AxKit2
view release on metacpan or search on metacpan
lib/AxKit2/XSP/TaglibHelper.pm view on Meta::CPAN
...you would get this XML result:
Hello, Joe!
<person>
<height>200</height>
<age>25</age>
<name>Bob</name></person>
If your function returned deeper result trees, with hashes containing
hashrefs or something similar, that would be handled fine. There are some
limitations with arrays, however, described in the BUGS AND LIMITATIONS
section.
=head1 STRUCTURED INPUT EXAMPLE
If you wish to send structured data (i.e. not just a scalar) to a taglib
function, use "*" instead of "$" for a variable. The input to a taglib
function specified as "insert_person($pid,*extra)" might be:
<test:insert-person pid="123">
<test:extra>
lib/AxKit2/XSP/TaglibHelper.pm view on Meta::CPAN
It would turn into this function call:
listbox("country", "Pick a Country", [
{ name => "Please choose a country", value => "" },
{ name => "United States", value => "" },
{ name => "Canada", value => "CA" },
], "", undef, undef, 1);
Hopefully the example is clear enough.
=head1 BUGS AND LIMITATIONS
Arrays and arrayrefs are generally difficult to work with because the
items within the array have no keys other than the index value. As a
result, if you want items within an array to be identified correctly,
you must currently make all array items point to a hashref that contains
the item's key or you must use the optional arguments to give TaglibHelper
enough "hints" to be able to represent the XML tree the way you want.
=head1 AUTHOR
( run in 0.236 second using v1.01-cache-2.11-cpan-4d50c553e7e )