{"id":7379,"date":"2022-12-20T19:37:53","date_gmt":"2022-12-20T22:37:53","guid":{"rendered":"http:\/\/lode.uno\/linux-man\/index.php\/2022\/12\/20\/mooseautobox-man3\/"},"modified":"2022-12-20T19:37:53","modified_gmt":"2022-12-20T22:37:53","slug":"mooseautobox-man3","status":"publish","type":"post","link":"https:\/\/lode.uno\/linux-man\/2022\/12\/20\/mooseautobox-man3\/","title":{"rendered":"Moose::Autobox (man3)"},"content":{"rendered":"<h1 align=\"center\">Moose::Autobox<\/h1>\n<p> <a href=\"#NAME\">NAME<\/a><br \/> <a href=\"#VERSION\">VERSION<\/a><br \/> <a href=\"#SYNOPSIS\">SYNOPSIS<\/a><br \/> <a href=\"#DESCRIPTION\">DESCRIPTION<\/a><br \/> <a href=\"#METHODS\">METHODS<\/a><br \/> <a href=\"#TODO\">TODO<\/a><br \/> <a href=\"#SUPPORT\">SUPPORT<\/a><br \/> <a href=\"#AUTHOR\">AUTHOR<\/a><br \/> <a href=\"#CONTRIBUTORS\">CONTRIBUTORS<\/a><br \/> <a href=\"#COPYRIGHT AND LICENSE\">COPYRIGHT AND LICENSE<\/a> <\/p>\n<hr>\n<h2>NAME <a name=\"NAME\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">Moose::Autobox \u2212 Autoboxed wrappers for Native Perl datatypes<\/p>\n<h2>VERSION <a name=\"VERSION\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">version 0.16<\/p>\n<h2>SYNOPSIS <a name=\"SYNOPSIS\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">use Moose::Autobox; <br \/> print &#8216;Print squares from 1 to 10 : &#8216;; <br \/> print [ 1 .. 10 ]\u2212>map(sub { $_ bodies manpages.csv script_extrae_body.sh script.sh usr $_ })\u2212>join(&#8216;, &#8216;);<\/p>\n<h2>DESCRIPTION <a name=\"DESCRIPTION\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">Moose::Autobox provides an implementation of <small>SCALAR, ARRAY, HASH &#038; CODE<\/small> for use with autobox. It does this using a hierarchy of roles in a manner similar to what Perl 6 <i>might<\/i> do. This module, like Class::MOP and Moose, was inspired by my work on the Perl 6 Object Space, and the \u2019core types\u2019 implemented there.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>A quick word about autobox<\/b> <br \/> The autobox module provides the ability for calling \u2019methods\u2019 on normal Perl values like Scalars, Arrays, Hashes and Code references. This gives the illusion that Perl\u2019s types are first-class objects. However, this is only an illusion, albeit a very nice one. I created this module because autobox itself does not actually provide an implementation for the Perl types but instead only provides the \u2019hooks\u2019 for others to add implementation too.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>Is this for real? or just play?<\/b> <br \/> Several people are using this module in serious applications and it seems to be quite stable. The underlying technologies of autobox and Moose::Role are also considered stable. There is some performance hit, but as I am fond of saying, nothing in life is free. Note that this hit only applies to the <i>use<\/i> of methods on native Perl values, not the mere act of loading this module in your namespace.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">If you have any questions regarding this module, either email me, or stop by #moose on irc.perl.org and ask around.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>Adding additional methods <br \/> Moose::Autobox<\/b> asks autobox to use the <b>Moose::Autobox::*<\/b> namespace prefix so as to avoid stepping on the toes of other autobox modules. This means that if you want to add methods to a particular perl type (i.e. \u2212 monkeypatch), then you must do this:<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">sub Moose::Autobox::SCALAR::bar { 42 }<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">instead of this:<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">sub SCALAR::bar { 42 }<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">as you would with vanilla autobox.<\/p>\n<h2>METHODS <a name=\"METHODS\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">&#8220;mixin_additional_role ($type, $role)&#8221;<\/p>\n<p style=\"margin-left:17%;\">This will mixin an additional $role into a certain $type. The types can be <small>SCALAR, ARRAY, HASH<\/small> or <small>CODE.<\/small><\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">This can be used to add additional methods to the types, see the <i>examples\/units\/<\/i> directory for some examples.<\/p>\n<h2>TODO <a name=\"TODO\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">More docs <br \/> More tests<\/p>\n<h2>SUPPORT <a name=\"SUPPORT\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">Bugs may be submitted through the <small>RT<\/small> bug tracker <https:\/\/rt.cpan.org\/Public\/Dist\/Display.html?Name=Moose-Autobox> (or bug\u2212Moose\u2212Autobox@rt.cpan.org <mailto:bug-Moose-Autobox@rt.cpan.org>).<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">There is also a mailing list available for users of this distribution, at <http:\/\/lists.perl.org\/list\/moose.html>.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">There is also an irc channel available for users of this distribution, at &#8220;#moose&#8221; on &#8220;irc.perl.org&#8221; <irc:\/\/irc.perl.org\/#moose>.<\/p>\n<h2>AUTHOR <a name=\"AUTHOR\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">Stevan Little <stevan.little@iinteractive.com><\/p>\n<h2>CONTRIBUTORS <a name=\"CONTRIBUTORS\"><\/a> <\/h2>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"68%\">\n<p style=\"margin-top: 1em\">Ricardo Signes <rjbs@cpan.org><\/p>\n<\/td>\n<td width=\"15%\"> <\/td>\n<\/tr>\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p>\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"68%\">\n<p>Karen Etheridge <ether@cpan.org><\/p>\n<\/td>\n<td width=\"15%\"> <\/td>\n<\/tr>\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p>\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"68%\">\n<p>Anders Nor Berle <berle@cpan.org><\/p>\n<\/td>\n<td width=\"15%\"> <\/td>\n<\/tr>\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p>\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"68%\">\n<p>Matt S Trout <mst@shadowcat.co.uk><\/p>\n<\/td>\n<td width=\"15%\"> <\/td>\n<\/tr>\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p>\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"68%\">\n<p>Steffen Schwigon <ss5@renormalist.net><\/p>\n<\/td>\n<td width=\"15%\"> <\/td>\n<\/tr>\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p>\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"68%\">\n<p>Michael Swearingen <mswearingen@gmail.com><\/p>\n<\/td>\n<td width=\"15%\"> <\/td>\n<\/tr>\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p>\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"68%\">\n<p>Florian Ragwitz <rafl@debian.org><\/p>\n<\/td>\n<td width=\"15%\"> <\/td>\n<\/tr>\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p>\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"68%\">\n<p>Jonathan Rockway <jon@jrock.us><\/p>\n<\/td>\n<td width=\"15%\"> <\/td>\n<\/tr>\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p>\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"68%\">\n<p>Shawn M Moore <sartak@gmail.com><\/p>\n<\/td>\n<td width=\"15%\"> <\/td>\n<\/tr>\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p>\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"68%\">\n<p>Todd Hepler <thepler@employees.org><\/p>\n<\/td>\n<td width=\"15%\"> <\/td>\n<\/tr>\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p>\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"68%\">\n<p>David Steinbrunner <dsteinbrunner@pobox.com><\/p>\n<\/td>\n<td width=\"15%\"> <\/td>\n<\/tr>\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p>\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"68%\">\n<p>Mike Whitaker <mike@altrion.org><\/p>\n<\/td>\n<td width=\"15%\"> <\/td>\n<\/tr>\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p>\u2022<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"68%\">\n<p>Nigel Gregoire <nigelgregoire@gmail.com><\/p>\n<\/td>\n<td width=\"15%\"> <\/td>\n<\/tr>\n<\/table>\n<h2>COPYRIGHT AND LICENSE <a name=\"COPYRIGHT AND LICENSE\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">This software is copyright (c) 2006 by Infinity Interactive, Inc.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">This is free software; you can redistribute it and\/or modify it under the same terms as the Perl 5 programming language system itself.<\/p>\n<hr>\n","protected":false},"excerpt":{"rendered":"<p>  Moose::Autobox \u2212 Autoboxed wrappers for Native Perl datatypes <\/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,3693],"class_list":["post-7379","post","type-post","status-publish","format-standard","hentry","category-sin-categoria","tag-man3","tag-mooseautobox"],"gutentor_comment":0,"_links":{"self":[{"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/posts\/7379","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=7379"}],"version-history":[{"count":0,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/posts\/7379\/revisions"}],"wp:attachment":[{"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/media?parent=7379"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/categories?post=7379"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/tags?post=7379"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}