HTML::Widget::Plugin::Struct - dump data structures for CGI::Expand expansion
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
COPYRIGHT AND LICENSE
This software is copyright (c) 2007 by Ricardo SIGNES.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.