{"id":6755,"date":"2022-12-20T19:33:36","date_gmt":"2022-12-20T22:33:36","guid":{"rendered":"http:\/\/lode.uno\/linux-man\/index.php\/2022\/12\/20\/manatoolssharedactionsrole-man3\/"},"modified":"2022-12-20T19:33:36","modified_gmt":"2022-12-20T22:33:36","slug":"manatoolssharedactionsrole-man3","status":"publish","type":"post","link":"https:\/\/lode.uno\/linux-man\/2022\/12\/20\/manatoolssharedactionsrole-man3\/","title":{"rendered":"ManaTools::Shared::ActionsRole (man3)"},"content":{"rendered":"<h1 align=\"center\">ManaTools::Shared::ActionsRole<\/h1>\n<p> <a href=\"#NAME\">NAME<\/a><br \/> <a href=\"#SYNOPSIS package Foo;\">SYNOPSIS package Foo;<\/a><br \/> <a href=\"#DESCRIPTION\">DESCRIPTION<\/a><br \/> <a href=\"#SUPPORT\">SUPPORT<\/a><br \/> <a href=\"#AUTHOR\">AUTHOR<\/a><br \/> <a href=\"#COPYRIGHT and LICENSE\">COPYRIGHT and LICENSE<\/a><br \/> <a href=\"#METHODS\">METHODS<\/a> <\/p>\n<hr>\n<h2>NAME <a name=\"NAME\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">ManaTools::Shared::ActionsRole \u2212 a Actions Moose::Role<\/p>\n<h2>SYNOPSIS package Foo; <a name=\"SYNOPSIS package Foo;\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">with &#8216;ManaTools::Shared::ActionsRole&#8217;; <br \/> 1; <br \/> &#8230; <br \/> my $f = Foo\u2212>new(); <br \/> my @actionnames = $f\u2212>get_actions(); <br \/> $f\u2212>add_action(&#8216;aname&#8217;, &#8216;a label&#8217;, $item, sub { my $self = shift; my @params = @_; &#8230; ; return &#8216;foo&#8217;; }, sub { return 1; }); <br \/> my $res = $f\u2212>act(&#8216;aname&#8217;, &#8216;param1&#8217;, &#8216;param2&#8217;, @params); <br \/> $f\u2212>remove_action(&#8216;aname&#8217;);<\/p>\n<h2>DESCRIPTION <a name=\"DESCRIPTION\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">This Role is a collection of Actions<\/p>\n<h2>SUPPORT <a name=\"SUPPORT\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">You can find documentation for this Role with the perldoc command: <br \/> perldoc ManaTools::Shared::ActionsRole<\/p>\n<h2>AUTHOR <a name=\"AUTHOR\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">Maarten Vanraes <alien@rmail.be><\/p>\n<h2>COPYRIGHT and LICENSE <a name=\"COPYRIGHT and LICENSE\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">Copyright (c) 2015 Maarten Vanraes <alien@rmail.be><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">This program is free software; you can redistribute it and\/or modify it under the terms of the <small>GNU<\/small> General Public License version 2, as published by the Free Software Foundation.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">This program is distributed in the hope that it will be useful, but <small>WITHOUT ANY WARRANTY<\/small> ; without even the implied warranty of <small>MERCHANTABILITY<\/small> or <small>FITNESS FOR A PARTICULAR PURPOSE.<\/small> See the <small>GNU<\/small> General Public License for more details.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">You should have received a copy of the <small>GNU<\/small> General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place \u2212 Suite 330, Boston, <small>MA 02111\u22121307, USA.<\/small><\/p>\n<h2>METHODS <a name=\"METHODS\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>get_actions<\/b> <i><small><br \/> OUTPUT<\/small><\/i><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">array of string<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><i><small>DESCRIPTION<\/small><\/i><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">this method returns a list of action names<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>act<\/b> <i><small><br \/> INPUT<\/small><\/i><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">$key: string <br \/> optional action parameters<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><i><small>OUTPUT<\/small><\/i><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">return value of the action<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><i><small>DESCRIPTION<\/small><\/i><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">this method calls an action<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>add_action<\/b> <i><small><br \/> INPUT<\/small><\/i><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">$name: Str <br \/> $label: Str <br \/> $action: CodeRef <br \/> $valid: CodeRef<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><i><small>DESCRIPTION<\/small><\/i><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">this method adds an action<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>remove_action<\/b> <i><small><br \/> INPUT<\/small><\/i><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">$key: string<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><i><small>DESCRIPTION<\/small><\/i><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">this method removes an action<\/p>\n<hr>\n","protected":false},"excerpt":{"rendered":"<p>  ManaTools::Shared::ActionsRole \u2212 a Actions Moose::Role <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[3007,3127],"class_list":["post-6755","post","type-post","status-publish","format-standard","hentry","category-sin-categoria","tag-man3","tag-manatoolssharedactionsrole"],"gutentor_comment":0,"_links":{"self":[{"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/posts\/6755","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/comments?post=6755"}],"version-history":[{"count":0,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/posts\/6755\/revisions"}],"wp:attachment":[{"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/media?parent=6755"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/categories?post=6755"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/tags?post=6755"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}