HTML::Widget::Plugin::Struct - dump data structures for CGI::Expand expansion
$Id: /my/cs/projects/HTML-Widget-Plugin-Struct/trunk/lib/HTML/Widget/Plugin/Struct.pm 32001 2007-07-09T17:01:12.968562Z rjbs $
This plugin provides a means to dump a (somewhat) complex Perl data structure to hidden widgets which can then be reconstructed by CGI::Expand.
This plugin provides the following widgets: struct
struct is the only widget provided by this plugin. It accepts four arguments:
* name - the base name for the widget (required, will default to id if given) * id - the base id for the widget (optional) * class - a class to apply to each element generated (optional) * value - the structure to represent
The value can be an arbitrarily deep structure built from simple scalars, hash references, and array references. The inclusion of any other kind of data will cause an exception to be raised.
References which appear twice will be treated as multiple occurances of identical structures. It won't be possible to tell that they were originally references to the same datum. Any circularity in the structure will cause an exception to be raised.
* improve the test suite
Ricardo SIGNES <
rjbs @ cpan.org>
Copyright (C) 2007, Ricardo SIGNES. This is free software, released under the same terms as perl itself.