Weasel::WidgetHandlers - Mapping elements to widget handlers
0.01
use Weasel::WidgetHandlers qw( register_widget_handler ); register_widget_handler( 'Weasel::Widgets::HTML::Radio', # Perl class handler 'HTML', # Widget group tag_name => 'input', attributes => { type => 'radio', }); register_widget_handler( 'Weasel::Widgets::Dojo::FilteringSelect', 'Dojo', tag_name => 'span', classes => ['dijitFilteringSelect'], attributes => { role => 'presentation', ... });
Registers $handler_class_name to be the instantiated widget returned for an element matching %conditions into $group_name.
$handler_class_name
%conditions
$group_name
Weasel::Session can select a subset of widgets to be applicable to that session by adding a subset of available groups to that session.
Weasel::Session
Returns the best matching handler's class name, within the groups listed in the arrayref $groups, or undef in case of no match.
$groups
undef
When $groups is undef, all registered handlers will be searched.
When multiple handlers are considered "best match", the one last added to the group last mentioned in $groups is selected.
Erik Huelsmann
Erik Huelsmann Yves Lavoie
Bugs can be filed in the GitHub issue tracker for the Weasel project: https://github.com/perl-weasel/weasel/issues
The source code repository for Weasel is at https://github.com/perl-weasel/weasel
Community support is available through perl-weasel@googlegroups.com.
(C) 2016 Erik Huelsmann
Licensed under the same terms as Perl.
To install Weasel, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Weasel
CPAN shell
perl -MCPAN -e shell install Weasel
For more information on module installation, please visit the detailed CPAN module installation guide.