Akopia Akopia Services

[Date Prev][Date Next][Thread Prev][Thread Next][Minivend by date ][Minivend by thread ]

[mv] 4.02 How to use: uneval and uneval_it



******    message to minivend-users from "Ton Verhagen" <ton@verhagen.net>     ******

Hi
I am struggling with the 'uneval' and 'uneval_it' routines/tags.
What I would like to do is to "uneval" a data structure and store
it in a table field or in a file (should use Storable,
Data::Dumper if installed). Basically it is the same thing as how
sessions and the address books are stored.

I have tried the following (on a page inside [perl] tags):

[perl]
# -1- Initialize an anonymous hash, for example:
my $hr = {
    cat => "Lilo",
    dog => "Boris",
    amounts => [ 300, 400, 700, [120, 345, 789], 10, 12],
    anotherkey1 =>

          k1 => "hello",
          k2 => "world",
          k3 => 55,
          k4 => [10, 20, 30],
   },
   anotherkey2 => 650,
};

# -2- Feed the hash ref to the uneval usertag
# (in mmtags.cfg)
my $result = $Tag->uneval($hr);
[/perl]

After doing so, $result will contain: "" (two quotes)
Why???

Other things I have tried are:
- calling the uneval routine in Vend::Util
- calling the uneval_it routine in Vend::Util
No succes either.
(BTW, what is the exact syntax for doing this on a page and/or in
a usertag?)

Sorry, but I am a bit lost. Probably I have overlooked something
very obvious, but I can't see what it could be.  Any ideas or
pointers?

Many Thanks!!

Ton


-
To unsubscribe from the list, DO NOT REPLY to this message.  Instead, send
email with 'UNSUBSCRIBE minivend-users' in the body to Majordomo@minivend.com.
Archive of past messages: http://www.minivend.com/minivend/minivend-list


Search for: Match: Format: Sort by: