Moose-Autobox-0.16/000755 000766 000024 00000000000 12711777774 014440 5ustar00etherstaff000000 000000 Moose-Autobox-0.16/Build.PL000644 000766 000024 00000007661 12711777774 015746 0ustar00etherstaff000000 000000 # This Build.PL for Moose-Autobox was generated by # Dist::Zilla::Plugin::ModuleBuildTiny::Fallback 0.023 use strict; use warnings; my %configure_requires = ( 'Module::Build::Tiny' => '0.034', ); my %errors = map { eval "require $_; $_->VERSION($configure_requires{$_}); 1"; $_ => $@, } keys %configure_requires; if (!grep { $_ } values %errors) { # This section for Moose-Autobox was generated by Dist::Zilla::Plugin::ModuleBuildTiny 0.014. use strict; use warnings; use 5.006; # use Module::Build::Tiny 0.034; Module::Build::Tiny::Build_PL(); } else { if (not $ENV{PERL_MB_FALLBACK_SILENCE_WARNING}) { warn <<'EOW' *** WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING *** If you're seeing this warning, your toolchain is really, really old* and you'll almost certainly have problems installing CPAN modules from this century. But never fear, dear user, for we have the technology to fix this! If you're using CPAN.pm to install things, then you can upgrade it using: cpan CPAN If you're using CPANPLUS to install things, then you can upgrade it using: cpanp CPANPLUS If you're using cpanminus, you shouldn't be seeing this message in the first place, so please file an issue on github. This public service announcement was brought to you by the Perl Toolchain Gang, the irc.perl.org #toolchain IRC channel, and the number 42. ---- * Alternatively, you are running this file manually, in which case you need to learn to first fulfill all configure requires prerequisites listed in META.yml or META.json -- or use a cpan client to install this distribution. You can also silence this warning for future installations by setting the PERL_MB_FALLBACK_SILENCE_WARNING environment variable, but please don't do that until you fix your toolchain as described above. Errors from configure prereqs: EOW . do { require Data::Dumper; Data::Dumper->new([ \%errors ])->Indent(2)->Terse(1)->Sortkeys(1)->Dump; }; sleep 10 if -t STDIN && (-t STDOUT || !(-f STDOUT || -c STDOUT)); } # This section was automatically generated by Dist::Zilla::Plugin::ModuleBuild v6.003. use strict; use warnings; require Module::Build; Module::Build->VERSION(0.28); my %module_build_args = ( "configure_requires" => { "Module::Build::Tiny" => "0.034", "perl" => "5.006" }, "dist_abstract" => "Autoboxed wrappers for Native Perl datatypes", "dist_author" => [ "Stevan Little " ], "dist_name" => "Moose-Autobox", "dist_version" => "0.16", "license" => "perl", "module_name" => "Moose::Autobox", "recursive_test_files" => 1, "requires" => { "Carp" => 0, "Data::Dumper" => 0, "List::MoreUtils" => "0.07", "Moose" => "0.42", "Moose::Role" => 0, "Moose::Util" => 0, "Scalar::Util" => 0, "Syntax::Keyword::Junction::All" => 0, "Syntax::Keyword::Junction::Any" => 0, "Syntax::Keyword::Junction::None" => 0, "Syntax::Keyword::Junction::One" => 0, "autobox" => "2.23", "metaclass" => 0, "namespace::autoclean" => 0, "parent" => 0, "perl" => "5.006", "strict" => 0, "warnings" => 0 }, "test_requires" => { "File::Spec" => 0, "Module::Metadata" => 0, "Test::Exception" => 0, "Test::More" => 0, "perl" => "5.006" } ); my %fallback_build_requires = ( "File::Spec" => 0, "Module::Metadata" => 0, "Test::Exception" => 0, "Test::More" => 0, "perl" => "5.006" ); unless ( eval { Module::Build->VERSION(0.4004) } ) { delete $module_build_args{test_requires}; $module_build_args{build_requires} = \%fallback_build_requires; } my $build = Module::Build->new(%module_build_args); $build->create_build_script; } Moose-Autobox-0.16/Changes000600 000766 000024 00000006237 12711777774 015733 0ustar00etherstaff000000 000000 Revision history for Moose-Autobox 0.16 2016-05-03 01:33:43Z - explicitly depend on List::MoreUtils (Nigel Gregoire, PR#2) 0.15 2013-10-28 01:59:43Z - hide internal packages from PAUSE - point repo/bugtracker at GitHub 0.14 2013-10-28 01:59:43Z - typo fixes (dsteinbrunner) - repackage to drop MYMETA files - stop using 'use_ok' in tests 0.13 2012-08-29 13:56:58Z - switch from Perl6::Junction to Syntax::Keyword::Junction (rjbs) 0.12 2012-03-20 - replace "use base" with "use parent" 0.11 2010-03-23 - add each_n_values to Indexed (rafl and rjbs) - add first and last to Scalar and Array (t0m) 0.10 2009-10-12 - add each, each_key, each_value to Indexed (array and hash) (rjbs) - add split, words, lines to String (Sartak) - add 'to' to Number (Debolaz) 0.09 2008-10-23 - update Perl6::Junction dependency and support new version 0.08 2008-05-12 - add flatten method to Array and Hash - upped the dependency on autobox from 1.22 to 2.23 at the suggestion of chocolateboy - might as well up the Moose dependency too. 0.07 2008-04-28 ~~ no more Module::Build, thanks mst ~~ * Moose::Autobox - added documentation about how to extend the autoboxed types (RT #34315) * Moose::Autobox::Hash Moose::Autobox::Indexed - added support for slice and hslice (jrockway) - added tests for this 0.06 2008-01-22 ~~ updated copyright dates & some docs ~~ * Moose::Autobox - fixed role application code to follow the new Moose::Util based API - upped the Moose version dependency - upped the autobox version dependency 0.05 2007-08-05 * Moose::Autobox - fixed loading approach so that Moose::Object doesn't end up in isa (thanks to mst) 0.04 2007-05-31 * Moose::Autobox::Hash - added method for shallow hash merging * Moose::Autobox::String - fixed rindex method * Moose::Autobox::Item - moved &dump from ::Ref to ::Item, so that it can be used for the other types too - added &perl method which is an alias for &dump for symmetry with Perl6's .perl * Moose::Autobox::Scalar/Array/Hash - added &print/&say to SCALAR, ARRAY and HASH 0.03 2006-08-17 * Moose::Autobox - we now inherit from autobox, now we don't have to do that ugly eval thing or manually load autobox when we want to use this module. - added &mixin_additional_role to allow mixing in of additional functionality (see examples/unit/*) * Moose::Autobox::Code - added the Y and U combinators + added new examples for units - ported from the Pugs examples/units directory 0.02 2006-06-24 - fixed Moose::Autobox so that PAUSE won't try to index SCALAR, ARRAY, HASH and CODE. - added examples/ directory - ported tic-tac-toe from the Pugs examples * Moose::Autobox::Ref - added &dump method which will use Data::Dumper to return a dumped representation of the ref * Moose::Autobox::Array - added Junctions support with Perl6::Junction 0.01 2006-06-09 - Autoboxing, all the cool kids are doing it ;) Moose-Autobox-0.16/CONTRIBUTING000644 000766 000024 00000007462 12711777774 016303 0ustar00etherstaff000000 000000 CONTRIBUTING Thank you for considering contributing to this distribution. This file contains instructions that will help you work with the source code. PLEASE NOTE that if you have any questions or difficulties, you can reach the maintainer(s) through the bug queue described later in this document (preferred), or by emailing the releaser directly. You are not required to follow any of the steps in this document to submit a patch or bug report; these are just recommendations, intended to help you (and help us help you faster). This distribution has a TODO file in the repository; you may want to check there to see if your issue or patch idea is mentioned. The distribution is managed with Dist::Zilla (https://metacpan.org/release/Dist-Zilla). This means than many of the usual files you might expect are not in the repository, but are generated at release time (e.g. Makefile.PL). However, you can run tests directly using the 'prove' tool: $ prove -l $ prove -lv t/some_test_file.t $ prove -lvr t/ In most cases, 'prove' is entirely sufficent for you to test any patches you have. You may need to satisfy some dependencies. The easiest way to satisfy dependencies is to install the last release -- this is available at https://metacpan.org/release/Moose-Autobox If you use cpanminus, you can do it without downloading the tarball first: $ cpanm --reinstall --installdeps --with-recommends Moose::Autobox Dist::Zilla is a very powerful authoring tool, but requires a number of author-specific plugins. If you would like to use it for contributing, install it from CPAN, then run one of the following commands, depending on your CPAN client: $ cpan `dzil authordeps --missing` or $ dzil authordeps --missing | cpanm You should then also install any additional requirements not needed by the dzil build but may be needed by tests or other development: $ cpan `dzil listdeps --author --missing` or $ dzil listdeps --author --missing | cpanm Or, you can use the 'dzil stale' command to install all requirements at once: $ cpan Dist::Zilla::App::Command::stale $ cpan `dzil stale --all` or $ cpanm Dist::Zilla::App::Command::stale $ dzil stale --all | cpanm You can also do this via cpanm directly: $ cpanm --reinstall --installdeps --with-develop --with-recommends Moose::Autobox Once installed, here are some dzil commands you might try: $ dzil build $ dzil test $ dzil test --release $ dzil xtest $ dzil listdeps --json $ dzil build --notgz You can learn more about Dist::Zilla at http://dzil.org/. The code for this distribution is hosted at GitHub. The repository is: https://github.com/moose/Moose-Autobox You can submit code changes by forking the repository, pushing your code changes to your clone, and then submitting a pull request. Detailed instructions for doing that is available here: https://help.github.com/articles/creating-a-pull-request If you have found a bug, but do not have an accompanying patch to fix it, you can submit an issue report here: https://rt.cpan.org/Public/Dist/Display.html?Name=Moose-Autobox or via email: bug-Moose-Autobox@rt.cpan.org There is also a mailing list available for users of this distribution, at http://lists.perl.org/list/moose.html There is also an irc channel available for users of this distribution, at irc://irc.perl.org/#moose If you send me a patch or pull request, your name and email address will be included in the documentation as a contributor (using the attribution on the commit or patch), unless you specifically request for it not to be. If you wish to be listed under a different name or address, you should submit a pull request to the .mailmap file to contain the correct mapping. This file was generated via Dist::Zilla::Plugin::GenerateFile::FromShareDir 0.009 from a template file originating in Dist-Zilla-PluginBundle-Author-ETHER-0.114. Moose-Autobox-0.16/dist.ini000644 000766 000024 00000001554 12711777774 016111 0ustar00etherstaff000000 000000 name = Moose-Autobox author = Stevan Little copyright_holder = Infinity Interactive, Inc. copyright_year = 2006 license = Perl_5 [@Author::ETHER] :version = 0.103 changes_version_columns = 6 Authority.authority = cpan:STEVAN Test::CleanNamespaces.skip = Moose::Autobox::Undef ; autobox::__ANON__ Test::MinimumVersion.max_target_perl = 5.008003 -remove = Test::Pod::No404s ; temporary? "recursive lambda forms" ruby talk is 404ing PodWeaver.finder[0] = :InstallModules ; default PodWeaver.finder[1] = :ExecFiles ; default PodWeaver.finder[2] = @Author::ETHER/Examples [MetaResources] x_IRC = irc://irc.perl.org/#moose x_MailingList = http://lists.perl.org/list/moose.html [Test::CheckBreaks] conflicts_module = Moose::Conflicts [Prereqs / RuntimeRequires] autobox = 2.23 Moose = 0.42 Moose-Autobox-0.16/examples/000755 000766 000024 00000000000 12711777774 016256 5ustar00etherstaff000000 000000 Moose-Autobox-0.16/INSTALL000644 000766 000024 00000001711 12711777774 015471 0ustar00etherstaff000000 000000 This is the Perl distribution Moose-Autobox. Installing Moose-Autobox is straightforward. ## Installation with cpanm If you have cpanm, you only need one line: % cpanm Moose::Autobox If you are installing into a system-wide directory, you may need to pass the "-S" flag to cpanm, which uses sudo to install the module: % cpanm -S Moose::Autobox ## Installing with the CPAN shell Alternatively, if your CPAN shell is set up, you should just be able to do: % cpan Moose::Autobox ## Manual installation As a last resort, you can manually install it. Download the tarball, untar it, then build it: % perl Build.PL % ./Build && ./Build test Then install it: % ./Build install If you are installing into a system-wide directory, you may need to run: % sudo ./Build install ## Documentation Moose-Autobox documentation is available as POD. You can run perldoc from a shell to read the documentation: % perldoc Moose::Autobox Moose-Autobox-0.16/lib/000755 000766 000024 00000000000 12711777774 015206 5ustar00etherstaff000000 000000 Moose-Autobox-0.16/LICENSE000644 000766 000024 00000043724 12711777774 015457 0ustar00etherstaff000000 000000 This software is copyright (c) 2006 by Infinity Interactive, Inc. This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. Terms of the Perl programming language system itself a) the GNU General Public License as published by the Free Software Foundation; either version 1, or (at your option) any later version, or b) the "Artistic License" --- The GNU General Public License, Version 1, February 1989 --- This software is Copyright (c) 2006 by Infinity Interactive, Inc. This is free software, licensed under: The GNU General Public License, Version 1, February 1989 GNU GENERAL PUBLIC LICENSE Version 1, February 1989 Copyright (C) 1989 Free Software Foundation, Inc. 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The license agreements of most software companies try to keep users at the mercy of those companies. By contrast, our General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. The General Public License applies to the Free Software Foundation's software and to any other program whose authors commit to using it. You can use it for your programs, too. When we speak of free software, we are referring to freedom, not price. Specifically, the General Public License is designed to make sure that you have the freedom to give away or sell copies of free software, that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things. To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it. For example, if you distribute copies of a such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must tell them their rights. We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software. Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations. The precise terms and conditions for copying, distribution and modification follow. GNU GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License Agreement applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any work containing the Program or a portion of it, either verbatim or with modifications. Each licensee is addressed as "you". 1. You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this General Public License and to the absence of any warranty; and give any other recipients of the Program a copy of this General Public License along with the Program. You may charge a fee for the physical act of transferring a copy. 2. You may modify your copy or copies of the Program or any portion of it, and copy and distribute such modifications under the terms of Paragraph 1 above, provided that you also do the following: a) cause the modified files to carry prominent notices stating that you changed the files and the date of any change; and b) cause the whole of any work that you distribute or publish, that in whole or in part contains the Program or any part thereof, either with or without modifications, to be licensed at no charge to all third parties under the terms of this General Public License (except that you may choose to grant warranty protection to some or all third parties, at your option). c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the simplest and most usual way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this General Public License. d) You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. Mere aggregation of another independent work with the Program (or its derivative) on a volume of a storage or distribution medium does not bring the other work under the scope of these terms. 3. You may copy and distribute the Program (or a portion or derivative of it, under Paragraph 2) in object code or executable form under the terms of Paragraphs 1 and 2 above provided that you also do one of the following: a) accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Paragraphs 1 and 2 above; or, b) accompany it with a written offer, valid for at least three years, to give any third party free (except for a nominal charge for the cost of distribution) a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Paragraphs 1 and 2 above; or, c) accompany it with the information you received as to where the corresponding source code may be obtained. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form alone.) Source code for a work means the preferred form of the work for making modifications to it. For an executable file, complete source code means all the source code for all modules it contains; but, as a special exception, it need not include source code for modules which are standard libraries that accompany the operating system on which the executable file runs, or for standard header files or definitions files that accompany that operating system. 4. You may not copy, modify, sublicense, distribute or transfer the Program except as expressly provided under this General Public License. Any attempt otherwise to copy, modify, sublicense, distribute or transfer the Program is void, and will automatically terminate your rights to use the Program under this License. However, parties who have received copies, or rights to use copies, from you under this General Public License will not have their licenses terminated so long as such parties remain in full compliance. 5. By copying, distributing or modifying the Program (or any work based on the Program) you indicate your acceptance of this license to do so, and all its terms and conditions. 6. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. 7. The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies a version number of the license which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of the license, you may choose any version ever published by the Free Software Foundation. 8. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY 9. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 10. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS Appendix: How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to humanity, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) 19yy This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 1, or (at your option) any later version. 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., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA Also add information on how to contact you by electronic and paper mail. If the program is interactive, make it output a short notice like this when it starts in an interactive mode: Gnomovision version 69, Copyright (C) 19xx name of author Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, the commands you use may be called something other than `show w' and `show c'; they could even be mouse-clicks or menu items--whatever suits your program. You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the program, if necessary. Here a sample; alter the names: Yoyodyne, Inc., hereby disclaims all copyright interest in the program `Gnomovision' (a program to direct compilers to make passes at assemblers) written by James Hacker. , 1 April 1989 Ty Coon, President of Vice That's all there is to it! --- The Artistic License 1.0 --- This software is Copyright (c) 2006 by Infinity Interactive, Inc. This is free software, licensed under: The Artistic License 1.0 The Artistic License Preamble The intent of this document is to state the conditions under which a Package may be copied, such that the Copyright Holder maintains some semblance of artistic control over the development of the package, while giving the users of the package the right to use and distribute the Package in a more-or-less customary fashion, plus the right to make reasonable modifications. Definitions: - "Package" refers to the collection of files distributed by the Copyright Holder, and derivatives of that collection of files created through textual modification. - "Standard Version" refers to such a Package if it has not been modified, or has been modified in accordance with the wishes of the Copyright Holder. - "Copyright Holder" is whoever is named in the copyright or copyrights for the package. - "You" is you, if you're thinking about copying or distributing this Package. - "Reasonable copying fee" is whatever you can justify on the basis of media cost, duplication charges, time of people involved, and so on. (You will not be required to justify it to the Copyright Holder, but only to the computing community at large as a market that must bear the fee.) - "Freely Available" means that no fee is charged for the item itself, though there may be fees involved in handling the item. It also means that recipients of the item may redistribute it under the same conditions they received it. 1. You may make and give away verbatim copies of the source form of the Standard Version of this Package without restriction, provided that you duplicate all of the original copyright notices and associated disclaimers. 2. You may apply bug fixes, portability fixes and other modifications derived from the Public Domain or from the Copyright Holder. A Package modified in such a way shall still be considered the Standard Version. 3. You may otherwise modify your copy of this Package in any way, provided that you insert a prominent notice in each changed file stating how and when you changed that file, and provided that you do at least ONE of the following: a) place your modifications in the Public Domain or otherwise make them Freely Available, such as by posting said modifications to Usenet or an equivalent medium, or placing the modifications on a major archive site such as ftp.uu.net, or by allowing the Copyright Holder to include your modifications in the Standard Version of the Package. b) use the modified Package only within your corporation or organization. c) rename any non-standard executables so the names do not conflict with standard executables, which must also be provided, and provide a separate manual page for each non-standard executable that clearly documents how it differs from the Standard Version. d) make other distribution arrangements with the Copyright Holder. 4. You may distribute the programs of this Package in object code or executable form, provided that you do at least ONE of the following: a) distribute a Standard Version of the executables and library files, together with instructions (in the manual page or equivalent) on where to get the Standard Version. b) accompany the distribution with the machine-readable source of the Package with your modifications. c) accompany any non-standard executables with their corresponding Standard Version executables, giving the non-standard executables non-standard names, and clearly documenting the differences in manual pages (or equivalent), together with instructions on where to get the Standard Version. d) make other distribution arrangements with the Copyright Holder. 5. You may charge a reasonable copying fee for any distribution of this Package. You may charge any fee you choose for support of this Package. You may not charge a fee for this Package itself. However, you may distribute this Package in aggregate with other (possibly commercial) programs as part of a larger (possibly commercial) software distribution provided that you do not advertise this Package as a product of your own. 6. The scripts and library files supplied as input to or produced as output from the programs of this Package do not automatically fall under the copyright of this Package, but belong to whomever generated them, and may be sold commercially, and may be aggregated with this Package. 7. C or perl subroutines supplied by you and linked into this Package shall not be considered part of this Package. 8. The name of the Copyright Holder may not be used to endorse or promote products derived from this software without specific prior written permission. 9. THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. The End Moose-Autobox-0.16/Makefile.PL000644 000766 000024 00000007403 12711777774 016416 0ustar00etherstaff000000 000000 # This Makefile.PL for Moose-Autobox was generated by # Dist::Zilla::Plugin::MakeMaker::Fallback 0.022 # and Dist::Zilla::Plugin::MakeMaker::Awesome 0.38. # Don't edit it but the dist.ini and plugins used to construct it. use strict; use warnings; use 5.006; use ExtUtils::MakeMaker; BEGIN { my %configure_requires = ( 'Module::Build::Tiny' => '0.034', ); my @missing = grep { ! eval "require $_; $_->VERSION($configure_requires{$_}); 1" } keys %configure_requires; if (@missing) { if (not $ENV{PERL_MM_FALLBACK_SILENCE_WARNING}) { warn <<'EOW'; *** WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING *** If you're seeing this warning, your toolchain is really, really old* and you'll almost certainly have problems installing CPAN modules from this century. But never fear, dear user, for we have the technology to fix this! If you're using CPAN.pm to install things, then you can upgrade it using: cpan CPAN If you're using CPANPLUS to install things, then you can upgrade it using: cpanp CPANPLUS If you're using cpanminus, you shouldn't be seeing this message in the first place, so please file an issue on github. If you're installing manually, please retrain your fingers to run Build.PL when present instead. This public service announcement was brought to you by the Perl Toolchain Gang, the irc.perl.org #toolchain IRC channel, and the number 42. ---- * Alternatively, you are doing something overly clever, in which case you should consider setting the 'prefer_installer' config option in CPAN.pm, or 'prefer_makefile' in CPANPLUS, to 'mb" and '0' respectively. You can also silence this warning for future installations by setting the PERL_MM_FALLBACK_SILENCE_WARNING environment variable. EOW sleep 10 if -t STDIN && (-t STDOUT || !(-f STDOUT || -c STDOUT)); } } } # end BEGIN my %WriteMakefileArgs = ( "ABSTRACT" => "Autoboxed wrappers for Native Perl datatypes", "AUTHOR" => "Stevan Little ", "CONFIGURE_REQUIRES" => { "Module::Build::Tiny" => "0.034" }, "DISTNAME" => "Moose-Autobox", "LICENSE" => "perl", "MIN_PERL_VERSION" => "5.006", "NAME" => "Moose::Autobox", "PL_FILES" => {}, "PREREQ_PM" => { "Carp" => 0, "Data::Dumper" => 0, "List::MoreUtils" => "0.07", "Moose" => "0.42", "Moose::Role" => 0, "Moose::Util" => 0, "Scalar::Util" => 0, "Syntax::Keyword::Junction::All" => 0, "Syntax::Keyword::Junction::Any" => 0, "Syntax::Keyword::Junction::None" => 0, "Syntax::Keyword::Junction::One" => 0, "autobox" => "2.23", "metaclass" => 0, "namespace::autoclean" => 0, "parent" => 0, "strict" => 0, "warnings" => 0 }, "TEST_REQUIRES" => { "File::Spec" => 0, "Module::Metadata" => 0, "Test::Exception" => 0, "Test::More" => 0 }, "VERSION" => "0.16", "test" => { "TESTS" => "t/*.t" } ); my %FallbackPrereqs = ( "Carp" => 0, "Data::Dumper" => 0, "File::Spec" => 0, "List::MoreUtils" => "0.07", "Module::Metadata" => 0, "Moose" => "0.42", "Moose::Role" => 0, "Moose::Util" => 0, "Scalar::Util" => 0, "Syntax::Keyword::Junction::All" => 0, "Syntax::Keyword::Junction::Any" => 0, "Syntax::Keyword::Junction::None" => 0, "Syntax::Keyword::Junction::One" => 0, "Test::Exception" => 0, "Test::More" => 0, "autobox" => "2.23", "metaclass" => 0, "namespace::autoclean" => 0, "parent" => 0, "strict" => 0, "warnings" => 0 ); unless ( eval { ExtUtils::MakeMaker->VERSION(6.63_03) } ) { delete $WriteMakefileArgs{TEST_REQUIRES}; delete $WriteMakefileArgs{BUILD_REQUIRES}; $WriteMakefileArgs{PREREQ_PM} = \%FallbackPrereqs; } delete $WriteMakefileArgs{CONFIGURE_REQUIRES} unless eval { ExtUtils::MakeMaker->VERSION(6.52) }; WriteMakefile(%WriteMakefileArgs); Moose-Autobox-0.16/MANIFEST000644 000766 000024 00000002351 12711777774 015572 0ustar00etherstaff000000 000000 # This file was automatically generated by Dist::Zilla::Plugin::Manifest v6.003. Build.PL CONTRIBUTING Changes INSTALL LICENSE MANIFEST META.json META.yml Makefile.PL README dist.ini examples/tic_tac_toe.pl examples/units/bytes.pl examples/units/time.pl lib/Moose/Autobox.pm lib/Moose/Autobox/Array.pm lib/Moose/Autobox/Code.pm lib/Moose/Autobox/Defined.pm lib/Moose/Autobox/Hash.pm lib/Moose/Autobox/Indexed.pm lib/Moose/Autobox/Item.pm lib/Moose/Autobox/List.pm lib/Moose/Autobox/Number.pm lib/Moose/Autobox/Ref.pm lib/Moose/Autobox/Scalar.pm lib/Moose/Autobox/String.pm lib/Moose/Autobox/Undef.pm lib/Moose/Autobox/Value.pm t/00-report-prereqs.dd t/00-report-prereqs.t t/000_load.t t/001_basic.t t/002_role_hierarchy.t t/003_p6_example.t t/004_list_compressions.t t/005_string.t t/006_y_combinator.t t/007_base.t t/008_flatten.t t/009_number.t t/010_each.t t/011_each_n_values.t t/012_first_last.t t/zzz-check-breaks.t xt/author/00-compile.t xt/author/clean-namespaces.t xt/author/eol.t xt/author/kwalitee.t xt/author/mojibake.t xt/author/no-tabs.t xt/author/pod-coverage.t xt/author/pod-spell.t xt/author/pod-syntax.t xt/release/changes_has_content.t xt/release/cpan-changes.t xt/release/distmeta.t xt/release/minimum-version.t xt/release/portability.t Moose-Autobox-0.16/META.json000644 000766 000024 00000131145 12711777774 016066 0ustar00etherstaff000000 000000 { "abstract" : "Autoboxed wrappers for Native Perl datatypes", "author" : [ "Stevan Little " ], "dynamic_config" : 0, "generated_by" : "Dist::Zilla version 6.003, CPAN::Meta::Converter version 2.150005", "license" : [ "perl_5" ], "meta-spec" : { "url" : "http://search.cpan.org/perldoc?CPAN::Meta::Spec", "version" : 2 }, "name" : "Moose-Autobox", "no_index" : { "directory" : [ "examples", "t", "xt" ] }, "prereqs" : { "configure" : { "requires" : { "Module::Build::Tiny" : "0.034", "perl" : "5.006" } }, "develop" : { "recommends" : { "Dist::Zilla::PluginBundle::Author::ETHER" : "0.114" }, "requires" : { "Dist::Zilla" : "5", "Dist::Zilla::Plugin::Authority" : "1.009", "Dist::Zilla::Plugin::AuthorityFromModule" : "0.002", "Dist::Zilla::Plugin::AutoMetaResources" : "0", "Dist::Zilla::Plugin::AutoPrereqs" : "5.038", "Dist::Zilla::Plugin::BumpVersionAfterRelease::Transitional" : "0.004", "Dist::Zilla::Plugin::CheckIssues" : "0", "Dist::Zilla::Plugin::CheckPrereqsIndexed" : "0", "Dist::Zilla::Plugin::CheckSelfDependency" : "0", "Dist::Zilla::Plugin::CheckStrictVersion" : "0", "Dist::Zilla::Plugin::ConfirmRelease" : "0", "Dist::Zilla::Plugin::CopyFilesFromRelease" : "0", "Dist::Zilla::Plugin::FileFinder::ByName" : "0", "Dist::Zilla::Plugin::GenerateFile::FromShareDir" : "0", "Dist::Zilla::Plugin::Git::Check" : "0", "Dist::Zilla::Plugin::Git::CheckFor::CorrectBranch" : "0.004", "Dist::Zilla::Plugin::Git::CheckFor::MergeConflicts" : "0", "Dist::Zilla::Plugin::Git::Commit" : "2.020", "Dist::Zilla::Plugin::Git::Contributors" : "0.004", "Dist::Zilla::Plugin::Git::Describe" : "0.004", "Dist::Zilla::Plugin::Git::GatherDir" : "2.016", "Dist::Zilla::Plugin::Git::Push" : "0", "Dist::Zilla::Plugin::Git::Remote::Check" : "0", "Dist::Zilla::Plugin::Git::Tag" : "0", "Dist::Zilla::Plugin::GitHub::Update" : "0.40", "Dist::Zilla::Plugin::GithubMeta" : "0.54", "Dist::Zilla::Plugin::InstallGuide" : "1.200005", "Dist::Zilla::Plugin::Keywords" : "0.004", "Dist::Zilla::Plugin::License" : "5.038", "Dist::Zilla::Plugin::MakeMaker::Fallback" : "0.012", "Dist::Zilla::Plugin::Manifest" : "0", "Dist::Zilla::Plugin::MetaConfig" : "0", "Dist::Zilla::Plugin::MetaJSON" : "0", "Dist::Zilla::Plugin::MetaNoIndex" : "0", "Dist::Zilla::Plugin::MetaProvides::Package" : "1.15000002", "Dist::Zilla::Plugin::MetaResources" : "0", "Dist::Zilla::Plugin::MetaTests" : "0", "Dist::Zilla::Plugin::MetaYAML" : "0", "Dist::Zilla::Plugin::MinimumPerl" : "1.006", "Dist::Zilla::Plugin::ModuleBuildTiny::Fallback" : "0.018", "Dist::Zilla::Plugin::MojibakeTests" : "0.8", "Dist::Zilla::Plugin::NextRelease" : "5.033", "Dist::Zilla::Plugin::PodCoverageTests" : "5.040", "Dist::Zilla::Plugin::PodSyntaxTests" : "5.040", "Dist::Zilla::Plugin::PodWeaver" : "4.005", "Dist::Zilla::Plugin::Prereqs" : "0", "Dist::Zilla::Plugin::Prereqs::AuthorDeps" : "0", "Dist::Zilla::Plugin::PromptIfStale" : "0", "Dist::Zilla::Plugin::Readme" : "0", "Dist::Zilla::Plugin::ReadmeAnyFromPod" : "0.142180", "Dist::Zilla::Plugin::RewriteVersion::Transitional" : "0.004", "Dist::Zilla::Plugin::Run::AfterBuild" : "0.038", "Dist::Zilla::Plugin::Run::AfterRelease" : "0.038", "Dist::Zilla::Plugin::RunExtraTests" : "0.024", "Dist::Zilla::Plugin::StaticInstall" : "0.005", "Dist::Zilla::Plugin::Test::CPAN::Changes" : "0.008", "Dist::Zilla::Plugin::Test::ChangesHasContent" : "0", "Dist::Zilla::Plugin::Test::CheckBreaks" : "0", "Dist::Zilla::Plugin::Test::CleanNamespaces" : "0.006", "Dist::Zilla::Plugin::Test::Compile" : "2.039", "Dist::Zilla::Plugin::Test::EOL" : "0.17", "Dist::Zilla::Plugin::Test::Kwalitee" : "2.10", "Dist::Zilla::Plugin::Test::MinimumVersion" : "2.000003", "Dist::Zilla::Plugin::Test::NoTabs" : "0.08", "Dist::Zilla::Plugin::Test::PodSpelling" : "2.006003", "Dist::Zilla::Plugin::Test::Portability" : "0", "Dist::Zilla::Plugin::Test::ReportPrereqs" : "0.022", "Dist::Zilla::Plugin::TestRelease" : "0", "Dist::Zilla::Plugin::UploadToCPAN" : "0", "Dist::Zilla::PluginBundle::Author::ETHER" : "0.103", "File::Spec" : "0", "IO::Handle" : "0", "IPC::Open3" : "0", "Pod::Coverage::TrustPod" : "0", "Pod::Wordlist" : "0", "Software::License::Perl_5" : "0", "Test::CPAN::Changes" : "0.19", "Test::CPAN::Meta" : "0", "Test::CleanNamespaces" : "0.15", "Test::EOL" : "0", "Test::Kwalitee" : "1.21", "Test::Mojibake" : "0", "Test::More" : "0.96", "Test::NoTabs" : "0", "Test::Pod" : "1.41", "Test::Pod::Coverage" : "1.08", "Test::Spelling" : "0.12", "blib" : "1.01" } }, "runtime" : { "requires" : { "Carp" : "0", "Data::Dumper" : "0", "List::MoreUtils" : "0.07", "Moose" : "0.42", "Moose::Role" : "0", "Moose::Util" : "0", "Scalar::Util" : "0", "Syntax::Keyword::Junction::All" : "0", "Syntax::Keyword::Junction::Any" : "0", "Syntax::Keyword::Junction::None" : "0", "Syntax::Keyword::Junction::One" : "0", "autobox" : "2.23", "metaclass" : "0", "namespace::autoclean" : "0", "parent" : "0", "perl" : "5.006", "strict" : "0", "warnings" : "0" } }, "test" : { "recommends" : { "CPAN::Meta" : "2.120900" }, "requires" : { "File::Spec" : "0", "Module::Metadata" : "0", "Test::Exception" : "0", "Test::More" : "0", "perl" : "5.006" } } }, "provides" : { "Moose::Autobox" : { "file" : "lib/Moose/Autobox.pm", "version" : "0.16" }, "Moose::Autobox::Array" : { "file" : "lib/Moose/Autobox/Array.pm", "version" : "0.16" }, "Moose::Autobox::Code" : { "file" : "lib/Moose/Autobox/Code.pm", "version" : "0.16" }, "Moose::Autobox::Defined" : { "file" : "lib/Moose/Autobox/Defined.pm", "version" : "0.16" }, "Moose::Autobox::Hash" : { "file" : "lib/Moose/Autobox/Hash.pm", "version" : "0.16" }, "Moose::Autobox::Indexed" : { "file" : "lib/Moose/Autobox/Indexed.pm", "version" : "0.16" }, "Moose::Autobox::Item" : { "file" : "lib/Moose/Autobox/Item.pm", "version" : "0.16" }, "Moose::Autobox::List" : { "file" : "lib/Moose/Autobox/List.pm", "version" : "0.16" }, "Moose::Autobox::Number" : { "file" : "lib/Moose/Autobox/Number.pm", "version" : "0.16" }, "Moose::Autobox::Ref" : { "file" : "lib/Moose/Autobox/Ref.pm", "version" : "0.16" }, "Moose::Autobox::Scalar" : { "file" : "lib/Moose/Autobox/Scalar.pm", "version" : "0.16" }, "Moose::Autobox::String" : { "file" : "lib/Moose/Autobox/String.pm", "version" : "0.16" }, "Moose::Autobox::Undef" : { "file" : "lib/Moose/Autobox/Undef.pm", "version" : "0.16" }, "Moose::Autobox::Value" : { "file" : "lib/Moose/Autobox/Value.pm", "version" : "0.16" } }, "release_status" : "stable", "resources" : { "bugtracker" : { "mailto" : "bug-Moose-Autobox@rt.cpan.org", "web" : "https://rt.cpan.org/Public/Dist/Display.html?Name=Moose-Autobox" }, "homepage" : "https://github.com/moose/Moose-Autobox", "repository" : { "type" : "git", "url" : "https://github.com/moose/Moose-Autobox.git", "web" : "https://github.com/moose/Moose-Autobox" }, "x_IRC" : "irc://irc.perl.org/#moose", "x_MailingList" : "http://lists.perl.org/list/moose.html" }, "version" : "0.16", "x_Dist_Zilla" : { "perl" : { "version" : "5.023009" }, "plugins" : [ { "class" : "Dist::Zilla::Plugin::Prereqs", "config" : { "Dist::Zilla::Plugin::Prereqs" : { "phase" : "develop", "type" : "requires" } }, "name" : "@Author::ETHER/bundle_plugins", "version" : "6.003" }, { "class" : "Dist::Zilla::Plugin::RewriteVersion::Transitional", "config" : { "Dist::Zilla::Plugin::RewriteVersion" : { "add_tarball_name" : 0, "finders" : [ ":ExecFiles", ":InstallModules" ], "global" : 1, "skip_version_provider" : 0 }, "Dist::Zilla::Plugin::RewriteVersion::Transitional" : {} }, "name" : "@Author::ETHER/RewriteVersion::Transitional", "version" : "0.007" }, { "class" : "Dist::Zilla::Plugin::PromptIfStale", "config" : { "Dist::Zilla::Plugin::PromptIfStale" : { "check_all_plugins" : 0, "check_all_prereqs" : 0, "modules" : [ "Dist::Zilla::PluginBundle::Author::ETHER" ], "phase" : "build", "skip" : [] } }, "name" : "@Author::ETHER/stale modules, build", "version" : "0.049" }, { "class" : "Dist::Zilla::Plugin::PromptIfStale", "config" : { "Dist::Zilla::Plugin::PromptIfStale" : { "check_all_plugins" : 1, "check_all_prereqs" : 1, "modules" : [], "phase" : "release", "skip" : [] } }, "name" : "@Author::ETHER/stale modules, release", "version" : "0.049" }, { "class" : "Dist::Zilla::Plugin::FileFinder::ByName", "name" : "@Author::ETHER/Examples", "version" : "6.003" }, { "class" : "Dist::Zilla::Plugin::Git::GatherDir", "config" : { "Dist::Zilla::Plugin::GatherDir" : { "exclude_filename" : [ "TODO" ], "exclude_match" : [], "follow_symlinks" : 0, "include_dotfiles" : 0, "prefix" : "", "prune_directory" : [], "root" : "." }, "Dist::Zilla::Plugin::Git::GatherDir" : { "include_untracked" : 0 } }, "name" : "@Author::ETHER/Git::GatherDir", "version" : "2.036" }, { "class" : "Dist::Zilla::Plugin::MetaYAML", "name" : "@Author::ETHER/MetaYAML", "version" : "6.003" }, { "class" : "Dist::Zilla::Plugin::MetaJSON", "name" : "@Author::ETHER/MetaJSON", "version" : "6.003" }, { "class" : "Dist::Zilla::Plugin::Readme", "name" : "@Author::ETHER/Readme", "version" : "6.003" }, { "class" : "Dist::Zilla::Plugin::Manifest", "name" : "@Author::ETHER/Manifest", "version" : "6.003" }, { "class" : "Dist::Zilla::Plugin::License", "name" : "@Author::ETHER/License", "version" : "6.003" }, { "class" : "Dist::Zilla::Plugin::GenerateFile::FromShareDir", "config" : { "Dist::Zilla::Plugin::GenerateFile::FromShareDir" : { "destination_filename" : "CONTRIBUTING", "dist" : "Dist-Zilla-PluginBundle-Author-ETHER", "encoding" : "UTF-8", "has_xs" : 0, "location" : "build", "source_filename" : "CONTRIBUTING" }, "Dist::Zilla::Role::RepoFileInjector" : { "allow_overwrite" : 1, "repo_root" : ".", "version" : "0.006" } }, "name" : "@Author::ETHER/generate CONTRIBUTING", "version" : "0.009" }, { "class" : "Dist::Zilla::Plugin::InstallGuide", "name" : "@Author::ETHER/InstallGuide", "version" : "1.200006" }, { "class" : "Dist::Zilla::Plugin::Test::Compile", "config" : { "Dist::Zilla::Plugin::Test::Compile" : { "bail_out_on_fail" : "1", "fail_on_warning" : "author", "fake_home" : 0, "filename" : "xt/author/00-compile.t", "module_finder" : [ ":InstallModules" ], "needs_display" : 0, "phase" : "develop", "script_finder" : [ ":PerlExecFiles", "@Author::ETHER/Examples" ], "skips" : [] } }, "name" : "@Author::ETHER/Test::Compile", "version" : "2.054" }, { "class" : "Dist::Zilla::Plugin::Test::NoTabs", "config" : { "Dist::Zilla::Plugin::Test::NoTabs" : { "filename" : "xt/author/no-tabs.t", "finder" : [ ":InstallModules", ":ExecFiles", "@Author::ETHER/Examples", ":TestFiles", ":ExtraTestFiles" ] } }, "name" : "@Author::ETHER/Test::NoTabs", "version" : "0.15" }, { "class" : "Dist::Zilla::Plugin::Test::EOL", "config" : { "Dist::Zilla::Plugin::Test::EOL" : { "filename" : "xt/author/eol.t", "finder" : [ ":InstallModules", ":ExecFiles", "@Author::ETHER/Examples", ":TestFiles", ":ExtraTestFiles" ], "trailing_whitespace" : "1" } }, "name" : "@Author::ETHER/Test::EOL", "version" : "0.18" }, { "class" : "Dist::Zilla::Plugin::MetaTests", "name" : "@Author::ETHER/MetaTests", "version" : "6.003" }, { "class" : "Dist::Zilla::Plugin::Test::CPAN::Changes", "name" : "@Author::ETHER/Test::CPAN::Changes", "version" : "0.009" }, { "class" : "Dist::Zilla::Plugin::Test::ChangesHasContent", "name" : "@Author::ETHER/Test::ChangesHasContent", "version" : "0.008" }, { "class" : "Dist::Zilla::Plugin::Test::MinimumVersion", "name" : "@Author::ETHER/Test::MinimumVersion", "version" : "2.000006" }, { "class" : "Dist::Zilla::Plugin::PodSyntaxTests", "name" : "@Author::ETHER/PodSyntaxTests", "version" : "6.003" }, { "class" : "Dist::Zilla::Plugin::PodCoverageTests", "name" : "@Author::ETHER/PodCoverageTests", "version" : "6.003" }, { "class" : "Dist::Zilla::Plugin::Test::PodSpelling", "config" : { "Dist::Zilla::Plugin::Test::PodSpelling" : { "directories" : [], "spell_cmd" : "", "stopwords" : [ "irc" ], "wordlist" : "Pod::Wordlist" } }, "name" : "@Author::ETHER/Test::PodSpelling", "version" : "2.007000" }, { "class" : "Dist::Zilla::Plugin::Test::Kwalitee", "config" : { "Dist::Zilla::Plugin::Test::Kwalitee" : { "filename" : "xt/author/kwalitee.t", "skiptest" : [] } }, "name" : "@Author::ETHER/Test::Kwalitee", "version" : "2.12" }, { "class" : "Dist::Zilla::Plugin::MojibakeTests", "name" : "@Author::ETHER/MojibakeTests", "version" : "0.8" }, { "class" : "Dist::Zilla::Plugin::Test::ReportPrereqs", "name" : "@Author::ETHER/Test::ReportPrereqs", "version" : "0.024" }, { "class" : "Dist::Zilla::Plugin::Test::Portability", "name" : "@Author::ETHER/Test::Portability", "version" : "2.000006" }, { "class" : "Dist::Zilla::Plugin::Test::CleanNamespaces", "config" : { "Dist::Zilla::Plugin::Test::CleanNamespaces" : { "filename" : "xt/author/clean-namespaces.t", "skips" : [ "Moose::Autobox::Undef" ] } }, "name" : "@Author::ETHER/Test::CleanNamespaces", "version" : "0.006" }, { "class" : "Dist::Zilla::Plugin::Git::Describe", "name" : "@Author::ETHER/Git::Describe", "version" : "0.006" }, { "class" : "Dist::Zilla::Plugin::PodWeaver", "config" : { "Dist::Zilla::Plugin::PodWeaver" : { "config_plugins" : [ "@Author::ETHER" ], "finder" : [ ":InstallModules", ":ExecFiles", "@Author::ETHER/Examples" ], "plugins" : [ { "class" : "Pod::Weaver::Plugin::EnsurePod5", "name" : "@Author::ETHER/EnsurePod5", "version" : "4.013" }, { "class" : "Pod::Weaver::Plugin::H1Nester", "name" : "@Author::ETHER/H1Nester", "version" : "4.013" }, { "class" : "Pod::Weaver::Plugin::SingleEncoding", "name" : "@Author::ETHER/SingleEncoding", "version" : "4.013" }, { "class" : "Pod::Weaver::Plugin::Transformer", "name" : "@Author::ETHER/List", "version" : "4.013" }, { "class" : "Pod::Weaver::Plugin::Transformer", "name" : "@Author::ETHER/Verbatim", "version" : "4.013" }, { "class" : "Pod::Weaver::Section::Region", "name" : "@Author::ETHER/header", "version" : "4.013" }, { "class" : "Pod::Weaver::Section::Name", "name" : "@Author::ETHER/Name", "version" : "4.013" }, { "class" : "Pod::Weaver::Section::Version", "name" : "@Author::ETHER/Version", "version" : "4.013" }, { "class" : "Pod::Weaver::Section::Region", "name" : "@Author::ETHER/prelude", "version" : "4.013" }, { "class" : "Pod::Weaver::Section::Generic", "name" : "SYNOPSIS", "version" : "4.013" }, { "class" : "Pod::Weaver::Section::Generic", "name" : "DESCRIPTION", "version" : "4.013" }, { "class" : "Pod::Weaver::Section::Generic", "name" : "OVERVIEW", "version" : "4.013" }, { "class" : "Pod::Weaver::Section::Collect", "name" : "ATTRIBUTES", "version" : "4.013" }, { "class" : "Pod::Weaver::Section::Collect", "name" : "METHODS", "version" : "4.013" }, { "class" : "Pod::Weaver::Section::Collect", "name" : "FUNCTIONS", "version" : "4.013" }, { "class" : "Pod::Weaver::Section::Collect", "name" : "TYPES", "version" : "4.013" }, { "class" : "Pod::Weaver::Section::Leftovers", "name" : "@Author::ETHER/Leftovers", "version" : "4.013" }, { "class" : "Pod::Weaver::Section::Region", "name" : "@Author::ETHER/postlude", "version" : "4.013" }, { "class" : "Pod::Weaver::Section::GenerateSection", "name" : "@Author::ETHER/generate SUPPORT", "version" : "1.01" }, { "class" : "Pod::Weaver::Section::AllowOverride", "name" : "@Author::ETHER/allow override SUPPORT", "version" : "0.05" }, { "class" : "Pod::Weaver::Section::Authors", "name" : "@Author::ETHER/Authors", "version" : "4.013" }, { "class" : "Pod::Weaver::Section::Contributors", "name" : "@Author::ETHER/Contributors", "version" : "0.009" }, { "class" : "Pod::Weaver::Section::Legal", "name" : "@Author::ETHER/Legal", "version" : "4.013" }, { "class" : "Pod::Weaver::Section::Region", "name" : "@Author::ETHER/footer", "version" : "4.013" } ] } }, "name" : "@Author::ETHER/PodWeaver", "version" : "4.008" }, { "class" : "Dist::Zilla::Plugin::GithubMeta", "name" : "@Author::ETHER/GithubMeta", "version" : "0.54" }, { "class" : "Dist::Zilla::Plugin::AutoMetaResources", "name" : "@Author::ETHER/AutoMetaResources", "version" : "1.21" }, { "class" : "Dist::Zilla::Plugin::AuthorityFromModule", "config" : { "Dist::Zilla::Plugin::AuthorityFromModule" : { "module" : "Moose::Autobox" }, "Dist::Zilla::Role::ModuleMetadata" : { "Module::Metadata" : "1.000032", "version" : "0.003" } }, "name" : "@Author::ETHER/AuthorityFromModule", "version" : "0.006" }, { "class" : "Dist::Zilla::Plugin::Authority", "name" : "@Author::ETHER/Authority", "version" : "1.009" }, { "class" : "Dist::Zilla::Plugin::MetaNoIndex", "name" : "@Author::ETHER/MetaNoIndex", "version" : "6.003" }, { "class" : "Dist::Zilla::Plugin::MetaProvides::Package", "config" : { "Dist::Zilla::Plugin::MetaProvides::Package" : { "finder" : [ ":InstallModules" ], "finder_objects" : [ { "class" : "Dist::Zilla::Plugin::FinderCode", "name" : ":InstallModules", "version" : "6.003" } ] }, "Dist::Zilla::Role::MetaProvider::Provider" : { "Dist::Zilla::Role::MetaProvider::Provider::VERSION" : "2.001011", "inherit_missing" : "0", "inherit_version" : "0", "meta_noindex" : "1" }, "Dist::Zilla::Role::ModuleMetadata" : { "Module::Metadata" : "1.000032", "version" : "0.003" } }, "name" : "@Author::ETHER/MetaProvides::Package", "version" : "2.004000" }, { "class" : "Dist::Zilla::Plugin::MetaConfig", "name" : "@Author::ETHER/MetaConfig", "version" : "6.003" }, { "class" : "Dist::Zilla::Plugin::Keywords", "config" : { "Dist::Zilla::Plugin::Keywords" : { "keywords" : [] } }, "name" : "@Author::ETHER/Keywords", "version" : "0.007" }, { "class" : "Dist::Zilla::Plugin::AutoPrereqs", "name" : "@Author::ETHER/AutoPrereqs", "version" : "6.003" }, { "class" : "Dist::Zilla::Plugin::Prereqs::AuthorDeps", "name" : "@Author::ETHER/Prereqs::AuthorDeps", "version" : "0.006" }, { "class" : "Dist::Zilla::Plugin::MinimumPerl", "name" : "@Author::ETHER/MinimumPerl", "version" : "1.006" }, { "class" : "Dist::Zilla::Plugin::Prereqs", "config" : { "Dist::Zilla::Plugin::Prereqs" : { "phase" : "develop", "type" : "recommends" } }, "name" : "@Author::ETHER/pluginbundle_version", "version" : "6.003" }, { "class" : "Dist::Zilla::Plugin::MakeMaker::Fallback", "config" : { "Dist::Zilla::Plugin::MakeMaker::Awesome" : { "version" : "0.38" }, "Dist::Zilla::Role::TestRunner" : { "default_jobs" : 9 } }, "name" : "@Author::ETHER/MakeMaker::Fallback", "version" : "0.022" }, { "class" : "Dist::Zilla::Plugin::ModuleBuildTiny::Fallback", "config" : { "Dist::Zilla::Plugin::ModuleBuildTiny::Fallback" : { "mb_version" : "0.28", "plugins" : [ { "class" : "Dist::Zilla::Plugin::ModuleBuild", "config" : { "Dist::Zilla::Role::TestRunner" : { "default_jobs" : 9 } }, "name" : "ModuleBuild, via ModuleBuildTiny::Fallback", "version" : "6.003" }, { "class" : "Dist::Zilla::Plugin::ModuleBuildTiny", "config" : { "Dist::Zilla::Role::TestRunner" : { "default_jobs" : 9 } }, "name" : "ModuleBuildTiny, via ModuleBuildTiny::Fallback", "version" : "0.014" } ] }, "Dist::Zilla::Role::TestRunner" : { "default_jobs" : 9 } }, "name" : "@Author::ETHER/ModuleBuildTiny::Fallback", "version" : "0.023" }, { "class" : "Dist::Zilla::Plugin::Git::Contributors", "config" : { "Dist::Zilla::Plugin::Git::Contributors" : { "include_authors" : 0, "include_releaser" : 1, "order_by" : "commits", "paths" : [ "." ] } }, "name" : "@Author::ETHER/Git::Contributors", "version" : "0.022" }, { "class" : "Dist::Zilla::Plugin::StaticInstall", "config" : { "Dist::Zilla::Plugin::StaticInstall" : { "dry_run" : 1, "mode" : "auto" } }, "name" : "@Author::ETHER/StaticInstall", "version" : "0.009" }, { "class" : "Dist::Zilla::Plugin::RunExtraTests", "config" : { "Dist::Zilla::Role::TestRunner" : { "default_jobs" : 9 } }, "name" : "@Author::ETHER/RunExtraTests", "version" : "0.028" }, { "class" : "Dist::Zilla::Plugin::CheckSelfDependency", "config" : { "Dist::Zilla::Plugin::CheckSelfDependency" : { "finder" : [ ":InstallModules" ] }, "Dist::Zilla::Role::ModuleMetadata" : { "Module::Metadata" : "1.000032", "version" : "0.003" } }, "name" : "@Author::ETHER/CheckSelfDependency", "version" : "0.011" }, { "class" : "Dist::Zilla::Plugin::Run::AfterBuild", "config" : { "Dist::Zilla::Plugin::Run::Role::Runner" : { "fatal_errors" : 1, "quiet" : 1, "run" : [ "bash -c \"test -e .ackrc && grep -q -- '--ignore-dir=.latest' .ackrc || echo '--ignore-dir=.latest' >> .ackrc; if [[ `dirname '%d'` != .build ]]; then test -e .ackrc && grep -q -- '--ignore-dir=%d' .ackrc || echo '--ignore-dir=%d' >> .ackrc; fi\"" ] } }, "name" : "@Author::ETHER/.ackrc", "version" : "0.043" }, { "class" : "Dist::Zilla::Plugin::Run::AfterBuild", "config" : { "Dist::Zilla::Plugin::Run::Role::Runner" : { "eval" : [ "if ('%d' =~ /^%n-[.[:xdigit:]]+$/) { unlink '.latest'; symlink '%d', '.latest'; }" ], "fatal_errors" : 1, "quiet" : 1 } }, "name" : "@Author::ETHER/.latest", "version" : "0.043" }, { "class" : "Dist::Zilla::Plugin::CheckStrictVersion", "name" : "@Author::ETHER/CheckStrictVersion", "version" : "0.001" }, { "class" : "Dist::Zilla::Plugin::Git::Check", "config" : { "Dist::Zilla::Plugin::Git::Check" : { "untracked_files" : "die" }, "Dist::Zilla::Role::Git::DirtyFiles" : { "allow_dirty" : [], "allow_dirty_match" : [], "changelog" : "Changes" }, "Dist::Zilla::Role::Git::Repo" : { "repo_root" : "." } }, "name" : "@Author::ETHER/initial check", "version" : "2.036" }, { "class" : "Dist::Zilla::Plugin::Git::CheckFor::MergeConflicts", "config" : { "Dist::Zilla::Role::Git::Repo" : { "repo_root" : "." } }, "name" : "@Author::ETHER/Git::CheckFor::MergeConflicts", "version" : "0.013" }, { "class" : "Dist::Zilla::Plugin::Git::CheckFor::CorrectBranch", "config" : { "Dist::Zilla::Role::Git::Repo" : { "repo_root" : "." } }, "name" : "@Author::ETHER/Git::CheckFor::CorrectBranch", "version" : "0.013" }, { "class" : "Dist::Zilla::Plugin::Git::Remote::Check", "name" : "@Author::ETHER/Git::Remote::Check", "version" : "0.2.0" }, { "class" : "Dist::Zilla::Plugin::CheckPrereqsIndexed", "name" : "@Author::ETHER/CheckPrereqsIndexed", "version" : "0.018" }, { "class" : "Dist::Zilla::Plugin::TestRelease", "name" : "@Author::ETHER/TestRelease", "version" : "6.003" }, { "class" : "Dist::Zilla::Plugin::Git::Check", "config" : { "Dist::Zilla::Plugin::Git::Check" : { "untracked_files" : "die" }, "Dist::Zilla::Role::Git::DirtyFiles" : { "allow_dirty" : [], "allow_dirty_match" : [], "changelog" : "Changes" }, "Dist::Zilla::Role::Git::Repo" : { "repo_root" : "." } }, "name" : "@Author::ETHER/after tests", "version" : "2.036" }, { "class" : "Dist::Zilla::Plugin::CheckIssues", "name" : "@Author::ETHER/CheckIssues", "version" : "0.009" }, { "class" : "Dist::Zilla::Plugin::UploadToCPAN", "name" : "@Author::ETHER/UploadToCPAN", "version" : "6.003" }, { "class" : "Dist::Zilla::Plugin::CopyFilesFromRelease", "config" : { "Dist::Zilla::Plugin::CopyFilesFromRelease" : { "filename" : [ "CONTRIBUTING", "Changes", "INSTALL", "LICENCE", "LICENSE", "ppport.h" ], "match" : [] } }, "name" : "@Author::ETHER/CopyFilesFromRelease", "version" : "0.006" }, { "class" : "Dist::Zilla::Plugin::ReadmeAnyFromPod", "config" : { "Dist::Zilla::Role::FileWatcher" : { "version" : "0.006" } }, "name" : "@Author::ETHER/ReadmeAnyFromPod", "version" : "0.161170" }, { "class" : "Dist::Zilla::Plugin::Git::Commit", "config" : { "Dist::Zilla::Plugin::Git::Commit" : { "add_files_in" : [ "." ], "commit_msg" : "%N-%v%t%n%n%c" }, "Dist::Zilla::Role::Git::DirtyFiles" : { "allow_dirty" : [ "Changes" ], "allow_dirty_match" : [], "changelog" : "Changes" }, "Dist::Zilla::Role::Git::Repo" : { "repo_root" : "." }, "Dist::Zilla::Role::Git::StringFormatter" : { "time_zone" : "local" } }, "name" : "@Author::ETHER/release snapshot", "version" : "2.036" }, { "class" : "Dist::Zilla::Plugin::Git::Tag", "config" : { "Dist::Zilla::Plugin::Git::Tag" : { "branch" : null, "changelog" : "Changes", "signed" : 0, "tag" : "v0.16", "tag_format" : "v%v", "tag_message" : "v%v%t" }, "Dist::Zilla::Role::Git::Repo" : { "repo_root" : "." }, "Dist::Zilla::Role::Git::StringFormatter" : { "time_zone" : "local" } }, "name" : "@Author::ETHER/Git::Tag", "version" : "2.036" }, { "class" : "Dist::Zilla::Plugin::GitHub::Update", "config" : { "Dist::Zilla::Plugin::GitHub::Update" : { "metacpan" : 1 } }, "name" : "@Author::ETHER/GitHub::Update", "version" : "0.42" }, { "class" : "Dist::Zilla::Plugin::BumpVersionAfterRelease::Transitional", "config" : { "Dist::Zilla::Plugin::BumpVersionAfterRelease" : { "finders" : [ ":ExecFiles", ":InstallModules" ], "global" : 1, "munge_makefile_pl" : 1 }, "Dist::Zilla::Plugin::BumpVersionAfterRelease::Transitional" : {} }, "name" : "@Author::ETHER/BumpVersionAfterRelease::Transitional", "version" : "0.007" }, { "class" : "Dist::Zilla::Plugin::NextRelease", "name" : "@Author::ETHER/NextRelease", "version" : "6.003" }, { "class" : "Dist::Zilla::Plugin::Git::Commit", "config" : { "Dist::Zilla::Plugin::Git::Commit" : { "add_files_in" : [], "commit_msg" : "increment $VERSION after %v release" }, "Dist::Zilla::Role::Git::DirtyFiles" : { "allow_dirty" : [ "Changes" ], "allow_dirty_match" : [ "(?^:^lib/.*\\.pm$)" ], "changelog" : "Changes" }, "Dist::Zilla::Role::Git::Repo" : { "repo_root" : "." }, "Dist::Zilla::Role::Git::StringFormatter" : { "time_zone" : "local" } }, "name" : "@Author::ETHER/post-release commit", "version" : "2.036" }, { "class" : "Dist::Zilla::Plugin::Git::Push", "config" : { "Dist::Zilla::Plugin::Git::Push" : { "push_to" : [ "origin" ], "remotes_must_exist" : 1 }, "Dist::Zilla::Role::Git::Repo" : { "repo_root" : "." } }, "name" : "@Author::ETHER/Git::Push", "version" : "2.036" }, { "class" : "Dist::Zilla::Plugin::Run::AfterRelease", "config" : { "Dist::Zilla::Plugin::Run::Role::Runner" : { "fatal_errors" : 0, "quiet" : 0, "run" : [ "REDACTED" ] } }, "name" : "@Author::ETHER/install release", "version" : "0.043" }, { "class" : "Dist::Zilla::Plugin::Run::AfterRelease", "config" : { "Dist::Zilla::Plugin::Run::Role::Runner" : { "eval" : [ "print \"release complete!\\xa\"" ], "fatal_errors" : 1, "quiet" : 1 } }, "name" : "@Author::ETHER/release complete", "version" : "0.043" }, { "class" : "Dist::Zilla::Plugin::ConfirmRelease", "name" : "@Author::ETHER/ConfirmRelease", "version" : "6.003" }, { "class" : "Dist::Zilla::Plugin::MetaResources", "name" : "MetaResources", "version" : "6.003" }, { "class" : "Dist::Zilla::Plugin::Test::CheckBreaks", "config" : { "Dist::Zilla::Plugin::Test::CheckBreaks" : { "conflicts_module" : "Moose::Conflicts", "no_forced_deps" : 0 }, "Dist::Zilla::Role::ModuleMetadata" : { "Module::Metadata" : "1.000032", "version" : "0.003" } }, "name" : "Test::CheckBreaks", "version" : "0.016" }, { "class" : "Dist::Zilla::Plugin::Prereqs", "config" : { "Dist::Zilla::Plugin::Prereqs" : { "phase" : "runtime", "type" : "requires" } }, "name" : "RuntimeRequires", "version" : "6.003" }, { "class" : "Dist::Zilla::Plugin::FinderCode", "name" : ":InstallModules", "version" : "6.003" }, { "class" : "Dist::Zilla::Plugin::FinderCode", "name" : ":IncModules", "version" : "6.003" }, { "class" : "Dist::Zilla::Plugin::FinderCode", "name" : ":TestFiles", "version" : "6.003" }, { "class" : "Dist::Zilla::Plugin::FinderCode", "name" : ":ExtraTestFiles", "version" : "6.003" }, { "class" : "Dist::Zilla::Plugin::FinderCode", "name" : ":ExecFiles", "version" : "6.003" }, { "class" : "Dist::Zilla::Plugin::FinderCode", "name" : ":PerlExecFiles", "version" : "6.003" }, { "class" : "Dist::Zilla::Plugin::FinderCode", "name" : ":ShareFiles", "version" : "6.003" }, { "class" : "Dist::Zilla::Plugin::FinderCode", "name" : ":MainModule", "version" : "6.003" }, { "class" : "Dist::Zilla::Plugin::FinderCode", "name" : ":AllFiles", "version" : "6.003" }, { "class" : "Dist::Zilla::Plugin::FinderCode", "name" : ":NoFiles", "version" : "6.003" }, { "class" : "Dist::Zilla::Plugin::VerifyPhases", "name" : "@Author::ETHER/PHASE VERIFICATION", "version" : "0.014" } ], "zilla" : { "class" : "Dist::Zilla::Dist::Builder", "config" : { "is_trial" : "0" }, "version" : "6.003" } }, "x_authority" : "cpan:STEVAN", "x_authority_from_module" : "Moose::Autobox", "x_contributors" : [ "Ricardo Signes ", "Karen Etheridge ", "Anders Nor Berle ", "Matt S Trout ", "Steffen Schwigon ", "Michael Swearingen ", "Florian Ragwitz ", "Jonathan Rockway ", "Shawn M Moore ", "Todd Hepler ", "David Steinbrunner ", "Mike Whitaker ", "Nigel Gregoire " ], "x_permissions_from_module" : "Moose::Autobox" } Moose-Autobox-0.16/META.yml000644 000766 000024 00000064150 12711777774 015717 0ustar00etherstaff000000 000000 --- abstract: 'Autoboxed wrappers for Native Perl datatypes' author: - 'Stevan Little ' build_requires: File::Spec: '0' Module::Metadata: '0' Test::Exception: '0' Test::More: '0' perl: '5.006' configure_requires: Module::Build::Tiny: '0.034' perl: '5.006' dynamic_config: 0 generated_by: 'Dist::Zilla version 6.003, CPAN::Meta::Converter version 2.150005' license: perl meta-spec: url: http://module-build.sourceforge.net/META-spec-v1.4.html version: '1.4' name: Moose-Autobox no_index: directory: - examples - t - xt provides: Moose::Autobox: file: lib/Moose/Autobox.pm version: '0.16' Moose::Autobox::Array: file: lib/Moose/Autobox/Array.pm version: '0.16' Moose::Autobox::Code: file: lib/Moose/Autobox/Code.pm version: '0.16' Moose::Autobox::Defined: file: lib/Moose/Autobox/Defined.pm version: '0.16' Moose::Autobox::Hash: file: lib/Moose/Autobox/Hash.pm version: '0.16' Moose::Autobox::Indexed: file: lib/Moose/Autobox/Indexed.pm version: '0.16' Moose::Autobox::Item: file: lib/Moose/Autobox/Item.pm version: '0.16' Moose::Autobox::List: file: lib/Moose/Autobox/List.pm version: '0.16' Moose::Autobox::Number: file: lib/Moose/Autobox/Number.pm version: '0.16' Moose::Autobox::Ref: file: lib/Moose/Autobox/Ref.pm version: '0.16' Moose::Autobox::Scalar: file: lib/Moose/Autobox/Scalar.pm version: '0.16' Moose::Autobox::String: file: lib/Moose/Autobox/String.pm version: '0.16' Moose::Autobox::Undef: file: lib/Moose/Autobox/Undef.pm version: '0.16' Moose::Autobox::Value: file: lib/Moose/Autobox/Value.pm version: '0.16' requires: Carp: '0' Data::Dumper: '0' List::MoreUtils: '0.07' Moose: '0.42' Moose::Role: '0' Moose::Util: '0' Scalar::Util: '0' Syntax::Keyword::Junction::All: '0' Syntax::Keyword::Junction::Any: '0' Syntax::Keyword::Junction::None: '0' Syntax::Keyword::Junction::One: '0' autobox: '2.23' metaclass: '0' namespace::autoclean: '0' parent: '0' perl: '5.006' strict: '0' warnings: '0' resources: IRC: irc://irc.perl.org/#moose MailingList: http://lists.perl.org/list/moose.html bugtracker: https://rt.cpan.org/Public/Dist/Display.html?Name=Moose-Autobox homepage: https://github.com/moose/Moose-Autobox repository: https://github.com/moose/Moose-Autobox.git version: '0.16' x_Dist_Zilla: perl: version: '5.023009' plugins: - class: Dist::Zilla::Plugin::Prereqs config: Dist::Zilla::Plugin::Prereqs: phase: develop type: requires name: '@Author::ETHER/bundle_plugins' version: '6.003' - class: Dist::Zilla::Plugin::RewriteVersion::Transitional config: Dist::Zilla::Plugin::RewriteVersion: add_tarball_name: 0 finders: - ':ExecFiles' - ':InstallModules' global: 1 skip_version_provider: 0 Dist::Zilla::Plugin::RewriteVersion::Transitional: {} name: '@Author::ETHER/RewriteVersion::Transitional' version: '0.007' - class: Dist::Zilla::Plugin::PromptIfStale config: Dist::Zilla::Plugin::PromptIfStale: check_all_plugins: 0 check_all_prereqs: 0 modules: - Dist::Zilla::PluginBundle::Author::ETHER phase: build skip: [] name: '@Author::ETHER/stale modules, build' version: '0.049' - class: Dist::Zilla::Plugin::PromptIfStale config: Dist::Zilla::Plugin::PromptIfStale: check_all_plugins: 1 check_all_prereqs: 1 modules: [] phase: release skip: [] name: '@Author::ETHER/stale modules, release' version: '0.049' - class: Dist::Zilla::Plugin::FileFinder::ByName name: '@Author::ETHER/Examples' version: '6.003' - class: Dist::Zilla::Plugin::Git::GatherDir config: Dist::Zilla::Plugin::GatherDir: exclude_filename: - TODO exclude_match: [] follow_symlinks: 0 include_dotfiles: 0 prefix: '' prune_directory: [] root: . Dist::Zilla::Plugin::Git::GatherDir: include_untracked: 0 name: '@Author::ETHER/Git::GatherDir' version: '2.036' - class: Dist::Zilla::Plugin::MetaYAML name: '@Author::ETHER/MetaYAML' version: '6.003' - class: Dist::Zilla::Plugin::MetaJSON name: '@Author::ETHER/MetaJSON' version: '6.003' - class: Dist::Zilla::Plugin::Readme name: '@Author::ETHER/Readme' version: '6.003' - class: Dist::Zilla::Plugin::Manifest name: '@Author::ETHER/Manifest' version: '6.003' - class: Dist::Zilla::Plugin::License name: '@Author::ETHER/License' version: '6.003' - class: Dist::Zilla::Plugin::GenerateFile::FromShareDir config: Dist::Zilla::Plugin::GenerateFile::FromShareDir: destination_filename: CONTRIBUTING dist: Dist-Zilla-PluginBundle-Author-ETHER encoding: UTF-8 has_xs: 0 location: build source_filename: CONTRIBUTING Dist::Zilla::Role::RepoFileInjector: allow_overwrite: 1 repo_root: . version: '0.006' name: '@Author::ETHER/generate CONTRIBUTING' version: '0.009' - class: Dist::Zilla::Plugin::InstallGuide name: '@Author::ETHER/InstallGuide' version: '1.200006' - class: Dist::Zilla::Plugin::Test::Compile config: Dist::Zilla::Plugin::Test::Compile: bail_out_on_fail: '1' fail_on_warning: author fake_home: 0 filename: xt/author/00-compile.t module_finder: - ':InstallModules' needs_display: 0 phase: develop script_finder: - ':PerlExecFiles' - '@Author::ETHER/Examples' skips: [] name: '@Author::ETHER/Test::Compile' version: '2.054' - class: Dist::Zilla::Plugin::Test::NoTabs config: Dist::Zilla::Plugin::Test::NoTabs: filename: xt/author/no-tabs.t finder: - ':InstallModules' - ':ExecFiles' - '@Author::ETHER/Examples' - ':TestFiles' - ':ExtraTestFiles' name: '@Author::ETHER/Test::NoTabs' version: '0.15' - class: Dist::Zilla::Plugin::Test::EOL config: Dist::Zilla::Plugin::Test::EOL: filename: xt/author/eol.t finder: - ':InstallModules' - ':ExecFiles' - '@Author::ETHER/Examples' - ':TestFiles' - ':ExtraTestFiles' trailing_whitespace: '1' name: '@Author::ETHER/Test::EOL' version: '0.18' - class: Dist::Zilla::Plugin::MetaTests name: '@Author::ETHER/MetaTests' version: '6.003' - class: Dist::Zilla::Plugin::Test::CPAN::Changes name: '@Author::ETHER/Test::CPAN::Changes' version: '0.009' - class: Dist::Zilla::Plugin::Test::ChangesHasContent name: '@Author::ETHER/Test::ChangesHasContent' version: '0.008' - class: Dist::Zilla::Plugin::Test::MinimumVersion name: '@Author::ETHER/Test::MinimumVersion' version: '2.000006' - class: Dist::Zilla::Plugin::PodSyntaxTests name: '@Author::ETHER/PodSyntaxTests' version: '6.003' - class: Dist::Zilla::Plugin::PodCoverageTests name: '@Author::ETHER/PodCoverageTests' version: '6.003' - class: Dist::Zilla::Plugin::Test::PodSpelling config: Dist::Zilla::Plugin::Test::PodSpelling: directories: [] spell_cmd: '' stopwords: - irc wordlist: Pod::Wordlist name: '@Author::ETHER/Test::PodSpelling' version: '2.007000' - class: Dist::Zilla::Plugin::Test::Kwalitee config: Dist::Zilla::Plugin::Test::Kwalitee: filename: xt/author/kwalitee.t skiptest: [] name: '@Author::ETHER/Test::Kwalitee' version: '2.12' - class: Dist::Zilla::Plugin::MojibakeTests name: '@Author::ETHER/MojibakeTests' version: '0.8' - class: Dist::Zilla::Plugin::Test::ReportPrereqs name: '@Author::ETHER/Test::ReportPrereqs' version: '0.024' - class: Dist::Zilla::Plugin::Test::Portability name: '@Author::ETHER/Test::Portability' version: '2.000006' - class: Dist::Zilla::Plugin::Test::CleanNamespaces config: Dist::Zilla::Plugin::Test::CleanNamespaces: filename: xt/author/clean-namespaces.t skips: - Moose::Autobox::Undef name: '@Author::ETHER/Test::CleanNamespaces' version: '0.006' - class: Dist::Zilla::Plugin::Git::Describe name: '@Author::ETHER/Git::Describe' version: '0.006' - class: Dist::Zilla::Plugin::PodWeaver config: Dist::Zilla::Plugin::PodWeaver: config_plugins: - '@Author::ETHER' finder: - ':InstallModules' - ':ExecFiles' - '@Author::ETHER/Examples' plugins: - class: Pod::Weaver::Plugin::EnsurePod5 name: '@Author::ETHER/EnsurePod5' version: '4.013' - class: Pod::Weaver::Plugin::H1Nester name: '@Author::ETHER/H1Nester' version: '4.013' - class: Pod::Weaver::Plugin::SingleEncoding name: '@Author::ETHER/SingleEncoding' version: '4.013' - class: Pod::Weaver::Plugin::Transformer name: '@Author::ETHER/List' version: '4.013' - class: Pod::Weaver::Plugin::Transformer name: '@Author::ETHER/Verbatim' version: '4.013' - class: Pod::Weaver::Section::Region name: '@Author::ETHER/header' version: '4.013' - class: Pod::Weaver::Section::Name name: '@Author::ETHER/Name' version: '4.013' - class: Pod::Weaver::Section::Version name: '@Author::ETHER/Version' version: '4.013' - class: Pod::Weaver::Section::Region name: '@Author::ETHER/prelude' version: '4.013' - class: Pod::Weaver::Section::Generic name: SYNOPSIS version: '4.013' - class: Pod::Weaver::Section::Generic name: DESCRIPTION version: '4.013' - class: Pod::Weaver::Section::Generic name: OVERVIEW version: '4.013' - class: Pod::Weaver::Section::Collect name: ATTRIBUTES version: '4.013' - class: Pod::Weaver::Section::Collect name: METHODS version: '4.013' - class: Pod::Weaver::Section::Collect name: FUNCTIONS version: '4.013' - class: Pod::Weaver::Section::Collect name: TYPES version: '4.013' - class: Pod::Weaver::Section::Leftovers name: '@Author::ETHER/Leftovers' version: '4.013' - class: Pod::Weaver::Section::Region name: '@Author::ETHER/postlude' version: '4.013' - class: Pod::Weaver::Section::GenerateSection name: '@Author::ETHER/generate SUPPORT' version: '1.01' - class: Pod::Weaver::Section::AllowOverride name: '@Author::ETHER/allow override SUPPORT' version: '0.05' - class: Pod::Weaver::Section::Authors name: '@Author::ETHER/Authors' version: '4.013' - class: Pod::Weaver::Section::Contributors name: '@Author::ETHER/Contributors' version: '0.009' - class: Pod::Weaver::Section::Legal name: '@Author::ETHER/Legal' version: '4.013' - class: Pod::Weaver::Section::Region name: '@Author::ETHER/footer' version: '4.013' name: '@Author::ETHER/PodWeaver' version: '4.008' - class: Dist::Zilla::Plugin::GithubMeta name: '@Author::ETHER/GithubMeta' version: '0.54' - class: Dist::Zilla::Plugin::AutoMetaResources name: '@Author::ETHER/AutoMetaResources' version: '1.21' - class: Dist::Zilla::Plugin::AuthorityFromModule config: Dist::Zilla::Plugin::AuthorityFromModule: module: Moose::Autobox Dist::Zilla::Role::ModuleMetadata: Module::Metadata: '1.000032' version: '0.003' name: '@Author::ETHER/AuthorityFromModule' version: '0.006' - class: Dist::Zilla::Plugin::Authority name: '@Author::ETHER/Authority' version: '1.009' - class: Dist::Zilla::Plugin::MetaNoIndex name: '@Author::ETHER/MetaNoIndex' version: '6.003' - class: Dist::Zilla::Plugin::MetaProvides::Package config: Dist::Zilla::Plugin::MetaProvides::Package: finder: - ':InstallModules' finder_objects: - class: Dist::Zilla::Plugin::FinderCode name: ':InstallModules' version: '6.003' Dist::Zilla::Role::MetaProvider::Provider: Dist::Zilla::Role::MetaProvider::Provider::VERSION: '2.001011' inherit_missing: '0' inherit_version: '0' meta_noindex: '1' Dist::Zilla::Role::ModuleMetadata: Module::Metadata: '1.000032' version: '0.003' name: '@Author::ETHER/MetaProvides::Package' version: '2.004000' - class: Dist::Zilla::Plugin::MetaConfig name: '@Author::ETHER/MetaConfig' version: '6.003' - class: Dist::Zilla::Plugin::Keywords config: Dist::Zilla::Plugin::Keywords: keywords: [] name: '@Author::ETHER/Keywords' version: '0.007' - class: Dist::Zilla::Plugin::AutoPrereqs name: '@Author::ETHER/AutoPrereqs' version: '6.003' - class: Dist::Zilla::Plugin::Prereqs::AuthorDeps name: '@Author::ETHER/Prereqs::AuthorDeps' version: '0.006' - class: Dist::Zilla::Plugin::MinimumPerl name: '@Author::ETHER/MinimumPerl' version: '1.006' - class: Dist::Zilla::Plugin::Prereqs config: Dist::Zilla::Plugin::Prereqs: phase: develop type: recommends name: '@Author::ETHER/pluginbundle_version' version: '6.003' - class: Dist::Zilla::Plugin::MakeMaker::Fallback config: Dist::Zilla::Plugin::MakeMaker::Awesome: version: '0.38' Dist::Zilla::Role::TestRunner: default_jobs: 9 name: '@Author::ETHER/MakeMaker::Fallback' version: '0.022' - class: Dist::Zilla::Plugin::ModuleBuildTiny::Fallback config: Dist::Zilla::Plugin::ModuleBuildTiny::Fallback: mb_version: '0.28' plugins: - class: Dist::Zilla::Plugin::ModuleBuild config: Dist::Zilla::Role::TestRunner: default_jobs: 9 name: 'ModuleBuild, via ModuleBuildTiny::Fallback' version: '6.003' - class: Dist::Zilla::Plugin::ModuleBuildTiny config: Dist::Zilla::Role::TestRunner: default_jobs: 9 name: 'ModuleBuildTiny, via ModuleBuildTiny::Fallback' version: '0.014' Dist::Zilla::Role::TestRunner: default_jobs: 9 name: '@Author::ETHER/ModuleBuildTiny::Fallback' version: '0.023' - class: Dist::Zilla::Plugin::Git::Contributors config: Dist::Zilla::Plugin::Git::Contributors: include_authors: 0 include_releaser: 1 order_by: commits paths: - . name: '@Author::ETHER/Git::Contributors' version: '0.022' - class: Dist::Zilla::Plugin::StaticInstall config: Dist::Zilla::Plugin::StaticInstall: dry_run: 1 mode: auto name: '@Author::ETHER/StaticInstall' version: '0.009' - class: Dist::Zilla::Plugin::RunExtraTests config: Dist::Zilla::Role::TestRunner: default_jobs: 9 name: '@Author::ETHER/RunExtraTests' version: '0.028' - class: Dist::Zilla::Plugin::CheckSelfDependency config: Dist::Zilla::Plugin::CheckSelfDependency: finder: - ':InstallModules' Dist::Zilla::Role::ModuleMetadata: Module::Metadata: '1.000032' version: '0.003' name: '@Author::ETHER/CheckSelfDependency' version: '0.011' - class: Dist::Zilla::Plugin::Run::AfterBuild config: Dist::Zilla::Plugin::Run::Role::Runner: fatal_errors: 1 quiet: 1 run: - "bash -c \"test -e .ackrc && grep -q -- '--ignore-dir=.latest' .ackrc || echo '--ignore-dir=.latest' >> .ackrc; if [[ `dirname '%d'` != .build ]]; then test -e .ackrc && grep -q -- '--ignore-dir=%d' .ackrc || echo '--ignore-dir=%d' >> .ackrc; fi\"" name: '@Author::ETHER/.ackrc' version: '0.043' - class: Dist::Zilla::Plugin::Run::AfterBuild config: Dist::Zilla::Plugin::Run::Role::Runner: eval: - "if ('%d' =~ /^%n-[.[:xdigit:]]+$/) { unlink '.latest'; symlink '%d', '.latest'; }" fatal_errors: 1 quiet: 1 name: '@Author::ETHER/.latest' version: '0.043' - class: Dist::Zilla::Plugin::CheckStrictVersion name: '@Author::ETHER/CheckStrictVersion' version: '0.001' - class: Dist::Zilla::Plugin::Git::Check config: Dist::Zilla::Plugin::Git::Check: untracked_files: die Dist::Zilla::Role::Git::DirtyFiles: allow_dirty: [] allow_dirty_match: [] changelog: Changes Dist::Zilla::Role::Git::Repo: repo_root: . name: '@Author::ETHER/initial check' version: '2.036' - class: Dist::Zilla::Plugin::Git::CheckFor::MergeConflicts config: Dist::Zilla::Role::Git::Repo: repo_root: . name: '@Author::ETHER/Git::CheckFor::MergeConflicts' version: '0.013' - class: Dist::Zilla::Plugin::Git::CheckFor::CorrectBranch config: Dist::Zilla::Role::Git::Repo: repo_root: . name: '@Author::ETHER/Git::CheckFor::CorrectBranch' version: '0.013' - class: Dist::Zilla::Plugin::Git::Remote::Check name: '@Author::ETHER/Git::Remote::Check' version: 0.2.0 - class: Dist::Zilla::Plugin::CheckPrereqsIndexed name: '@Author::ETHER/CheckPrereqsIndexed' version: '0.018' - class: Dist::Zilla::Plugin::TestRelease name: '@Author::ETHER/TestRelease' version: '6.003' - class: Dist::Zilla::Plugin::Git::Check config: Dist::Zilla::Plugin::Git::Check: untracked_files: die Dist::Zilla::Role::Git::DirtyFiles: allow_dirty: [] allow_dirty_match: [] changelog: Changes Dist::Zilla::Role::Git::Repo: repo_root: . name: '@Author::ETHER/after tests' version: '2.036' - class: Dist::Zilla::Plugin::CheckIssues name: '@Author::ETHER/CheckIssues' version: '0.009' - class: Dist::Zilla::Plugin::UploadToCPAN name: '@Author::ETHER/UploadToCPAN' version: '6.003' - class: Dist::Zilla::Plugin::CopyFilesFromRelease config: Dist::Zilla::Plugin::CopyFilesFromRelease: filename: - CONTRIBUTING - Changes - INSTALL - LICENCE - LICENSE - ppport.h match: [] name: '@Author::ETHER/CopyFilesFromRelease' version: '0.006' - class: Dist::Zilla::Plugin::ReadmeAnyFromPod config: Dist::Zilla::Role::FileWatcher: version: '0.006' name: '@Author::ETHER/ReadmeAnyFromPod' version: '0.161170' - class: Dist::Zilla::Plugin::Git::Commit config: Dist::Zilla::Plugin::Git::Commit: add_files_in: - . commit_msg: '%N-%v%t%n%n%c' Dist::Zilla::Role::Git::DirtyFiles: allow_dirty: - Changes allow_dirty_match: [] changelog: Changes Dist::Zilla::Role::Git::Repo: repo_root: . Dist::Zilla::Role::Git::StringFormatter: time_zone: local name: '@Author::ETHER/release snapshot' version: '2.036' - class: Dist::Zilla::Plugin::Git::Tag config: Dist::Zilla::Plugin::Git::Tag: branch: ~ changelog: Changes signed: 0 tag: v0.16 tag_format: v%v tag_message: v%v%t Dist::Zilla::Role::Git::Repo: repo_root: . Dist::Zilla::Role::Git::StringFormatter: time_zone: local name: '@Author::ETHER/Git::Tag' version: '2.036' - class: Dist::Zilla::Plugin::GitHub::Update config: Dist::Zilla::Plugin::GitHub::Update: metacpan: 1 name: '@Author::ETHER/GitHub::Update' version: '0.42' - class: Dist::Zilla::Plugin::BumpVersionAfterRelease::Transitional config: Dist::Zilla::Plugin::BumpVersionAfterRelease: finders: - ':ExecFiles' - ':InstallModules' global: 1 munge_makefile_pl: 1 Dist::Zilla::Plugin::BumpVersionAfterRelease::Transitional: {} name: '@Author::ETHER/BumpVersionAfterRelease::Transitional' version: '0.007' - class: Dist::Zilla::Plugin::NextRelease name: '@Author::ETHER/NextRelease' version: '6.003' - class: Dist::Zilla::Plugin::Git::Commit config: Dist::Zilla::Plugin::Git::Commit: add_files_in: [] commit_msg: 'increment $VERSION after %v release' Dist::Zilla::Role::Git::DirtyFiles: allow_dirty: - Changes allow_dirty_match: - (?^:^lib/.*\.pm$) changelog: Changes Dist::Zilla::Role::Git::Repo: repo_root: . Dist::Zilla::Role::Git::StringFormatter: time_zone: local name: '@Author::ETHER/post-release commit' version: '2.036' - class: Dist::Zilla::Plugin::Git::Push config: Dist::Zilla::Plugin::Git::Push: push_to: - origin remotes_must_exist: 1 Dist::Zilla::Role::Git::Repo: repo_root: . name: '@Author::ETHER/Git::Push' version: '2.036' - class: Dist::Zilla::Plugin::Run::AfterRelease config: Dist::Zilla::Plugin::Run::Role::Runner: fatal_errors: 0 quiet: 0 run: - REDACTED name: '@Author::ETHER/install release' version: '0.043' - class: Dist::Zilla::Plugin::Run::AfterRelease config: Dist::Zilla::Plugin::Run::Role::Runner: eval: - 'print "release complete!\xa"' fatal_errors: 1 quiet: 1 name: '@Author::ETHER/release complete' version: '0.043' - class: Dist::Zilla::Plugin::ConfirmRelease name: '@Author::ETHER/ConfirmRelease' version: '6.003' - class: Dist::Zilla::Plugin::MetaResources name: MetaResources version: '6.003' - class: Dist::Zilla::Plugin::Test::CheckBreaks config: Dist::Zilla::Plugin::Test::CheckBreaks: conflicts_module: Moose::Conflicts no_forced_deps: 0 Dist::Zilla::Role::ModuleMetadata: Module::Metadata: '1.000032' version: '0.003' name: Test::CheckBreaks version: '0.016' - class: Dist::Zilla::Plugin::Prereqs config: Dist::Zilla::Plugin::Prereqs: phase: runtime type: requires name: RuntimeRequires version: '6.003' - class: Dist::Zilla::Plugin::FinderCode name: ':InstallModules' version: '6.003' - class: Dist::Zilla::Plugin::FinderCode name: ':IncModules' version: '6.003' - class: Dist::Zilla::Plugin::FinderCode name: ':TestFiles' version: '6.003' - class: Dist::Zilla::Plugin::FinderCode name: ':ExtraTestFiles' version: '6.003' - class: Dist::Zilla::Plugin::FinderCode name: ':ExecFiles' version: '6.003' - class: Dist::Zilla::Plugin::FinderCode name: ':PerlExecFiles' version: '6.003' - class: Dist::Zilla::Plugin::FinderCode name: ':ShareFiles' version: '6.003' - class: Dist::Zilla::Plugin::FinderCode name: ':MainModule' version: '6.003' - class: Dist::Zilla::Plugin::FinderCode name: ':AllFiles' version: '6.003' - class: Dist::Zilla::Plugin::FinderCode name: ':NoFiles' version: '6.003' - class: Dist::Zilla::Plugin::VerifyPhases name: '@Author::ETHER/PHASE VERIFICATION' version: '0.014' zilla: class: Dist::Zilla::Dist::Builder config: is_trial: '0' version: '6.003' x_authority: cpan:STEVAN x_authority_from_module: Moose::Autobox x_contributors: - 'Ricardo Signes ' - 'Karen Etheridge ' - 'Anders Nor Berle ' - 'Matt S Trout ' - 'Steffen Schwigon ' - 'Michael Swearingen ' - 'Florian Ragwitz ' - 'Jonathan Rockway ' - 'Shawn M Moore ' - 'Todd Hepler ' - 'David Steinbrunner ' - 'Mike Whitaker ' - 'Nigel Gregoire ' x_permissions_from_module: Moose::Autobox Moose-Autobox-0.16/README000644 000766 000024 00000000612 12711777774 015317 0ustar00etherstaff000000 000000 This archive contains the distribution Moose-Autobox, version 0.16: Autoboxed wrappers for Native Perl datatypes This software is copyright (c) 2006 by Infinity Interactive, Inc. This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. This README file was generated by Dist::Zilla::Plugin::Readme v6.003. Moose-Autobox-0.16/t/000755 000766 000024 00000000000 12711777774 014703 5ustar00etherstaff000000 000000 Moose-Autobox-0.16/xt/000755 000766 000024 00000000000 12711777774 015073 5ustar00etherstaff000000 000000 Moose-Autobox-0.16/xt/author/000755 000766 000024 00000000000 12711777774 016375 5ustar00etherstaff000000 000000 Moose-Autobox-0.16/xt/release/000755 000766 000024 00000000000 12711777774 016513 5ustar00etherstaff000000 000000 Moose-Autobox-0.16/xt/release/changes_has_content.t000644 000766 000024 00000002010 12711777774 022666 0ustar00etherstaff000000 000000 #!perl use Test::More tests => 2; note 'Checking Changes'; my $changes_file = 'Changes'; my $newver = '0.16'; my $trial_token = '-TRIAL'; SKIP: { ok(-e $changes_file, "$changes_file file exists") or skip 'Changes is missing', 1; ok(_get_changes($newver), "$changes_file has content for $newver"); } done_testing; # _get_changes copied and adapted from Dist::Zilla::Plugin::Git::Commit # by Jerome Quelin sub _get_changes { my $newver = shift; # parse changelog to find commit message open(my $fh, '<', $changes_file) or die "cannot open $changes_file: $!"; my $changelog = join('', <$fh>); close $fh; my @content = grep { /^$newver(?:$trial_token)?(?:\s+|$)/ ... /^\S/ } # from newver to un-indented split /\n/, $changelog; shift @content; # drop the version line # drop unindented last line and trailing blank lines pop @content while ( @content && $content[-1] =~ /^(?:\S|\s*$)/ ); # return number of non-blank lines return scalar @content; } Moose-Autobox-0.16/xt/release/cpan-changes.t000644 000766 000024 00000000263 12711777774 021230 0ustar00etherstaff000000 000000 #!perl use strict; use warnings; use Test::More 0.96 tests => 2; use_ok('Test::CPAN::Changes'); subtest 'changes_ok' => sub { changes_file_ok('Changes'); }; done_testing(); Moose-Autobox-0.16/xt/release/distmeta.t000644 000766 000024 00000000172 12711777774 020512 0ustar00etherstaff000000 000000 #!perl # This file was automatically generated by Dist::Zilla::Plugin::MetaTests. use Test::CPAN::Meta; meta_yaml_ok(); Moose-Autobox-0.16/xt/release/minimum-version.t000644 000766 000024 00000000271 12711777774 022036 0ustar00etherstaff000000 000000 #!perl use Test::More; eval "use Test::MinimumVersion"; plan skip_all => "Test::MinimumVersion required for testing minimum versions" if $@; all_minimum_version_ok( qq{5.008003} ); Moose-Autobox-0.16/xt/release/portability.t000644 000766 000024 00000000277 12711777774 021250 0ustar00etherstaff000000 000000 #!perl use strict; use warnings; use Test::More; eval 'use Test::Portability::Files'; plan skip_all => 'Test::Portability::Files required for testing portability' if $@; run_tests(); Moose-Autobox-0.16/xt/author/00-compile.t000644 000766 000024 00000005143 12711777774 020432 0ustar00etherstaff000000 000000 use 5.006; use strict; use warnings; # this test was generated with Dist::Zilla::Plugin::Test::Compile 2.054 use Test::More 0.94; plan tests => 18; my @module_files = ( 'Moose/Autobox.pm', 'Moose/Autobox/Array.pm', 'Moose/Autobox/Code.pm', 'Moose/Autobox/Defined.pm', 'Moose/Autobox/Hash.pm', 'Moose/Autobox/Indexed.pm', 'Moose/Autobox/Item.pm', 'Moose/Autobox/List.pm', 'Moose/Autobox/Number.pm', 'Moose/Autobox/Ref.pm', 'Moose/Autobox/Scalar.pm', 'Moose/Autobox/String.pm', 'Moose/Autobox/Undef.pm', 'Moose/Autobox/Value.pm' ); my @scripts = ( 'examples/tic_tac_toe.pl', 'examples/units/bytes.pl', 'examples/units/time.pl' ); # no fake home requested my $inc_switch = -d 'blib' ? '-Mblib' : '-Ilib'; use File::Spec; use IPC::Open3; use IO::Handle; open my $stdin, '<', File::Spec->devnull or die "can't open devnull: $!"; my @warnings; for my $lib (@module_files) { # see L my $stderr = IO::Handle->new; my $pid = open3($stdin, '>&STDERR', $stderr, $^X, $inc_switch, '-e', "require q[$lib]"); binmode $stderr, ':crlf' if $^O eq 'MSWin32'; my @_warnings = <$stderr>; waitpid($pid, 0); is($?, 0, "$lib loaded ok"); shift @_warnings if @_warnings and $_warnings[0] =~ /^Using .*\bblib/ and not eval { require blib; blib->VERSION('1.01') }; if (@_warnings) { warn @_warnings; push @warnings, @_warnings; } } foreach my $file (@scripts) { SKIP: { open my $fh, '<', $file or warn("Unable to open $file: $!"), next; my $line = <$fh>; close $fh and skip("$file isn't perl", 1) unless $line =~ /^#!\s*(?:\S*perl\S*)((?:\s+-\w*)*)(?:\s*#.*)?$/; my @flags = $1 ? split(' ', $1) : (); my $stderr = IO::Handle->new; my $pid = open3($stdin, '>&STDERR', $stderr, $^X, $inc_switch, @flags, '-c', $file); binmode $stderr, ':crlf' if $^O eq 'MSWin32'; my @_warnings = <$stderr>; waitpid($pid, 0); is($?, 0, "$file compiled ok"); shift @_warnings if @_warnings and $_warnings[0] =~ /^Using .*\bblib/ and not eval { require blib; blib->VERSION('1.01') }; # in older perls, -c output is simply the file portion of the path being tested if (@_warnings = grep { !/\bsyntax OK$/ } grep { chomp; $_ ne (File::Spec->splitpath($file))[2] } @_warnings) { warn @_warnings; push @warnings, @_warnings; } } } is(scalar(@warnings), 0, 'no warnings found') or diag 'got warnings: ', explain(\@warnings); BAIL_OUT("Compilation problems") if !Test::More->builder->is_passing; Moose-Autobox-0.16/xt/author/clean-namespaces.t000644 000766 000024 00000000570 12711777774 021763 0ustar00etherstaff000000 000000 use strict; use warnings; # this test was generated with Dist::Zilla::Plugin::Test::CleanNamespaces 0.006 use Test::More 0.94; use Test::CleanNamespaces 0.15; subtest all_namespaces_clean => sub { namespaces_clean( grep { my $mod = $_; not grep { $mod =~ $_ } qr/Moose::Autobox::Undef/ } Test::CleanNamespaces->find_modules ); }; done_testing; Moose-Autobox-0.16/xt/author/eol.t000644 000766 000024 00000003134 12711777774 017342 0ustar00etherstaff000000 000000 use strict; use warnings; # this test was generated with Dist::Zilla::Plugin::Test::EOL 0.18 use Test::More 0.88; use Test::EOL; my @files = ( 'examples/tic_tac_toe.pl', 'examples/units/bytes.pl', 'examples/units/time.pl', 'lib/Moose/Autobox.pm', 'lib/Moose/Autobox/Array.pm', 'lib/Moose/Autobox/Code.pm', 'lib/Moose/Autobox/Defined.pm', 'lib/Moose/Autobox/Hash.pm', 'lib/Moose/Autobox/Indexed.pm', 'lib/Moose/Autobox/Item.pm', 'lib/Moose/Autobox/List.pm', 'lib/Moose/Autobox/Number.pm', 'lib/Moose/Autobox/Ref.pm', 'lib/Moose/Autobox/Scalar.pm', 'lib/Moose/Autobox/String.pm', 'lib/Moose/Autobox/Undef.pm', 'lib/Moose/Autobox/Value.pm', 't/00-report-prereqs.dd', 't/00-report-prereqs.t', 't/000_load.t', 't/001_basic.t', 't/002_role_hierarchy.t', 't/003_p6_example.t', 't/004_list_compressions.t', 't/005_string.t', 't/006_y_combinator.t', 't/007_base.t', 't/008_flatten.t', 't/009_number.t', 't/010_each.t', 't/011_each_n_values.t', 't/012_first_last.t', 't/zzz-check-breaks.t', 'xt/author/00-compile.t', 'xt/author/clean-namespaces.t', 'xt/author/eol.t', 'xt/author/kwalitee.t', 'xt/author/mojibake.t', 'xt/author/no-tabs.t', 'xt/author/pod-coverage.t', 'xt/author/pod-spell.t', 'xt/author/pod-syntax.t', 'xt/release/changes_has_content.t', 'xt/release/cpan-changes.t', 'xt/release/distmeta.t', 'xt/release/minimum-version.t', 'xt/release/portability.t' ); eol_unix_ok($_, { trailing_whitespace => 1 }) foreach @files; done_testing; Moose-Autobox-0.16/xt/author/kwalitee.t000644 000766 000024 00000000275 12711777774 020373 0ustar00etherstaff000000 000000 # this test was generated with Dist::Zilla::Plugin::Test::Kwalitee 2.12 use strict; use warnings; use Test::More 0.88; use Test::Kwalitee 1.21 'kwalitee_ok'; kwalitee_ok(); done_testing; Moose-Autobox-0.16/xt/author/mojibake.t000644 000766 000024 00000000151 12711777774 020340 0ustar00etherstaff000000 000000 #!perl use strict; use warnings qw(all); use Test::More; use Test::Mojibake; all_files_encoding_ok(); Moose-Autobox-0.16/xt/author/no-tabs.t000644 000766 000024 00000003102 12711777774 020121 0ustar00etherstaff000000 000000 use strict; use warnings; # this test was generated with Dist::Zilla::Plugin::Test::NoTabs 0.15 use Test::More 0.88; use Test::NoTabs; my @files = ( 'examples/tic_tac_toe.pl', 'examples/units/bytes.pl', 'examples/units/time.pl', 'lib/Moose/Autobox.pm', 'lib/Moose/Autobox/Array.pm', 'lib/Moose/Autobox/Code.pm', 'lib/Moose/Autobox/Defined.pm', 'lib/Moose/Autobox/Hash.pm', 'lib/Moose/Autobox/Indexed.pm', 'lib/Moose/Autobox/Item.pm', 'lib/Moose/Autobox/List.pm', 'lib/Moose/Autobox/Number.pm', 'lib/Moose/Autobox/Ref.pm', 'lib/Moose/Autobox/Scalar.pm', 'lib/Moose/Autobox/String.pm', 'lib/Moose/Autobox/Undef.pm', 'lib/Moose/Autobox/Value.pm', 't/00-report-prereqs.dd', 't/00-report-prereqs.t', 't/000_load.t', 't/001_basic.t', 't/002_role_hierarchy.t', 't/003_p6_example.t', 't/004_list_compressions.t', 't/005_string.t', 't/006_y_combinator.t', 't/007_base.t', 't/008_flatten.t', 't/009_number.t', 't/010_each.t', 't/011_each_n_values.t', 't/012_first_last.t', 't/zzz-check-breaks.t', 'xt/author/00-compile.t', 'xt/author/clean-namespaces.t', 'xt/author/eol.t', 'xt/author/kwalitee.t', 'xt/author/mojibake.t', 'xt/author/no-tabs.t', 'xt/author/pod-coverage.t', 'xt/author/pod-spell.t', 'xt/author/pod-syntax.t', 'xt/release/changes_has_content.t', 'xt/release/cpan-changes.t', 'xt/release/distmeta.t', 'xt/release/minimum-version.t', 'xt/release/portability.t' ); notabs_ok($_) foreach @files; done_testing; Moose-Autobox-0.16/xt/author/pod-coverage.t000644 000766 000024 00000000334 12711777774 021135 0ustar00etherstaff000000 000000 #!perl # This file was automatically generated by Dist::Zilla::Plugin::PodCoverageTests. use Test::Pod::Coverage 1.08; use Pod::Coverage::TrustPod; all_pod_coverage_ok({ coverage_class => 'Pod::Coverage::TrustPod' }); Moose-Autobox-0.16/xt/author/pod-spell.t000644 000766 000024 00000001236 12711777774 020463 0ustar00etherstaff000000 000000 use strict; use warnings; use Test::More; # generated by Dist::Zilla::Plugin::Test::PodSpelling 2.007000 use Test::Spelling 0.12; use Pod::Wordlist; add_stopwords(); all_pod_files_spelling_ok( qw( bin lib ) ); __DATA__ irc Stevan Little stevan Infinity Interactive Inc Ricardo Signes rjbs Karen Etheridge ether Anders Nor Berle berle Matt Trout mst Steffen Schwigon ss5 Michael Swearingen mswearingen Florian Ragwitz rafl Jonathan Rockway jon Shawn Moore sartak Todd Hepler thepler David Steinbrunner dsteinbrunner Mike Whitaker mike Nigel Gregoire nigelgregoire lib Moose Autobox Array Code Defined Hash Indexed Item List Number Ref Scalar String Undef Value Moose-Autobox-0.16/xt/author/pod-syntax.t000644 000766 000024 00000000252 12711777774 020667 0ustar00etherstaff000000 000000 #!perl # This file was automatically generated by Dist::Zilla::Plugin::PodSyntaxTests. use strict; use warnings; use Test::More; use Test::Pod 1.41; all_pod_files_ok(); Moose-Autobox-0.16/t/00-report-prereqs.dd000644 000766 000024 00000022654 12711777774 020434 0ustar00etherstaff000000 000000 do { my $x = { 'configure' => { 'requires' => { 'Module::Build::Tiny' => '0.034', 'perl' => '5.006' } }, 'develop' => { 'recommends' => { 'Dist::Zilla::PluginBundle::Author::ETHER' => '0.114' }, 'requires' => { 'Dist::Zilla' => '5', 'Dist::Zilla::Plugin::Authority' => '1.009', 'Dist::Zilla::Plugin::AuthorityFromModule' => '0.002', 'Dist::Zilla::Plugin::AutoMetaResources' => '0', 'Dist::Zilla::Plugin::AutoPrereqs' => '5.038', 'Dist::Zilla::Plugin::BumpVersionAfterRelease::Transitional' => '0.004', 'Dist::Zilla::Plugin::CheckIssues' => '0', 'Dist::Zilla::Plugin::CheckPrereqsIndexed' => '0', 'Dist::Zilla::Plugin::CheckSelfDependency' => '0', 'Dist::Zilla::Plugin::CheckStrictVersion' => '0', 'Dist::Zilla::Plugin::ConfirmRelease' => '0', 'Dist::Zilla::Plugin::CopyFilesFromRelease' => '0', 'Dist::Zilla::Plugin::FileFinder::ByName' => '0', 'Dist::Zilla::Plugin::GenerateFile::FromShareDir' => '0', 'Dist::Zilla::Plugin::Git::Check' => '0', 'Dist::Zilla::Plugin::Git::CheckFor::CorrectBranch' => '0.004', 'Dist::Zilla::Plugin::Git::CheckFor::MergeConflicts' => '0', 'Dist::Zilla::Plugin::Git::Commit' => '2.020', 'Dist::Zilla::Plugin::Git::Contributors' => '0.004', 'Dist::Zilla::Plugin::Git::Describe' => '0.004', 'Dist::Zilla::Plugin::Git::GatherDir' => '2.016', 'Dist::Zilla::Plugin::Git::Push' => '0', 'Dist::Zilla::Plugin::Git::Remote::Check' => '0', 'Dist::Zilla::Plugin::Git::Tag' => '0', 'Dist::Zilla::Plugin::GitHub::Update' => '0.40', 'Dist::Zilla::Plugin::GithubMeta' => '0.54', 'Dist::Zilla::Plugin::InstallGuide' => '1.200005', 'Dist::Zilla::Plugin::Keywords' => '0.004', 'Dist::Zilla::Plugin::License' => '5.038', 'Dist::Zilla::Plugin::MakeMaker::Fallback' => '0.012', 'Dist::Zilla::Plugin::Manifest' => '0', 'Dist::Zilla::Plugin::MetaConfig' => '0', 'Dist::Zilla::Plugin::MetaJSON' => '0', 'Dist::Zilla::Plugin::MetaNoIndex' => '0', 'Dist::Zilla::Plugin::MetaProvides::Package' => '1.15000002', 'Dist::Zilla::Plugin::MetaResources' => '0', 'Dist::Zilla::Plugin::MetaTests' => '0', 'Dist::Zilla::Plugin::MetaYAML' => '0', 'Dist::Zilla::Plugin::MinimumPerl' => '1.006', 'Dist::Zilla::Plugin::ModuleBuildTiny::Fallback' => '0.018', 'Dist::Zilla::Plugin::MojibakeTests' => '0.8', 'Dist::Zilla::Plugin::NextRelease' => '5.033', 'Dist::Zilla::Plugin::PodCoverageTests' => '5.040', 'Dist::Zilla::Plugin::PodSyntaxTests' => '5.040', 'Dist::Zilla::Plugin::PodWeaver' => '4.005', 'Dist::Zilla::Plugin::Prereqs' => '0', 'Dist::Zilla::Plugin::Prereqs::AuthorDeps' => '0', 'Dist::Zilla::Plugin::PromptIfStale' => '0', 'Dist::Zilla::Plugin::Readme' => '0', 'Dist::Zilla::Plugin::ReadmeAnyFromPod' => '0.142180', 'Dist::Zilla::Plugin::RewriteVersion::Transitional' => '0.004', 'Dist::Zilla::Plugin::Run::AfterBuild' => '0.038', 'Dist::Zilla::Plugin::Run::AfterRelease' => '0.038', 'Dist::Zilla::Plugin::RunExtraTests' => '0.024', 'Dist::Zilla::Plugin::StaticInstall' => '0.005', 'Dist::Zilla::Plugin::Test::CPAN::Changes' => '0.008', 'Dist::Zilla::Plugin::Test::ChangesHasContent' => '0', 'Dist::Zilla::Plugin::Test::CheckBreaks' => '0', 'Dist::Zilla::Plugin::Test::CleanNamespaces' => '0.006', 'Dist::Zilla::Plugin::Test::Compile' => '2.039', 'Dist::Zilla::Plugin::Test::EOL' => '0.17', 'Dist::Zilla::Plugin::Test::Kwalitee' => '2.10', 'Dist::Zilla::Plugin::Test::MinimumVersion' => '2.000003', 'Dist::Zilla::Plugin::Test::NoTabs' => '0.08', 'Dist::Zilla::Plugin::Test::PodSpelling' => '2.006003', 'Dist::Zilla::Plugin::Test::Portability' => '0', 'Dist::Zilla::Plugin::Test::ReportPrereqs' => '0.022', 'Dist::Zilla::Plugin::TestRelease' => '0', 'Dist::Zilla::Plugin::UploadToCPAN' => '0', 'Dist::Zilla::PluginBundle::Author::ETHER' => '0.103', 'File::Spec' => '0', 'IO::Handle' => '0', 'IPC::Open3' => '0', 'Pod::Coverage::TrustPod' => '0', 'Pod::Wordlist' => '0', 'Software::License::Perl_5' => '0', 'Test::CPAN::Changes' => '0.19', 'Test::CPAN::Meta' => '0', 'Test::CleanNamespaces' => '0.15', 'Test::EOL' => '0', 'Test::Kwalitee' => '1.21', 'Test::Mojibake' => '0', 'Test::More' => '0.96', 'Test::NoTabs' => '0', 'Test::Pod' => '1.41', 'Test::Pod::Coverage' => '1.08', 'Test::Spelling' => '0.12', 'blib' => '1.01' } }, 'runtime' => { 'requires' => { 'Carp' => '0', 'Data::Dumper' => '0', 'List::MoreUtils' => '0.07', 'Moose' => '0.42', 'Moose::Role' => '0', 'Moose::Util' => '0', 'Scalar::Util' => '0', 'Syntax::Keyword::Junction::All' => '0', 'Syntax::Keyword::Junction::Any' => '0', 'Syntax::Keyword::Junction::None' => '0', 'Syntax::Keyword::Junction::One' => '0', 'autobox' => '2.23', 'metaclass' => '0', 'namespace::autoclean' => '0', 'parent' => '0', 'perl' => '5.006', 'strict' => '0', 'warnings' => '0' } }, 'test' => { 'recommends' => { 'CPAN::Meta' => '2.120900' }, 'requires' => { 'File::Spec' => '0', 'Module::Metadata' => '0', 'Test::Exception' => '0', 'Test::More' => '0', 'perl' => '5.006' } } }; $x; }Moose-Autobox-0.16/t/00-report-prereqs.t000644 000766 000024 00000012774 12711777774 020312 0ustar00etherstaff000000 000000 #!perl use strict; use warnings; # This test was generated by Dist::Zilla::Plugin::Test::ReportPrereqs 0.024 use Test::More tests => 1; use Module::Metadata; use File::Spec; # from $version::LAX my $lax_version_re = qr/(?: undef | (?: (?:[0-9]+) (?: \. | (?:\.[0-9]+) (?:_[0-9]+)? )? | (?:\.[0-9]+) (?:_[0-9]+)? ) | (?: v (?:[0-9]+) (?: (?:\.[0-9]+)+ (?:_[0-9]+)? )? | (?:[0-9]+)? (?:\.[0-9]+){2,} (?:_[0-9]+)? ) )/x; # hide optional CPAN::Meta modules from prereq scanner # and check if they are available my $cpan_meta = "CPAN::Meta"; my $cpan_meta_pre = "CPAN::Meta::Prereqs"; my $HAS_CPAN_META = eval "require $cpan_meta; $cpan_meta->VERSION('2.120900')" && eval "require $cpan_meta_pre"; ## no critic # Verify requirements? my $DO_VERIFY_PREREQS = 1; sub _max { my $max = shift; $max = ( $_ > $max ) ? $_ : $max for @_; return $max; } sub _merge_prereqs { my ($collector, $prereqs) = @_; # CPAN::Meta::Prereqs object if (ref $collector eq $cpan_meta_pre) { return $collector->with_merged_prereqs( CPAN::Meta::Prereqs->new( $prereqs ) ); } # Raw hashrefs for my $phase ( keys %$prereqs ) { for my $type ( keys %{ $prereqs->{$phase} } ) { for my $module ( keys %{ $prereqs->{$phase}{$type} } ) { $collector->{$phase}{$type}{$module} = $prereqs->{$phase}{$type}{$module}; } } } return $collector; } my @include = qw( Pod::Coverage ); my @exclude = qw( ); # Add static prereqs to the included modules list my $static_prereqs = do 't/00-report-prereqs.dd'; # Merge all prereqs (either with ::Prereqs or a hashref) my $full_prereqs = _merge_prereqs( ( $HAS_CPAN_META ? $cpan_meta_pre->new : {} ), $static_prereqs ); # Add dynamic prereqs to the included modules list (if we can) my ($source) = grep { -f } 'MYMETA.json', 'MYMETA.yml'; if ( $source && $HAS_CPAN_META ) { if ( my $meta = eval { CPAN::Meta->load_file($source) } ) { $full_prereqs = _merge_prereqs($full_prereqs, $meta->prereqs); } } else { $source = 'static metadata'; } my @full_reports; my @dep_errors; my $req_hash = $HAS_CPAN_META ? $full_prereqs->as_string_hash : $full_prereqs; # Add static includes into a fake section for my $mod (@include) { $req_hash->{other}{modules}{$mod} = 0; } for my $phase ( qw(configure build test runtime develop other) ) { next unless $req_hash->{$phase}; next if ($phase eq 'develop' and not $ENV{AUTHOR_TESTING}); for my $type ( qw(requires recommends suggests conflicts modules) ) { next unless $req_hash->{$phase}{$type}; my $title = ucfirst($phase).' '.ucfirst($type); my @reports = [qw/Module Want Have/]; for my $mod ( sort keys %{ $req_hash->{$phase}{$type} } ) { next if $mod eq 'perl'; next if grep { $_ eq $mod } @exclude; my $file = $mod; $file =~ s{::}{/}g; $file .= ".pm"; my ($prefix) = grep { -e File::Spec->catfile($_, $file) } @INC; my $want = $req_hash->{$phase}{$type}{$mod}; $want = "undef" unless defined $want; $want = "any" if !$want && $want == 0; my $req_string = $want eq 'any' ? 'any version required' : "version '$want' required"; if ($prefix) { my $have = Module::Metadata->new_from_file( File::Spec->catfile($prefix, $file) )->version; $have = "undef" unless defined $have; push @reports, [$mod, $want, $have]; if ( $DO_VERIFY_PREREQS && $HAS_CPAN_META && $type eq 'requires' ) { if ( $have !~ /\A$lax_version_re\z/ ) { push @dep_errors, "$mod version '$have' cannot be parsed ($req_string)"; } elsif ( ! $full_prereqs->requirements_for( $phase, $type )->accepts_module( $mod => $have ) ) { push @dep_errors, "$mod version '$have' is not in required range '$want'"; } } } else { push @reports, [$mod, $want, "missing"]; if ( $DO_VERIFY_PREREQS && $type eq 'requires' ) { push @dep_errors, "$mod is not installed ($req_string)"; } } } if ( @reports ) { push @full_reports, "=== $title ===\n\n"; my $ml = _max( map { length $_->[0] } @reports ); my $wl = _max( map { length $_->[1] } @reports ); my $hl = _max( map { length $_->[2] } @reports ); if ($type eq 'modules') { splice @reports, 1, 0, ["-" x $ml, "", "-" x $hl]; push @full_reports, map { sprintf(" %*s %*s\n", -$ml, $_->[0], $hl, $_->[2]) } @reports; } else { splice @reports, 1, 0, ["-" x $ml, "-" x $wl, "-" x $hl]; push @full_reports, map { sprintf(" %*s %*s %*s\n", -$ml, $_->[0], $wl, $_->[1], $hl, $_->[2]) } @reports; } push @full_reports, "\n"; } } } if ( @full_reports ) { diag "\nVersions for all modules listed in $source (including optional ones):\n\n", @full_reports; } if ( @dep_errors ) { diag join("\n", "\n*** WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING ***\n", "The following REQUIRED prerequisites were not satisfied:\n", @dep_errors, "\n" ); } pass; # vim: ts=4 sts=4 sw=4 et: Moose-Autobox-0.16/t/000_load.t000600 000766 000024 00000001103 12711777774 016351 0ustar00etherstaff000000 000000 use strict; use warnings; use Test::More tests => 14; BEGIN { use_ok('Moose::Autobox'); use_ok('Moose::Autobox::Array'); use_ok('Moose::Autobox::Code'); use_ok('Moose::Autobox::Defined'); use_ok('Moose::Autobox::Hash'); use_ok('Moose::Autobox::Indexed'); use_ok('Moose::Autobox::Item'); use_ok('Moose::Autobox::List'); use_ok('Moose::Autobox::Number'); use_ok('Moose::Autobox::Ref'); use_ok('Moose::Autobox::Scalar'); use_ok('Moose::Autobox::String'); use_ok('Moose::Autobox::Undef'); use_ok('Moose::Autobox::Value'); } Moose-Autobox-0.16/t/001_basic.t000600 000766 000024 00000014541 12711777774 016526 0ustar00etherstaff000000 000000 use strict; use warnings; use Test::More tests => 69; use Moose::Autobox; my $VAR1; # for eval of dumps # SCALAR & UNDEF my $s; ok(!$s->defined, '... got a undefined value'); $s = 5; ok($s->defined, '... got a defined value'); eval $s->dump; is($VAR1, 5 , '... eval of SCALAR->dump works'); eval $s->flatten; is($VAR1, 5 , '... eval of SCALAR->flatten works'); eval $s->perl; is($s->perl, $s->dump, '... SCALAR->dump equals SCALAR->perl'); # CODE my $f1 = sub { @_ }; ok($f1->defined, '... created function'); my $f2 = eval { $f1->curry(1, 2, 3) }; ok($f2->defined, '... created curried function'); my $f3 = eval { $f1->rcurry(1, 2, 3) }; ok($f3->defined, '... created right-curried function'); is_deeply( [ $f2->(4, 5, 6) ], [ 1, 2, 3, 4, 5, 6 ], '... got the right return value from the curried function'); is_deeply( [ $f3->(4, 5, 6) ], [ 4, 5, 6, 1, 2, 3 ], '... got the right return value from the r-curried function'); ok((sub { 1 })->disjoin(sub { 0 })->(), '... disjoins properly'); ok((sub { 0 })->disjoin(sub { 1 })->(), '... disjoins properly'); ok(!(sub { 1 })->conjoin(sub { 0 })->(), '... conjoins properly'); ok(!(sub { 0 })->conjoin(sub { 1 })->(), '... conjoins properly'); my $compose = (sub { @_, 1 })->compose(sub { @_, 2 }); is_deeply( [ $compose->() ], [ 1, 2 ], '... got the right return value for compose'); # ARRAY my $a = [ 4, 2, 6, 78, 101, 2, 3 ]; is($a->length, 7, '... got the right length'); ok($a->defined, '... got the right defined value'); is_deeply( $a->map(sub { $_ + 2 }), [ map { $_ + 2 } (4, 2, 6, 78, 101, 2, 3) ], '... got the right return value for map'); is_deeply($a, [ 4, 2, 6, 78, 101, 2, 3 ], '... original value is unchanged'); my $b = [1, 2, 3]; $b->map(sub { $_++ } ); is_deeply($b, [ 2, 3, 4 ], '... original value is changed'); is_deeply( $a->reverse(), [ 3, 2, 101, 78, 6, 2, 4 ], '... got the right return value for reverse'); is_deeply($a, [ 4, 2, 6, 78, 101, 2, 3 ], '... original value is unchanged'); is_deeply( $a->grep(sub { $_ < 50 }), [ grep { $_ < 50 } (4, 2, 6, 78, 101, 2, 3) ], '... got the right return value grep'); is_deeply($a, [ 4, 2, 6, 78, 101, 2, 3 ], '... original value is unchanged'); is($a->join(', '), '4, 2, 6, 78, 101, 2, 3', '... got the right joined string'); is($a->join, '4267810123', '... got the right joined string'); ok($a->exists(0), '... exists works'); ok(!$a->exists(10), '... exists works'); is($a->pop(), 3, '... got the right pop-ed value'); is_deeply($a, [ 4, 2, 6, 78, 101, 2 ], '... original value is now changed'); is($a->shift(), 4, '... got the right unshift-ed value'); is_deeply($a, [ 2, 6, 78, 101, 2 ], '... original value is now changed'); is_deeply( $a->slice([ 1, 2, 4 ]), [ 6, 78, 2 ], '... got the right sliced value'); is_deeply( $a->unshift(10), [ 10, 2, 6, 78, 101, 2 ], '... got the correct unshifted value'); is_deeply( $a->unshift(15, 20, 30), [ 15, 20, 30, 10, 2, 6, 78, 101, 2 ], '... got the correct unshifted value (multiple values)'); is_deeply( $a->push(10), [ 15, 20, 30, 10, 2, 6, 78, 101, 2, 10 ], '... got the correct pushed value'); is_deeply( $a->push(15, 20, 30), [ 15, 20, 30, 10, 2, 6, 78, 101, 2, 10, 15, 20, 30 ], '... got the correct pushed value (multiple values)'); is_deeply( $a->sort(sub { $_[0] <=> $_[1] }), [ 2, 2, 6, 10, 10, 15, 15, 20, 20, 30, 30, 78, 101 ], '... got the correct sorted value'); is_deeply( $a, [ 15, 20, 30, 10, 2, 6, 78, 101, 2, 10, 15, 20, 30 ], '... the original values are unchanged'); is_deeply( []->push(10, 20, 30)->map(sub { ($_, $_ + 5) })->reverse, [ 35, 30, 25, 20, 15, 10 ], '... got the correct chained value'); is_deeply( $a->keys, [ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12 ], '... the keys'); is_deeply( $a->values, [ 15, 20, 30, 10, 2, 6, 78, 101, 2, 10, 15, 20, 30 ], '... the values'); is_deeply( $a->kv, [ [0, 15], [1, 20], [2, 30], [3, 10], [4, 2], [5, 6], [6, 78], [7, 101], [8, 2], [9, 10], [10, 15], [11, 20], [12, 30] ], '... [ k, v ]'); is([1, 2, 3, 4, 5]->reduce(sub { $_[0] + $_[1] }), 15, '... got the right reduction'); is_deeply( [1, 2, 3, 4, 5]->zip([ 5, 4, 3, 2, 1 ]), [ [1, 5], [2, 4], [3, 3], [4, 2], [5, 1] ], '... got the right zip'); is_deeply( [1, 2, 3, 4, 5]->zip([ 6, 5, 4, 3, 2, 1 ]), [ [1, 6], [2, 5], [3, 4], [4, 3], [5, 2], [undef, 1] ], '... got the right zip'); is($a->delete(2), 30, '... got the value deleted'); is_deeply( $a, [ 15, 20, undef, 10, 2, 6, 78, 101, 2, 10, 15, 20, 30 ], '... the value is correctly deleted'); $a->put(2, 30); is_deeply( $a, [ 15, 20, 30, 10, 2, 6, 78, 101, 2, 10, 15, 20, 30 ], '... the value is correctly put'); eval($a->dump); is_deeply( $VAR1, [ 15, 20, 30, 10, 2, 6, 78, 101, 2, 10, 15, 20, 30 ], '... the value is correctly dumped'); is( $a->dump, $a->perl, '... the value is correctly dumped with perl()' ); is([1, 2, 3, 4, 5]->any, 3, '... any correctly found a value'); is([1, 1, 2, 3, 4, 5, 5]->one, 2, '... one correctly found one value'); is([1, 1, 2, 3, 4, 5, 5]->none , 6, '... none correctly did not find any of a value'); is([3, 3, 3]->all, 3, '... all correctly found all of a value'); # Hash my $h = { one => 1, two => 2, three => 3 }; ok($h->defined, '... got the right defined value'); is_deeply( $h->keys->sort, [ qw/one three two/ ], '... the keys'); is_deeply( $h->values->sort, [ 1, 2, 3 ], '... the values'); is_deeply( $h->kv->sort(sub { $_[0]->[1] <=> $_[1]->[1] }), [ ['one', 1], ['two', 2], ['three', 3] ], '... the kvs'); ok($h->exists('two'), '... exists works'); ok(!$h->exists('five'), '... !exists works'); $h->put('four' => 4); is_deeply( $h, { one => 1, two => 2, three => 3, four => 4 }, '... got the value added correctly'); is($h->at('four'), 4, '... got the value at "four"'); $h->delete('four'); is_deeply( $h, { one => 1, two => 2, three => 3 }, '... got the value deleted correctly'); is_deeply( $h->merge({ three => 33, four => 44 }), { one => 1, two => 2, three => 33, four => 44 }, '... got the hashes merged correctly'); eval($h->dump); is_deeply( $VAR1, { one => 1, two => 2, three => 3 }, '... the value is correctly dumped'); is( $h->dump, $h->perl, '... the value is correctly dumped with perl()' ); is_deeply( { one => 1, two => 2, three => 3 }->slice([qw/three one/]), [ qw/3 1/ ], '... hash slices ok' ); is_deeply( { one => 1, two => 2, three => 3 }->hslice([qw/two three/]), { two => 2, three => 3 }, '... hash hslices ok' ); Moose-Autobox-0.16/t/002_role_hierarchy.t000600 000766 000024 00000004377 12711777774 020453 0ustar00etherstaff000000 000000 use strict; use warnings; use Test::More tests => 21; use Moose::Autobox; ok(Moose::Autobox::SCALAR->does('Moose::Autobox::Scalar'), '... SCALAR does Moose::Autobox::Scalar'); ok(Moose::Autobox::SCALAR->does('Moose::Autobox::String'), '... SCALAR does Moose::Autobox::String'); ok(Moose::Autobox::SCALAR->does('Moose::Autobox::Number'), '... SCALAR does Moose::Autobox::Number'); ok(Moose::Autobox::SCALAR->does('Moose::Autobox::Value'), '... SCALAR does Moose::Autobox::Value'); ok(Moose::Autobox::SCALAR->does('Moose::Autobox::Defined'), '... SCALAR does Moose::Autobox::Defined'); ok(Moose::Autobox::SCALAR->does('Moose::Autobox::Item'), '... SCALAR does Moose::Autobox::Item'); ok(Moose::Autobox::ARRAY->does('Moose::Autobox::Array'), '... ARRAY does Moose::Autobox::Array'); ok(Moose::Autobox::ARRAY->does('Moose::Autobox::List'), '... ARRAY does Moose::Autobox::List'); ok(Moose::Autobox::ARRAY->does('Moose::Autobox::Indexed'), '... ARRAY does Moose::Autobox::Indexed'); ok(Moose::Autobox::ARRAY->does('Moose::Autobox::Ref'), '... ARRAY does Moose::Autobox::Ref'); ok(Moose::Autobox::ARRAY->does('Moose::Autobox::Defined'), '... ARRAY does Moose::Autobox::Defined'); ok(Moose::Autobox::ARRAY->does('Moose::Autobox::Item'), '... ARRAY does Moose::Autobox::Item'); ok(Moose::Autobox::HASH->does('Moose::Autobox::Hash'), '... HASH does Moose::Autobox::Hash'); ok(Moose::Autobox::HASH->does('Moose::Autobox::Indexed'), '... HASH does Moose::Autobox::Indexed'); ok(Moose::Autobox::HASH->does('Moose::Autobox::Ref'), '... HASH does Moose::Autobox::Ref'); ok(Moose::Autobox::HASH->does('Moose::Autobox::Defined'), '... HASH does Moose::Autobox::Defined'); ok(Moose::Autobox::HASH->does('Moose::Autobox::Item'), '... HASH does Moose::Autobox::Item'); ok(Moose::Autobox::CODE->does('Moose::Autobox::Code'), '... CODE does Moose::Autobox::Code'); ok(Moose::Autobox::CODE->does('Moose::Autobox::Ref'), '... CODE does Moose::Autobox::Ref'); ok(Moose::Autobox::CODE->does('Moose::Autobox::Defined'), '... CODE does Moose::Autobox::Defined'); ok(Moose::Autobox::CODE->does('Moose::Autobox::Item'), '... CODE does Moose::Autobox::Item'); Moose-Autobox-0.16/t/003_p6_example.t000600 000766 000024 00000002415 12711777774 017504 0ustar00etherstaff000000 000000 use strict; use warnings; use Test::More tests => 7; use Test::Exception; require Moose::Autobox; =pod This comes from one of the examples in the Pugs distro. =cut { package Units::Bytes; use Moose::Role; use Moose::Autobox; sub bytes { $_[0] } sub kilobytes { $_[0] * 1024 } sub megabytes { $_[0] * 1024->kilobytes } sub gigabytes { $_[0] * 1024->megabytes } sub terabytes { $_[0] * 1024->gigabytes } { no warnings 'once'; # << squelch the stupid "used only once, maybe typo" warnings *byte = \&bytes; *kilobyte = \&kilobytes; *megabyte = \&megabytes; *gigabyte = \&gigabytes; *terabyte = \&terabytes; } } Moose::Autobox->mixin_additional_role(SCALAR => 'Units::Bytes'); sub testing_bytes { ::dies_ok { 10->bytes } '... cannot do the autoboxing lexically'; } { use Moose::Autobox; is(5->bytes, 5, '... got 5 bytes'); is(5->kilobytes, 5120, '... got 5 kilobytes'); is(2->megabytes, 2097152, '... got 2 megabytes'); is(1->gigabyte, 1073741824, '... got 1 gigabyte'); is(2->terabytes, 2199023255552, '... got 2 terabyte'); testing_bytes; } dies_ok { 5->bytes } '... no longer got 5 bytes'; Moose-Autobox-0.16/t/004_list_compressions.t000600 000766 000024 00000001301 12711777774 021215 0ustar00etherstaff000000 000000 use strict; use warnings; use Test::More tests => 4; use Moose::Autobox; is_deeply( [ 1 .. 5 ]->map(sub { $_ * $_ }), [ 1, 4, 9, 16, 25 ], '... got the expected return values'); is_deeply( [ 1 .. 5 ]->map(sub { $_ * $_ })->do(sub { $_->zip($_) }), [ [1, 1], [4, 4], [9, 9], [16, 16], [25, 25] ], '... got the expected return values'); is( # sprintf an array ... [ 1 .. 5 ]->sprintf("%d -> %d -> %d"), '1 -> 2 -> 3', '... got the sprintf-ed values'); is( # sprintf an array ... [ 1 .. 5 ]->do(sub { $_->sprintf( $_->keys ->map(sub { '%d (' . $_ . ')' }) ->join(' -> ')) }), '1 (0) -> 2 (1) -> 3 (2) -> 4 (3) -> 5 (4)', '... got a more elaboratly sprintf-ed values'); Moose-Autobox-0.16/t/005_string.t000600 000766 000024 00000003430 12711777774 016752 0ustar00etherstaff000000 000000 use strict; use warnings; use Test::More tests => 22; use Test::Exception; use Moose::Autobox; my $VAR1; # for eval of dumps is('Hello World'->lc, 'hello world', '... $str->lc'); is('Hello World'->uc, 'HELLO WORLD', '... $str->uc'); is('foo'->ucfirst, 'Foo', '... $str->ucfirst'); is('Foo'->lcfirst, 'foo', '... $str->lcfirst'); dies_ok { ('Hello')->chop } '... cannot modify a read-only'; { my $greeting = 'Hello'; is($greeting->chop, 'o', '... got the chopped off portion of the string'); is($greeting, 'Hell', '... and are left with the rest of the string'); } dies_ok { "Hello\n"->chomp } '... cannot modify a read-only'; { my $greeting = "Hello\n"; is($greeting->chomp, '1', '... got the chopped off portion of the string'); is($greeting, 'Hello', '... and are left with the rest of the string'); } is('reverse'->reverse, 'esrever', '... got the string reversal'); is('length'->length, 6, '... got the string length'); is('Hello World'->index('World'), 6, '... got the correct index'); is('Hello World, Hello'->index('Hello'), 0, '... got the correct index'); is('Hello World, Hello'->index('Hello', 6), 13, '... got the correct index'); is('Hello World, Hello'->rindex('Hello'), 13, '... got the correct right index'); is('Hello World, Hello'->rindex('Hello', 6), 0, '... got the correct right index'); is_deeply('/foo/bar/baz'->split('/'), ['', 'foo', 'bar', 'baz'], '... got the correct fragments'); is_deeply('Hello World'->words, ['Hello', 'World'], '... got the correct words'); is_deeply("Hello\nWor\n\nld\n"->lines, ['Hello', 'Wor', '', 'ld'], '... got the correct lines'); eval 'Hello World, Hello'->dump; is($VAR1, 'Hello World, Hello' , '... eval of &dump works'); eval 'Hello World, Hello'->perl; is($VAR1, 'Hello World, Hello' , '... eval of &perl works'); Moose-Autobox-0.16/t/006_y_combinator.t000600 000766 000024 00000001161 12711777774 020131 0ustar00etherstaff000000 000000 use strict; use warnings; use Test::More tests => 2; use Test::Exception; use Moose::Autobox; # we need a control in the experiment sub fact { my $n = shift; return 1 if $n < 2; return $n * fact($n - 1); } *fact2 = sub { my $f = shift; sub { my $n = shift; return 1 if $n < 2; return $n * $f->($n - 1); } }->y; *fact3 = sub { my $f = shift; sub { my $n = shift; return 1 if $n < 2; return $n * ($f->($f))->($n - 1); } }->u; is(fact(10), fact2(10), '... our factorials match'); is(fact(10), fact3()->(10), '... our factorials match'); Moose-Autobox-0.16/t/007_base.t000600 000766 000024 00000000356 12711777774 016364 0ustar00etherstaff000000 000000 use strict; use warnings; use Test::More tests => 4; use Moose::Autobox (); foreach my $stem (qw(SCALAR ARRAY HASH CODE)) { my $class = "Moose::Autobox::${stem}"; ok(!$class->isa('Moose::Object'), "${class} !isa Moose::Object"); } Moose-Autobox-0.16/t/008_flatten.t000600 000766 000024 00000002657 12711777774 017116 0ustar00etherstaff000000 000000 use strict; use warnings; use Test::More tests => 9; use Moose::Autobox; my $array = [ qw(1 2 3 4 ) ]; is_deeply( [ $array->flatten ], [ 1, 2, 3, 4 ], "flattening an array returns a list", ); my $hash = { a => 1, b => 2 }; is_deeply( [ sort $hash->flatten ], [ qw(1 2 a b) ], "flattening a hash returns a list", ); my $scalar = 1; is_deeply( [ $scalar->flatten ], [ 1 ], "flattening a scalar returns the scalar", ); my $scalar_ref = \$scalar; is_deeply( [ $scalar_ref->flatten ], [ \$scalar ], "flattening a reference to a scalar returns the same scalar reference", ); # flatten_deep on array is_deeply( [ 1 .. 9 ]->flatten_deep, [ 1 .. 9 ], "default flatten_deep on shallow array returns correct array" ); is_deeply( [ [ 1 .. 3 ], [[ 4 .. 6 ]], [[[ 7 .. 9 ]]] ]->flatten_deep, [ 1 .. 9 ], "default flatten_deep on array with depth completely flattens array" ); is_deeply( [ [ 1 .. 3 ], [[ 4 .. 6 ]], [[[ 7 .. 9 ]]] ]->flatten_deep(undef), [ 1 .. 9 ], "flatten_deep with an undef argument on array with depth completely flattens array" ); is_deeply( [ [ 1 .. 3 ], [[ 4 .. 6 ]], [[[ 7 .. 9 ]]] ]->flatten_deep(0), [ [ 1 .. 3 ], [[ 4 .. 6 ]], [[[ 7 .. 9 ]]] ], "flatten_deep with depth 0 specified on array returns array unchanged" ); is_deeply( [ [ 1 .. 3 ], [[ 4 .. 6 ]], [[[ 7 .. 9 ]]] ]->flatten_deep(2), [ 1 .. 6, [ 7 .. 9 ] ], "flatten_deep with depth specified returns correct array" ); Moose-Autobox-0.16/t/009_number.t000600 000766 000024 00000000364 12711777774 016743 0ustar00etherstaff000000 000000 use strict; use warnings; use Test::More tests => 3; use Moose::Autobox; is_deeply( 1->to(5), [ 1, 2, 3, 4, 5 ], '... got 1 to 5'); is_deeply( 5->to(1), [ 5, 4, 3, 2, 1 ], '... got 5 to 1'); is_deeply( 1->to(1), [ 1 ], '... got 1 to 1'); Moose-Autobox-0.16/t/010_each.t000600 000766 000024 00000002357 12711777774 016347 0ustar00etherstaff000000 000000 use strict; use warnings; use Test::More tests => 11; require_ok('Moose::Autobox'); use Moose::Autobox; { my %hash = ( a => 1, b => 2, c => 3, ); my $href = { %hash }; is_deeply($href, \%hash, "sanity check to start"); my @keys; $href->each_key(sub { push @keys, $_ }); is_deeply([ sort @keys ], [ sort keys %hash ], "keys found via each_key"); my @values; $href->each_value(sub { push @values, $_ }); is_deeply([ sort @values ], [ sort values %hash ], "values via each_values"); $href->each_value(sub { $_++ }); is($href->{a}, 2, "we can ++ values directly"); $href->each_key(sub { $_ = "$_$_" }); ok(! exists $href->{aa}, "we cannot alter keys directly"); } { my @array = qw(foo bar baz); my $aref = [ @array ]; is_deeply($aref, \@array, "sanity check to start"); my @keys; $aref->each_key(sub { push @keys, $_ }); is_deeply([ @keys ], [ 0, 1, 2 ], "keys found via each_key"); my @values; $aref->each_value(sub { push @values, $_ }); is_deeply([ @values ], [ @array ], "values via each_values"); $aref->each_value(sub { $_ = uc }); is($aref->[0], 'FOO', "we can alter values directly"); $aref->each_key(sub { $_ = $_ + 1 }); ok(! $aref->[3], "we cannot alter keys directly"); } Moose-Autobox-0.16/t/011_each_n_values.t000644 000766 000024 00000002136 12711777774 020247 0ustar00etherstaff000000 000000 use strict; use warnings; use Test::More; use Moose::Autobox; { my @array = ('a' .. 'z'); my $aref = [ @array ]; { my @vals; @array->each_n_values(2, sub { push @vals, [@_] }); is(scalar @vals, 13); is(scalar @$_, 2) for @vals; is_deeply(@vals->map(sub { @{ $_ } }), [@array]); } { my @vals; $aref->each_n_values(2, sub { push @vals, [@_] }); is(scalar @vals, 13); is(scalar @$_, 2) for @vals; is_deeply(@vals->map(sub { @{ $_ } }), $aref); } } { my %hash = (a => 1, b => 2, c => 3, d => 4); my $href = { %hash }; { my @vals; %hash->each_n_values(2, sub { push @vals, [@_] }); my %seen; is(@vals, 2); for my $pair (@vals) { $seen{$_}++ for @$pair } is_deeply(\%seen, { 1,1,2,1,3,1,4,1 }); } { my @vals; $href->each_n_values(2, sub { push @vals, [@_] }); my %seen; is(@vals, 2); for my $pair (@vals) { $seen{$_}++ for @$pair } is_deeply(\%seen, { 1,1,2,1,3,1,4,1 }); } } done_testing; Moose-Autobox-0.16/t/012_first_last.t000600 000766 000024 00000000376 12711777774 017622 0ustar00etherstaff000000 000000 use strict; use warnings; use Test::More tests => 5; require_ok('Moose::Autobox'); use Moose::Autobox; my $string = 'foo'; my $list = ['foo', 'bar']; is $string->first, 'foo'; is $string->last, 'foo'; is $list->first, 'foo'; is $list->last, 'bar'; Moose-Autobox-0.16/t/zzz-check-breaks.t000644 000766 000024 00000000623 12711777774 020246 0ustar00etherstaff000000 000000 use strict; use warnings; # this test was generated with Dist::Zilla::Plugin::Test::CheckBreaks 0.016 use Test::More tests => 2; SKIP: { eval 'require Moose::Conflicts; Moose::Conflicts->check_conflicts'; skip('no Moose::Conflicts module found', 1) if not $INC{'Moose/Conflicts.pm'}; diag $@ if $@; pass 'conflicts checked via Moose::Conflicts'; } pass 'no x_breaks data to check'; Moose-Autobox-0.16/lib/Moose/000755 000766 000024 00000000000 12711777774 016270 5ustar00etherstaff000000 000000 Moose-Autobox-0.16/lib/Moose/Autobox/000755 000766 000024 00000000000 12711777774 017711 5ustar00etherstaff000000 000000 Moose-Autobox-0.16/lib/Moose/Autobox.pm000600 000766 000024 00000013177 12711777774 020250 0ustar00etherstaff000000 000000 package Moose::Autobox; # git description: 0_09-64-ge6e9586 # ABSTRACT: Autoboxed wrappers for Native Perl datatypes use 5.006; use strict; use warnings; use Carp (); use Scalar::Util (); use Moose::Util (); our $VERSION = '0.16'; use parent 'autobox'; use Moose::Autobox::Undef; sub import { (shift)->SUPER::import( DEFAULT => 'Moose::Autobox::', UNDEF => 'Moose::Autobox::Undef', ); } sub mixin_additional_role { my ($class, $type, $role) = @_; ($type =~ /SCALAR|ARRAY|HASH|CODE/) || Carp::confess "Can only add additional roles to SCALAR, ARRAY, HASH or CODE"; Moose::Util::apply_all_roles(('Moose::Autobox::' . $type)->meta, ($role)); } { package Moose::Autobox::SCALAR; use Moose::Autobox::Scalar; use metaclass 'Moose::Meta::Class'; Moose::Util::apply_all_roles(__PACKAGE__->meta, ('Moose::Autobox::Scalar')); *does = \&Moose::Object::does; package Moose::Autobox::ARRAY; use Moose::Autobox::Array; use metaclass 'Moose::Meta::Class'; Moose::Util::apply_all_roles(__PACKAGE__->meta, ('Moose::Autobox::Array')); *does = \&Moose::Object::does; package Moose::Autobox::HASH; use Moose::Autobox::Hash; use metaclass 'Moose::Meta::Class'; Moose::Util::apply_all_roles(__PACKAGE__->meta, ('Moose::Autobox::Hash')); *does = \&Moose::Object::does; package Moose::Autobox::CODE; use Moose::Autobox::Code; use metaclass 'Moose::Meta::Class'; Moose::Util::apply_all_roles(__PACKAGE__->meta, ('Moose::Autobox::Code')); *does = \&Moose::Object::does; } 1; __END__ =pod =encoding UTF-8 =for :stopwords Autoboxed autobox =head1 NAME Moose::Autobox - Autoboxed wrappers for Native Perl datatypes =head1 VERSION version 0.16 =head1 SYNOPSIS use Moose::Autobox; print 'Print squares from 1 to 10 : '; print [ 1 .. 10 ]->map(sub { $_ * $_ })->join(', '); =head1 DESCRIPTION Moose::Autobox provides an implementation of SCALAR, ARRAY, HASH & CODE for use with L. It does this using a hierarchy of roles in a manner similar to what Perl 6 I do. This module, like L and L, was inspired by my work on the Perl 6 Object Space, and the 'core types' implemented there. =head2 A quick word about autobox The L module provides the ability for calling 'methods' on normal Perl values like Scalars, Arrays, Hashes and Code references. This gives the illusion that Perl's types are first-class objects. However, this is only an illusion, albeit a very nice one. I created this module because L itself does not actually provide an implementation for the Perl types but instead only provides the 'hooks' for others to add implementation too. =head2 Is this for real? or just play? Several people are using this module in serious applications and it seems to be quite stable. The underlying technologies of L and L 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 of methods on native Perl values, not the mere act of loading this module in your namespace. If you have any questions regarding this module, either email me, or stop by #moose on irc.perl.org and ask around. =head2 Adding additional methods B asks L to use the B namespace prefix so as to avoid stepping on the toes of other L modules. This means that if you want to add methods to a particular perl type (i.e. - monkeypatch), then you must do this: sub Moose::Autobox::SCALAR::bar { 42 } instead of this: sub SCALAR::bar { 42 } as you would with vanilla autobox. =head1 METHODS =over 4 =item C This will mixin an additional C<$role> into a certain C<$type>. The types can be SCALAR, ARRAY, HASH or CODE. This can be used to add additional methods to the types, see the F directory for some examples. =back =for :stopwords TODO =head1 TODO =over 4 =item More docs =item More tests =back =head1 SUPPORT Bugs may be submitted through L (or L). There is also a mailing list available for users of this distribution, at L. There is also an irc channel available for users of this distribution, at L on C|irc://irc.perl.org/#moose>. =head1 AUTHOR Stevan Little =head1 CONTRIBUTORS =for stopwords Ricardo Signes Karen Etheridge Anders Nor Berle Matt S Trout Steffen Schwigon Michael Swearingen Florian Ragwitz Jonathan Rockway Shawn M Moore Todd Hepler David Steinbrunner Mike Whitaker Nigel Gregoire =over 4 =item * Ricardo Signes =item * Karen Etheridge =item * Anders Nor Berle =item * Matt S Trout =item * Steffen Schwigon =item * Michael Swearingen =item * Florian Ragwitz =item * Jonathan Rockway =item * Shawn M Moore =item * Todd Hepler =item * David Steinbrunner =item * Mike Whitaker =item * Nigel Gregoire =back =head1 COPYRIGHT AND LICENSE This software is copyright (c) 2006 by Infinity Interactive, Inc. This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. =cut Moose-Autobox-0.16/lib/Moose/Autobox/Array.pm000644 000766 000024 00000014035 12711777774 021330 0ustar00etherstaff000000 000000 package Moose::Autobox::Array; # ABSTRACT: the Array role use Moose::Role 'with'; use Moose::Autobox; use List::MoreUtils 0.07 (); use Syntax::Keyword::Junction::All (); use Syntax::Keyword::Junction::Any (); use Syntax::Keyword::Junction::None (); use Syntax::Keyword::Junction::One (); use namespace::autoclean; our $VERSION = '0.16'; with 'Moose::Autobox::Ref', 'Moose::Autobox::List', 'Moose::Autobox::Indexed'; ## Array Interface sub pop { my ($array) = @_; CORE::pop @$array; } sub push { my ($array, @rest) = @_; CORE::push @$array, @rest; $array; } sub unshift { my ($array, @rest) = @_; CORE::unshift @$array, @rest; $array; } sub delete { my ($array, $index) = @_; CORE::delete $array->[$index]; } sub shift { my ($array) = @_; CORE::shift @$array; } sub slice { my ($array, $indicies) = @_; [ @{$array}[ @{$indicies} ] ]; } # NOTE: # sprintf args need to be reversed, # because the invocant is the array sub sprintf { CORE::sprintf $_[1], @{$_[0]} } ## ::List interface implementation sub head { $_[0]->[0] } sub tail { [ @{$_[0]}[ 1 .. $#{$_[0]} ] ] } sub length { my ($array) = @_; CORE::scalar @$array; } sub grep { my ($array, $sub) = @_; [ CORE::grep { $sub->($_) } @$array ]; } sub map { my ($array, $sub) = @_; [ CORE::map { $sub->($_) } @$array ]; } sub join { my ($array, $sep) = @_; $sep ||= ''; CORE::join $sep, @$array; } sub reverse { my ($array) = @_; [ CORE::reverse @$array ]; } sub sort { my ($array, $sub) = @_; $sub ||= sub { $a cmp $b }; [ CORE::sort { $sub->($a, $b) } @$array ]; } sub first { $_[0]->[0]; } sub last { $_[0]->[$#{$_[0]}]; } ## ::Indexed implementation sub at { my ($array, $index) = @_; $array->[$index]; } sub put { my ($array, $index, $value) = @_; $array->[$index] = $value; } sub exists { my ($array, $index) = @_; CORE::exists $array->[$index]; } sub keys { my ($array) = @_; [ 0 .. $#{$array} ]; } sub values { my ($array) = @_; [ @$array ]; } sub kv { my ($array) = @_; $array->keys->map(sub { [ $_, $array->[$_] ] }); } sub each { my ($array, $sub) = @_; for my $i (0 .. $#$array) { $sub->($i, $array->[ $i ]); } } sub each_key { my ($array, $sub) = @_; $sub->($_) for (0 .. $#$array); } sub each_value { my ($array, $sub) = @_; $sub->($_) for @$array; } sub each_n_values { my ($array, $n, $sub) = @_; my $it = List::MoreUtils::natatime($n, @$array); while (my @vals = $it->()) { $sub->(@vals); } return; } # end indexed sub flatten { @{$_[0]} } sub _flatten_deep { my @array = @_; my $depth = CORE::pop @array; --$depth if (defined($depth)); CORE::map { (ref eq 'ARRAY') ? (defined($depth) && $depth == -1) ? $_ : _flatten_deep( @$_, $depth ) : $_ } @array; } sub flatten_deep { my ($array, $depth) = @_; [ _flatten_deep(@$array, $depth) ]; } ## Junctions sub all { my ($array) = @_; return Syntax::Keyword::Junction::All->new(@$array); } sub any { my ($array) = @_; return Syntax::Keyword::Junction::Any->new(@$array); } sub none { my ($array) = @_; return Syntax::Keyword::Junction::None->new(@$array); } sub one { my ($array) = @_; return Syntax::Keyword::Junction::One->new(@$array); } ## Print sub print { CORE::print @{$_[0]} } sub say { CORE::print @{$_[0]}, "\n" } no Moose::Role; 1; __END__ =pod =encoding UTF-8 =head1 NAME Moose::Autobox::Array - the Array role =head1 VERSION version 0.16 =head1 SYNOPSIS use Moose::Autobox; [ 1..5 ]->isa('ARRAY'); # true [ a..z ]->does('Moose::Autobox::Array'); # true [ 0..2 ]->does('Moose::Autobox::List'); # true print "Squares: " . [ 1 .. 10 ]->map(sub { $_ * $_ })->join(', '); print [ 1, 'number' ]->sprintf('%d is the loneliest %s'); print ([ 1 .. 5 ]->any == 3) ? 'true' : 'false'; # prints 'true' =head1 DESCRIPTION This is a role to describe operations on the Array type. =head1 METHODS =over 4 =item C =item C =item C =item C =item C =item C =item C =item C =item C =item C =item C =back =head2 Indexed implementation =over 4 =item C =item C =item C =item C =item C =item C =item C =item C =item C =item C =back =head2 List implementation =over 4 =item C =item C =item C =item C =item C =item C Note that, in both the above, $_ is in scope within the code block, as well as being passed as $_[0]. As per CORE::map and CORE::grep, $_ is an alias to the list value, so can be used to modify the list, viz: use Moose::Autobox; my $foo = [1, 2, 3]; $foo->map( sub {$_++} ); print $foo->dump; yields $VAR1 = [ 2, 3, 4 ]; =item C =item C =back =head2 Junctions =over 4 =item C =item C =item C =item C =back =over 4 =item C =item C =item C =back =head1 SUPPORT Bugs may be submitted through L (or L). There is also a mailing list available for users of this distribution, at L. There is also an irc channel available for users of this distribution, at L on C|irc://irc.perl.org/#moose>. =head1 AUTHOR Stevan Little =head1 COPYRIGHT AND LICENSE This software is copyright (c) 2006 by Infinity Interactive, Inc. This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. =cut Moose-Autobox-0.16/lib/Moose/Autobox/Code.pm000600 000766 000024 00000005314 12711777774 021114 0ustar00etherstaff000000 000000 package Moose::Autobox::Code; # ABSTRACT: the Code role use Moose::Role 'with'; use Moose::Autobox; use namespace::autoclean; our $VERSION = '0.16'; with 'Moose::Autobox::Ref'; sub curry { my ($f, @a) = @_; return sub { $f->(@a, @_) } } sub rcurry { my ($f, @a) = @_; return sub { $f->(@_, @a) } } sub compose { my ($f, $f2, @rest) = @_; return $f if !$f2; return (sub { $f2->($f->(@_)) })->compose(@rest); } sub disjoin { my ($f, $f2) = @_; return sub { $f->(@_) || $f2->(@_) } } sub conjoin { my ($f, $f2) = @_; return sub { $f->(@_) && $f2->(@_) } } # fixed point combinators sub u { my $f = shift; sub { $f->($f, @_) }; } sub y { my $f = shift; (sub { my $h = shift; sub { $f->(($h->u)->())->(@_) } }->u)->(); } 1; __END__ =pod =encoding UTF-8 =head1 NAME Moose::Autobox::Code - the Code role =head1 VERSION version 0.16 =head1 SYNOPSIS use Moose::Autobox; my $adder = sub { $_[0] + $_[1] }; my $add_2 = $adder->curry(2); $add_2->(2); # returns 4 # create a recursive subroutine # using the Y combinator *factorial = sub { my $f = shift; sub { my $n = shift; return 1 if $n < 2; return $n * $f->($n - 1); } }->y; factorial(10) # returns 3628800 =head1 DESCRIPTION This is a role to describe operations on the Code type. =head1 METHODS =over 4 =item C =item C =item C =item C =item C This will take a list of C<@subs> and compose them all into a single subroutine where the output of one sub will be the input of another. =item C =for :stopwords combinator This implements the Y combinator. =item C This implements the U combinator. =back =over 4 =item C =back =head1 SEE ALSO =over 4 =item L =item L =back =head1 SUPPORT Bugs may be submitted through L (or L). There is also a mailing list available for users of this distribution, at L. There is also an irc channel available for users of this distribution, at L on C|irc://irc.perl.org/#moose>. =head1 AUTHOR Stevan Little =head1 COPYRIGHT AND LICENSE This software is copyright (c) 2006 by Infinity Interactive, Inc. This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. =cut Moose-Autobox-0.16/lib/Moose/Autobox/Defined.pm000600 000766 000024 00000002454 12711777774 021602 0ustar00etherstaff000000 000000 package Moose::Autobox::Defined; # ABSTRACT: the Defined role use Moose::Role 'with'; use namespace::autoclean; our $VERSION = '0.16'; with 'Moose::Autobox::Item'; sub defined { 1 } 1; __END__ =pod =encoding UTF-8 =head1 NAME Moose::Autobox::Defined - the Defined role =head1 VERSION version 0.16 =head1 SYNOPSIS use Moose::Autobox; my $x; $x->defined; # false $x = 10; $x->defined; # true =head1 DESCRIPTION This is a role to describes a defined value. =head1 METHODS =over 4 =item C =back =over 4 =item C =back =head1 SUPPORT Bugs may be submitted through L (or L). There is also a mailing list available for users of this distribution, at L. There is also an irc channel available for users of this distribution, at L on C|irc://irc.perl.org/#moose>. =head1 AUTHOR Stevan Little =head1 COPYRIGHT AND LICENSE This software is copyright (c) 2006 by Infinity Interactive, Inc. This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. =cut Moose-Autobox-0.16/lib/Moose/Autobox/Hash.pm000644 000766 000024 00000006426 12711777774 021142 0ustar00etherstaff000000 000000 package Moose::Autobox::Hash; # ABSTRACT: the Hash role use Moose::Role 'with'; use List::MoreUtils 0.07 (); use namespace::autoclean; our $VERSION = '0.16'; with 'Moose::Autobox::Ref', 'Moose::Autobox::Indexed'; sub delete { my ($hash, $key) = @_; CORE::delete $hash->{$key}; } sub merge { my ($left, $right) = @_; Carp::confess "You must pass a hashref as argument to merge" unless ref $right eq 'HASH'; return { %$left, %$right }; } sub hslice { my ($hash, $keys) = @_; return { map { $_ => $hash->{$_} } @$keys }; } sub flatten { return %{$_[0]} } # ::Indexed implementation sub at { my ($hash, $index) = @_; $hash->{$index}; } sub put { my ($hash, $index, $value) = @_; $hash->{$index} = $value; } sub exists { my ($hash, $key) = @_; CORE::exists $hash->{$key}; } sub keys { my ($hash) = @_; [ CORE::keys %$hash ]; } sub values { my ($hash) = @_; [ CORE::values %$hash ]; } sub kv { my ($hash) = @_; [ CORE::map { [ $_, $hash->{$_} ] } CORE::keys %$hash ]; } sub slice { my ($hash, $keys) = @_; return [ @{$hash}{@$keys} ]; } sub each { my ($hash, $sub) = @_; for my $key (CORE::keys %$hash) { $sub->($key, $hash->{$key}); } } sub each_key { my ($hash, $sub) = @_; $sub->($_) for CORE::keys %$hash; } sub each_value { my ($hash, $sub) = @_; $sub->($_) for CORE::values %$hash; } sub each_n_values { my ($hash, $n, $sub) = @_; my @keys = CORE::keys %$hash; my $it = List::MoreUtils::natatime($n, @keys); while (my @vals = $it->()) { $sub->(@$hash{ @vals }); } return; } # End Indexed sub print { CORE::print %{$_[0]} } sub say { CORE::print %{$_[0]}, "\n" } 1; __END__ =pod =encoding UTF-8 =head1 NAME Moose::Autobox::Hash - the Hash role =head1 VERSION version 0.16 =head1 SYNOPSIS use Moose::Autobox; print { one => 1, two => 2 }->keys->join(', '); # prints 'one, two' =head1 DESCRIPTION This is a role to describes a Hash value. =head1 METHODS =over 4 =item C =item C Takes a hashref and returns a new hashref with right precedence shallow merging. =item C Slices a hash but returns the keys and values as a new hashref. =item C =back =head2 Indexed implementation =over 4 =item C =item C =item C =item C =item C =item C =item C =item C =item C =item C =item C =back =over 4 =item C =item C =item C =back =head1 SUPPORT Bugs may be submitted through L (or L). There is also a mailing list available for users of this distribution, at L. There is also an irc channel available for users of this distribution, at L on C|irc://irc.perl.org/#moose>. =head1 AUTHOR Stevan Little =head1 COPYRIGHT AND LICENSE This software is copyright (c) 2006 by Infinity Interactive, Inc. This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. =cut Moose-Autobox-0.16/lib/Moose/Autobox/Indexed.pm000600 000766 000024 00000003311 12711777774 021615 0ustar00etherstaff000000 000000 package Moose::Autobox::Indexed; # ABSTRACT: the Indexed role use Moose::Role 'requires'; use namespace::autoclean; our $VERSION = '0.16'; requires 'at'; requires 'put'; requires 'exists'; requires 'keys'; requires 'values'; requires 'kv'; requires 'slice'; requires qw(each each_key each_value each_n_values); 1; __END__ =pod =encoding UTF-8 =head1 NAME Moose::Autobox::Indexed - the Indexed role =head1 VERSION version 0.16 =head1 DESCRIPTION This is a role to describes an collection whose values can be accessed by a key of some kind. The role is entirely abstract, those which implement it must supply all it's methods. Currently both L and L implement this role. =head1 METHODS =over 4 =item C =back =head1 REQUIRED METHODS =over 4 =item C =item C =item C =item C =item C =item C =item C =item C =item C =item C =back =head1 SUPPORT Bugs may be submitted through L (or L). There is also a mailing list available for users of this distribution, at L. There is also an irc channel available for users of this distribution, at L on C|irc://irc.perl.org/#moose>. =head1 AUTHOR Stevan Little =head1 COPYRIGHT AND LICENSE This software is copyright (c) 2006 by Infinity Interactive, Inc. This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. =cut Moose-Autobox-0.16/lib/Moose/Autobox/Item.pm000600 000766 000024 00000002711 12711777774 021136 0ustar00etherstaff000000 000000 package Moose::Autobox::Item; # ABSTRACT: the Item role use Moose::Role 'requires'; use namespace::autoclean; our $VERSION = '0.16'; requires 'defined'; sub dump { my $self = shift; require Data::Dumper; return Data::Dumper::Dumper($self); } *perl = \&dump; 1; __END__ =pod =encoding UTF-8 =head1 NAME Moose::Autobox::Item - the Item role =head1 VERSION version 0.16 =head1 DESCRIPTION This is the root of our role hierarchy. =head1 METHODS =over 4 =item C =item C Calls Data::Dumper::Dumper. =item C Same as C. For symmetry with Perl6's .perl method. Like &print with newline. =item C =back =head1 REQUIRED METHODS =over 4 =item C =back =head1 SUPPORT Bugs may be submitted through L (or L). There is also a mailing list available for users of this distribution, at L. There is also an irc channel available for users of this distribution, at L on C|irc://irc.perl.org/#moose>. =head1 AUTHOR Stevan Little =head1 COPYRIGHT AND LICENSE This software is copyright (c) 2006 by Infinity Interactive, Inc. This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. =cut Moose-Autobox-0.16/lib/Moose/Autobox/List.pm000600 000766 000024 00000004066 12711777774 021160 0ustar00etherstaff000000 000000 package Moose::Autobox::List; # ABSTRACT: the List role use Moose::Role 'with', 'requires'; use Moose::Autobox; use namespace::autoclean; our $VERSION = '0.16'; with 'Moose::Autobox::Value'; requires 'head'; requires 'tail'; requires 'length'; requires 'join'; requires 'grep'; requires 'map'; requires 'sort'; requires 'reverse'; sub reduce { my ($array, $func) = @_; my $a = $array->values; my $acc = $a->head; $a->tail->map(sub { $acc = $func->($acc, $_) }); return $acc; } sub zip { my ($array, $other) = @_; ($array->length < $other->length ? $other : $array) ->keys ->map(sub { [ $array->at($_), $other->at($_) ] }); } 1; __END__ =pod =encoding UTF-8 =head1 NAME Moose::Autobox::List - the List role =head1 VERSION version 0.16 =head1 DESCRIPTION This is a role to describes a List interface. This is not meant to be any specific Perl type, but instead an interface that certain Perl types might implement. Currently only L implements this. =head1 METHODS =over 4 =item C =item C =back =over 4 =item C =back =head1 REQUIRED METHODS =over 4 =item C =item C =item C =item C =item C =item C =item C =item C =back =head1 SUPPORT Bugs may be submitted through L (or L). There is also a mailing list available for users of this distribution, at L. There is also an irc channel available for users of this distribution, at L on C|irc://irc.perl.org/#moose>. =head1 AUTHOR Stevan Little =head1 COPYRIGHT AND LICENSE This software is copyright (c) 2006 by Infinity Interactive, Inc. This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. =cut Moose-Autobox-0.16/lib/Moose/Autobox/Number.pm000600 000766 000024 00000003164 12711777774 021473 0ustar00etherstaff000000 000000 package Moose::Autobox::Number; # ABSTRACT: Moose::Autobox::Number - the Number role use Moose::Role; use namespace::autoclean; our $VERSION = '0.16'; with 'Moose::Autobox::Value'; sub to { return [ $_[0] .. $_[1] ] if $_[0] <= $_[1]; return [ reverse $_[1] .. $_[0] ]; } 1; __END__ =pod =encoding UTF-8 =head1 NAME Moose::Autobox::Number - Moose::Autobox::Number - the Number role =head1 VERSION version 0.16 =head1 DESCRIPTION This is a role to describes a Numeric value. =head1 METHODS =over 4 =item C Takes another number as argument and produces an array ranging from the number the method is called on to the number given as argument. In some situations, this method intentionally behaves different from the range operator in perl: $foo = [ 5 .. 1 ]; # $foo is [] $foo = 5->to(1); # $foo is [ 5, 4, 3, 2, 1 ] =back =over 4 =item C =back =head1 SUPPORT Bugs may be submitted through L (or L). There is also a mailing list available for users of this distribution, at L. There is also an irc channel available for users of this distribution, at L on C|irc://irc.perl.org/#moose>. =head1 AUTHOR Stevan Little =head1 COPYRIGHT AND LICENSE This software is copyright (c) 2006 by Infinity Interactive, Inc. This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. =cut Moose-Autobox-0.16/lib/Moose/Autobox/Ref.pm000600 000766 000024 00000002201 12711777774 020746 0ustar00etherstaff000000 000000 package Moose::Autobox::Ref; # ABSTRACT: the Ref role use Moose::Role 'with'; use namespace::autoclean; our $VERSION = '0.16'; with 'Moose::Autobox::Defined'; 1; __END__ =pod =encoding UTF-8 =head1 NAME Moose::Autobox::Ref - the Ref role =head1 VERSION version 0.16 =head1 DESCRIPTION This is a role to describes a reference value. =head1 METHODS =over 4 =item C =back =head1 SUPPORT Bugs may be submitted through L (or L). There is also a mailing list available for users of this distribution, at L. There is also an irc channel available for users of this distribution, at L on C|irc://irc.perl.org/#moose>. =head1 AUTHOR Stevan Little =head1 COPYRIGHT AND LICENSE This software is copyright (c) 2006 by Infinity Interactive, Inc. This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. =cut Moose-Autobox-0.16/lib/Moose/Autobox/Scalar.pm000600 000766 000024 00000003263 12711777774 021450 0ustar00etherstaff000000 000000 package Moose::Autobox::Scalar; # ABSTRACT: the Scalar role use Moose::Role 'with'; use namespace::autoclean; our $VERSION = '0.16'; with 'Moose::Autobox::String', 'Moose::Autobox::Number'; sub flatten { $_[0] } sub first { $_[0] } sub last { $_[0] } sub print { CORE::print $_[0] } sub say { CORE::print $_[0], "\n" } 1; __END__ =pod =encoding UTF-8 =head1 NAME Moose::Autobox::Scalar - the Scalar role =head1 VERSION version 0.16 =head1 DESCRIPTION This is a role to describes a Scalar value, which is defined as the combination (union sort of) of a String and a Number. =head1 METHODS =over 4 =item C =item C =item C =item C Flattening a scalar just returns the scalar. This means that you can say: my @array = $input->flatten; # Given $input of 5, @array is (5); # Given $input of [ 5, 2, 0], @array is (5, 2, 0) =item C As per flatten. =item C As per flatten. =back =head1 SUPPORT Bugs may be submitted through L (or L). There is also a mailing list available for users of this distribution, at L. There is also an irc channel available for users of this distribution, at L on C|irc://irc.perl.org/#moose>. =head1 AUTHOR Stevan Little =head1 COPYRIGHT AND LICENSE This software is copyright (c) 2006 by Infinity Interactive, Inc. This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. =cut Moose-Autobox-0.16/lib/Moose/Autobox/String.pm000600 000766 000024 00000004430 12711777774 021506 0ustar00etherstaff000000 000000 package Moose::Autobox::String; # ABSTRACT: the String role use Moose::Role; use namespace::autoclean; our $VERSION = '0.16'; with 'Moose::Autobox::Value'; # perl built-ins sub lc { CORE::lc $_[0] } sub lcfirst { CORE::lcfirst $_[0] } sub uc { CORE::uc $_[0] } sub ucfirst { CORE::ucfirst $_[0] } sub chomp { CORE::chomp $_[0] } sub chop { CORE::chop $_[0] } sub reverse { CORE::reverse $_[0] } sub length { CORE::length $_[0] } sub lines { [ CORE::split '\n', $_[0] ] } sub words { [ CORE::split ' ', $_[0] ] } sub index { return CORE::index($_[0], $_[1]) if scalar @_ == 2; return CORE::index($_[0], $_[1], $_[2]); } sub rindex { return CORE::rindex($_[0], $_[1]) if scalar @_ == 2; return CORE::rindex($_[0], $_[1], $_[2]); } sub split { return [ CORE::split($_[1], $_[0]) ] if scalar @_ == 2; return [ CORE::split($_[1], $_[0], $_[2]) ]; } 1; __END__ =pod =encoding UTF-8 =head1 NAME Moose::Autobox::String - the String role =head1 VERSION version 0.16 =head1 SYNOPSIS use Moose::Autobox; "Hello World"->uc; # HELLO WORLD =head1 DESCRIPTION This is a role to describes a String value. =head1 METHODS =over 4 =item C =item C =item C =item C =item C =item C =item C =item C =item C =item C =item C $string->split($pattern); =item C This is equivalent to splitting on space. =item C This is equivalent to splitting on newlines. =back =over 4 =item C =back =head1 SUPPORT Bugs may be submitted through L (or L). There is also a mailing list available for users of this distribution, at L. There is also an irc channel available for users of this distribution, at L on C|irc://irc.perl.org/#moose>. =head1 AUTHOR Stevan Little =head1 COPYRIGHT AND LICENSE This software is copyright (c) 2006 by Infinity Interactive, Inc. This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. =cut Moose-Autobox-0.16/lib/Moose/Autobox/Undef.pm000600 000766 000024 00000002404 12711777774 021300 0ustar00etherstaff000000 000000 package Moose::Autobox::Undef; # ABSTRACT: the Undef role use Moose::Role 'with'; use namespace::autoclean; our $VERSION = '0.16'; with 'Moose::Autobox::Item'; sub defined { 0 } 1; __END__ =pod =encoding UTF-8 =head1 NAME Moose::Autobox::Undef - the Undef role =head1 VERSION version 0.16 =head1 SYNOPSIS use Moose::Autobox; my $x; $x->defined; # false =head1 DESCRIPTION This is a role to describes a undefined value. =head1 METHODS =over 4 =item C =back =over 4 =item C =back =head1 SUPPORT Bugs may be submitted through L (or L). There is also a mailing list available for users of this distribution, at L. There is also an irc channel available for users of this distribution, at L on C|irc://irc.perl.org/#moose>. =head1 AUTHOR Stevan Little =head1 COPYRIGHT AND LICENSE This software is copyright (c) 2006 by Infinity Interactive, Inc. This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. =cut Moose-Autobox-0.16/lib/Moose/Autobox/Value.pm000600 000766 000024 00000002655 12711777774 021323 0ustar00etherstaff000000 000000 package Moose::Autobox::Value; # ABSTRACT: Moose::Autobox::Value - the Value role use Moose::Role 'with'; use namespace::autoclean; our $VERSION = '0.16'; with 'Moose::Autobox::Defined'; sub do { my ($self, $block) = @_; local $_ = $self; $block->($self); } 1; __END__ =pod =encoding UTF-8 =head1 NAME Moose::Autobox::Value - Moose::Autobox::Value - the Value role =head1 VERSION version 0.16 =head1 SYNOPSIS use Moose::Autobox; # execute a sub on the value print 10->do(sub { $_ * $_ }); # prints 100 =head1 DESCRIPTION This is a role to describes a defined (non-reference) Perl value. =head1 METHODS =over 4 =item C =item C =back =head1 SUPPORT Bugs may be submitted through L (or L). There is also a mailing list available for users of this distribution, at L. There is also an irc channel available for users of this distribution, at L on C|irc://irc.perl.org/#moose>. =head1 AUTHOR Stevan Little =head1 COPYRIGHT AND LICENSE This software is copyright (c) 2006 by Infinity Interactive, Inc. This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. =cut Moose-Autobox-0.16/examples/tic_tac_toe.pl000644 000766 000024 00000005157 12711777774 021100 0ustar00etherstaff000000 000000 #!/usr/bin/perl use strict; use warnings; use Moose::Autobox; use Moose::Autobox::Undef; sub print_board { my ($b) = @_; my $count = 0; $b->map(sub { print("$_ \t"); print("\n") unless ((++$count) % 3); }); } my $board = [ ('.') x 9 ]; print_board($board); my $choice = [ 1 .. 9 ]->any; my $player = 'X'; while ($board->any eq '.') { INPUT: { print("Player ($player), enter the Position [1-9]: "); my $in = <>; unless ($in == $choice) { print "\n\tPlease enter a value within 1-9\n\n"; redo INPUT; } my $idx = $in - 1; if ($board->[$idx] ne '.') { print "\n\tElement already entered at $in\n"; redo INPUT; } $board->[$idx] = $player; } print_board($board); [ [ 0, 1, 2 ], [ 3, 4, 5 ], [ 6, 7, 8 ], [ 0, 3, 6 ], [ 1, 4, 7 ], [ 2, 5, 8 ], [ 0, 4, 8 ], [ 2, 4, 6 ], ]->map(sub { my $row = $board->slice($_); if (($row->all eq 'X') || ($row->all eq 'O')) { print("\n\tPlayer ($player) Wins\n"); exit; } }); $player = $player eq 'X' ? 'O' : 'X'; } # PODNAME: tic_tac_toe.pl # ABSTRACT: Tic-Tac-Toe __END__ =pod =encoding UTF-8 =head1 NAME tic_tac_toe.pl - Tic-Tac-Toe =head1 VERSION version 0.16 =head1 DESCRIPTION This is a Moose::Autobox port of a perl6 implementation of the classic Tic-Tac-Toe game. This uses a modified version of the one Rob Kinyon created L. =head1 ACKNOWLEDGEMENTS This code was ported from the version in the Pugs examples/ directory. The authors of that were: :for list * mkirank L * Rob Kinyon L * Stevan Little, Estevan@iinteractive.comE * Audrey Tang =head1 SUPPORT Bugs may be submitted through L (or L). There is also a mailing list available for users of this distribution, at L. There is also an irc channel available for users of this distribution, at L on C|irc://irc.perl.org/#moose>. =head1 AUTHOR Stevan Little =head1 COPYRIGHT AND LICENSE This software is copyright (c) 2006 by Infinity Interactive, Inc. This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. =cut Moose-Autobox-0.16/examples/units/000755 000766 000024 00000000000 12711777774 017420 5ustar00etherstaff000000 000000 Moose-Autobox-0.16/examples/units/bytes.pl000644 000766 000024 00000004464 12711777774 021113 0ustar00etherstaff000000 000000 #!/usr/bin/perl use strict; use warnings; use Moose::Autobox; { package # hide from PAUSE Units::Bytes; use Moose::Role; use Moose::Autobox; sub bytes { $_[0] } sub kilobytes { $_[0] * 1024 } sub megabytes { $_[0] * 1024->kilobytes } sub gigabytes { $_[0] * 1024->megabytes } sub terabytes { $_[0] * 1024->gigabytes } { no warnings 'once'; # << squelch the stupid "used only once, maybe typo" warnings *byte = \&bytes; *kilobyte = \&kilobytes; *megabyte = \&megabytes; *gigabyte = \&gigabytes; *terabyte = \&terabytes; } } Moose::Autobox->mixin_additional_role(SCALAR => 'Units::Bytes'); $\ = "\n"; print "5 kilobytes are " . 5->kilobytes . " bytes"; print "2 megabytes are " . 2->megabytes . " bytes"; print "1 gigabyte is " . 1->gigabyte . " bytes"; print "2 terabyes are " . 2->terabytes . " bytes"; # PODNAME: Units::Bytes __END__ =pod =encoding UTF-8 =head1 NAME Units::Bytes =head1 VERSION version 0.16 =head1 SYNOPSIS Moose::Autobox->mixin_additional_role(SCALAR => 'Units::Bytes'); print "5 kilobytes are " . 5->kilobytes . " bytes"; print "2 megabytes are " . 2->megabytes . " bytes"; print "1 gigabyte is " . 1->gigabyte . " bytes"; print "2 terabyes are " . 2->terabytes . " bytes"; =head1 DESCRIPTION This is a Moose::Autobox port of the perl6 vmethods example. =head1 ACKNOWLEDGEMENTS This code was ported from the version in the Pugs examples/vmethods/ directory. See that for original author information. =head1 SUPPORT Bugs may be submitted through L (or L). There is also a mailing list available for users of this distribution, at L. There is also an irc channel available for users of this distribution, at L on C|irc://irc.perl.org/#moose>. =head1 AUTHOR Stevan Little =head1 COPYRIGHT AND LICENSE This software is copyright (c) 2006 by Infinity Interactive, Inc. This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. =cut Moose-Autobox-0.16/examples/units/time.pl000644 000766 000024 00000005534 12711777774 020722 0ustar00etherstaff000000 000000 #!/usr/bin/perl use strict; use warnings; use Moose::Autobox; { package # hide me from PAUSE Units::Time; use Moose::Role; use Moose::Autobox; sub seconds { $_[0] } sub minutes { $_[0] * 60 } sub hours { $_[0] * 60->minutes } sub days { $_[0] * 24->hours } sub weeks { $_[0] * 7->days } sub years { $_[0] * 365->days } sub centuries { $_[0] * 10->years } sub ago { my ($self, $time) = @_; $time ||= time(); $time - $self; } sub since { my ($self, $time) = @_; $time ||= time(); $time + $self; } { no warnings 'once'; # singular versions *second = \&seconds; *minute = \&minutes; *hour = \&hours; *day = \&days; *week = \&weeks; *year = \&years; *century = \¢uries; *til = \&ago; *from_now = \&since; } sub as_string { scalar localtime $_[0] } } Moose::Autobox->mixin_additional_role(SCALAR => 'Units::Time'); $\ = "\n"; print "2 days ago was : " . 2->days->ago->as_string; print "3 weeks from now will be : " . 3->weeks->from_now->as_string; my $one_week_ago = 1->week->ago; print "1 day until 1 week ago : " . 1->day->til($one_week_ago)->as_string; print "2 years since 1 week ago : " . 2->years->since($one_week_ago)->as_string; __END__ =pod =encoding UTF-8 =head1 NAME Units::Time =head1 VERSION version 0.16 =head1 SYNOPSIS Moose::Autobox->mixin_additional_role(SCALAR => 'Units::Time'); print "2 days ago was : " . 2->days->ago->as_string; print "3 weeks from now will be : " . 3->weeks->from_now->as_string; print "1 day until 1 week ago : " . 1->day->til(1->week->ago)->as_string; print "2 years since 1 week ago : " . 2->years->since(1->week->ago)->as_string; =head1 DESCRIPTION This is a Moose::Autobox port of the perl6 vmethods example. =head1 ACKNOWLEDGEMENTS This code was ported from the version in the Pugs examples/vmethods/ directory. See that for original author information. =head1 SUPPORT Bugs may be submitted through L (or L). There is also a mailing list available for users of this distribution, at L. There is also an irc channel available for users of this distribution, at L on C|irc://irc.perl.org/#moose>. =head1 AUTHOR Stevan Little =head1 COPYRIGHT AND LICENSE This software is copyright (c) 2006 by Infinity Interactive, Inc. This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. =cut