ManaTools::Shared::ActionsRole - a Actions Moose::Role
with 'ManaTools::Shared::ActionsRole'; 1; ... my $f = Foo->new(); my @actionnames = $f->get_actions(); $f->add_action('aname', 'a label', $item, sub { my $self = shift; my @params = @_; ... ; return 'foo'; }, sub { return 1; }); my $res = $f->act('aname', 'param1', 'param2', @params); $f->remove_action('aname');
This Role is a collection of Actions
You can find documentation for this Role with the perldoc command: perldoc ManaTools::Shared::ActionsRole
Maarten Vanraes <alien@rmail.be>
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2, as published by the Free Software Foundation.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
array of string
DESCRIPTION
this method returns a list of action names
$key: string optional action parameters
OUTPUT
return value of the action
DESCRIPTION
this method calls an action
$name: Str $label: Str $action: CodeRef $valid: CodeRef
DESCRIPTION
this method adds an action
$key: string
DESCRIPTION
this method removes an action