Reaction::UI::WidgetClass - Create a new widget class
Turns the importing package into a widget class. It will export:
It will also set the value of default_base as new superclass. The default is Reaction::UI::Widget.
default_base
Reaction::UI::Widget
over $collection
Used in combination with "render" to render a fragment for a series of values:
render fragment_name => over [1, 2, 3];
render $fragment_name; render $fragment_name, $over;
With only the fragment name as argument, it renders that fragment. If an $over collection is specified with the "over" keyword, the fragment is rendered once for every value in the collection. The value will be accessible in the topic argument _.
$over
_
arg $arg_name, $arg_value;
Sets the fragment argument $arg_name to $arg_value;
$arg_name
$arg_value
localize $value;
Calls the view's localize method to localize the passed value.
localize
call_next;
Calls the parent fragment.
event_id $event_name;
Fetches the event id for the event $event_name from the viewport via its event_id_for method.
$event_name
event_id_for
event_uri \%events;
Returns an URI object with the event ids corresponding to the keys in the %events argument and the values being the values of the hash reference.
%events
attrs \%attrs;
Builds a string of rendered element attributes out of the %attrs hash reference argument.
%attrs
implements fragment foo { ... }; implements bar => sub { ... };
Implements a method or a fragment in the widget class.
fragment foo { ... };
Creates a new fragment named foo with a implementation in the block.
foo
See Reaction::Class for authors.
See Reaction::Class for the license.
To install Reaction, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Reaction
CPAN shell
perl -MCPAN -e shell install Reaction
For more information on module installation, please visit the detailed CPAN module installation guide.