{"id":6637,"date":"2022-12-20T19:19:30","date_gmt":"2022-12-20T22:19:30","guid":{"rendered":"http:\/\/lode.uno\/linux-man\/index.php\/2022\/12\/20\/manatoolsmodule-man3\/"},"modified":"2022-12-20T19:19:30","modified_gmt":"2022-12-20T22:19:30","slug":"manatoolsmodule-man3","status":"publish","type":"post","link":"https:\/\/lode.uno\/linux-man\/2022\/12\/20\/manatoolsmodule-man3\/","title":{"rendered":"ManaTools::Module (man3)"},"content":{"rendered":"<h1 align=\"center\">ManaTools::Module<\/h1>\n<p> <a href=\"#Attributes \u2212 Optional constructor parameters\">Attributes \u2212 Optional constructor parameters<\/a><br \/> <a href=\"#SUBROUTINES\/METHODS\">SUBROUTINES\/METHODS<\/a> <\/p>\n<hr>\n<h2>Attributes \u2212 Optional constructor parameters <a name=\"Attributes \u2212 Optional constructor parameters\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>icon<\/b> <br \/> icon attribute defines the Module icon, override this <br \/> attribute by using <br \/> has &#8216;+icon&#8217; => ( <br \/> &#8230; <br \/> ) <br \/> into your module implementation.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>name<\/b> <br \/> name attribute defines the Module name, override this <br \/> attribute by using <br \/> has &#8216;+name&#8217; => ( <br \/> &#8230; <br \/> ) <br \/> into your module implementation.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>title<\/b> <br \/> title attribute defines the Module title, override this <br \/> attribute by using <br \/> has &#8216;+title&#8217; => ( <br \/> &#8230; <br \/> ) <br \/> into your module implementation.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>launch<\/b> <br \/> launch attribute defines the Module as external command <br \/> to be run, pass this attribute to the &#8220;create&#8221; to set it.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>loc<\/b> <br \/> loc attribute defines localization object that uses &#8220;manatools&#8221; <br \/> domain as default. (see ManaTools::Shared::Locales for details). <br \/> To use your own Module domain, override this attribute by using <br \/> has &#8216;+loc&#8217; => ( <br \/> &#8230; <br \/> ) <br \/> or assign it again to your ManaTools::Shared::Locales object into <br \/> the extension module implementation.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>logger<\/b> <br \/> logger attribute defines logging object that uses the loc attribute <br \/> and goes to Syslog. (see ManaTools::Shared::Logging for details). <br \/> You can use this attribute to log various messages: <br \/> $log\u2212>D(&#8220;debugstuff: %s&#8221;, $somestring); <br \/> $log\u2212>I(&#8220;infostuff: %s&#8221;, $somestring); <br \/> $log\u2212>W(&#8220;warnstuff: %s&#8221;, $somestring); <br \/> $log\u2212>E(&#8220;errorstuff: %s&#8221;, $somestring); <br \/> if you wish to trace (goes to STDERR): <br \/> $log\u2212>trace(1);<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>commandline<\/b> <br \/> commandline attribute defines the given command line, if <br \/> \u2212\u2212help is passed help message is shown and the module is not <br \/> loaded. <br \/> See ManaTools::Shared::GUI::CommandLine for details and usage.<\/p>\n<h2>SUBROUTINES\/METHODS <a name=\"SUBROUTINES\/METHODS\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>create<\/b> <i><small><br \/> INPUT<\/small><\/i><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">%params: moudule extension construtcor parameters <br \/> \u2212\u2212CLASS <name> name of the Class module extension name <br \/> in the case of acting as a launcher mandatory parameters <br \/> are name, icon and launch (see Attributes section of <br \/> this manual)<\/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\">returns a Module instance, such as a module launcher <br \/> (this object) or an extension of this class<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><b><small>BUILD<\/small><\/b> <small><i><br \/> INPUT<\/i><\/small><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">$self: this object<\/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\">The BUILD method is called after a Moose object is created, <br \/> base Module class sets title and icon<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>setButton<\/b> <i><small><br \/> INPUT<\/small><\/i><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">$self: this object <br \/> $button: yui push button to be assigned to this module<\/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 assignes a button to this module<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>removeButton<\/b> <i><small><br \/> INPUT<\/small><\/i><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">$self: this object<\/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 remove the assigned button from this module<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>start<\/b> <i><small><br \/> INPUT<\/small><\/i><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">$self: this object<\/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 is the base class launcher that runs an external <br \/> module, defined in launch attribute.<\/p>\n<hr>\n","protected":false},"excerpt":{"rendered":"<p>ManaTools::Module Attributes \u2212 Optional constructor parameters SUBROUTINES\/METHODS Attributes \u2212 Optional constructor parameters icon icon attribute defines the Module icon, override this attribute by using has &#8216;+icon&#8217; => ( &#8230; ) into your module implementation. name name attribute defines the Module name, override this attribute by using has &#8216;+name&#8217; => ( &#8230; ) into your module [&hellip;]<\/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,3018],"class_list":["post-6637","post","type-post","status-publish","format-standard","hentry","category-sin-categoria","tag-man3","tag-manatoolsmodule"],"gutentor_comment":0,"_links":{"self":[{"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/posts\/6637","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=6637"}],"version-history":[{"count":0,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/posts\/6637\/revisions"}],"wp:attachment":[{"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/media?parent=6637"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/categories?post=6637"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/tags?post=6637"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}