For more information... RTFM!
NAVIGATION
PAGES THAT LINK HERE
ACCOUNT LOGIN

You are not logged in

Powered by Interchange version 5.7.0

uneval

Create a string representation of a Perl hash/array, or an Interchange $Session hash key.

Summary

  • [uneval name ref]

Parameter Description Default
name A $Session hash key to convert. None
ref A Perl hashref/arrayref to convert. None

Examples

Tag expansion example

[calcn]
    $someref = {
        foo => [ 'bar', 'baz' ],
    };
    undef;
[/calcn]

[uneval ref=`$someref`]

Perl examples

Perl reference:

$Tag->uneval({
    ref => $someref,
});

or $Session hash key:

$Tag->uneval({
    name => 'carts',
});

or similarly with positional parameters.  Perl reference:

$Tag->uneval(undef, $someref);

or $Session hash key:

$Tag->uneval($name);

The following is more efficient than calling $Tag->uneval(), for Perl array/hash references, and yields the same result:

[calcn]
    $someref = {
        foo => [ 'bar', 'baz' ],
    };
    uneval($someref);
[/calcn]

See the Interchange Perl objects documentation for more information.

Description

This tag encodes a Perl hash/array reference into a string representation of the code used to build the reference.

You can supply either a reference to an arbitrary Perl hash or array, or the name of key in the $Session hash.

Parameters

name

The name of a key in the $Session hash.

ref

A reference to an arbitrary Perl hash or array.

Category:  Interchange tags
Last modified by: Kevin Walsh
Modification date: Thursday 13 September 2007 at 2:23 PM (CDT)
Home  |  Legal nonsense  |  Privacy policy  |  Donations  |  Contact us