diff -Nru libmoosex-storage-perl-0.33/Build.PL libmoosex-storage-perl-0.45/Build.PL --- libmoosex-storage-perl-0.33/Build.PL 1970-01-01 00:00:00.000000000 +0000 +++ libmoosex-storage-perl-0.45/Build.PL 2013-12-22 00:48:35.000000000 +0000 @@ -0,0 +1,3 @@ +use 5.008; +use Module::Build::Tiny 0.030; +Build_PL(); diff -Nru libmoosex-storage-perl-0.33/CONTRIBUTING libmoosex-storage-perl-0.45/CONTRIBUTING --- libmoosex-storage-perl-0.33/CONTRIBUTING 1970-01-01 00:00:00.000000000 +0000 +++ libmoosex-storage-perl-0.45/CONTRIBUTING 2013-12-22 00:48:35.000000000 +0000 @@ -0,0 +1,78 @@ + +CONTRIBUTING + +Thank you for considering contributing to this distribution. This file +contains instructions that will help you work with the source code. + +The distribution is managed with 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/MooseX-Storage. + +If you use cpanminus, you can do it without downloading the tarball first: + + $ cpanm --reinstall --installdeps --with-recommends MooseX::Storage + +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` + $ 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` + $ dzil listdeps --author --missing | cpanm + +You can also do this via cpanm directly: + + $ cpanm --reinstall --installdeps --with-develop --with-recommends MooseX::Storage + +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 main repository is: +https://github.com/moose/MooseX-Storage. +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/ +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=MooseX-Storage +or via bug-MooseX-Storage@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. + + +This file was generated via Dist::Zilla::Plugin::GenerateFile::ShareDir 0.003 from a +template file originating in Dist-Zilla-PluginBundle-Author-ETHER-0.043. diff -Nru libmoosex-storage-perl-0.33/Changes libmoosex-storage-perl-0.45/Changes --- libmoosex-storage-perl-0.33/Changes 2013-03-30 02:06:38.000000000 +0000 +++ libmoosex-storage-perl-0.45/Changes 2013-12-22 00:48:35.000000000 +0000 @@ -1,246 +1,286 @@ Revision history for MooseX-Storage -0.33 - * always JSONify data with sorted keys, to handle hash order randomization - introduced in 5.17.* (RT#84287, Karen Etheridge) - -0.32 - * Change to use core Digest and Digest::SHA dists, rather than Digest::SHA1. - RT#69811 - * Create a JSON::Any object, so setting $ENV{JSON_ANY_CONFIG} works. - Adjust tests that were setting the wrong values and the default - happened to work. - * Don't rely on hash key order in tests (RT#81695) +0.45 2013-12-22 00:48:10Z + - new 'Value' type handler added (thanks David Golden) -0.31 - * Add example for add_custom_type_handler to the MooseX::Storage::Engine docs. (perigrin) +0.44 2013-11-30 20:09:54Z + - re-release to fix compile test - * Incorrect documentation for ->unpack method's inject parameter fixed. +0.43 2013-09-11 01:47:40Z + - removed use of deprecated Class::MOP::load_class - * The test suite now uses Test::Fatal instead of Test::Exception (Karen +0.42 2013-09-08 18:00:22Z + - all features are now configured as x_default => 1 in metadata (not yet + supported by any cpan clients), signalling to automatically add to prereqs + when installing non-interactively + - re-release with properly encoded META.yml + +0.41 2013-09-03 01:05:15Z + - re-release with updated Dist::Zilla plugins to clear the dynamic_config + flag in metadata + - repository has moved to the GitHub Moose organization + +0.40 2013-08-29 01:57:00Z + - replaced last use of Best (held over since 2010!) to YAML::Any + - fixed another test making use of optional features + +0.39 2013-07-27 00:02:26Z + - re-release as stable (full working Dist::Zilla conversion) + +0.38 2013-07-20 16:42:03Z (TRIAL RELEASE) + - re-release with new compile test, which properly declares all its prerequisites + +0.37 2013-07-20 00:41:17Z (TRIAL RELEASE) + - fixed compile tests so that modules using optional features are skipped + (from 0.36-TRIAL) + +0.36 2013-07-17 04:41:39Z (TRIAL RELEASE) + - convert to Dist::Zilla, with new optional prereq handling + +0.35 2013-07-15 + - properly skip optional tests when the required JSON backends aren't + available + +0.34 2013-06-20 + - JSON storage works when Cpanel::JSON::XS is the only JSON backend installed + +0.33 2013-03-29 + - always JSONify data with sorted keys, to handle hash order randomization + introduced in 5.17.* (RT#84287, Karen Etheridge) + +0.32 2012-12-04 + - Change to use core Digest and Digest::SHA dists, rather than Digest::SHA1. + RT#69811 + - Create a JSON::Any object, so setting $ENV{JSON_ANY_CONFIG} works. + Adjust tests that were setting the wrong values and the default + happened to work. + - Don't rely on hash key order in tests (RT#81695) + +0.31 2012-02-28 + - Add example for add_custom_type_handler to the MooseX::Storage::Engine docs. (perigrin) + + - Incorrect documentation for ->unpack method's inject parameter fixed. + + - The test suite now uses Test::Fatal instead of Test::Exception (Karen Etheridge). -0.30 - * Make Makefile.PL features work again. RT#67170 +0.30 2011-04-29 + - Make Makefile.PL features work again. RT#67170 -0.29 - * Remove use of Test::TempDir in favor of File::Temp (gphat) +0.29 2010-11-17 + - Remove use of Test::TempDir in favor of File::Temp (gphat) -0.28 - * Make the engine_traits parameter be able to use a '+My::Trait::Name' +0.28 2010-10-03 + - Make the engine_traits parameter be able to use a '+My::Trait::Name' prefix to specify a trait name which isn't in the MooseX::Storage::Engine::Trait namespace - * Misc POD and test cleanups. + - Misc POD and test cleanups. -0.27 - * use of parameterized roles (first added in 0.22) now works in Deferred +0.27 2010-04-15 + - use of parameterized roles (first added in 0.22) now works in Deferred Example: $object->freeze({ format => [ $role_name => \%args ] }) -0.26 - * Fix URI for repository in metadata. - * Fix infinite recursion when collapsing objects which overload stringify +0.26 2010-03-25 + - Fix URI for repository in metadata. + - Fix infinite recursion when collapsing objects which overload stringify to freeze themselves. -0.25 - * Add support for Union types (bumps Moose dep to 0.99) +0.25 2010-03-09 + - Add support for Union types (bumps Moose dep to 0.99) -0.24 - * Add additional YAML implementation tests. - * Switch from using Best to YAML::Any. - * Remove Test::YAML::Valid. +0.24 2010-01-11 + - Add additional YAML implementation tests. + - Switch from using Best to YAML::Any. + - Remove Test::YAML::Valid. -0.23 - * Revert whitespace change in tests which breaks the tests if you +0.23 2009-11-10 + - Revert whitespace change in tests which breaks the tests if you have Test::YAML::Valid installed. -0.22 - * Fix warnings when types do not have a parent type. - * allow the use of roles outside MooseX::Storage:: (rjbs) - * allow the use of parameterized roles (rjbs) +0.22 2009-11-05 + - Fix warnings when types do not have a parent type. + - allow the use of roles outside MooseX::Storage:: (rjbs) + - allow the use of parameterized roles (rjbs) -0.21 - * Fix inconsistent dist versions with Perl::Version +0.21 2009-07-14 + - Fix inconsistent dist versions with Perl::Version -0.20 - * Add support for Storage( traits => [...] ) with a MooseX::Storage::Traits::XX +0.20 2009-07-14 + - Add support for Storage( traits => [...] ) with a MooseX::Storage::Traits::XX namespace to alter the behaviour of the storage engine. (Suggestions for how to make this less fugly appreciated) - * Add feature to disable cycle checking, either via engine trait or option - * add docs & tests (including 1 TODO test) - * Add feature to only serialize attributes whose predicate returns 'true' - * Implement the unpack( $data, inject => {...} ) feature. - * add docs & tests - * Move Base::WithChecksum to build upon Basic.pm, avoid code duplication - * Add extra test to ensure restoring fails if required argument isn't provided - * Fix a bug where if a required constructor argument was not serialized, it was + - Add feature to disable cycle checking, either via engine trait or option + - add docs & tests (including 1 TODO test) + - Add feature to only serialize attributes whose predicate returns 'true' + - Implement the unpack( $data, inject => {...} ) feature. + - add docs & tests + - Move Base::WithChecksum to build upon Basic.pm, avoid code duplication + - Add extra test to ensure restoring fails if required argument isn't provided + - Fix a bug where if a required constructor argument was not serialized, it was impossible to ->unpack again. -0.19 - * Skip pod tests when not in author mode +0.19 2009-07-14 + - Skip pod tests when not in author mode + +0.18 2009-06-02 + - Fix test failures without JSON::Any. Patch from RT#46343 (Nicholas Clarke) + - Added support for Maybe[...] constraints fixing RT#43165 (plu) + +0.17 2009-04-06 + - Change MooseX::Storage::Engine to use get_all_attributes, + rather than the deprecated compute_all_applicable_attributes (t0m) + - Don't fail tests when Best is unavailable (t0m) + +0.15 2008-09-29 + - MooseX::Storage + - Remove use of deprecated alias_method routine + which was causing issues when you used multiple + Roles which used MooseX::Storage (t0m). + +0.14 2008-06-22 + - MooseX::Storage::Engine + - cycles are now tracked by refaddr instead + of stringified object, which broke for any + overloaded objects (Thanks to Jonathan Rockway) + + - Don't fail tests when YAML is unavailable + + - Use temporary files in test suite, instead of cwd + +0.13 2008-05-24 + - MooseX::Storage::Engine: + - added find_type_handler_for($name) method + to make finding type handlers easier + - improved error messages + + - removed Build.PL since Module::Install + no longer supports it + +0.12 2008-03-14 + - added build_requires for Test::Deep (awwaiid) + - upped the Moose dependency to support the custom + meta-attribute-traits + + - t/ + - fixing all the tests to properly skip if optional + features are not being used, this should help get + rid of all our CPANtester failures + - tested against 5.10 as well -0.18 - * Fix test failures without JSON::Any. Patch from RT#46343 (Nicholas Clarke) - * Added support for Maybe[...] constraints fixing RT#43165 (plu) - -0.17 - * Change MooseX::Storage::Engine to use get_all_attributes, - rather than the deprecated compute_all_applicable_attributes (t0m) - -0.16 - * Don't fail tests when Best is unavailable (t0m) - -0.15 - * MooseX::Storage - - Remove use of deprecated alias_method routine - which was causing issues when you used multiple - Roles which used MooseX::Storage (t0m). - -0.14 - * MooseX::Storage::Engine - - cycles are now tracked by refaddr instead - of stringified object, which broke for any - overloaded objects (Thanks to Jonathan Rockway) - - * Don't fail tests when YAML is unavailable - - * Use temporary files in test suite, instead of cwd - -0.13 Sat. May 24, 2008 - * MooseX::Storage::Engine - - added find_type_handler_for($name) method - to make finding type handlers easier - - improved error messages - - ~ removed Build.PL since Module::Install - no longer supports it - -0.12 Fri. March 14, 2008 - - - added build_requires for Test::Deep (awwaiid) - - upped the Moose dependency to support the custom - meta-attribute-traits - - * t/ - - fixing all the tests to properly skip if optional - features are not being used, this should help get - rid of all our CPANtester failures - - tested against 5.10 as well - - * MooseX::Storage::Engine + - MooseX::Storage::Engine MooseX::Storage::Meta::Attribute::DoNotSerialize MooseX::Storage::Meta::Attribute::Trait::DoNotSerialize - - adding meta-attribute-trait support for + - adding meta-attribute-trait support for DoNotSerialize - added tests for this -0.11 Thurs. Jan. 10, 2008 - - - upped the Test::JSON dependency - so that we use the version that - supports JSON::Any - - upped the JSON::Any requirement - - minor test cleanups to handle - optional dependencies better - - * MooseX::Storage::Engine - - the numbers now have to numify (+0) in the - expand/collapse so that certain JSON engines - will not choke on them - -0.10 Thurs. Jan. 10, 2008 - ~~ updated copyright information ~~ - - * MooseX::Storage::Deferred - - added this role, which allows you to wait until - you actually call a method to determine what - formatter and/or IO engine you want to use - - added tests for this +0.11 2008-01-10 + - upped the Test::JSON dependency + so that we use the version that + supports JSON::Any + - upped the JSON::Any requirement + - minor test cleanups to handle + optional dependencies better + + - MooseX::Storage::Engine + - the numbers now have to numify (+0) in the + expand/collapse so that certain JSON engines + will not choke on them + +0.10 2009-01-10 + - updated copyright information + + - MooseX::Storage::Deferred + - added this role, which allows you to wait until + you actually call a method to determine what + formatter and/or IO engine you want to use + - added tests for this + +0.09 2007-10-23 + - MooseX::Storage::Util + - added support to deal with utf8 strings correctly + + - MooseX::Storage::Engine::File + MooseX::Storage::Engine::AtomicFile + - fixed utf8 handling when storing string + - added tests for this -0.09 Tue. Oct. 23, 2007 - * MooseX::Storage::Util - - added support to deal with utf8 strings correctly - - * MooseX::Storage::Engine::File - MooseX::Storage::Engine::AtomicFile - - fixed utf8 handling when storing string - - added tests for this - - * t/ + - t/ - added an extra test for the utf8 handling - - * Change build system to Module::Install -0.08 Wed. Oct. 10, 2007 - * MooseX::Storage::Format::JSON - - added support to deal with utf8 strings correctly - -0.07 Thurs. Sept. 27, 2007 - + MooseX::Storage::Format::Storable - - this will use Storable to freeze/thaw objects - - added tests for this - - + MooseX::Storage::IO::StorableFile - - this will use Storable to load/store objects - - added tests for this - - * t/ - - fixed tests in 030_with_checksum.t - (thanks to sartak) - -0.06 Tues. Aug. 7, 2007 - * MooseX::Storage::Engine - - added the Bool type and fixed a few bugs - that it exposed (thanks to Sartak) - - added tests for this - -0.05 Sun. July 15. 2007 - * MooseX::Storage::Base::WithChecksum - - Fixed minor issue where the WithChecksum would - choke with a bad checksum due to odd Data::Dumper - output. - - * t/ - - forced JSON::Any in the basic JSON tests to use - JSON.pm since this is what Test::JSON uses and - subtle (and annoying) issues can arise. - -0.04 Tues. July 3, 2007 - * MooseX::Storage::Util - - made this more robust when it tries - to use YAML and JSON loaders and fails - to find one - - fixed tests to reflect this - -0.03 Wed. June 27, 2007 - * MooseX::Storage::Util - - this is a collection of useful tools - for working with MooseX::Storage data - - added docs and test - - * t/ - - added test for a custom type handler - - fixed checksum test to skip if Digest::SHA1 - (our default) is not available - -0.02 Fri. June 8, 2007 - * MooseX::Storage::Base::WithChecksum - - added a simple base role which makes a checksum of - the data structure before packing, and checks the - checksum before unpacking. - - added tests for this + - Change build system to Module::Install - * MooseX::Storage::Engine - - better error reporting when cycles are found - - class names are now stored as the full identifier - (--) and are checked - when they are expanded. - - added docs and tests for this - - * MooseX::Storage::Engine::IO::(AtomicFile, File) - - added checks to make sure the file gets opened correctly - and dies if it does not. +0.08 2007-10-10 + - MooseX::Storage::Format::JSON + - added support to deal with utf8 strings correctly + +0.07 2007-09-27 + - MooseX::Storage::Format::Storable + - this will use Storable to freeze/thaw objects + - added tests for this + + - MooseX::Storage::IO::StorableFile + - this will use Storable to load/store objects + - added tests for this + + - t/ + - fixed tests in 030_with_checksum.t + (thanks to sartak) + +0.06 2007-08-07 + - MooseX::Storage::Engine + - added the Bool type and fixed a few bugs + that it exposed (thanks to Sartak) + - added tests for this + +0.05 2007-07-15 + - MooseX::Storage::Base::WithChecksum + - Fixed minor issue where the WithChecksum would + choke with a bad checksum due to odd Data::Dumper + output. + + - t/ + - forced JSON::Any in the basic JSON tests to use + JSON.pm since this is what Test::JSON uses and + subtle (and annoying) issues can arise. + +0.04 2007-07-03 + - MooseX::Storage::Util + - made this more robust when it tries + to use YAML and JSON loaders and fails + to find one + - fixed tests to reflect this + +0.03 2007-06-27 + - MooseX::Storage::Util + - this is a collection of useful tools + for working with MooseX::Storage data + - added docs and test + + - t/ + - added test for a custom type handler + - fixed checksum test to skip if Digest::SHA1 + (our default) is not available + +0.02 2007-06-08 + - MooseX::Storage::Base::WithChecksum + - added a simple base role which makes a checksum of + the data structure before packing, and checks the + checksum before unpacking. + - added tests for this + + - MooseX::Storage::Engine + - better error reporting when cycles are found + - class names are now stored as the full identifier + (--) and are checked + when they are expanded. + - added docs and tests for this + + - MooseX::Storage::Engine::IO::(AtomicFile, File) + - added checks to make sure the file gets opened correctly + and dies if it does not. -0.01 Mon. April 30, 2007 - This was Chris's idea originally (blame him), and +0.01 2007-04-30 + - This was Chris's idea originally (blame him), and we expanded on it to create what you see here :) diff -Nru libmoosex-storage-perl-0.33/INSTALL libmoosex-storage-perl-0.45/INSTALL --- libmoosex-storage-perl-0.33/INSTALL 1970-01-01 00:00:00.000000000 +0000 +++ libmoosex-storage-perl-0.45/INSTALL 2013-12-22 00:48:35.000000000 +0000 @@ -0,0 +1,44 @@ + +This is the Perl distribution MooseX-Storage. + +Installing MooseX-Storage is straightforward. + +## Installation with cpanm + +If you have cpanm, you only need one line: + + % cpanm MooseX::Storage + +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 MooseX::Storage + +## Installing with the CPAN shell + +Alternatively, if your CPAN shell is set up, you should just be able to do: + + % cpan MooseX::Storage + +## 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 + +MooseX-Storage documentation is available as POD. +You can run perldoc from a shell to read the documentation: + + % perldoc MooseX::Storage diff -Nru libmoosex-storage-perl-0.33/LICENSE libmoosex-storage-perl-0.45/LICENSE --- libmoosex-storage-perl-0.33/LICENSE 1970-01-01 00:00:00.000000000 +0000 +++ libmoosex-storage-perl-0.45/LICENSE 2013-12-22 00:48:35.000000000 +0000 @@ -0,0 +1,379 @@ +This software is copyright (c) 2007 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) 2007 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, Suite 500, Boston, MA 02110-1335 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) 2007 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 + diff -Nru libmoosex-storage-perl-0.33/MANIFEST libmoosex-storage-perl-0.45/MANIFEST --- libmoosex-storage-perl-0.33/MANIFEST 2013-03-30 02:07:14.000000000 +0000 +++ libmoosex-storage-perl-0.45/MANIFEST 2013-12-22 00:48:35.000000000 +0000 @@ -1,17 +1,16 @@ +Build.PL +CONTRIBUTING Changes -inc/Module/AutoInstall.pm -inc/Module/Install.pm -inc/Module/Install/AuthorRequires.pm -inc/Module/Install/AuthorTests.pm -inc/Module/Install/AutoInstall.pm -inc/Module/Install/Base.pm -inc/Module/Install/Can.pm -inc/Module/Install/Fetch.pm -inc/Module/Install/Include.pm -inc/Module/Install/Makefile.pm -inc/Module/Install/Metadata.pm -inc/Module/Install/Win32.pm -inc/Module/Install/WriteAll.pm +INSTALL +LICENSE +MANIFEST +META.json +META.yml +Makefile.PL +README +README.md +TODO +dist.ini lib/MooseX/Storage.pm lib/MooseX/Storage/Base/WithChecksum.pm lib/MooseX/Storage/Basic.pm @@ -32,10 +31,7 @@ lib/MooseX/Storage/Traits/DisableCycleDetection.pm lib/MooseX/Storage/Traits/OnlyWhenBuilt.pm lib/MooseX/Storage/Util.pm -Makefile.PL -MANIFEST This list of files -META.yml -README +t/00-report-prereqs.t t/000_load.t t/001_basic.t t/002_basic_io.t @@ -67,5 +63,20 @@ t/105_io_atomic_w_utf8.t t/200_combined_in_roles.t t/300_overloaded.t -t/author/pod-coverage.t -t/author/pod.t +weaver.ini +xt/author/00-compile.t +xt/author/pod-spell.t +xt/release/changes_has_content.t +xt/release/cpan-changes.t +xt/release/distmeta.t +xt/release/eol.t +xt/release/kwalitee.t +xt/release/minimum-version.t +xt/release/mojibake.t +xt/release/no-tabs.t +xt/release/pod-coverage.t +xt/release/pod-no404s.t +xt/release/pod-syntax.t +xt/release/portability.t +xt/release/test-version.t +xt/release/unused-vars.t diff -Nru libmoosex-storage-perl-0.33/META.json libmoosex-storage-perl-0.45/META.json --- libmoosex-storage-perl-0.33/META.json 1970-01-01 00:00:00.000000000 +0000 +++ libmoosex-storage-perl-0.45/META.json 2013-12-22 00:48:35.000000000 +0000 @@ -0,0 +1,979 @@ +{ + "abstract" : "A serialization framework for Moose classes", + "author" : [ + "Chris Prather ", + "Stevan Little ", + "\u05d9\u05d5\u05d1\u05dc \u05e7\u05d5\u05d2'\u05de\u05df (Yuval Kogman) " + ], + "dynamic_config" : 0, + "generated_by" : "Dist::Zilla version 5.006, CPAN::Meta::Converter version 2.133380", + "license" : [ + "perl_5" + ], + "meta-spec" : { + "url" : "http://search.cpan.org/perldoc?CPAN::Meta::Spec", + "version" : "2" + }, + "name" : "MooseX-Storage", + "no_index" : { + "directory" : [ + "t", + "xt", + "examples" + ] + }, + "optional_features" : { + "File" : { + "description" : "the ability to save the file to disk", + "prereqs" : { + "runtime" : { + "requires" : { + "IO::AtomicFile" : "0", + "IO::File" : "0" + } + } + }, + "x_default" : "1" + }, + "JSON" : { + "description" : "Serialize to JSON. You should have at least one serialization format.", + "prereqs" : { + "runtime" : { + "recommends" : { + "MooseX::Storage::Format::JSONpm" : "0" + }, + "requires" : { + "JSON::Any" : "1.15" + } + }, + "test" : { + "requires" : { + "Test::Deep::JSON" : "0" + } + } + }, + "x_default" : "1" + }, + "Storable" : { + "description" : "Serialize to Storable. You should have at least one serialization format.", + "prereqs" : { + "runtime" : { + "requires" : { + "Storable" : "0" + } + } + }, + "x_default" : "1" + }, + "YAML" : { + "description" : "Serialize to YAML. You should have at least one serialization format.", + "prereqs" : { + "runtime" : { + "recommends" : { + "YAML" : "0", + "YAML::Syck" : "0", + "YAML::XS" : "0" + }, + "requires" : { + "YAML::Any" : "0" + } + }, + "test" : { + "requires" : { + "Test::Without::Module" : "0" + } + } + }, + "x_default" : "1" + } + }, + "prereqs" : { + "configure" : { + "requires" : { + "ExtUtils::MakeMaker" : "6.30", + "Module::Build::Tiny" : "0.030" + } + }, + "develop" : { + "recommends" : { + "Dist::Zilla::PluginBundle::Author::ETHER" : "0.043" + }, + "requires" : { + "Digest" : "0", + "Digest::HMAC" : "0", + "Digest::HMAC_SHA1" : "0", + "Digest::SHA" : "0", + "Dist::Zilla" : "5.006", + "Dist::Zilla::Plugin::ContributorsFromGit" : "0", + "Dist::Zilla::Plugin::GitHub::Update" : "0", + "Dist::Zilla::Plugin::GithubMeta" : "0", + "Dist::Zilla::Plugin::MakeMaker::Fallback" : "0", + "Dist::Zilla::Plugin::MetaResources" : "0", + "Dist::Zilla::Plugin::ModuleBuildTiny" : "0.004", + "Dist::Zilla::Plugin::OptionalFeature" : "0", + "Dist::Zilla::Plugin::Prereqs" : "0", + "Dist::Zilla::PluginBundle::Author::ETHER" : "0.019", + "Encode" : "0", + "File::Spec" : "0", + "IO::AtomicFile" : "0", + "IO::File" : "0", + "IO::Handle" : "0", + "IPC::Open3" : "0", + "JSON::Any" : "1.15", + "MooseX::Storage::Format::JSONpm" : "0", + "Pod::Coverage::TrustPod" : "0", + "Pod::Weaver" : "4", + "Pod::Weaver::Section::Contributors" : "0", + "Storable" : "0", + "Test::CPAN::Changes" : "0.19", + "Test::CPAN::Meta" : "0", + "Test::Deep::JSON" : "0", + "Test::Kwalitee" : "1.12", + "Test::More" : "0.94", + "Test::NoTabs" : "0", + "Test::Pod" : "1.41", + "Test::Pod::Coverage" : "1.08", + "Test::Without::Module" : "0", + "YAML" : "0", + "YAML::Any" : "0", + "YAML::Syck" : "0", + "YAML::XS" : "0" + } + }, + "runtime" : { + "recommends" : { + "Digest::HMAC" : "0", + "Digest::SHA" : "0", + "IO::AtomicFile" : "0", + "IO::File" : "0", + "JSON::Any" : "1.15", + "MooseX::Storage::Format::JSONpm" : "0", + "Storable" : "0", + "YAML" : "0", + "YAML::Any" : "0", + "YAML::Syck" : "0", + "YAML::XS" : "0" + }, + "requires" : { + "Data::Dumper" : "0", + "Digest" : "0", + "Module::Runtime" : "0", + "Moose" : "0.99", + "Scalar::Util" : "0", + "String::RewritePrefix" : "0", + "perl" : "5.008" + } + }, + "test" : { + "recommends" : { + "CPAN::Meta" : "0", + "CPAN::Meta::Requirements" : "0", + "Test::Deep::JSON" : "0", + "Test::Without::Module" : "0" + }, + "requires" : { + "File::Spec::Functions" : "0", + "Test::Deep" : "0", + "Test::Fatal" : "0", + "Test::More" : "0.88", + "Test::Requires" : "0.05" + } + } + }, + "provides" : { + "Moose::Meta::Attribute::Custom::DoNotSerialize" : { + "file" : "lib/MooseX/Storage/Meta/Attribute/DoNotSerialize.pm", + "version" : "0.45" + }, + "Moose::Meta::Attribute::Custom::Trait::DoNotSerialize" : { + "file" : "lib/MooseX/Storage/Meta/Attribute/Trait/DoNotSerialize.pm", + "version" : "0.45" + }, + "MooseX::Storage" : { + "file" : "lib/MooseX/Storage.pm", + "version" : "0.45" + }, + "MooseX::Storage::Base::WithChecksum" : { + "file" : "lib/MooseX/Storage/Base/WithChecksum.pm", + "version" : "0.45" + }, + "MooseX::Storage::Basic" : { + "file" : "lib/MooseX/Storage/Basic.pm", + "version" : "0.45" + }, + "MooseX::Storage::Deferred" : { + "file" : "lib/MooseX/Storage/Deferred.pm", + "version" : "0.45" + }, + "MooseX::Storage::Engine" : { + "file" : "lib/MooseX/Storage/Engine.pm", + "version" : "0.45" + }, + "MooseX::Storage::Engine::IO::AtomicFile" : { + "file" : "lib/MooseX/Storage/Engine/IO/AtomicFile.pm", + "version" : "0.45" + }, + "MooseX::Storage::Engine::IO::File" : { + "file" : "lib/MooseX/Storage/Engine/IO/File.pm", + "version" : "0.45" + }, + "MooseX::Storage::Engine::Trait::DisableCycleDetection" : { + "file" : "lib/MooseX/Storage/Engine/Trait/DisableCycleDetection.pm", + "version" : "0.45" + }, + "MooseX::Storage::Engine::Trait::OnlyWhenBuilt" : { + "file" : "lib/MooseX/Storage/Engine/Trait/OnlyWhenBuilt.pm", + "version" : "0.45" + }, + "MooseX::Storage::Format::JSON" : { + "file" : "lib/MooseX/Storage/Format/JSON.pm", + "version" : "0.45" + }, + "MooseX::Storage::Format::Storable" : { + "file" : "lib/MooseX/Storage/Format/Storable.pm", + "version" : "0.45" + }, + "MooseX::Storage::Format::YAML" : { + "file" : "lib/MooseX/Storage/Format/YAML.pm", + "version" : "0.45" + }, + "MooseX::Storage::IO::AtomicFile" : { + "file" : "lib/MooseX/Storage/IO/AtomicFile.pm", + "version" : "0.45" + }, + "MooseX::Storage::IO::File" : { + "file" : "lib/MooseX/Storage/IO/File.pm", + "version" : "0.45" + }, + "MooseX::Storage::IO::StorableFile" : { + "file" : "lib/MooseX/Storage/IO/StorableFile.pm", + "version" : "0.45" + }, + "MooseX::Storage::Meta::Attribute::DoNotSerialize" : { + "file" : "lib/MooseX/Storage/Meta/Attribute/DoNotSerialize.pm", + "version" : "0.45" + }, + "MooseX::Storage::Meta::Attribute::Trait::DoNotSerialize" : { + "file" : "lib/MooseX/Storage/Meta/Attribute/Trait/DoNotSerialize.pm", + "version" : "0.45" + }, + "MooseX::Storage::Traits::DisableCycleDetection" : { + "file" : "lib/MooseX/Storage/Traits/DisableCycleDetection.pm", + "version" : "0.45" + }, + "MooseX::Storage::Traits::OnlyWhenBuilt" : { + "file" : "lib/MooseX/Storage/Traits/OnlyWhenBuilt.pm", + "version" : "0.45" + }, + "MooseX::Storage::Util" : { + "file" : "lib/MooseX/Storage/Util.pm", + "version" : "0.45" + } + }, + "release_status" : "stable", + "resources" : { + "bugtracker" : { + "mailto" : "bug-MooseX-Storage@rt.cpan.org", + "web" : "https://rt.cpan.org/Public/Dist/Display.html?Name=MooseX-Storage" + }, + "homepage" : "https://github.com/moose/MooseX-Storage", + "repository" : { + "type" : "git", + "url" : "https://github.com/moose/MooseX-Storage.git", + "web" : "https://github.com/moose/MooseX-Storage" + }, + "x_IRC" : "irc://irc.perl.org/#moose", + "x_MailingList" : "http://lists.perl.org/list/moose.html" + }, + "version" : "0.45", + "x_Dist_Zilla" : { + "perl" : { + "version" : "5.019006" + }, + "plugins" : [ + { + "class" : "Dist::Zilla::Plugin::Git::NextVersion", + "name" : "@Author::ETHER/Git::NextVersion", + "version" : "2.019" + }, + { + "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/build", + "version" : "0.015" + }, + { + "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/release", + "version" : "0.015" + }, + { + "class" : "Dist::Zilla::Plugin::ExecDir", + "name" : "@Author::ETHER/ExecDir", + "version" : "5.006" + }, + { + "class" : "Dist::Zilla::Plugin::ShareDir", + "name" : "@Author::ETHER/ShareDir", + "version" : "5.006" + }, + { + "class" : "Dist::Zilla::Plugin::FileFinder::ByName", + "name" : "@Author::ETHER/Examples", + "version" : "5.006" + }, + { + "class" : "Dist::Zilla::Plugin::Git::GatherDir", + "name" : "@Author::ETHER/Git::GatherDir", + "version" : "2.019" + }, + { + "class" : "Dist::Zilla::Plugin::MetaYAML", + "name" : "@Author::ETHER/MetaYAML", + "version" : "5.006" + }, + { + "class" : "Dist::Zilla::Plugin::MetaJSON", + "name" : "@Author::ETHER/MetaJSON", + "version" : "5.006" + }, + { + "class" : "Dist::Zilla::Plugin::License", + "name" : "@Author::ETHER/License", + "version" : "5.006" + }, + { + "class" : "Dist::Zilla::Plugin::Readme", + "name" : "@Author::ETHER/Readme", + "version" : "5.006" + }, + { + "class" : "Dist::Zilla::Plugin::Manifest", + "name" : "@Author::ETHER/Manifest", + "version" : "5.006" + }, + { + "class" : "Dist::Zilla::Plugin::GenerateFile::ShareDir", + "config" : { + "Dist::Zilla::Plugin::GenerateFile::ShareDir" : { + "destination_filename" : "CONTRIBUTING", + "dist" : "Dist-Zilla-PluginBundle-Author-ETHER", + "encoding" : "UTF-8", + "source_filename" : "CONTRIBUTING" + } + }, + "name" : "@Author::ETHER/GenerateFile::ShareDir", + "version" : "0.003" + }, + { + "class" : "Dist::Zilla::Plugin::Test::Compile", + "config" : { + "Dist::Zilla::Plugin::Test::Compile" : { + "filename" : "xt/author/00-compile.t", + "module_finder" : [ + ":InstallModules" + ], + "script_finder" : [ + ":ExecFiles", + "@Author::ETHER/Examples" + ] + } + }, + "name" : "@Author::ETHER/Test::Compile", + "version" : "2.039" + }, + { + "class" : "Dist::Zilla::Plugin::Test::NoTabs", + "config" : { + "Dist::Zilla::Plugin::Test::NoTabs" : { + "module_finder" : [ + ":InstallModules" + ], + "script_finder" : [ + ":ExecFiles", + "@Author::ETHER/Examples" + ] + } + }, + "name" : "@Author::ETHER/Test::NoTabs", + "version" : "0.06" + }, + { + "class" : "Dist::Zilla::Plugin::EOLTests", + "name" : "@Author::ETHER/EOLTests", + "version" : "0.02" + }, + { + "class" : "Dist::Zilla::Plugin::MetaTests", + "name" : "@Author::ETHER/MetaTests", + "version" : "5.006" + }, + { + "class" : "Dist::Zilla::Plugin::Test::Version", + "name" : "@Author::ETHER/Test::Version", + "version" : "0.002004" + }, + { + "class" : "Dist::Zilla::Plugin::Test::CPAN::Changes", + "name" : "@Author::ETHER/Test::CPAN::Changes", + "version" : "0.008" + }, + { + "class" : "Dist::Zilla::Plugin::Test::ChangesHasContent", + "name" : "@Author::ETHER/Test::ChangesHasContent", + "version" : "0.006" + }, + { + "class" : "Dist::Zilla::Plugin::Test::UnusedVars", + "name" : "@Author::ETHER/Test::UnusedVars", + "version" : "2.000005" + }, + { + "class" : "Dist::Zilla::Plugin::Test::MinimumVersion", + "name" : "@Author::ETHER/Test::MinimumVersion", + "version" : "2.000005" + }, + { + "class" : "Dist::Zilla::Plugin::PodSyntaxTests", + "name" : "@Author::ETHER/PodSyntaxTests", + "version" : "5.006" + }, + { + "class" : "Dist::Zilla::Plugin::PodCoverageTests", + "name" : "@Author::ETHER/PodCoverageTests", + "version" : "5.006" + }, + { + "class" : "Dist::Zilla::Plugin::Test::PodSpelling", + "name" : "@Author::ETHER/Test::PodSpelling", + "version" : "2.006002" + }, + { + "class" : "Dist::Zilla::Plugin::Test::Pod::No404s", + "name" : "@Author::ETHER/Test::Pod::No404s", + "version" : "1.001" + }, + { + "class" : "Dist::Zilla::Plugin::Test::Kwalitee", + "name" : "@Author::ETHER/Test::Kwalitee", + "version" : "2.07" + }, + { + "class" : "Dist::Zilla::Plugin::MojibakeTests", + "name" : "@Author::ETHER/MojibakeTests", + "version" : "0.5" + }, + { + "class" : "Dist::Zilla::Plugin::Test::ReportPrereqs", + "name" : "@Author::ETHER/Test::ReportPrereqs", + "version" : "0.010" + }, + { + "class" : "Dist::Zilla::Plugin::Test::Portability", + "name" : "@Author::ETHER/Test::Portability", + "version" : "2.000005" + }, + { + "class" : "Dist::Zilla::Plugin::PruneCruft", + "name" : "@Author::ETHER/PruneCruft", + "version" : "5.006" + }, + { + "class" : "Dist::Zilla::Plugin::ManifestSkip", + "name" : "@Author::ETHER/ManifestSkip", + "version" : "5.006" + }, + { + "class" : "Dist::Zilla::Plugin::Authority", + "name" : "@Author::ETHER/Authority", + "version" : "1.006" + }, + { + "class" : "Dist::Zilla::Plugin::Git::Describe", + "name" : "@Author::ETHER/Git::Describe", + "version" : "0.003" + }, + { + "class" : "Dist::Zilla::Plugin::PkgVersion", + "name" : "@Author::ETHER/PkgVersion", + "version" : "5.006" + }, + { + "class" : "Dist::Zilla::Plugin::PodWeaver", + "config" : { + "Dist::Zilla::Plugin::PodWeaver" : { + "finder" : [ + ":InstallModules", + ":ExecFiles" + ], + "plugins" : [ + { + "class" : "Pod::Weaver::Plugin::EnsurePod5", + "name" : "@CorePrep/EnsurePod5", + "version" : "4.005" + }, + { + "class" : "Pod::Weaver::Plugin::H1Nester", + "name" : "@CorePrep/H1Nester", + "version" : "4.005" + }, + { + "class" : "Pod::Weaver::Plugin::SingleEncoding", + "name" : "@Default/SingleEncoding", + "version" : "4.005" + }, + { + "class" : "Pod::Weaver::Section::Name", + "name" : "@Default/Name", + "version" : "4.005" + }, + { + "class" : "Pod::Weaver::Section::Version", + "name" : "@Default/Version", + "version" : "4.005" + }, + { + "class" : "Pod::Weaver::Section::Region", + "name" : "@Default/prelude", + "version" : "4.005" + }, + { + "class" : "Pod::Weaver::Section::Generic", + "name" : "SYNOPSIS", + "version" : "4.005" + }, + { + "class" : "Pod::Weaver::Section::Generic", + "name" : "DESCRIPTION", + "version" : "4.005" + }, + { + "class" : "Pod::Weaver::Section::Generic", + "name" : "OVERVIEW", + "version" : "4.005" + }, + { + "class" : "Pod::Weaver::Section::Collect", + "name" : "ATTRIBUTES", + "version" : "4.005" + }, + { + "class" : "Pod::Weaver::Section::Collect", + "name" : "METHODS", + "version" : "4.005" + }, + { + "class" : "Pod::Weaver::Section::Collect", + "name" : "FUNCTIONS", + "version" : "4.005" + }, + { + "class" : "Pod::Weaver::Section::Leftovers", + "name" : "@Default/Leftovers", + "version" : "4.005" + }, + { + "class" : "Pod::Weaver::Section::Region", + "name" : "@Default/postlude", + "version" : "4.005" + }, + { + "class" : "Pod::Weaver::Section::Authors", + "name" : "@Default/Authors", + "version" : "4.005" + }, + { + "class" : "Pod::Weaver::Section::Legal", + "name" : "@Default/Legal", + "version" : "4.005" + }, + { + "class" : "Pod::Weaver::Plugin::Transformer", + "name" : "-Transformer", + "version" : "4.005" + }, + { + "class" : "Pod::Weaver::Plugin::StopWords", + "name" : "-StopWords", + "version" : "1.008" + }, + { + "class" : "Pod::Weaver::Section::Contributors", + "name" : "Contributors", + "version" : "0.007" + } + ] + } + }, + "name" : "@Author::ETHER/PodWeaver", + "version" : "4.002" + }, + { + "class" : "Dist::Zilla::Plugin::NextRelease", + "name" : "@Author::ETHER/NextRelease", + "version" : "5.006" + }, + { + "class" : "Dist::Zilla::Plugin::ReadmeAnyFromPod", + "name" : "@Author::ETHER/ReadmeAnyFromPod", + "version" : "0.133360" + }, + { + "class" : "Dist::Zilla::Plugin::GithubMeta", + "name" : "@Author::ETHER/GithubMeta", + "version" : "0.42" + }, + { + "class" : "Dist::Zilla::Plugin::AutoMetaResources", + "name" : "@Author::ETHER/AutoMetaResources", + "version" : "1.20" + }, + { + "class" : "Dist::Zilla::Plugin::MetaNoIndex", + "name" : "@Author::ETHER/MetaNoIndex", + "version" : "5.006" + }, + { + "class" : "Dist::Zilla::Plugin::FinderCode", + "name" : "@Author::ETHER/MetaProvides::Package/AUTOVIV/:InstallModulesPM", + "version" : "5.006" + }, + { + "class" : "Dist::Zilla::Plugin::MetaProvides::Package", + "config" : { + "Dist::Zilla::Plugin::MetaProvides::Package" : {}, + "Dist::Zilla::Role::MetaProvider::Provider" : { + "inherit_missing" : "1", + "inherit_version" : "1", + "meta_noindex" : "1" + } + }, + "name" : "@Author::ETHER/MetaProvides::Package", + "version" : "1.15000001" + }, + { + "class" : "Dist::Zilla::Plugin::MetaConfig", + "name" : "@Author::ETHER/MetaConfig", + "version" : "5.006" + }, + { + "class" : "Dist::Zilla::Plugin::Prereqs::AuthorDeps", + "name" : "@Author::ETHER/Prereqs::AuthorDeps", + "version" : "0.002" + }, + { + "class" : "Dist::Zilla::Plugin::MinimumPerl", + "name" : "@Author::ETHER/MinimumPerl", + "version" : "1.003" + }, + { + "class" : "Dist::Zilla::Plugin::Prereqs", + "config" : { + "Dist::Zilla::Plugin::Prereqs" : { + "phase" : "develop", + "type" : "requires" + } + }, + "name" : "@Author::ETHER/installer_requirements", + "version" : "5.006" + }, + { + "class" : "Dist::Zilla::Plugin::Prereqs", + "config" : { + "Dist::Zilla::Plugin::Prereqs" : { + "phase" : "develop", + "type" : "recommends" + } + }, + "name" : "@Author::ETHER/pluginbundle_version", + "version" : "5.006" + }, + { + "class" : "Dist::Zilla::Plugin::RunExtraTests", + "name" : "@Author::ETHER/RunExtraTests", + "version" : "0.016" + }, + { + "class" : "Dist::Zilla::Plugin::MakeMaker::Fallback", + "name" : "@Author::ETHER/MakeMaker::Fallback", + "version" : "0.005" + }, + { + "class" : "Dist::Zilla::Plugin::ModuleBuildTiny", + "name" : "@Author::ETHER/ModuleBuildTiny", + "version" : "0.005" + }, + { + "class" : "Dist::Zilla::Plugin::InstallGuide", + "name" : "@Author::ETHER/InstallGuide", + "version" : "1.200002" + }, + { + "class" : "Dist::Zilla::Plugin::CheckSelfDependency", + "name" : "@Author::ETHER/CheckSelfDependency", + "version" : "0.006" + }, + { + "class" : "Dist::Zilla::Plugin::Run::AfterBuild", + "name" : "@Author::ETHER/Run::AfterBuild", + "version" : "0.020" + }, + { + "class" : "Dist::Zilla::Plugin::Git::Check", + "name" : "@Author::ETHER/initial check", + "version" : "2.019" + }, + { + "class" : "Dist::Zilla::Plugin::Git::CheckFor::MergeConflicts", + "name" : "@Author::ETHER/Git::CheckFor::MergeConflicts", + "version" : "0.008" + }, + { + "class" : "Dist::Zilla::Plugin::Git::CheckFor::CorrectBranch", + "name" : "@Author::ETHER/Git::CheckFor::CorrectBranch", + "version" : "0.008" + }, + { + "class" : "Dist::Zilla::Plugin::Git::Remote::Check", + "name" : "@Author::ETHER/Git::Remote::Check", + "version" : "0.1.2" + }, + { + "class" : "Dist::Zilla::Plugin::CheckPrereqsIndexed", + "name" : "@Author::ETHER/CheckPrereqsIndexed", + "version" : "0.009" + }, + { + "class" : "Dist::Zilla::Plugin::TestRelease", + "name" : "@Author::ETHER/TestRelease", + "version" : "5.006" + }, + { + "class" : "Dist::Zilla::Plugin::Git::Check", + "name" : "@Author::ETHER/after tests", + "version" : "2.019" + }, + { + "class" : "Dist::Zilla::Plugin::UploadToCPAN", + "name" : "@Author::ETHER/UploadToCPAN", + "version" : "5.006" + }, + { + "class" : "Dist::Zilla::Plugin::CopyFilesFromRelease", + "name" : "@Author::ETHER/CopyFilesFromRelease", + "version" : "0.001" + }, + { + "class" : "Dist::Zilla::Plugin::Git::Commit", + "name" : "@Author::ETHER/Git::Commit", + "version" : "2.019" + }, + { + "class" : "Dist::Zilla::Plugin::Git::Tag", + "name" : "@Author::ETHER/Git::Tag", + "version" : "2.019" + }, + { + "class" : "Dist::Zilla::Plugin::GitHub::Update", + "name" : "@Author::ETHER/GitHub::Update", + "version" : "0.36" + }, + { + "class" : "Dist::Zilla::Plugin::Git::Push", + "name" : "@Author::ETHER/Git::Push", + "version" : "2.019" + }, + { + "class" : "Dist::Zilla::Plugin::InstallRelease", + "name" : "@Author::ETHER/InstallRelease", + "version" : "0.008" + }, + { + "class" : "Dist::Zilla::Plugin::ConfirmRelease", + "name" : "@Author::ETHER/ConfirmRelease", + "version" : "5.006" + }, + { + "class" : "Dist::Zilla::Plugin::Prereqs", + "config" : { + "Dist::Zilla::Plugin::Prereqs" : { + "phase" : "develop", + "type" : "requires" + } + }, + "name" : "@Author::ETHER/via_options", + "version" : "5.006" + }, + { + "class" : "Dist::Zilla::Plugin::MetaResources", + "name" : "MetaResources", + "version" : "5.006" + }, + { + "class" : "Dist::Zilla::Plugin::ContributorsFromGit", + "name" : "ContributorsFromGit", + "version" : "0.006" + }, + { + "class" : "Dist::Zilla::Plugin::Prereqs", + "config" : { + "Dist::Zilla::Plugin::Prereqs" : { + "phase" : "runtime", + "type" : "requires" + } + }, + "name" : "RuntimeRequires", + "version" : "5.006" + }, + { + "class" : "Dist::Zilla::Plugin::Prereqs", + "config" : { + "Dist::Zilla::Plugin::Prereqs" : { + "phase" : "test", + "type" : "requires" + } + }, + "name" : "TestRequires", + "version" : "5.006" + }, + { + "class" : "Dist::Zilla::Plugin::Prereqs", + "config" : { + "Dist::Zilla::Plugin::Prereqs" : { + "phase" : "runtime", + "type" : "recommends" + } + }, + "name" : "RuntimeRecommends", + "version" : "5.006" + }, + { + "class" : "Dist::Zilla::Plugin::Prereqs", + "config" : { + "Dist::Zilla::Plugin::Prereqs" : { + "phase" : "develop", + "type" : "requires" + } + }, + "name" : "DevelopRequires", + "version" : "5.006" + }, + { + "class" : "Dist::Zilla::Plugin::OptionalFeature", + "name" : "JSON-Runtime", + "version" : "0.008" + }, + { + "class" : "Dist::Zilla::Plugin::OptionalFeature", + "name" : "JSON-RuntimeRecommends", + "version" : "0.008" + }, + { + "class" : "Dist::Zilla::Plugin::OptionalFeature", + "name" : "JSON-Test", + "version" : "0.008" + }, + { + "class" : "Dist::Zilla::Plugin::OptionalFeature", + "name" : "YAML-Runtime", + "version" : "0.008" + }, + { + "class" : "Dist::Zilla::Plugin::OptionalFeature", + "name" : "YAML-RuntimeRecommends", + "version" : "0.008" + }, + { + "class" : "Dist::Zilla::Plugin::OptionalFeature", + "name" : "YAML-Test", + "version" : "0.008" + }, + { + "class" : "Dist::Zilla::Plugin::OptionalFeature", + "name" : "Storable", + "version" : "0.008" + }, + { + "class" : "Dist::Zilla::Plugin::OptionalFeature", + "name" : "File", + "version" : "0.008" + }, + { + "class" : "Dist::Zilla::Plugin::FinderCode", + "name" : ":InstallModules", + "version" : "5.006" + }, + { + "class" : "Dist::Zilla::Plugin::FinderCode", + "name" : ":IncModules", + "version" : "5.006" + }, + { + "class" : "Dist::Zilla::Plugin::FinderCode", + "name" : ":TestFiles", + "version" : "5.006" + }, + { + "class" : "Dist::Zilla::Plugin::FinderCode", + "name" : ":ExecFiles", + "version" : "5.006" + }, + { + "class" : "Dist::Zilla::Plugin::FinderCode", + "name" : ":ShareFiles", + "version" : "5.006" + }, + { + "class" : "Dist::Zilla::Plugin::FinderCode", + "name" : ":MainModule", + "version" : "5.006" + } + ], + "zilla" : { + "class" : "Dist::Zilla::Dist::Builder", + "config" : { + "is_trial" : "0" + }, + "version" : "5.006" + } + }, + "x_authority" : "cpan:STEVAN", + "x_contributors" : [ + "Chris Prather ", + "Cory Watson ", + "Dagfinn Ilmari Manns\u00e5ker ", + "David Golden ", + "David Steinbrunner ", + "Florian Ragwitz ", + "Johannes Plunien ", + "Jonathan Rockway ", + "Jonathan Yu ", + "Jos Boumans ", + "Karen Etheridge ", + "Ricardo Signes ", + "Robert Boone ", + "Shawn M Moore ", + "Tomas Doran ", + "Yuval Kogman " + ] +} + diff -Nru libmoosex-storage-perl-0.33/META.yml libmoosex-storage-perl-0.45/META.yml --- libmoosex-storage-perl-0.33/META.yml 2013-03-30 02:07:02.000000000 +0000 +++ libmoosex-storage-perl-0.45/META.yml 2013-12-22 00:48:35.000000000 +0000 @@ -2,17 +2,19 @@ abstract: 'A serialization framework for Moose classes' author: - 'Chris Prather ' + - 'Stevan Little ' + - "יובל קוג'מן (Yuval Kogman) " build_requires: - ExtUtils::MakeMaker: 6.36 + File::Spec::Functions: 0 Test::Deep: 0 Test::Fatal: 0 Test::More: 0.88 Test::Requires: 0.05 configure_requires: - ExtUtils::MakeMaker: 6.36 -distribution_type: module -dynamic_config: 1 -generated_by: 'Module::Install version 1.06' + ExtUtils::MakeMaker: 6.30 + Module::Build::Tiny: 0.030 +dynamic_config: 0 +generated_by: 'Dist::Zilla version 5.006, CPAN::Meta::Converter version 2.133380' license: perl meta-spec: url: http://module-build.sourceforge.net/META-spec-v1.4.html @@ -20,12 +22,663 @@ name: MooseX-Storage no_index: directory: - - inc - t + - xt + - examples +optional_features: + File: + description: 'the ability to save the file to disk' + requires: + IO::AtomicFile: 0 + IO::File: 0 + JSON: + description: 'Serialize to JSON. You should have at least one serialization format.' + recommends: + MooseX::Storage::Format::JSONpm: 0 + requires: + JSON::Any: 1.15 + Storable: + description: 'Serialize to Storable. You should have at least one serialization format.' + requires: + Storable: 0 + YAML: + description: 'Serialize to YAML. You should have at least one serialization format.' + recommends: + YAML: 0 + YAML::Syck: 0 + YAML::XS: 0 + requires: + YAML::Any: 0 +provides: + Moose::Meta::Attribute::Custom::DoNotSerialize: + file: lib/MooseX/Storage/Meta/Attribute/DoNotSerialize.pm + version: 0.45 + Moose::Meta::Attribute::Custom::Trait::DoNotSerialize: + file: lib/MooseX/Storage/Meta/Attribute/Trait/DoNotSerialize.pm + version: 0.45 + MooseX::Storage: + file: lib/MooseX/Storage.pm + version: 0.45 + MooseX::Storage::Base::WithChecksum: + file: lib/MooseX/Storage/Base/WithChecksum.pm + version: 0.45 + MooseX::Storage::Basic: + file: lib/MooseX/Storage/Basic.pm + version: 0.45 + MooseX::Storage::Deferred: + file: lib/MooseX/Storage/Deferred.pm + version: 0.45 + MooseX::Storage::Engine: + file: lib/MooseX/Storage/Engine.pm + version: 0.45 + MooseX::Storage::Engine::IO::AtomicFile: + file: lib/MooseX/Storage/Engine/IO/AtomicFile.pm + version: 0.45 + MooseX::Storage::Engine::IO::File: + file: lib/MooseX/Storage/Engine/IO/File.pm + version: 0.45 + MooseX::Storage::Engine::Trait::DisableCycleDetection: + file: lib/MooseX/Storage/Engine/Trait/DisableCycleDetection.pm + version: 0.45 + MooseX::Storage::Engine::Trait::OnlyWhenBuilt: + file: lib/MooseX/Storage/Engine/Trait/OnlyWhenBuilt.pm + version: 0.45 + MooseX::Storage::Format::JSON: + file: lib/MooseX/Storage/Format/JSON.pm + version: 0.45 + MooseX::Storage::Format::Storable: + file: lib/MooseX/Storage/Format/Storable.pm + version: 0.45 + MooseX::Storage::Format::YAML: + file: lib/MooseX/Storage/Format/YAML.pm + version: 0.45 + MooseX::Storage::IO::AtomicFile: + file: lib/MooseX/Storage/IO/AtomicFile.pm + version: 0.45 + MooseX::Storage::IO::File: + file: lib/MooseX/Storage/IO/File.pm + version: 0.45 + MooseX::Storage::IO::StorableFile: + file: lib/MooseX/Storage/IO/StorableFile.pm + version: 0.45 + MooseX::Storage::Meta::Attribute::DoNotSerialize: + file: lib/MooseX/Storage/Meta/Attribute/DoNotSerialize.pm + version: 0.45 + MooseX::Storage::Meta::Attribute::Trait::DoNotSerialize: + file: lib/MooseX/Storage/Meta/Attribute/Trait/DoNotSerialize.pm + version: 0.45 + MooseX::Storage::Traits::DisableCycleDetection: + file: lib/MooseX/Storage/Traits/DisableCycleDetection.pm + version: 0.45 + MooseX::Storage::Traits::OnlyWhenBuilt: + file: lib/MooseX/Storage/Traits/OnlyWhenBuilt.pm + version: 0.45 + MooseX::Storage::Util: + file: lib/MooseX/Storage/Util.pm + version: 0.45 +recommends: + Digest::HMAC: 0 + Digest::SHA: 0 + IO::AtomicFile: 0 + IO::File: 0 + JSON::Any: 1.15 + MooseX::Storage::Format::JSONpm: 0 + Storable: 0 + YAML: 0 + YAML::Any: 0 + YAML::Syck: 0 + YAML::XS: 0 requires: + Data::Dumper: 0 + Digest: 0 + Module::Runtime: 0 Moose: 0.99 + Scalar::Util: 0 String::RewritePrefix: 0 + perl: 5.008 resources: - license: http://dev.perl.org/licenses/ - repository: git://git.moose.perl.org/MooseX-Storage.git -version: 0.33 + IRC: irc://irc.perl.org/#moose + MailingList: http://lists.perl.org/list/moose.html + bugtracker: https://rt.cpan.org/Public/Dist/Display.html?Name=MooseX-Storage + homepage: https://github.com/moose/MooseX-Storage + repository: https://github.com/moose/MooseX-Storage.git +version: 0.45 +x_Dist_Zilla: + perl: + version: 5.019006 + plugins: + - + class: Dist::Zilla::Plugin::Git::NextVersion + name: '@Author::ETHER/Git::NextVersion' + version: 2.019 + - + 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/build' + version: 0.015 + - + 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/release' + version: 0.015 + - + class: Dist::Zilla::Plugin::ExecDir + name: '@Author::ETHER/ExecDir' + version: 5.006 + - + class: Dist::Zilla::Plugin::ShareDir + name: '@Author::ETHER/ShareDir' + version: 5.006 + - + class: Dist::Zilla::Plugin::FileFinder::ByName + name: '@Author::ETHER/Examples' + version: 5.006 + - + class: Dist::Zilla::Plugin::Git::GatherDir + name: '@Author::ETHER/Git::GatherDir' + version: 2.019 + - + class: Dist::Zilla::Plugin::MetaYAML + name: '@Author::ETHER/MetaYAML' + version: 5.006 + - + class: Dist::Zilla::Plugin::MetaJSON + name: '@Author::ETHER/MetaJSON' + version: 5.006 + - + class: Dist::Zilla::Plugin::License + name: '@Author::ETHER/License' + version: 5.006 + - + class: Dist::Zilla::Plugin::Readme + name: '@Author::ETHER/Readme' + version: 5.006 + - + class: Dist::Zilla::Plugin::Manifest + name: '@Author::ETHER/Manifest' + version: 5.006 + - + class: Dist::Zilla::Plugin::GenerateFile::ShareDir + config: + Dist::Zilla::Plugin::GenerateFile::ShareDir: + destination_filename: CONTRIBUTING + dist: Dist-Zilla-PluginBundle-Author-ETHER + encoding: UTF-8 + source_filename: CONTRIBUTING + name: '@Author::ETHER/GenerateFile::ShareDir' + version: 0.003 + - + class: Dist::Zilla::Plugin::Test::Compile + config: + Dist::Zilla::Plugin::Test::Compile: + filename: xt/author/00-compile.t + module_finder: + - ':InstallModules' + script_finder: + - ':ExecFiles' + - '@Author::ETHER/Examples' + name: '@Author::ETHER/Test::Compile' + version: 2.039 + - + class: Dist::Zilla::Plugin::Test::NoTabs + config: + Dist::Zilla::Plugin::Test::NoTabs: + module_finder: + - ':InstallModules' + script_finder: + - ':ExecFiles' + - '@Author::ETHER/Examples' + name: '@Author::ETHER/Test::NoTabs' + version: 0.06 + - + class: Dist::Zilla::Plugin::EOLTests + name: '@Author::ETHER/EOLTests' + version: 0.02 + - + class: Dist::Zilla::Plugin::MetaTests + name: '@Author::ETHER/MetaTests' + version: 5.006 + - + class: Dist::Zilla::Plugin::Test::Version + name: '@Author::ETHER/Test::Version' + version: 0.002004 + - + class: Dist::Zilla::Plugin::Test::CPAN::Changes + name: '@Author::ETHER/Test::CPAN::Changes' + version: 0.008 + - + class: Dist::Zilla::Plugin::Test::ChangesHasContent + name: '@Author::ETHER/Test::ChangesHasContent' + version: 0.006 + - + class: Dist::Zilla::Plugin::Test::UnusedVars + name: '@Author::ETHER/Test::UnusedVars' + version: 2.000005 + - + class: Dist::Zilla::Plugin::Test::MinimumVersion + name: '@Author::ETHER/Test::MinimumVersion' + version: 2.000005 + - + class: Dist::Zilla::Plugin::PodSyntaxTests + name: '@Author::ETHER/PodSyntaxTests' + version: 5.006 + - + class: Dist::Zilla::Plugin::PodCoverageTests + name: '@Author::ETHER/PodCoverageTests' + version: 5.006 + - + class: Dist::Zilla::Plugin::Test::PodSpelling + name: '@Author::ETHER/Test::PodSpelling' + version: 2.006002 + - + class: Dist::Zilla::Plugin::Test::Pod::No404s + name: '@Author::ETHER/Test::Pod::No404s' + version: 1.001 + - + class: Dist::Zilla::Plugin::Test::Kwalitee + name: '@Author::ETHER/Test::Kwalitee' + version: 2.07 + - + class: Dist::Zilla::Plugin::MojibakeTests + name: '@Author::ETHER/MojibakeTests' + version: 0.5 + - + class: Dist::Zilla::Plugin::Test::ReportPrereqs + name: '@Author::ETHER/Test::ReportPrereqs' + version: 0.010 + - + class: Dist::Zilla::Plugin::Test::Portability + name: '@Author::ETHER/Test::Portability' + version: 2.000005 + - + class: Dist::Zilla::Plugin::PruneCruft + name: '@Author::ETHER/PruneCruft' + version: 5.006 + - + class: Dist::Zilla::Plugin::ManifestSkip + name: '@Author::ETHER/ManifestSkip' + version: 5.006 + - + class: Dist::Zilla::Plugin::Authority + name: '@Author::ETHER/Authority' + version: 1.006 + - + class: Dist::Zilla::Plugin::Git::Describe + name: '@Author::ETHER/Git::Describe' + version: 0.003 + - + class: Dist::Zilla::Plugin::PkgVersion + name: '@Author::ETHER/PkgVersion' + version: 5.006 + - + class: Dist::Zilla::Plugin::PodWeaver + config: + Dist::Zilla::Plugin::PodWeaver: + finder: + - ':InstallModules' + - ':ExecFiles' + plugins: + - + class: Pod::Weaver::Plugin::EnsurePod5 + name: '@CorePrep/EnsurePod5' + version: 4.005 + - + class: Pod::Weaver::Plugin::H1Nester + name: '@CorePrep/H1Nester' + version: 4.005 + - + class: Pod::Weaver::Plugin::SingleEncoding + name: '@Default/SingleEncoding' + version: 4.005 + - + class: Pod::Weaver::Section::Name + name: '@Default/Name' + version: 4.005 + - + class: Pod::Weaver::Section::Version + name: '@Default/Version' + version: 4.005 + - + class: Pod::Weaver::Section::Region + name: '@Default/prelude' + version: 4.005 + - + class: Pod::Weaver::Section::Generic + name: SYNOPSIS + version: 4.005 + - + class: Pod::Weaver::Section::Generic + name: DESCRIPTION + version: 4.005 + - + class: Pod::Weaver::Section::Generic + name: OVERVIEW + version: 4.005 + - + class: Pod::Weaver::Section::Collect + name: ATTRIBUTES + version: 4.005 + - + class: Pod::Weaver::Section::Collect + name: METHODS + version: 4.005 + - + class: Pod::Weaver::Section::Collect + name: FUNCTIONS + version: 4.005 + - + class: Pod::Weaver::Section::Leftovers + name: '@Default/Leftovers' + version: 4.005 + - + class: Pod::Weaver::Section::Region + name: '@Default/postlude' + version: 4.005 + - + class: Pod::Weaver::Section::Authors + name: '@Default/Authors' + version: 4.005 + - + class: Pod::Weaver::Section::Legal + name: '@Default/Legal' + version: 4.005 + - + class: Pod::Weaver::Plugin::Transformer + name: '-Transformer' + version: 4.005 + - + class: Pod::Weaver::Plugin::StopWords + name: '-StopWords' + version: 1.008 + - + class: Pod::Weaver::Section::Contributors + name: Contributors + version: 0.007 + name: '@Author::ETHER/PodWeaver' + version: 4.002 + - + class: Dist::Zilla::Plugin::NextRelease + name: '@Author::ETHER/NextRelease' + version: 5.006 + - + class: Dist::Zilla::Plugin::ReadmeAnyFromPod + name: '@Author::ETHER/ReadmeAnyFromPod' + version: 0.133360 + - + class: Dist::Zilla::Plugin::GithubMeta + name: '@Author::ETHER/GithubMeta' + version: 0.42 + - + class: Dist::Zilla::Plugin::AutoMetaResources + name: '@Author::ETHER/AutoMetaResources' + version: 1.20 + - + class: Dist::Zilla::Plugin::MetaNoIndex + name: '@Author::ETHER/MetaNoIndex' + version: 5.006 + - + class: Dist::Zilla::Plugin::FinderCode + name: '@Author::ETHER/MetaProvides::Package/AUTOVIV/:InstallModulesPM' + version: 5.006 + - + class: Dist::Zilla::Plugin::MetaProvides::Package + config: + Dist::Zilla::Plugin::MetaProvides::Package: {} + Dist::Zilla::Role::MetaProvider::Provider: + inherit_missing: 1 + inherit_version: 1 + meta_noindex: 1 + name: '@Author::ETHER/MetaProvides::Package' + version: 1.15000001 + - + class: Dist::Zilla::Plugin::MetaConfig + name: '@Author::ETHER/MetaConfig' + version: 5.006 + - + class: Dist::Zilla::Plugin::Prereqs::AuthorDeps + name: '@Author::ETHER/Prereqs::AuthorDeps' + version: 0.002 + - + class: Dist::Zilla::Plugin::MinimumPerl + name: '@Author::ETHER/MinimumPerl' + version: 1.003 + - + class: Dist::Zilla::Plugin::Prereqs + config: + Dist::Zilla::Plugin::Prereqs: + phase: develop + type: requires + name: '@Author::ETHER/installer_requirements' + version: 5.006 + - + class: Dist::Zilla::Plugin::Prereqs + config: + Dist::Zilla::Plugin::Prereqs: + phase: develop + type: recommends + name: '@Author::ETHER/pluginbundle_version' + version: 5.006 + - + class: Dist::Zilla::Plugin::RunExtraTests + name: '@Author::ETHER/RunExtraTests' + version: 0.016 + - + class: Dist::Zilla::Plugin::MakeMaker::Fallback + name: '@Author::ETHER/MakeMaker::Fallback' + version: 0.005 + - + class: Dist::Zilla::Plugin::ModuleBuildTiny + name: '@Author::ETHER/ModuleBuildTiny' + version: 0.005 + - + class: Dist::Zilla::Plugin::InstallGuide + name: '@Author::ETHER/InstallGuide' + version: 1.200002 + - + class: Dist::Zilla::Plugin::CheckSelfDependency + name: '@Author::ETHER/CheckSelfDependency' + version: 0.006 + - + class: Dist::Zilla::Plugin::Run::AfterBuild + name: '@Author::ETHER/Run::AfterBuild' + version: 0.020 + - + class: Dist::Zilla::Plugin::Git::Check + name: '@Author::ETHER/initial check' + version: 2.019 + - + class: Dist::Zilla::Plugin::Git::CheckFor::MergeConflicts + name: '@Author::ETHER/Git::CheckFor::MergeConflicts' + version: 0.008 + - + class: Dist::Zilla::Plugin::Git::CheckFor::CorrectBranch + name: '@Author::ETHER/Git::CheckFor::CorrectBranch' + version: 0.008 + - + class: Dist::Zilla::Plugin::Git::Remote::Check + name: '@Author::ETHER/Git::Remote::Check' + version: 0.1.2 + - + class: Dist::Zilla::Plugin::CheckPrereqsIndexed + name: '@Author::ETHER/CheckPrereqsIndexed' + version: 0.009 + - + class: Dist::Zilla::Plugin::TestRelease + name: '@Author::ETHER/TestRelease' + version: 5.006 + - + class: Dist::Zilla::Plugin::Git::Check + name: '@Author::ETHER/after tests' + version: 2.019 + - + class: Dist::Zilla::Plugin::UploadToCPAN + name: '@Author::ETHER/UploadToCPAN' + version: 5.006 + - + class: Dist::Zilla::Plugin::CopyFilesFromRelease + name: '@Author::ETHER/CopyFilesFromRelease' + version: 0.001 + - + class: Dist::Zilla::Plugin::Git::Commit + name: '@Author::ETHER/Git::Commit' + version: 2.019 + - + class: Dist::Zilla::Plugin::Git::Tag + name: '@Author::ETHER/Git::Tag' + version: 2.019 + - + class: Dist::Zilla::Plugin::GitHub::Update + name: '@Author::ETHER/GitHub::Update' + version: 0.36 + - + class: Dist::Zilla::Plugin::Git::Push + name: '@Author::ETHER/Git::Push' + version: 2.019 + - + class: Dist::Zilla::Plugin::InstallRelease + name: '@Author::ETHER/InstallRelease' + version: 0.008 + - + class: Dist::Zilla::Plugin::ConfirmRelease + name: '@Author::ETHER/ConfirmRelease' + version: 5.006 + - + class: Dist::Zilla::Plugin::Prereqs + config: + Dist::Zilla::Plugin::Prereqs: + phase: develop + type: requires + name: '@Author::ETHER/via_options' + version: 5.006 + - + class: Dist::Zilla::Plugin::MetaResources + name: MetaResources + version: 5.006 + - + class: Dist::Zilla::Plugin::ContributorsFromGit + name: ContributorsFromGit + version: 0.006 + - + class: Dist::Zilla::Plugin::Prereqs + config: + Dist::Zilla::Plugin::Prereqs: + phase: runtime + type: requires + name: RuntimeRequires + version: 5.006 + - + class: Dist::Zilla::Plugin::Prereqs + config: + Dist::Zilla::Plugin::Prereqs: + phase: test + type: requires + name: TestRequires + version: 5.006 + - + class: Dist::Zilla::Plugin::Prereqs + config: + Dist::Zilla::Plugin::Prereqs: + phase: runtime + type: recommends + name: RuntimeRecommends + version: 5.006 + - + class: Dist::Zilla::Plugin::Prereqs + config: + Dist::Zilla::Plugin::Prereqs: + phase: develop + type: requires + name: DevelopRequires + version: 5.006 + - + class: Dist::Zilla::Plugin::OptionalFeature + name: JSON-Runtime + version: 0.008 + - + class: Dist::Zilla::Plugin::OptionalFeature + name: JSON-RuntimeRecommends + version: 0.008 + - + class: Dist::Zilla::Plugin::OptionalFeature + name: JSON-Test + version: 0.008 + - + class: Dist::Zilla::Plugin::OptionalFeature + name: YAML-Runtime + version: 0.008 + - + class: Dist::Zilla::Plugin::OptionalFeature + name: YAML-RuntimeRecommends + version: 0.008 + - + class: Dist::Zilla::Plugin::OptionalFeature + name: YAML-Test + version: 0.008 + - + class: Dist::Zilla::Plugin::OptionalFeature + name: Storable + version: 0.008 + - + class: Dist::Zilla::Plugin::OptionalFeature + name: File + version: 0.008 + - + class: Dist::Zilla::Plugin::FinderCode + name: ':InstallModules' + version: 5.006 + - + class: Dist::Zilla::Plugin::FinderCode + name: ':IncModules' + version: 5.006 + - + class: Dist::Zilla::Plugin::FinderCode + name: ':TestFiles' + version: 5.006 + - + class: Dist::Zilla::Plugin::FinderCode + name: ':ExecFiles' + version: 5.006 + - + class: Dist::Zilla::Plugin::FinderCode + name: ':ShareFiles' + version: 5.006 + - + class: Dist::Zilla::Plugin::FinderCode + name: ':MainModule' + version: 5.006 + zilla: + class: Dist::Zilla::Dist::Builder + config: + is_trial: 0 + version: 5.006 +x_authority: cpan:STEVAN +x_contributors: + - 'Chris Prather ' + - 'Cory Watson ' + - 'Dagfinn Ilmari Mannsåker ' + - 'David Golden ' + - 'David Steinbrunner ' + - 'Florian Ragwitz ' + - 'Johannes Plunien ' + - 'Jonathan Rockway ' + - 'Jonathan Yu ' + - 'Jos Boumans ' + - 'Karen Etheridge ' + - 'Ricardo Signes ' + - 'Robert Boone ' + - 'Shawn M Moore ' + - 'Tomas Doran ' + - 'Yuval Kogman ' diff -Nru libmoosex-storage-perl-0.33/Makefile.PL libmoosex-storage-perl-0.45/Makefile.PL --- libmoosex-storage-perl-0.33/Makefile.PL 2013-03-30 02:00:17.000000000 +0000 +++ libmoosex-storage-perl-0.45/Makefile.PL 2013-12-22 00:48:35.000000000 +0000 @@ -1,60 +1,135 @@ -# Load the Module::Install bundled in ./inc/ -use inc::Module::Install 0.75; -use Module::Install::AuthorRequires; -use Module::Install::AuthorTests; - -# Define metadata -name 'MooseX-Storage'; -all_from 'lib/MooseX/Storage.pm'; - -# Specific dependencies -requires 'Moose' => '0.99'; -requires 'String::RewritePrefix'; - -author_requires 'Test::Without::Module'; - -# you should have at least one -# serialization format -auto_install; # Needed for features to work. RT#67170 -feature 'JSON', - -default => 1, - 'JSON::Any' => '1.15', - 'Test::JSON' => '0.06'; - -author_requires 'JSON::Any' => '1.15'; -author_requires 'Test::JSON' => '0.06'; - -feature 'YAML', - -default => 1, - 'YAML::Any' => '0'; -author_requires 'YAML::Any'; - -feature 'Storable', - -default => 1, - 'Storable' => '0'; -author_requires 'Storable'; - -# and the ability to save the -# file to disk -feature 'File', - -default => 1, - 'IO::File' => '0.1'; -author_requires 'IO::File' => '0.1'; - -author_tests 't/author'; - -build_requires 'Test::More' => '0.88'; -build_requires 'Test::Deep' => '0'; -build_requires 'Test::Fatal' => '0'; -build_requires 'Test::Requires' => '0.05'; - -author_requires 'Digest::HMAC'; -author_requires 'Digest::SHA'; -author_requires 'Test::Pod' => '1.14'; -author_requires 'Test::Pod::Coverage' => '1.08'; +# This Makefile.PL for MooseX-Storage was generated by +# Dist::Zilla::Plugin::MakeMaker::Fallback 0.005. +# Don't edit it but the dist.ini used to construct it. + +use strict; +use warnings; + +BEGIN { +my %configure_requires = ( + 'ExtUtils::MakeMaker' => '6.30', + 'Module::Build::Tiny' => '0.030', +); + +my @missing = grep { + ! eval "require $_; $_->VERSION($configure_requires{$_}); 1" +} keys %configure_requires; + +if (not @missing) +{ + print "Congratulations, your toolchain understands 'configure_requires'!\n\n"; +} +else +{ + $ENV{PERL_MM_FALLBACK_SILENCE_WARNING} or 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)); +} +} + +use 5.008; + +use ExtUtils::MakeMaker 6.30; + + + +my %WriteMakefileArgs = ( + "ABSTRACT" => "A serialization framework for Moose classes", + "AUTHOR" => "Chris Prather , Stevan Little , \x{5d9}\x{5d5}\x{5d1}\x{5dc} \x{5e7}\x{5d5}\x{5d2}'\x{5de}\x{5df} (Yuval Kogman) ", + "BUILD_REQUIRES" => {}, + "CONFIGURE_REQUIRES" => { + "ExtUtils::MakeMaker" => "6.30", + "Module::Build::Tiny" => "0.030" + }, + "DISTNAME" => "MooseX-Storage", + "EXE_FILES" => [], + "LICENSE" => "perl", + "NAME" => "MooseX::Storage", + "PREREQ_PM" => { + "Data::Dumper" => 0, + "Digest" => 0, + "Module::Runtime" => 0, + "Moose" => "0.99", + "Scalar::Util" => 0, + "String::RewritePrefix" => 0 + }, + "TEST_REQUIRES" => { + "File::Spec::Functions" => 0, + "Test::Deep" => 0, + "Test::Fatal" => 0, + "Test::More" => "0.88", + "Test::Requires" => "0.05" + }, + "VERSION" => "0.45", + "test" => { + "TESTS" => "t/*.t" + } +); + + +unless ( eval { ExtUtils::MakeMaker->VERSION(6.63_03) } ) { + my $tr = delete $WriteMakefileArgs{TEST_REQUIRES}; + my $br = $WriteMakefileArgs{BUILD_REQUIRES}; + for my $mod ( keys %$tr ) { + if ( exists $br->{$mod} ) { + $br->{$mod} = $tr->{$mod} if $tr->{$mod} > $br->{$mod}; + } + else { + $br->{$mod} = $tr->{$mod}; + } + } +} + +unless ( eval { ExtUtils::MakeMaker->VERSION(6.56) } ) { + my $br = delete $WriteMakefileArgs{BUILD_REQUIRES}; + my $pp = $WriteMakefileArgs{PREREQ_PM}; + for my $mod ( keys %$br ) { + if ( exists $pp->{$mod} ) { + $pp->{$mod} = $br->{$mod} if $br->{$mod} > $pp->{$mod}; + } + else { + $pp->{$mod} = $br->{$mod}; + } + } +} + +delete $WriteMakefileArgs{CONFIGURE_REQUIRES} + unless eval { ExtUtils::MakeMaker->VERSION(6.52) }; + +WriteMakefile(%WriteMakefileArgs); -# r/w: gitmo@git.moose.perl.org:MooseX-Storage.git -resources repository => 'git://git.moose.perl.org/MooseX-Storage.git'; -WriteAll; diff -Nru libmoosex-storage-perl-0.33/README libmoosex-storage-perl-0.45/README --- libmoosex-storage-perl-0.33/README 2013-03-30 01:18:24.000000000 +0000 +++ libmoosex-storage-perl-0.45/README 2013-12-22 00:48:35.000000000 +0000 @@ -1,41 +1,13 @@ -MooseX-Storage version 0.32 -INSTALLATION -To install this module, run the following commands: +This archive contains the distribution MooseX-Storage, +version 0.45: - perl Makefile.PL - make - make test - make install + A serialization framework for Moose classes -Alternatively, to install with Module::Build, you can use the following commands: +This software is copyright (c) 2007 by Infinity Interactive, Inc.. - perl Build.PL - ./Build - ./Build test - ./Build install +This is free software; you can redistribute it and/or modify it under +the same terms as the Perl 5 programming language system itself. -DEPENDENCIES - - Moose - JSON::Any - Best (in order to load a YAML file) - IO::File - -OPTIONAL DEPENDENCIES - - IO::AtomicFile - Test::YAML::Valid - Test::JSON - Digest - Digest::SHA1 - Data::Dumper - -COPYRIGHT AND LICENCE - -Copyright (C) 2007-2008 Infinity Interactive - -This library is free software; you can redistribute it and/or modify -it under the same terms as Perl itself. diff -Nru libmoosex-storage-perl-0.33/README.md libmoosex-storage-perl-0.45/README.md --- libmoosex-storage-perl-0.33/README.md 1970-01-01 00:00:00.000000000 +0000 +++ libmoosex-storage-perl-0.45/README.md 2013-12-22 00:48:35.000000000 +0000 @@ -0,0 +1,239 @@ +# NAME + +MooseX::Storage - A serialization framework for Moose classes + +# VERSION + +version 0.45 + +# SYNOPSIS + + package Point; + use Moose; + use MooseX::Storage; + + with Storage('format' => 'JSON', 'io' => 'File'); + + has 'x' => (is => 'rw', isa => 'Int'); + has 'y' => (is => 'rw', isa => 'Int'); + + 1; + + my $p = Point->new(x => 10, y => 10); + + ## methods to pack/unpack an + ## object in perl data structures + + # pack the class into a hash + $p->pack(); # { __CLASS__ => 'Point-0.01', x => 10, y => 10 } + + # unpack the hash into a class + my $p2 = Point->unpack({ __CLASS__ => 'Point-0.01', x => 10, y => 10 }); + + ## methods to freeze/thaw into + ## a specified serialization format + ## (in this case JSON) + + # pack the class into a JSON string + $p->freeze(); # { "__CLASS__" : "Point-0.01", "x" : 10, "y" : 10 } + + # unpack the JSON string into a class + my $p2 = Point->thaw('{ "__CLASS__" : "Point-0.01", "x" : 10, "y" : 10 }'); + + ## methods to load/store a class + ## on the file system + + $p->store('my_point.json'); + + my $p2 = Point->load('my_point.json'); + +# DESCRIPTION + +MooseX::Storage is a serialization framework for Moose, it provides +a very flexible and highly pluggable way to serialize Moose classes +to a number of different formats and styles. + +## Important Note + +This is still an early release of this module, so use with caution. +It's outward facing serialization API should be considered stable, +but I still reserve the right to make tweaks if I need too. Anything +beyond the basic pack/unpack, freeze/thaw and load/store should not +be relied on. + +## Levels of Serialization + +There are 3 levels to the serialization, each of which builds upon +the other and each of which can be customized to the specific needs +of your class. + +- __base__ + + The first (base) level is `pack` and `unpack`. In this level the + class is serialized into a Perl HASH reference, it is tagged with the + class name and each instance attribute is stored. Very simple. + + This level is not optional, it is the bare minimum that + MooseX::Storage provides and all other levels build on top of this. + + See [MooseX::Storage::Basic](https://metacpan.org/pod/MooseX::Storage::Basic) for the fundamental implementation and + options to `pack` and `unpack` + +- __format__ + + The second (format) level is `freeze` and `thaw`. In this level the + output of `pack` is sent to `freeze` or the output of `thaw` is sent + to `unpack`. This levels primary role is to convert to and from the + specific serialization format and Perl land. + + This level is optional, if you don't want/need it, you don't have to + have it. You can just use `pack`/`unpack` instead. + +- __io__ + + The third (io) level is `load` and `store`. In this level we are reading + and writing data to file/network/database/etc. + + This level is also optional, in most cases it does require a `format` role + to also be used, the exception being the `StorableFile` role. + +## Behaviour modifiers + +The serialization behaviour can be changed by supplying `traits`. +This can be done as follows: + + use MooseX::Storage; + with Storage( traits => [Trait1, Trait2,...] ); + +The following traits are currently bundled with `MooseX::Storage`: + +- OnlyWhenBuilt + + Only attributes that have been built (i.e., where the predicate returns + 'true') will be serialized. This avoids any potentially expensive computations. + + See [MooseX::Storage::Traits::OnlyWhenBuilt](https://metacpan.org/pod/MooseX::Storage::Traits::OnlyWhenBuilt) for details. + +## How we serialize + +There are always limits to any serialization framework, there are just +some things which are really difficult to serialize properly and some +things which cannot be serialized at all. + +## What can be serialized? + +Currently only numbers, string, ARRAY refs, HASH refs and other +MooseX::Storage enabled objects are supported. + +With Array and Hash references the first level down is inspected and +any objects found are serialized/deserialized for you. We do not do +this recursively by default, however this feature may become an +option eventually. + +The specific serialize/deserialize routine is determined by the +Moose type constraint a specific attribute has. In most cases subtypes +of the supported types are handled correctly, and there is a facility +for adding handlers for custom types as well. This will get documented +eventually, but it is currently still in development. + +## What can not be serialized? + +We do not support CODE references yet, but this support might be added +in using B::Deparse or some other deep magic. + +Scalar refs are not supported, mostly because there is no way to know +if the value being referenced will be there when the object is inflated. +I highly doubt will be ever support this in a general sense, but it +would be possible to add this yourself for a small specific case. + +Circular references are specifically disallowed, however if you break +the cycles yourself then re-assemble them later you can get around this. +The reason we disallow circular refs is because they are not always supported +in all formats we use, and they tend to be very tricky to do for all +possible cases. It is almost always something you want to have tight control +over anyway. + +# CAVEAT + +This is __not__ a persistence framework; changes to your object after +you load or store it will not be reflected in the stored class. + +# EXPORTS + +- __Storage (%options)__ + + This module will export the `Storage` method and can be used to + load a specific set of MooseX::Storage roles to implement a specific + combination of features. It is meant to make things easier, but it + is by no means the only way. You can still compose your roles by + hand if you like. + + By default, options are assumed to be short forms. For example, this: + + Storage(format => 'JSON'); + + ...will result in looking for MooseX::Storage::Format::JSON. To use a role + that is not under the default namespace prefix, start with an equal sign: + + Storage(format => '=My::Private::JSONFormat'); + + To use a parameterized role (for which, see [MooseX::Role::Parameterized](https://metacpan.org/pod/MooseX::Role::Parameterized)) you + can pass an arrayref of the role name (in short or long form, as above) and its + parameters: + + Storage(format => [ JSONpm => { json_opts => { pretty => 1 } } ]); + +# METHODS + +- __import__ + +## Introspection + +- __meta__ + +# TODO + +This module needs docs and probably a Cookbook of some kind as well. +This is an early release, so that is my excuse for now :) + +For the time being, please read the tests and feel free to email me +if you have any questions. This module can also be discussed on IRC +in the \#moose channel on irc.perl.org. + +# BUGS + +All complex software has bugs lurking in it, and this module is no +exception. If you find a bug please either email me, or add the bug +to cpan-RT. + +# AUTHORS + +- Chris Prather +- Stevan Little +- יובל קוג'מן (Yuval Kogman) + +# COPYRIGHT AND LICENSE + +This software is copyright (c) 2007 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. + +# CONTRIBUTORS + +- Chris Prather +- Cory Watson +- Dagfinn Ilmari Mannsåker +- David Golden +- David Steinbrunner +- Florian Ragwitz +- Johannes Plunien +- Jonathan Rockway +- Jonathan Yu +- Jos Boumans +- Karen Etheridge +- Ricardo Signes +- Robert Boone +- Shawn M Moore +- Tomas Doran +- Yuval Kogman diff -Nru libmoosex-storage-perl-0.33/TODO libmoosex-storage-perl-0.45/TODO --- libmoosex-storage-perl-0.33/TODO 1970-01-01 00:00:00.000000000 +0000 +++ libmoosex-storage-perl-0.45/TODO 2013-12-22 00:48:35.000000000 +0000 @@ -0,0 +1,9 @@ +--------------------------------------------------------------------- +:NOTES: +--------------------------------------------------------------------- + + + + + + diff -Nru libmoosex-storage-perl-0.33/debian/changelog libmoosex-storage-perl-0.45/debian/changelog --- libmoosex-storage-perl-0.33/debian/changelog 2013-06-03 19:34:12.000000000 +0000 +++ libmoosex-storage-perl-0.45/debian/changelog 2013-12-25 17:38:13.000000000 +0000 @@ -1,3 +1,13 @@ +libmoosex-storage-perl (0.45-1) unstable; urgency=medium + + * New upstream release. + * Update upstream copyright years. Drop info about removed files. + * Update (build) dependencies. + * Install new CONTRIBUTING file. + * Declare compliance with Debian Policy 3.9.5. + + -- gregor herrmann Wed, 25 Dec 2013 18:38:02 +0100 + libmoosex-storage-perl (0.33-1) unstable; urgency=low [ gregor herrmann ] diff -Nru libmoosex-storage-perl-0.33/debian/compat libmoosex-storage-perl-0.45/debian/compat --- libmoosex-storage-perl-0.33/debian/compat 2013-06-03 19:34:12.000000000 +0000 +++ libmoosex-storage-perl-0.45/debian/compat 2013-12-25 17:38:13.000000000 +0000 @@ -1 +1 @@ -8 +9 diff -Nru libmoosex-storage-perl-0.33/debian/control libmoosex-storage-perl-0.45/debian/control --- libmoosex-storage-perl-0.33/debian/control 2013-06-03 19:34:12.000000000 +0000 +++ libmoosex-storage-perl-0.45/debian/control 2013-12-25 17:38:13.000000000 +0000 @@ -5,12 +5,14 @@ gregor herrmann Section: perl Priority: optional -Build-Depends: debhelper (>= 8) +Build-Depends: debhelper (>= 9.20130630~), + libmodule-build-tiny-perl Build-Depends-Indep: perl, libdigest-hmac-perl, libio-stringy-perl, libjson-any-perl, libjson-xs-perl, + libmodule-runtime-perl, libmoose-perl, libstring-rewriteprefix-perl, libtest-deep-perl, @@ -22,7 +24,7 @@ libyaml-libyaml-perl, libyaml-perl, libyaml-syck-perl -Standards-Version: 3.9.4 +Standards-Version: 3.9.5 Vcs-Browser: http://anonscm.debian.org/gitweb/?p=pkg-perl/packages/libmoosex-storage-perl.git Vcs-Git: git://anonscm.debian.org/pkg-perl/packages/libmoosex-storage-perl.git Homepage: https://metacpan.org/release/MooseX-Storage/ @@ -31,11 +33,12 @@ Architecture: all Depends: ${perl:Depends}, ${misc:Depends}, + libmodule-runtime-perl, libmoose-perl, libstring-rewriteprefix-perl -Recommends: libjson-any-perl, +Recommends: libio-stringy-perl, + libjson-any-perl, libyaml-perl -Suggests: libio-stringy-perl Description: serialization framework for Moose classes MooseX::Storage is a serialization framework for Moose classes. It provides a flexible and highly pluggable way to serialize Moose classes to a number of diff -Nru libmoosex-storage-perl-0.33/debian/copyright libmoosex-storage-perl-0.45/debian/copyright --- libmoosex-storage-perl-0.33/debian/copyright 2013-06-03 19:34:12.000000000 +0000 +++ libmoosex-storage-perl-0.45/debian/copyright 2013-12-25 17:38:13.000000000 +0000 @@ -4,13 +4,7 @@ Source: https://metacpan.org/release/MooseX-Storage/ Files: * -Copyright: 2007-2008, Infinity Interactive, Inc. -License: Artistic or GPL-1+ - -Files: inc/Module/* -Copyright: 2002-2012, Adam Kennedy - 2002-2012, Audrey Tang - 2002-2012, Brian Ingerson +Copyright: 2007, Infinity Interactive, Inc. License: Artistic or GPL-1+ Files: debian/* @@ -34,4 +28,3 @@ . On Debian systems, the complete text of the GNU General Public License can be found in `/usr/share/common-licenses/GPL-1' - diff -Nru libmoosex-storage-perl-0.33/debian/libmoosex-storage-perl.docs libmoosex-storage-perl-0.45/debian/libmoosex-storage-perl.docs --- libmoosex-storage-perl-0.33/debian/libmoosex-storage-perl.docs 1970-01-01 00:00:00.000000000 +0000 +++ libmoosex-storage-perl-0.45/debian/libmoosex-storage-perl.docs 2013-12-25 17:38:13.000000000 +0000 @@ -0,0 +1 @@ +CONTRIBUTING diff -Nru libmoosex-storage-perl-0.33/dist.ini libmoosex-storage-perl-0.45/dist.ini --- libmoosex-storage-perl-0.33/dist.ini 1970-01-01 00:00:00.000000000 +0000 +++ libmoosex-storage-perl-0.45/dist.ini 2013-12-22 00:48:35.000000000 +0000 @@ -0,0 +1,109 @@ +name = MooseX-Storage +author = Chris Prather +author = Stevan Little +author = יובל קוג'מן (Yuval Kogman) +copyright_holder = Infinity Interactive, Inc. +copyright_year = 2007 +license = Perl_5 + +:version = 5 + +[@Author::ETHER] +:version = 0.019 +-remove = AutoPrereqs +server = github +Authority.authority = cpan:STEVAN +Test::MinimumVersion.max_target_perl = 5.008003 +; these appear in every file, so it's easier to just put it here +Test::PodSpelling.stopwords = cpan +; these are all the modules that use optional prereqs, and will cause +; cpantesters to barf in the compile tests +Test::Compile.skip[] = ^MooseX::Storage::((Engine::)?IO::|Format::) + +[MetaResources] +x_IRC = irc://irc.perl.org/#moose +x_MailingList = http://lists.perl.org/list/moose.html + +; authordep Pod::Weaver = 4 +; authordep Pod::Weaver::Section::Contributors + +[ContributorsFromGit] + +[Prereqs / RuntimeRequires] +Moose = 0.99 +String::RewritePrefix = 0 +Digest = 0 +Data::Dumper = 0 +Scalar::Util = 0 +Module::Runtime = 0 + +[Prereqs / TestRequires] +Test::More = 0.88 +Test::Deep = 0 +Test::Fatal = 0 +Test::Requires = 0.05 +File::Spec::Functions = 0 + +[Prereqs / RuntimeRecommends] +Digest::HMAC = 0 +Digest::SHA = 0 + +[Prereqs / DevelopRequires] +Digest = 0 +Digest::HMAC = 0 +Digest::HMAC_SHA1 = 0 +Digest::SHA = 0 +Encode = 0 + + +[OptionalFeature / JSON-Runtime] +:version = 0.006 ; for -default +-description = Serialize to JSON. You should have at least one serialization format. +-always_recommend = 1 +-default = 1 +JSON::Any = 1.15 + +[OptionalFeature / JSON-RuntimeRecommends] +-description = Serialize to JSON. You should have at least one serialization format. +-always_recommend = 1 +-default = 1 +MooseX::Storage::Format::JSONpm = 0 + +[OptionalFeature / JSON-Test] +-description = Serialize to JSON. You should have at least one serialization format. +-always_recommend = 1 +-default = 1 +Test::Deep::JSON = 0 + +[OptionalFeature / YAML-Runtime] +-description = Serialize to YAML. You should have at least one serialization format. +-always_recommend = 1 +-default = 1 +YAML::Any = 0 + +[OptionalFeature / YAML-RuntimeRecommends] +-description = Serialize to YAML. You should have at least one serialization format. +-always_recommend = 1 +-default = 1 +YAML = 0 +YAML::Syck = 0 +YAML::XS = 0 + +[OptionalFeature / YAML-Test] +-description = Serialize to YAML. You should have at least one serialization format. +-always_recommend = 1 +-default = 1 +Test::Without::Module = 0 + +[OptionalFeature / Storable] +-description = Serialize to Storable. You should have at least one serialization format. +-always_recommend = 1 +-default = 1 +Storable = 0 + +[OptionalFeature / File] +-description = the ability to save the file to disk +-always_recommend = 1 +-default = 1 +IO::File = 0 +IO::AtomicFile = 0 diff -Nru libmoosex-storage-perl-0.33/inc/Module/AutoInstall.pm libmoosex-storage-perl-0.45/inc/Module/AutoInstall.pm --- libmoosex-storage-perl-0.33/inc/Module/AutoInstall.pm 2013-03-30 02:07:01.000000000 +0000 +++ libmoosex-storage-perl-0.45/inc/Module/AutoInstall.pm 1970-01-01 00:00:00.000000000 +0000 @@ -1,930 +0,0 @@ -#line 1 -package Module::AutoInstall; - -use strict; -use Cwd (); -use File::Spec (); -use ExtUtils::MakeMaker (); - -use vars qw{$VERSION}; -BEGIN { - $VERSION = '1.06'; -} - -# special map on pre-defined feature sets -my %FeatureMap = ( - '' => 'Core Features', # XXX: deprecated - '-core' => 'Core Features', -); - -# various lexical flags -my ( @Missing, @Existing, %DisabledTests, $UnderCPAN, $InstallDepsTarget, $HasCPANPLUS ); -my ( - $Config, $CheckOnly, $SkipInstall, $AcceptDefault, $TestOnly, $AllDeps, - $UpgradeDeps -); -my ( $PostambleActions, $PostambleActionsNoTest, $PostambleActionsUpgradeDeps, - $PostambleActionsUpgradeDepsNoTest, $PostambleActionsListDeps, - $PostambleActionsListAllDeps, $PostambleUsed, $NoTest); - -# See if it's a testing or non-interactive session -_accept_default( $ENV{AUTOMATED_TESTING} or ! -t STDIN ); -_init(); - -sub _accept_default { - $AcceptDefault = shift; -} - -sub _installdeps_target { - $InstallDepsTarget = shift; -} - -sub missing_modules { - return @Missing; -} - -sub do_install { - __PACKAGE__->install( - [ - $Config - ? ( UNIVERSAL::isa( $Config, 'HASH' ) ? %{$Config} : @{$Config} ) - : () - ], - @Missing, - ); -} - -# initialize various flags, and/or perform install -sub _init { - foreach my $arg ( - @ARGV, - split( - /[\s\t]+/, - $ENV{PERL_AUTOINSTALL} || $ENV{PERL_EXTUTILS_AUTOINSTALL} || '' - ) - ) - { - if ( $arg =~ /^--config=(.*)$/ ) { - $Config = [ split( ',', $1 ) ]; - } - elsif ( $arg =~ /^--installdeps=(.*)$/ ) { - __PACKAGE__->install( $Config, @Missing = split( /,/, $1 ) ); - exit 0; - } - elsif ( $arg =~ /^--upgradedeps=(.*)$/ ) { - $UpgradeDeps = 1; - __PACKAGE__->install( $Config, @Missing = split( /,/, $1 ) ); - exit 0; - } - elsif ( $arg =~ /^--default(?:deps)?$/ ) { - $AcceptDefault = 1; - } - elsif ( $arg =~ /^--check(?:deps)?$/ ) { - $CheckOnly = 1; - } - elsif ( $arg =~ /^--skip(?:deps)?$/ ) { - $SkipInstall = 1; - } - elsif ( $arg =~ /^--test(?:only)?$/ ) { - $TestOnly = 1; - } - elsif ( $arg =~ /^--all(?:deps)?$/ ) { - $AllDeps = 1; - } - } -} - -# overrides MakeMaker's prompt() to automatically accept the default choice -sub _prompt { - goto &ExtUtils::MakeMaker::prompt unless $AcceptDefault; - - my ( $prompt, $default ) = @_; - my $y = ( $default =~ /^[Yy]/ ); - - print $prompt, ' [', ( $y ? 'Y' : 'y' ), '/', ( $y ? 'n' : 'N' ), '] '; - print "$default\n"; - return $default; -} - -# the workhorse -sub import { - my $class = shift; - my @args = @_ or return; - my $core_all; - - print "*** $class version " . $class->VERSION . "\n"; - print "*** Checking for Perl dependencies...\n"; - - my $cwd = Cwd::cwd(); - - $Config = []; - - my $maxlen = length( - ( - sort { length($b) <=> length($a) } - grep { /^[^\-]/ } - map { - ref($_) - ? ( ( ref($_) eq 'HASH' ) ? keys(%$_) : @{$_} ) - : '' - } - map { +{@args}->{$_} } - grep { /^[^\-]/ or /^-core$/i } keys %{ +{@args} } - )[0] - ); - - # We want to know if we're under CPAN early to avoid prompting, but - # if we aren't going to try and install anything anyway then skip the - # check entirely since we don't want to have to load (and configure) - # an old CPAN just for a cosmetic message - - $UnderCPAN = _check_lock(1) unless $SkipInstall || $InstallDepsTarget; - - while ( my ( $feature, $modules ) = splice( @args, 0, 2 ) ) { - my ( @required, @tests, @skiptests ); - my $default = 1; - my $conflict = 0; - - if ( $feature =~ m/^-(\w+)$/ ) { - my $option = lc($1); - - # check for a newer version of myself - _update_to( $modules, @_ ) and return if $option eq 'version'; - - # sets CPAN configuration options - $Config = $modules if $option eq 'config'; - - # promote every features to core status - $core_all = ( $modules =~ /^all$/i ) and next - if $option eq 'core'; - - next unless $option eq 'core'; - } - - print "[" . ( $FeatureMap{ lc($feature) } || $feature ) . "]\n"; - - $modules = [ %{$modules} ] if UNIVERSAL::isa( $modules, 'HASH' ); - - unshift @$modules, -default => &{ shift(@$modules) } - if ( ref( $modules->[0] ) eq 'CODE' ); # XXX: bugward combatability - - while ( my ( $mod, $arg ) = splice( @$modules, 0, 2 ) ) { - if ( $mod =~ m/^-(\w+)$/ ) { - my $option = lc($1); - - $default = $arg if ( $option eq 'default' ); - $conflict = $arg if ( $option eq 'conflict' ); - @tests = @{$arg} if ( $option eq 'tests' ); - @skiptests = @{$arg} if ( $option eq 'skiptests' ); - - next; - } - - printf( "- %-${maxlen}s ...", $mod ); - - if ( $arg and $arg =~ /^\D/ ) { - unshift @$modules, $arg; - $arg = 0; - } - - # XXX: check for conflicts and uninstalls(!) them. - my $cur = _version_of($mod); - if (_version_cmp ($cur, $arg) >= 0) - { - print "loaded. ($cur" . ( $arg ? " >= $arg" : '' ) . ")\n"; - push @Existing, $mod => $arg; - $DisabledTests{$_} = 1 for map { glob($_) } @skiptests; - } - else { - if (not defined $cur) # indeed missing - { - print "missing." . ( $arg ? " (would need $arg)" : '' ) . "\n"; - } - else - { - # no need to check $arg as _version_cmp ($cur, undef) would satisfy >= above - print "too old. ($cur < $arg)\n"; - } - - push @required, $mod => $arg; - } - } - - next unless @required; - - my $mandatory = ( $feature eq '-core' or $core_all ); - - if ( - !$SkipInstall - and ( - $CheckOnly - or ($mandatory and $UnderCPAN) - or $AllDeps - or $InstallDepsTarget - or _prompt( - qq{==> Auto-install the } - . ( @required / 2 ) - . ( $mandatory ? ' mandatory' : ' optional' ) - . qq{ module(s) from CPAN?}, - $default ? 'y' : 'n', - ) =~ /^[Yy]/ - ) - ) - { - push( @Missing, @required ); - $DisabledTests{$_} = 1 for map { glob($_) } @skiptests; - } - - elsif ( !$SkipInstall - and $default - and $mandatory - and - _prompt( qq{==> The module(s) are mandatory! Really skip?}, 'n', ) - =~ /^[Nn]/ ) - { - push( @Missing, @required ); - $DisabledTests{$_} = 1 for map { glob($_) } @skiptests; - } - - else { - $DisabledTests{$_} = 1 for map { glob($_) } @tests; - } - } - - if ( @Missing and not( $CheckOnly or $UnderCPAN) ) { - require Config; - my $make = $Config::Config{make}; - if ($InstallDepsTarget) { - print -"*** To install dependencies type '$make installdeps' or '$make installdeps_notest'.\n"; - } - else { - print -"*** Dependencies will be installed the next time you type '$make'.\n"; - } - - # make an educated guess of whether we'll need root permission. - print " (You may need to do that as the 'root' user.)\n" - if eval '$>'; - } - print "*** $class configuration finished.\n"; - - chdir $cwd; - - # import to main:: - no strict 'refs'; - *{'main::WriteMakefile'} = \&Write if caller(0) eq 'main'; - - return (@Existing, @Missing); -} - -sub _running_under { - my $thing = shift; - print <<"END_MESSAGE"; -*** Since we're running under ${thing}, I'll just let it take care - of the dependency's installation later. -END_MESSAGE - return 1; -} - -# Check to see if we are currently running under CPAN.pm and/or CPANPLUS; -# if we are, then we simply let it taking care of our dependencies -sub _check_lock { - return unless @Missing or @_; - - if ($ENV{PERL5_CPANM_IS_RUNNING}) { - return _running_under('cpanminus'); - } - - my $cpan_env = $ENV{PERL5_CPAN_IS_RUNNING}; - - if ($ENV{PERL5_CPANPLUS_IS_RUNNING}) { - return _running_under($cpan_env ? 'CPAN' : 'CPANPLUS'); - } - - require CPAN; - - if ($CPAN::VERSION > '1.89') { - if ($cpan_env) { - return _running_under('CPAN'); - } - return; # CPAN.pm new enough, don't need to check further - } - - # last ditch attempt, this -will- configure CPAN, very sorry - - _load_cpan(1); # force initialize even though it's already loaded - - # Find the CPAN lock-file - my $lock = MM->catfile( $CPAN::Config->{cpan_home}, ".lock" ); - return unless -f $lock; - - # Check the lock - local *LOCK; - return unless open(LOCK, $lock); - - if ( - ( $^O eq 'MSWin32' ? _under_cpan() : == getppid() ) - and ( $CPAN::Config->{prerequisites_policy} || '' ) ne 'ignore' - ) { - print <<'END_MESSAGE'; - -*** Since we're running under CPAN, I'll just let it take care - of the dependency's installation later. -END_MESSAGE - return 1; - } - - close LOCK; - return; -} - -sub install { - my $class = shift; - - my $i; # used below to strip leading '-' from config keys - my @config = ( map { s/^-// if ++$i; $_ } @{ +shift } ); - - my ( @modules, @installed ); - while ( my ( $pkg, $ver ) = splice( @_, 0, 2 ) ) { - - # grep out those already installed - if ( _version_cmp( _version_of($pkg), $ver ) >= 0 ) { - push @installed, $pkg; - } - else { - push @modules, $pkg, $ver; - } - } - - if ($UpgradeDeps) { - push @modules, @installed; - @installed = (); - } - - return @installed unless @modules; # nothing to do - return @installed if _check_lock(); # defer to the CPAN shell - - print "*** Installing dependencies...\n"; - - return unless _connected_to('cpan.org'); - - my %args = @config; - my %failed; - local *FAILED; - if ( $args{do_once} and open( FAILED, '.#autoinstall.failed' ) ) { - while () { chomp; $failed{$_}++ } - close FAILED; - - my @newmod; - while ( my ( $k, $v ) = splice( @modules, 0, 2 ) ) { - push @newmod, ( $k => $v ) unless $failed{$k}; - } - @modules = @newmod; - } - - if ( _has_cpanplus() and not $ENV{PERL_AUTOINSTALL_PREFER_CPAN} ) { - _install_cpanplus( \@modules, \@config ); - } else { - _install_cpan( \@modules, \@config ); - } - - print "*** $class installation finished.\n"; - - # see if we have successfully installed them - while ( my ( $pkg, $ver ) = splice( @modules, 0, 2 ) ) { - if ( _version_cmp( _version_of($pkg), $ver ) >= 0 ) { - push @installed, $pkg; - } - elsif ( $args{do_once} and open( FAILED, '>> .#autoinstall.failed' ) ) { - print FAILED "$pkg\n"; - } - } - - close FAILED if $args{do_once}; - - return @installed; -} - -sub _install_cpanplus { - my @modules = @{ +shift }; - my @config = _cpanplus_config( @{ +shift } ); - my $installed = 0; - - require CPANPLUS::Backend; - my $cp = CPANPLUS::Backend->new; - my $conf = $cp->configure_object; - - return unless $conf->can('conf') # 0.05x+ with "sudo" support - or _can_write($conf->_get_build('base')); # 0.04x - - # if we're root, set UNINST=1 to avoid trouble unless user asked for it. - my $makeflags = $conf->get_conf('makeflags') || ''; - if ( UNIVERSAL::isa( $makeflags, 'HASH' ) ) { - # 0.03+ uses a hashref here - $makeflags->{UNINST} = 1 unless exists $makeflags->{UNINST}; - - } else { - # 0.02 and below uses a scalar - $makeflags = join( ' ', split( ' ', $makeflags ), 'UNINST=1' ) - if ( $makeflags !~ /\bUNINST\b/ and eval qq{ $> eq '0' } ); - - } - $conf->set_conf( makeflags => $makeflags ); - $conf->set_conf( prereqs => 1 ); - - - - while ( my ( $key, $val ) = splice( @config, 0, 2 ) ) { - $conf->set_conf( $key, $val ); - } - - my $modtree = $cp->module_tree; - while ( my ( $pkg, $ver ) = splice( @modules, 0, 2 ) ) { - print "*** Installing $pkg...\n"; - - MY::preinstall( $pkg, $ver ) or next if defined &MY::preinstall; - - my $success; - my $obj = $modtree->{$pkg}; - - if ( $obj and _version_cmp( $obj->{version}, $ver ) >= 0 ) { - my $pathname = $pkg; - $pathname =~ s/::/\\W/; - - foreach my $inc ( grep { m/$pathname.pm/i } keys(%INC) ) { - delete $INC{$inc}; - } - - my $rv = $cp->install( modules => [ $obj->{module} ] ); - - if ( $rv and ( $rv->{ $obj->{module} } or $rv->{ok} ) ) { - print "*** $pkg successfully installed.\n"; - $success = 1; - } else { - print "*** $pkg installation cancelled.\n"; - $success = 0; - } - - $installed += $success; - } else { - print << "."; -*** Could not find a version $ver or above for $pkg; skipping. -. - } - - MY::postinstall( $pkg, $ver, $success ) if defined &MY::postinstall; - } - - return $installed; -} - -sub _cpanplus_config { - my @config = (); - while ( @_ ) { - my ($key, $value) = (shift(), shift()); - if ( $key eq 'prerequisites_policy' ) { - if ( $value eq 'follow' ) { - $value = CPANPLUS::Internals::Constants::PREREQ_INSTALL(); - } elsif ( $value eq 'ask' ) { - $value = CPANPLUS::Internals::Constants::PREREQ_ASK(); - } elsif ( $value eq 'ignore' ) { - $value = CPANPLUS::Internals::Constants::PREREQ_IGNORE(); - } else { - die "*** Cannot convert option $key = '$value' to CPANPLUS version.\n"; - } - push @config, 'prereqs', $value; - } elsif ( $key eq 'force' ) { - push @config, $key, $value; - } elsif ( $key eq 'notest' ) { - push @config, 'skiptest', $value; - } else { - die "*** Cannot convert option $key to CPANPLUS version.\n"; - } - } - return @config; -} - -sub _install_cpan { - my @modules = @{ +shift }; - my @config = @{ +shift }; - my $installed = 0; - my %args; - - _load_cpan(); - require Config; - - if (CPAN->VERSION < 1.80) { - # no "sudo" support, probe for writableness - return unless _can_write( MM->catfile( $CPAN::Config->{cpan_home}, 'sources' ) ) - and _can_write( $Config::Config{sitelib} ); - } - - # if we're root, set UNINST=1 to avoid trouble unless user asked for it. - my $makeflags = $CPAN::Config->{make_install_arg} || ''; - $CPAN::Config->{make_install_arg} = - join( ' ', split( ' ', $makeflags ), 'UNINST=1' ) - if ( $makeflags !~ /\bUNINST\b/ and eval qq{ $> eq '0' } ); - - # don't show start-up info - $CPAN::Config->{inhibit_startup_message} = 1; - - # set additional options - while ( my ( $opt, $arg ) = splice( @config, 0, 2 ) ) { - ( $args{$opt} = $arg, next ) - if $opt =~ /^(?:force|notest)$/; # pseudo-option - $CPAN::Config->{$opt} = $arg; - } - - if ($args{notest} && (not CPAN::Shell->can('notest'))) { - die "Your version of CPAN is too old to support the 'notest' pragma"; - } - - local $CPAN::Config->{prerequisites_policy} = 'follow'; - - while ( my ( $pkg, $ver ) = splice( @modules, 0, 2 ) ) { - MY::preinstall( $pkg, $ver ) or next if defined &MY::preinstall; - - print "*** Installing $pkg...\n"; - - my $obj = CPAN::Shell->expand( Module => $pkg ); - my $success = 0; - - if ( $obj and _version_cmp( $obj->cpan_version, $ver ) >= 0 ) { - my $pathname = $pkg; - $pathname =~ s/::/\\W/; - - foreach my $inc ( grep { m/$pathname.pm/i } keys(%INC) ) { - delete $INC{$inc}; - } - - my $rv = do { - if ($args{force}) { - CPAN::Shell->force( install => $pkg ) - } elsif ($args{notest}) { - CPAN::Shell->notest( install => $pkg ) - } else { - CPAN::Shell->install($pkg) - } - }; - - $rv ||= eval { - $CPAN::META->instance( 'CPAN::Distribution', $obj->cpan_file, ) - ->{install} - if $CPAN::META; - }; - - if ( $rv eq 'YES' ) { - print "*** $pkg successfully installed.\n"; - $success = 1; - } - else { - print "*** $pkg installation failed.\n"; - $success = 0; - } - - $installed += $success; - } - else { - print << "."; -*** Could not find a version $ver or above for $pkg; skipping. -. - } - - MY::postinstall( $pkg, $ver, $success ) if defined &MY::postinstall; - } - - return $installed; -} - -sub _has_cpanplus { - return ( - $HasCPANPLUS = ( - $INC{'CPANPLUS/Config.pm'} - or _load('CPANPLUS::Shell::Default') - ) - ); -} - -# make guesses on whether we're under the CPAN installation directory -sub _under_cpan { - require Cwd; - require File::Spec; - - my $cwd = File::Spec->canonpath( Cwd::cwd() ); - my $cpan = File::Spec->canonpath( $CPAN::Config->{cpan_home} ); - - return ( index( $cwd, $cpan ) > -1 ); -} - -sub _update_to { - my $class = __PACKAGE__; - my $ver = shift; - - return - if _version_cmp( _version_of($class), $ver ) >= 0; # no need to upgrade - - if ( - _prompt( "==> A newer version of $class ($ver) is required. Install?", - 'y' ) =~ /^[Nn]/ - ) - { - die "*** Please install $class $ver manually.\n"; - } - - print << "."; -*** Trying to fetch it from CPAN... -. - - # install ourselves - _load($class) and return $class->import(@_) - if $class->install( [], $class, $ver ); - - print << '.'; exit 1; - -*** Cannot bootstrap myself. :-( Installation terminated. -. -} - -# check if we're connected to some host, using inet_aton -sub _connected_to { - my $site = shift; - - return ( - ( _load('Socket') and Socket::inet_aton($site) ) or _prompt( - qq( -*** Your host cannot resolve the domain name '$site', which - probably means the Internet connections are unavailable. -==> Should we try to install the required module(s) anyway?), 'n' - ) =~ /^[Yy]/ - ); -} - -# check if a directory is writable; may create it on demand -sub _can_write { - my $path = shift; - mkdir( $path, 0755 ) unless -e $path; - - return 1 if -w $path; - - print << "."; -*** You are not allowed to write to the directory '$path'; - the installation may fail due to insufficient permissions. -. - - if ( - eval '$>' and lc(`sudo -V`) =~ /version/ and _prompt( - qq( -==> Should we try to re-execute the autoinstall process with 'sudo'?), - ((-t STDIN) ? 'y' : 'n') - ) =~ /^[Yy]/ - ) - { - - # try to bootstrap ourselves from sudo - print << "."; -*** Trying to re-execute the autoinstall process with 'sudo'... -. - my $missing = join( ',', @Missing ); - my $config = join( ',', - UNIVERSAL::isa( $Config, 'HASH' ) ? %{$Config} : @{$Config} ) - if $Config; - - return - unless system( 'sudo', $^X, $0, "--config=$config", - "--installdeps=$missing" ); - - print << "."; -*** The 'sudo' command exited with error! Resuming... -. - } - - return _prompt( - qq( -==> Should we try to install the required module(s) anyway?), 'n' - ) =~ /^[Yy]/; -} - -# load a module and return the version it reports -sub _load { - my $mod = pop; # method/function doesn't matter - my $file = $mod; - $file =~ s|::|/|g; - $file .= '.pm'; - local $@; - return eval { require $file; $mod->VERSION } || ( $@ ? undef: 0 ); -} - -# report version without loading a module -sub _version_of { - my $mod = pop; # method/function doesn't matter - my $file = $mod; - $file =~ s|::|/|g; - $file .= '.pm'; - foreach my $dir ( @INC ) { - next if ref $dir; - my $path = File::Spec->catfile($dir, $file); - next unless -e $path; - require ExtUtils::MM_Unix; - return ExtUtils::MM_Unix->parse_version($path); - } - return undef; -} - -# Load CPAN.pm and it's configuration -sub _load_cpan { - return if $CPAN::VERSION and $CPAN::Config and not @_; - require CPAN; - - # CPAN-1.82+ adds CPAN::Config::AUTOLOAD to redirect to - # CPAN::HandleConfig->load. CPAN reports that the redirection - # is deprecated in a warning printed at the user. - - # CPAN-1.81 expects CPAN::HandleConfig->load, does not have - # $CPAN::HandleConfig::VERSION but cannot handle - # CPAN::Config->load - - # Which "versions expect CPAN::Config->load? - - if ( $CPAN::HandleConfig::VERSION - || CPAN::HandleConfig->can('load') - ) { - # Newer versions of CPAN have a HandleConfig module - CPAN::HandleConfig->load; - } else { - # Older versions had the load method in Config directly - CPAN::Config->load; - } -} - -# compare two versions, either use Sort::Versions or plain comparison -# return values same as <=> -sub _version_cmp { - my ( $cur, $min ) = @_; - return -1 unless defined $cur; # if 0 keep comparing - return 1 unless $min; - - $cur =~ s/\s+$//; - - # check for version numbers that are not in decimal format - if ( ref($cur) or ref($min) or $cur =~ /v|\..*\./ or $min =~ /v|\..*\./ ) { - if ( ( $version::VERSION or defined( _load('version') )) and - version->can('new') - ) { - - # use version.pm if it is installed. - return version->new($cur) <=> version->new($min); - } - elsif ( $Sort::Versions::VERSION or defined( _load('Sort::Versions') ) ) - { - - # use Sort::Versions as the sorting algorithm for a.b.c versions - return Sort::Versions::versioncmp( $cur, $min ); - } - - warn "Cannot reliably compare non-decimal formatted versions.\n" - . "Please install version.pm or Sort::Versions.\n"; - } - - # plain comparison - local $^W = 0; # shuts off 'not numeric' bugs - return $cur <=> $min; -} - -# nothing; this usage is deprecated. -sub main::PREREQ_PM { return {}; } - -sub _make_args { - my %args = @_; - - $args{PREREQ_PM} = { %{ $args{PREREQ_PM} || {} }, @Existing, @Missing } - if $UnderCPAN or $TestOnly; - - if ( $args{EXE_FILES} and -e 'MANIFEST' ) { - require ExtUtils::Manifest; - my $manifest = ExtUtils::Manifest::maniread('MANIFEST'); - - $args{EXE_FILES} = - [ grep { exists $manifest->{$_} } @{ $args{EXE_FILES} } ]; - } - - $args{test}{TESTS} ||= 't/*.t'; - $args{test}{TESTS} = join( ' ', - grep { !exists( $DisabledTests{$_} ) } - map { glob($_) } split( /\s+/, $args{test}{TESTS} ) ); - - my $missing = join( ',', @Missing ); - my $config = - join( ',', UNIVERSAL::isa( $Config, 'HASH' ) ? %{$Config} : @{$Config} ) - if $Config; - - $PostambleActions = ( - ($missing and not $UnderCPAN) - ? "\$(PERL) $0 --config=$config --installdeps=$missing" - : "\$(NOECHO) \$(NOOP)" - ); - - my $deps_list = join( ',', @Missing, @Existing ); - - $PostambleActionsUpgradeDeps = - "\$(PERL) $0 --config=$config --upgradedeps=$deps_list"; - - my $config_notest = - join( ',', (UNIVERSAL::isa( $Config, 'HASH' ) ? %{$Config} : @{$Config}), - 'notest', 1 ) - if $Config; - - $PostambleActionsNoTest = ( - ($missing and not $UnderCPAN) - ? "\$(PERL) $0 --config=$config_notest --installdeps=$missing" - : "\$(NOECHO) \$(NOOP)" - ); - - $PostambleActionsUpgradeDepsNoTest = - "\$(PERL) $0 --config=$config_notest --upgradedeps=$deps_list"; - - $PostambleActionsListDeps = - '@$(PERL) -le "print for @ARGV" ' - . join(' ', map $Missing[$_], grep $_ % 2 == 0, 0..$#Missing); - - my @all = (@Missing, @Existing); - - $PostambleActionsListAllDeps = - '@$(PERL) -le "print for @ARGV" ' - . join(' ', map $all[$_], grep $_ % 2 == 0, 0..$#all); - - return %args; -} - -# a wrapper to ExtUtils::MakeMaker::WriteMakefile -sub Write { - require Carp; - Carp::croak "WriteMakefile: Need even number of args" if @_ % 2; - - if ($CheckOnly) { - print << "."; -*** Makefile not written in check-only mode. -. - return; - } - - my %args = _make_args(@_); - - no strict 'refs'; - - $PostambleUsed = 0; - local *MY::postamble = \&postamble unless defined &MY::postamble; - ExtUtils::MakeMaker::WriteMakefile(%args); - - print << "." unless $PostambleUsed; -*** WARNING: Makefile written with customized MY::postamble() without - including contents from Module::AutoInstall::postamble() -- - auto installation features disabled. Please contact the author. -. - - return 1; -} - -sub postamble { - $PostambleUsed = 1; - my $fragment; - - $fragment .= <<"AUTO_INSTALL" if !$InstallDepsTarget; - -config :: installdeps -\t\$(NOECHO) \$(NOOP) -AUTO_INSTALL - - $fragment .= <<"END_MAKE"; - -checkdeps :: -\t\$(PERL) $0 --checkdeps - -installdeps :: -\t$PostambleActions - -installdeps_notest :: -\t$PostambleActionsNoTest - -upgradedeps :: -\t$PostambleActionsUpgradeDeps - -upgradedeps_notest :: -\t$PostambleActionsUpgradeDepsNoTest - -listdeps :: -\t$PostambleActionsListDeps - -listalldeps :: -\t$PostambleActionsListAllDeps - -END_MAKE - - return $fragment; -} - -1; - -__END__ - -#line 1193 diff -Nru libmoosex-storage-perl-0.33/inc/Module/Install/AuthorRequires.pm libmoosex-storage-perl-0.45/inc/Module/Install/AuthorRequires.pm --- libmoosex-storage-perl-0.33/inc/Module/Install/AuthorRequires.pm 2013-03-30 02:07:01.000000000 +0000 +++ libmoosex-storage-perl-0.45/inc/Module/Install/AuthorRequires.pm 1970-01-01 00:00:00.000000000 +0000 @@ -1,38 +0,0 @@ -#line 1 -use strict; -use warnings; - -package Module::Install::AuthorRequires; - -use base 'Module::Install::Base'; - -# cargo cult -BEGIN { - our $VERSION = '0.02'; - our $ISCORE = 1; -} - -sub author_requires { - my $self = shift; - - return $self->{values}->{author_requires} - unless @_; - - my @added; - while (@_) { - my $mod = shift or last; - my $version = shift || 0; - push @added, [$mod => $version]; - } - - push @{ $self->{values}->{author_requires} }, @added; - $self->admin->author_requires(@added); - - return map { @$_ } @added; -} - -1; - -__END__ - -#line 92 diff -Nru libmoosex-storage-perl-0.33/inc/Module/Install/AuthorTests.pm libmoosex-storage-perl-0.45/inc/Module/Install/AuthorTests.pm --- libmoosex-storage-perl-0.33/inc/Module/Install/AuthorTests.pm 2013-03-30 02:07:01.000000000 +0000 +++ libmoosex-storage-perl-0.45/inc/Module/Install/AuthorTests.pm 1970-01-01 00:00:00.000000000 +0000 @@ -1,59 +0,0 @@ -#line 1 -package Module::Install::AuthorTests; - -use 5.005; -use strict; -use Module::Install::Base; -use Carp (); - -#line 16 - -use vars qw{$VERSION $ISCORE @ISA}; -BEGIN { - $VERSION = '0.002'; - $ISCORE = 1; - @ISA = qw{Module::Install::Base}; -} - -#line 42 - -sub author_tests { - my ($self, @dirs) = @_; - _add_author_tests($self, \@dirs, 0); -} - -#line 56 - -sub recursive_author_tests { - my ($self, @dirs) = @_; - _add_author_tests($self, \@dirs, 1); -} - -sub _wanted { - my $href = shift; - sub { /\.t$/ and -f $_ and $href->{$File::Find::dir} = 1 } -} - -sub _add_author_tests { - my ($self, $dirs, $recurse) = @_; - return unless $Module::Install::AUTHOR; - - my @tests = $self->tests ? (split / /, $self->tests) : 't/*.t'; - - # XXX: pick a default, later -- rjbs, 2008-02-24 - my @dirs = @$dirs ? @$dirs : Carp::confess "no dirs given to author_tests"; - @dirs = grep { -d } @dirs; - - if ($recurse) { - require File::Find; - my %test_dir; - File::Find::find(_wanted(\%test_dir), @dirs); - $self->tests( join ' ', @tests, map { "$_/*.t" } sort keys %test_dir ); - } else { - $self->tests( join ' ', @tests, map { "$_/*.t" } sort @dirs ); - } -} - -#line 107 - -1; diff -Nru libmoosex-storage-perl-0.33/inc/Module/Install/AutoInstall.pm libmoosex-storage-perl-0.45/inc/Module/Install/AutoInstall.pm --- libmoosex-storage-perl-0.33/inc/Module/Install/AutoInstall.pm 2013-03-30 02:07:01.000000000 +0000 +++ libmoosex-storage-perl-0.45/inc/Module/Install/AutoInstall.pm 1970-01-01 00:00:00.000000000 +0000 @@ -1,93 +0,0 @@ -#line 1 -package Module::Install::AutoInstall; - -use strict; -use Module::Install::Base (); - -use vars qw{$VERSION @ISA $ISCORE}; -BEGIN { - $VERSION = '1.06'; - @ISA = 'Module::Install::Base'; - $ISCORE = 1; -} - -sub AutoInstall { $_[0] } - -sub run { - my $self = shift; - $self->auto_install_now(@_); -} - -sub write { - my $self = shift; - $self->auto_install(@_); -} - -sub auto_install { - my $self = shift; - return if $self->{done}++; - - # Flatten array of arrays into a single array - my @core = map @$_, map @$_, grep ref, - $self->build_requires, $self->requires; - - my @config = @_; - - # We'll need Module::AutoInstall - $self->include('Module::AutoInstall'); - require Module::AutoInstall; - - my @features_require = Module::AutoInstall->import( - (@config ? (-config => \@config) : ()), - (@core ? (-core => \@core) : ()), - $self->features, - ); - - my %seen; - my @requires = map @$_, map @$_, grep ref, $self->requires; - while (my ($mod, $ver) = splice(@requires, 0, 2)) { - $seen{$mod}{$ver}++; - } - my @build_requires = map @$_, map @$_, grep ref, $self->build_requires; - while (my ($mod, $ver) = splice(@build_requires, 0, 2)) { - $seen{$mod}{$ver}++; - } - my @configure_requires = map @$_, map @$_, grep ref, $self->configure_requires; - while (my ($mod, $ver) = splice(@configure_requires, 0, 2)) { - $seen{$mod}{$ver}++; - } - - my @deduped; - while (my ($mod, $ver) = splice(@features_require, 0, 2)) { - push @deduped, $mod => $ver unless $seen{$mod}{$ver}++; - } - - $self->requires(@deduped); - - $self->makemaker_args( Module::AutoInstall::_make_args() ); - - my $class = ref($self); - $self->postamble( - "# --- $class section:\n" . - Module::AutoInstall::postamble() - ); -} - -sub installdeps_target { - my ($self, @args) = @_; - - $self->include('Module::AutoInstall'); - require Module::AutoInstall; - - Module::AutoInstall::_installdeps_target(1); - - $self->auto_install(@args); -} - -sub auto_install_now { - my $self = shift; - $self->auto_install(@_); - Module::AutoInstall::do_install(); -} - -1; diff -Nru libmoosex-storage-perl-0.33/inc/Module/Install/Base.pm libmoosex-storage-perl-0.45/inc/Module/Install/Base.pm --- libmoosex-storage-perl-0.33/inc/Module/Install/Base.pm 2013-03-30 02:07:01.000000000 +0000 +++ libmoosex-storage-perl-0.45/inc/Module/Install/Base.pm 1970-01-01 00:00:00.000000000 +0000 @@ -1,83 +0,0 @@ -#line 1 -package Module::Install::Base; - -use strict 'vars'; -use vars qw{$VERSION}; -BEGIN { - $VERSION = '1.06'; -} - -# Suspend handler for "redefined" warnings -BEGIN { - my $w = $SIG{__WARN__}; - $SIG{__WARN__} = sub { $w }; -} - -#line 42 - -sub new { - my $class = shift; - unless ( defined &{"${class}::call"} ) { - *{"${class}::call"} = sub { shift->_top->call(@_) }; - } - unless ( defined &{"${class}::load"} ) { - *{"${class}::load"} = sub { shift->_top->load(@_) }; - } - bless { @_ }, $class; -} - -#line 61 - -sub AUTOLOAD { - local $@; - my $func = eval { shift->_top->autoload } or return; - goto &$func; -} - -#line 75 - -sub _top { - $_[0]->{_top}; -} - -#line 90 - -sub admin { - $_[0]->_top->{admin} - or - Module::Install::Base::FakeAdmin->new; -} - -#line 106 - -sub is_admin { - ! $_[0]->admin->isa('Module::Install::Base::FakeAdmin'); -} - -sub DESTROY {} - -package Module::Install::Base::FakeAdmin; - -use vars qw{$VERSION}; -BEGIN { - $VERSION = $Module::Install::Base::VERSION; -} - -my $fake; - -sub new { - $fake ||= bless(\@_, $_[0]); -} - -sub AUTOLOAD {} - -sub DESTROY {} - -# Restore warning handler -BEGIN { - $SIG{__WARN__} = $SIG{__WARN__}->(); -} - -1; - -#line 159 diff -Nru libmoosex-storage-perl-0.33/inc/Module/Install/Can.pm libmoosex-storage-perl-0.45/inc/Module/Install/Can.pm --- libmoosex-storage-perl-0.33/inc/Module/Install/Can.pm 2013-03-30 02:07:01.000000000 +0000 +++ libmoosex-storage-perl-0.45/inc/Module/Install/Can.pm 1970-01-01 00:00:00.000000000 +0000 @@ -1,154 +0,0 @@ -#line 1 -package Module::Install::Can; - -use strict; -use Config (); -use ExtUtils::MakeMaker (); -use Module::Install::Base (); - -use vars qw{$VERSION @ISA $ISCORE}; -BEGIN { - $VERSION = '1.06'; - @ISA = 'Module::Install::Base'; - $ISCORE = 1; -} - -# check if we can load some module -### Upgrade this to not have to load the module if possible -sub can_use { - my ($self, $mod, $ver) = @_; - $mod =~ s{::|\\}{/}g; - $mod .= '.pm' unless $mod =~ /\.pm$/i; - - my $pkg = $mod; - $pkg =~ s{/}{::}g; - $pkg =~ s{\.pm$}{}i; - - local $@; - eval { require $mod; $pkg->VERSION($ver || 0); 1 }; -} - -# Check if we can run some command -sub can_run { - my ($self, $cmd) = @_; - - my $_cmd = $cmd; - return $_cmd if (-x $_cmd or $_cmd = MM->maybe_command($_cmd)); - - for my $dir ((split /$Config::Config{path_sep}/, $ENV{PATH}), '.') { - next if $dir eq ''; - require File::Spec; - my $abs = File::Spec->catfile($dir, $cmd); - return $abs if (-x $abs or $abs = MM->maybe_command($abs)); - } - - return; -} - -# Can our C compiler environment build XS files -sub can_xs { - my $self = shift; - - # Ensure we have the CBuilder module - $self->configure_requires( 'ExtUtils::CBuilder' => 0.27 ); - - # Do we have the configure_requires checker? - local $@; - eval "require ExtUtils::CBuilder;"; - if ( $@ ) { - # They don't obey configure_requires, so it is - # someone old and delicate. Try to avoid hurting - # them by falling back to an older simpler test. - return $self->can_cc(); - } - - # Do we have a working C compiler - my $builder = ExtUtils::CBuilder->new( - quiet => 1, - ); - unless ( $builder->have_compiler ) { - # No working C compiler - return 0; - } - - # Write a C file representative of what XS becomes - require File::Temp; - my ( $FH, $tmpfile ) = File::Temp::tempfile( - "compilexs-XXXXX", - SUFFIX => '.c', - ); - binmode $FH; - print $FH <<'END_C'; -#include "EXTERN.h" -#include "perl.h" -#include "XSUB.h" - -int main(int argc, char **argv) { - return 0; -} - -int boot_sanexs() { - return 1; -} - -END_C - close $FH; - - # Can the C compiler access the same headers XS does - my @libs = (); - my $object = undef; - eval { - local $^W = 0; - $object = $builder->compile( - source => $tmpfile, - ); - @libs = $builder->link( - objects => $object, - module_name => 'sanexs', - ); - }; - my $result = $@ ? 0 : 1; - - # Clean up all the build files - foreach ( $tmpfile, $object, @libs ) { - next unless defined $_; - 1 while unlink; - } - - return $result; -} - -# Can we locate a (the) C compiler -sub can_cc { - my $self = shift; - my @chunks = split(/ /, $Config::Config{cc}) or return; - - # $Config{cc} may contain args; try to find out the program part - while (@chunks) { - return $self->can_run("@chunks") || (pop(@chunks), next); - } - - return; -} - -# Fix Cygwin bug on maybe_command(); -if ( $^O eq 'cygwin' ) { - require ExtUtils::MM_Cygwin; - require ExtUtils::MM_Win32; - if ( ! defined(&ExtUtils::MM_Cygwin::maybe_command) ) { - *ExtUtils::MM_Cygwin::maybe_command = sub { - my ($self, $file) = @_; - if ($file =~ m{^/cygdrive/}i and ExtUtils::MM_Win32->can('maybe_command')) { - ExtUtils::MM_Win32->maybe_command($file); - } else { - ExtUtils::MM_Unix->maybe_command($file); - } - } - } -} - -1; - -__END__ - -#line 236 diff -Nru libmoosex-storage-perl-0.33/inc/Module/Install/Fetch.pm libmoosex-storage-perl-0.45/inc/Module/Install/Fetch.pm --- libmoosex-storage-perl-0.33/inc/Module/Install/Fetch.pm 2013-03-30 02:07:01.000000000 +0000 +++ libmoosex-storage-perl-0.45/inc/Module/Install/Fetch.pm 1970-01-01 00:00:00.000000000 +0000 @@ -1,93 +0,0 @@ -#line 1 -package Module::Install::Fetch; - -use strict; -use Module::Install::Base (); - -use vars qw{$VERSION @ISA $ISCORE}; -BEGIN { - $VERSION = '1.06'; - @ISA = 'Module::Install::Base'; - $ISCORE = 1; -} - -sub get_file { - my ($self, %args) = @_; - my ($scheme, $host, $path, $file) = - $args{url} =~ m|^(\w+)://([^/]+)(.+)/(.+)| or return; - - if ( $scheme eq 'http' and ! eval { require LWP::Simple; 1 } ) { - $args{url} = $args{ftp_url} - or (warn("LWP support unavailable!\n"), return); - ($scheme, $host, $path, $file) = - $args{url} =~ m|^(\w+)://([^/]+)(.+)/(.+)| or return; - } - - $|++; - print "Fetching '$file' from $host... "; - - unless (eval { require Socket; Socket::inet_aton($host) }) { - warn "'$host' resolve failed!\n"; - return; - } - - return unless $scheme eq 'ftp' or $scheme eq 'http'; - - require Cwd; - my $dir = Cwd::getcwd(); - chdir $args{local_dir} or return if exists $args{local_dir}; - - if (eval { require LWP::Simple; 1 }) { - LWP::Simple::mirror($args{url}, $file); - } - elsif (eval { require Net::FTP; 1 }) { eval { - # use Net::FTP to get past firewall - my $ftp = Net::FTP->new($host, Passive => 1, Timeout => 600); - $ftp->login("anonymous", 'anonymous@example.com'); - $ftp->cwd($path); - $ftp->binary; - $ftp->get($file) or (warn("$!\n"), return); - $ftp->quit; - } } - elsif (my $ftp = $self->can_run('ftp')) { eval { - # no Net::FTP, fallback to ftp.exe - require FileHandle; - my $fh = FileHandle->new; - - local $SIG{CHLD} = 'IGNORE'; - unless ($fh->open("|$ftp -n")) { - warn "Couldn't open ftp: $!\n"; - chdir $dir; return; - } - - my @dialog = split(/\n/, <<"END_FTP"); -open $host -user anonymous anonymous\@example.com -cd $path -binary -get $file $file -quit -END_FTP - foreach (@dialog) { $fh->print("$_\n") } - $fh->close; - } } - else { - warn "No working 'ftp' program available!\n"; - chdir $dir; return; - } - - unless (-f $file) { - warn "Fetching failed: $@\n"; - chdir $dir; return; - } - - return if exists $args{size} and -s $file != $args{size}; - system($args{run}) if exists $args{run}; - unlink($file) if $args{remove}; - - print(((!exists $args{check_for} or -e $args{check_for}) - ? "done!" : "failed! ($!)"), "\n"); - chdir $dir; return !$?; -} - -1; diff -Nru libmoosex-storage-perl-0.33/inc/Module/Install/Include.pm libmoosex-storage-perl-0.45/inc/Module/Install/Include.pm --- libmoosex-storage-perl-0.33/inc/Module/Install/Include.pm 2013-03-30 02:07:01.000000000 +0000 +++ libmoosex-storage-perl-0.45/inc/Module/Install/Include.pm 1970-01-01 00:00:00.000000000 +0000 @@ -1,34 +0,0 @@ -#line 1 -package Module::Install::Include; - -use strict; -use Module::Install::Base (); - -use vars qw{$VERSION @ISA $ISCORE}; -BEGIN { - $VERSION = '1.06'; - @ISA = 'Module::Install::Base'; - $ISCORE = 1; -} - -sub include { - shift()->admin->include(@_); -} - -sub include_deps { - shift()->admin->include_deps(@_); -} - -sub auto_include { - shift()->admin->auto_include(@_); -} - -sub auto_include_deps { - shift()->admin->auto_include_deps(@_); -} - -sub auto_include_dependent_dists { - shift()->admin->auto_include_dependent_dists(@_); -} - -1; diff -Nru libmoosex-storage-perl-0.33/inc/Module/Install/Makefile.pm libmoosex-storage-perl-0.45/inc/Module/Install/Makefile.pm --- libmoosex-storage-perl-0.33/inc/Module/Install/Makefile.pm 2013-03-30 02:07:01.000000000 +0000 +++ libmoosex-storage-perl-0.45/inc/Module/Install/Makefile.pm 1970-01-01 00:00:00.000000000 +0000 @@ -1,418 +0,0 @@ -#line 1 -package Module::Install::Makefile; - -use strict 'vars'; -use ExtUtils::MakeMaker (); -use Module::Install::Base (); -use Fcntl qw/:flock :seek/; - -use vars qw{$VERSION @ISA $ISCORE}; -BEGIN { - $VERSION = '1.06'; - @ISA = 'Module::Install::Base'; - $ISCORE = 1; -} - -sub Makefile { $_[0] } - -my %seen = (); - -sub prompt { - shift; - - # Infinite loop protection - my @c = caller(); - if ( ++$seen{"$c[1]|$c[2]|$_[0]"} > 3 ) { - die "Caught an potential prompt infinite loop ($c[1]|$c[2]|$_[0])"; - } - - # In automated testing or non-interactive session, always use defaults - if ( ($ENV{AUTOMATED_TESTING} or -! -t STDIN) and ! $ENV{PERL_MM_USE_DEFAULT} ) { - local $ENV{PERL_MM_USE_DEFAULT} = 1; - goto &ExtUtils::MakeMaker::prompt; - } else { - goto &ExtUtils::MakeMaker::prompt; - } -} - -# Store a cleaned up version of the MakeMaker version, -# since we need to behave differently in a variety of -# ways based on the MM version. -my $makemaker = eval $ExtUtils::MakeMaker::VERSION; - -# If we are passed a param, do a "newer than" comparison. -# Otherwise, just return the MakeMaker version. -sub makemaker { - ( @_ < 2 or $makemaker >= eval($_[1]) ) ? $makemaker : 0 -} - -# Ripped from ExtUtils::MakeMaker 6.56, and slightly modified -# as we only need to know here whether the attribute is an array -# or a hash or something else (which may or may not be appendable). -my %makemaker_argtype = ( - C => 'ARRAY', - CONFIG => 'ARRAY', -# CONFIGURE => 'CODE', # ignore - DIR => 'ARRAY', - DL_FUNCS => 'HASH', - DL_VARS => 'ARRAY', - EXCLUDE_EXT => 'ARRAY', - EXE_FILES => 'ARRAY', - FUNCLIST => 'ARRAY', - H => 'ARRAY', - IMPORTS => 'HASH', - INCLUDE_EXT => 'ARRAY', - LIBS => 'ARRAY', # ignore '' - MAN1PODS => 'HASH', - MAN3PODS => 'HASH', - META_ADD => 'HASH', - META_MERGE => 'HASH', - PL_FILES => 'HASH', - PM => 'HASH', - PMLIBDIRS => 'ARRAY', - PMLIBPARENTDIRS => 'ARRAY', - PREREQ_PM => 'HASH', - CONFIGURE_REQUIRES => 'HASH', - SKIP => 'ARRAY', - TYPEMAPS => 'ARRAY', - XS => 'HASH', -# VERSION => ['version',''], # ignore -# _KEEP_AFTER_FLUSH => '', - - clean => 'HASH', - depend => 'HASH', - dist => 'HASH', - dynamic_lib=> 'HASH', - linkext => 'HASH', - macro => 'HASH', - postamble => 'HASH', - realclean => 'HASH', - test => 'HASH', - tool_autosplit => 'HASH', - - # special cases where you can use makemaker_append - CCFLAGS => 'APPENDABLE', - DEFINE => 'APPENDABLE', - INC => 'APPENDABLE', - LDDLFLAGS => 'APPENDABLE', - LDFROM => 'APPENDABLE', -); - -sub makemaker_args { - my ($self, %new_args) = @_; - my $args = ( $self->{makemaker_args} ||= {} ); - foreach my $key (keys %new_args) { - if ($makemaker_argtype{$key}) { - if ($makemaker_argtype{$key} eq 'ARRAY') { - $args->{$key} = [] unless defined $args->{$key}; - unless (ref $args->{$key} eq 'ARRAY') { - $args->{$key} = [$args->{$key}] - } - push @{$args->{$key}}, - ref $new_args{$key} eq 'ARRAY' - ? @{$new_args{$key}} - : $new_args{$key}; - } - elsif ($makemaker_argtype{$key} eq 'HASH') { - $args->{$key} = {} unless defined $args->{$key}; - foreach my $skey (keys %{ $new_args{$key} }) { - $args->{$key}{$skey} = $new_args{$key}{$skey}; - } - } - elsif ($makemaker_argtype{$key} eq 'APPENDABLE') { - $self->makemaker_append($key => $new_args{$key}); - } - } - else { - if (defined $args->{$key}) { - warn qq{MakeMaker attribute "$key" is overriden; use "makemaker_append" to append values\n}; - } - $args->{$key} = $new_args{$key}; - } - } - return $args; -} - -# For mm args that take multiple space-seperated args, -# append an argument to the current list. -sub makemaker_append { - my $self = shift; - my $name = shift; - my $args = $self->makemaker_args; - $args->{$name} = defined $args->{$name} - ? join( ' ', $args->{$name}, @_ ) - : join( ' ', @_ ); -} - -sub build_subdirs { - my $self = shift; - my $subdirs = $self->makemaker_args->{DIR} ||= []; - for my $subdir (@_) { - push @$subdirs, $subdir; - } -} - -sub clean_files { - my $self = shift; - my $clean = $self->makemaker_args->{clean} ||= {}; - %$clean = ( - %$clean, - FILES => join ' ', grep { length $_ } ($clean->{FILES} || (), @_), - ); -} - -sub realclean_files { - my $self = shift; - my $realclean = $self->makemaker_args->{realclean} ||= {}; - %$realclean = ( - %$realclean, - FILES => join ' ', grep { length $_ } ($realclean->{FILES} || (), @_), - ); -} - -sub libs { - my $self = shift; - my $libs = ref $_[0] ? shift : [ shift ]; - $self->makemaker_args( LIBS => $libs ); -} - -sub inc { - my $self = shift; - $self->makemaker_args( INC => shift ); -} - -sub _wanted_t { -} - -sub tests_recursive { - my $self = shift; - my $dir = shift || 't'; - unless ( -d $dir ) { - die "tests_recursive dir '$dir' does not exist"; - } - my %tests = map { $_ => 1 } split / /, ($self->tests || ''); - require File::Find; - File::Find::find( - sub { /\.t$/ and -f $_ and $tests{"$File::Find::dir/*.t"} = 1 }, - $dir - ); - $self->tests( join ' ', sort keys %tests ); -} - -sub write { - my $self = shift; - die "&Makefile->write() takes no arguments\n" if @_; - - # Check the current Perl version - my $perl_version = $self->perl_version; - if ( $perl_version ) { - eval "use $perl_version; 1" - or die "ERROR: perl: Version $] is installed, " - . "but we need version >= $perl_version"; - } - - # Make sure we have a new enough MakeMaker - require ExtUtils::MakeMaker; - - if ( $perl_version and $self->_cmp($perl_version, '5.006') >= 0 ) { - # This previous attempted to inherit the version of - # ExtUtils::MakeMaker in use by the module author, but this - # was found to be untenable as some authors build releases - # using future dev versions of EU:MM that nobody else has. - # Instead, #toolchain suggests we use 6.59 which is the most - # stable version on CPAN at time of writing and is, to quote - # ribasushi, "not terminally fucked, > and tested enough". - # TODO: We will now need to maintain this over time to push - # the version up as new versions are released. - $self->build_requires( 'ExtUtils::MakeMaker' => 6.59 ); - $self->configure_requires( 'ExtUtils::MakeMaker' => 6.59 ); - } else { - # Allow legacy-compatibility with 5.005 by depending on the - # most recent EU:MM that supported 5.005. - $self->build_requires( 'ExtUtils::MakeMaker' => 6.36 ); - $self->configure_requires( 'ExtUtils::MakeMaker' => 6.36 ); - } - - # Generate the MakeMaker params - my $args = $self->makemaker_args; - $args->{DISTNAME} = $self->name; - $args->{NAME} = $self->module_name || $self->name; - $args->{NAME} =~ s/-/::/g; - $args->{VERSION} = $self->version or die <<'EOT'; -ERROR: Can't determine distribution version. Please specify it -explicitly via 'version' in Makefile.PL, or set a valid $VERSION -in a module, and provide its file path via 'version_from' (or -'all_from' if you prefer) in Makefile.PL. -EOT - - if ( $self->tests ) { - my @tests = split ' ', $self->tests; - my %seen; - $args->{test} = { - TESTS => (join ' ', grep {!$seen{$_}++} @tests), - }; - } elsif ( $Module::Install::ExtraTests::use_extratests ) { - # Module::Install::ExtraTests doesn't set $self->tests and does its own tests via harness. - # So, just ignore our xt tests here. - } elsif ( -d 'xt' and ($Module::Install::AUTHOR or $ENV{RELEASE_TESTING}) ) { - $args->{test} = { - TESTS => join( ' ', map { "$_/*.t" } grep { -d $_ } qw{ t xt } ), - }; - } - if ( $] >= 5.005 ) { - $args->{ABSTRACT} = $self->abstract; - $args->{AUTHOR} = join ', ', @{$self->author || []}; - } - if ( $self->makemaker(6.10) ) { - $args->{NO_META} = 1; - #$args->{NO_MYMETA} = 1; - } - if ( $self->makemaker(6.17) and $self->sign ) { - $args->{SIGN} = 1; - } - unless ( $self->is_admin ) { - delete $args->{SIGN}; - } - if ( $self->makemaker(6.31) and $self->license ) { - $args->{LICENSE} = $self->license; - } - - my $prereq = ($args->{PREREQ_PM} ||= {}); - %$prereq = ( %$prereq, - map { @$_ } # flatten [module => version] - map { @$_ } - grep $_, - ($self->requires) - ); - - # Remove any reference to perl, PREREQ_PM doesn't support it - delete $args->{PREREQ_PM}->{perl}; - - # Merge both kinds of requires into BUILD_REQUIRES - my $build_prereq = ($args->{BUILD_REQUIRES} ||= {}); - %$build_prereq = ( %$build_prereq, - map { @$_ } # flatten [module => version] - map { @$_ } - grep $_, - ($self->configure_requires, $self->build_requires) - ); - - # Remove any reference to perl, BUILD_REQUIRES doesn't support it - delete $args->{BUILD_REQUIRES}->{perl}; - - # Delete bundled dists from prereq_pm, add it to Makefile DIR - my $subdirs = ($args->{DIR} || []); - if ($self->bundles) { - my %processed; - foreach my $bundle (@{ $self->bundles }) { - my ($mod_name, $dist_dir) = @$bundle; - delete $prereq->{$mod_name}; - $dist_dir = File::Basename::basename($dist_dir); # dir for building this module - if (not exists $processed{$dist_dir}) { - if (-d $dist_dir) { - # List as sub-directory to be processed by make - push @$subdirs, $dist_dir; - } - # Else do nothing: the module is already present on the system - $processed{$dist_dir} = undef; - } - } - } - - unless ( $self->makemaker('6.55_03') ) { - %$prereq = (%$prereq,%$build_prereq); - delete $args->{BUILD_REQUIRES}; - } - - if ( my $perl_version = $self->perl_version ) { - eval "use $perl_version; 1" - or die "ERROR: perl: Version $] is installed, " - . "but we need version >= $perl_version"; - - if ( $self->makemaker(6.48) ) { - $args->{MIN_PERL_VERSION} = $perl_version; - } - } - - if ($self->installdirs) { - warn qq{old INSTALLDIRS (probably set by makemaker_args) is overriden by installdirs\n} if $args->{INSTALLDIRS}; - $args->{INSTALLDIRS} = $self->installdirs; - } - - my %args = map { - ( $_ => $args->{$_} ) } grep {defined($args->{$_} ) - } keys %$args; - - my $user_preop = delete $args{dist}->{PREOP}; - if ( my $preop = $self->admin->preop($user_preop) ) { - foreach my $key ( keys %$preop ) { - $args{dist}->{$key} = $preop->{$key}; - } - } - - my $mm = ExtUtils::MakeMaker::WriteMakefile(%args); - $self->fix_up_makefile($mm->{FIRST_MAKEFILE} || 'Makefile'); -} - -sub fix_up_makefile { - my $self = shift; - my $makefile_name = shift; - my $top_class = ref($self->_top) || ''; - my $top_version = $self->_top->VERSION || ''; - - my $preamble = $self->preamble - ? "# Preamble by $top_class $top_version\n" - . $self->preamble - : ''; - my $postamble = "# Postamble by $top_class $top_version\n" - . ($self->postamble || ''); - - local *MAKEFILE; - open MAKEFILE, "+< $makefile_name" or die "fix_up_makefile: Couldn't open $makefile_name: $!"; - eval { flock MAKEFILE, LOCK_EX }; - my $makefile = do { local $/; }; - - $makefile =~ s/\b(test_harness\(\$\(TEST_VERBOSE\), )/$1'inc', /; - $makefile =~ s/( -I\$\(INST_ARCHLIB\))/ -Iinc$1/g; - $makefile =~ s/( "-I\$\(INST_LIB\)")/ "-Iinc"$1/g; - $makefile =~ s/^(FULLPERL = .*)/$1 "-Iinc"/m; - $makefile =~ s/^(PERL = .*)/$1 "-Iinc"/m; - - # Module::Install will never be used to build the Core Perl - # Sometimes PERL_LIB and PERL_ARCHLIB get written anyway, which breaks - # PREFIX/PERL5LIB, and thus, install_share. Blank them if they exist - $makefile =~ s/^PERL_LIB = .+/PERL_LIB =/m; - #$makefile =~ s/^PERL_ARCHLIB = .+/PERL_ARCHLIB =/m; - - # Perl 5.005 mentions PERL_LIB explicitly, so we have to remove that as well. - $makefile =~ s/(\"?)-I\$\(PERL_LIB\)\1//g; - - # XXX - This is currently unused; not sure if it breaks other MM-users - # $makefile =~ s/^pm_to_blib\s+:\s+/pm_to_blib :: /mg; - - seek MAKEFILE, 0, SEEK_SET; - truncate MAKEFILE, 0; - print MAKEFILE "$preamble$makefile$postamble" or die $!; - close MAKEFILE or die $!; - - 1; -} - -sub preamble { - my ($self, $text) = @_; - $self->{preamble} = $text . $self->{preamble} if defined $text; - $self->{preamble}; -} - -sub postamble { - my ($self, $text) = @_; - $self->{postamble} ||= $self->admin->postamble; - $self->{postamble} .= $text if defined $text; - $self->{postamble} -} - -1; - -__END__ - -#line 544 diff -Nru libmoosex-storage-perl-0.33/inc/Module/Install/Metadata.pm libmoosex-storage-perl-0.45/inc/Module/Install/Metadata.pm --- libmoosex-storage-perl-0.33/inc/Module/Install/Metadata.pm 2013-03-30 02:07:01.000000000 +0000 +++ libmoosex-storage-perl-0.45/inc/Module/Install/Metadata.pm 1970-01-01 00:00:00.000000000 +0000 @@ -1,722 +0,0 @@ -#line 1 -package Module::Install::Metadata; - -use strict 'vars'; -use Module::Install::Base (); - -use vars qw{$VERSION @ISA $ISCORE}; -BEGIN { - $VERSION = '1.06'; - @ISA = 'Module::Install::Base'; - $ISCORE = 1; -} - -my @boolean_keys = qw{ - sign -}; - -my @scalar_keys = qw{ - name - module_name - abstract - version - distribution_type - tests - installdirs -}; - -my @tuple_keys = qw{ - configure_requires - build_requires - requires - recommends - bundles - resources -}; - -my @resource_keys = qw{ - homepage - bugtracker - repository -}; - -my @array_keys = qw{ - keywords - author -}; - -*authors = \&author; - -sub Meta { shift } -sub Meta_BooleanKeys { @boolean_keys } -sub Meta_ScalarKeys { @scalar_keys } -sub Meta_TupleKeys { @tuple_keys } -sub Meta_ResourceKeys { @resource_keys } -sub Meta_ArrayKeys { @array_keys } - -foreach my $key ( @boolean_keys ) { - *$key = sub { - my $self = shift; - if ( defined wantarray and not @_ ) { - return $self->{values}->{$key}; - } - $self->{values}->{$key} = ( @_ ? $_[0] : 1 ); - return $self; - }; -} - -foreach my $key ( @scalar_keys ) { - *$key = sub { - my $self = shift; - return $self->{values}->{$key} if defined wantarray and !@_; - $self->{values}->{$key} = shift; - return $self; - }; -} - -foreach my $key ( @array_keys ) { - *$key = sub { - my $self = shift; - return $self->{values}->{$key} if defined wantarray and !@_; - $self->{values}->{$key} ||= []; - push @{$self->{values}->{$key}}, @_; - return $self; - }; -} - -foreach my $key ( @resource_keys ) { - *$key = sub { - my $self = shift; - unless ( @_ ) { - return () unless $self->{values}->{resources}; - return map { $_->[1] } - grep { $_->[0] eq $key } - @{ $self->{values}->{resources} }; - } - return $self->{values}->{resources}->{$key} unless @_; - my $uri = shift or die( - "Did not provide a value to $key()" - ); - $self->resources( $key => $uri ); - return 1; - }; -} - -foreach my $key ( grep { $_ ne "resources" } @tuple_keys) { - *$key = sub { - my $self = shift; - return $self->{values}->{$key} unless @_; - my @added; - while ( @_ ) { - my $module = shift or last; - my $version = shift || 0; - push @added, [ $module, $version ]; - } - push @{ $self->{values}->{$key} }, @added; - return map {@$_} @added; - }; -} - -# Resource handling -my %lc_resource = map { $_ => 1 } qw{ - homepage - license - bugtracker - repository -}; - -sub resources { - my $self = shift; - while ( @_ ) { - my $name = shift or last; - my $value = shift or next; - if ( $name eq lc $name and ! $lc_resource{$name} ) { - die("Unsupported reserved lowercase resource '$name'"); - } - $self->{values}->{resources} ||= []; - push @{ $self->{values}->{resources} }, [ $name, $value ]; - } - $self->{values}->{resources}; -} - -# Aliases for build_requires that will have alternative -# meanings in some future version of META.yml. -sub test_requires { shift->build_requires(@_) } -sub install_requires { shift->build_requires(@_) } - -# Aliases for installdirs options -sub install_as_core { $_[0]->installdirs('perl') } -sub install_as_cpan { $_[0]->installdirs('site') } -sub install_as_site { $_[0]->installdirs('site') } -sub install_as_vendor { $_[0]->installdirs('vendor') } - -sub dynamic_config { - my $self = shift; - my $value = @_ ? shift : 1; - if ( $self->{values}->{dynamic_config} ) { - # Once dynamic we never change to static, for safety - return 0; - } - $self->{values}->{dynamic_config} = $value ? 1 : 0; - return 1; -} - -# Convenience command -sub static_config { - shift->dynamic_config(0); -} - -sub perl_version { - my $self = shift; - return $self->{values}->{perl_version} unless @_; - my $version = shift or die( - "Did not provide a value to perl_version()" - ); - - # Normalize the version - $version = $self->_perl_version($version); - - # We don't support the really old versions - unless ( $version >= 5.005 ) { - die "Module::Install only supports 5.005 or newer (use ExtUtils::MakeMaker)\n"; - } - - $self->{values}->{perl_version} = $version; -} - -sub all_from { - my ( $self, $file ) = @_; - - unless ( defined($file) ) { - my $name = $self->name or die( - "all_from called with no args without setting name() first" - ); - $file = join('/', 'lib', split(/-/, $name)) . '.pm'; - $file =~ s{.*/}{} unless -e $file; - unless ( -e $file ) { - die("all_from cannot find $file from $name"); - } - } - unless ( -f $file ) { - die("The path '$file' does not exist, or is not a file"); - } - - $self->{values}{all_from} = $file; - - # Some methods pull from POD instead of code. - # If there is a matching .pod, use that instead - my $pod = $file; - $pod =~ s/\.pm$/.pod/i; - $pod = $file unless -e $pod; - - # Pull the different values - $self->name_from($file) unless $self->name; - $self->version_from($file) unless $self->version; - $self->perl_version_from($file) unless $self->perl_version; - $self->author_from($pod) unless @{$self->author || []}; - $self->license_from($pod) unless $self->license; - $self->abstract_from($pod) unless $self->abstract; - - return 1; -} - -sub provides { - my $self = shift; - my $provides = ( $self->{values}->{provides} ||= {} ); - %$provides = (%$provides, @_) if @_; - return $provides; -} - -sub auto_provides { - my $self = shift; - return $self unless $self->is_admin; - unless (-e 'MANIFEST') { - warn "Cannot deduce auto_provides without a MANIFEST, skipping\n"; - return $self; - } - # Avoid spurious warnings as we are not checking manifest here. - local $SIG{__WARN__} = sub {1}; - require ExtUtils::Manifest; - local *ExtUtils::Manifest::manicheck = sub { return }; - - require Module::Build; - my $build = Module::Build->new( - dist_name => $self->name, - dist_version => $self->version, - license => $self->license, - ); - $self->provides( %{ $build->find_dist_packages || {} } ); -} - -sub feature { - my $self = shift; - my $name = shift; - my $features = ( $self->{values}->{features} ||= [] ); - my $mods; - - if ( @_ == 1 and ref( $_[0] ) ) { - # The user used ->feature like ->features by passing in the second - # argument as a reference. Accomodate for that. - $mods = $_[0]; - } else { - $mods = \@_; - } - - my $count = 0; - push @$features, ( - $name => [ - map { - ref($_) ? ( ref($_) eq 'HASH' ) ? %$_ : @$_ : $_ - } @$mods - ] - ); - - return @$features; -} - -sub features { - my $self = shift; - while ( my ( $name, $mods ) = splice( @_, 0, 2 ) ) { - $self->feature( $name, @$mods ); - } - return $self->{values}->{features} - ? @{ $self->{values}->{features} } - : (); -} - -sub no_index { - my $self = shift; - my $type = shift; - push @{ $self->{values}->{no_index}->{$type} }, @_ if $type; - return $self->{values}->{no_index}; -} - -sub read { - my $self = shift; - $self->include_deps( 'YAML::Tiny', 0 ); - - require YAML::Tiny; - my $data = YAML::Tiny::LoadFile('META.yml'); - - # Call methods explicitly in case user has already set some values. - while ( my ( $key, $value ) = each %$data ) { - next unless $self->can($key); - if ( ref $value eq 'HASH' ) { - while ( my ( $module, $version ) = each %$value ) { - $self->can($key)->($self, $module => $version ); - } - } else { - $self->can($key)->($self, $value); - } - } - return $self; -} - -sub write { - my $self = shift; - return $self unless $self->is_admin; - $self->admin->write_meta; - return $self; -} - -sub version_from { - require ExtUtils::MM_Unix; - my ( $self, $file ) = @_; - $self->version( ExtUtils::MM_Unix->parse_version($file) ); - - # for version integrity check - $self->makemaker_args( VERSION_FROM => $file ); -} - -sub abstract_from { - require ExtUtils::MM_Unix; - my ( $self, $file ) = @_; - $self->abstract( - bless( - { DISTNAME => $self->name }, - 'ExtUtils::MM_Unix' - )->parse_abstract($file) - ); -} - -# Add both distribution and module name -sub name_from { - my ($self, $file) = @_; - if ( - Module::Install::_read($file) =~ m/ - ^ \s* - package \s* - ([\w:]+) - \s* ; - /ixms - ) { - my ($name, $module_name) = ($1, $1); - $name =~ s{::}{-}g; - $self->name($name); - unless ( $self->module_name ) { - $self->module_name($module_name); - } - } else { - die("Cannot determine name from $file\n"); - } -} - -sub _extract_perl_version { - if ( - $_[0] =~ m/ - ^\s* - (?:use|require) \s* - v? - ([\d_\.]+) - \s* ; - /ixms - ) { - my $perl_version = $1; - $perl_version =~ s{_}{}g; - return $perl_version; - } else { - return; - } -} - -sub perl_version_from { - my $self = shift; - my $perl_version=_extract_perl_version(Module::Install::_read($_[0])); - if ($perl_version) { - $self->perl_version($perl_version); - } else { - warn "Cannot determine perl version info from $_[0]\n"; - return; - } -} - -sub author_from { - my $self = shift; - my $content = Module::Install::_read($_[0]); - if ($content =~ m/ - =head \d \s+ (?:authors?)\b \s* - ([^\n]*) - | - =head \d \s+ (?:licen[cs]e|licensing|copyright|legal)\b \s* - .*? copyright .*? \d\d\d[\d.]+ \s* (?:\bby\b)? \s* - ([^\n]*) - /ixms) { - my $author = $1 || $2; - - # XXX: ugly but should work anyway... - if (eval "require Pod::Escapes; 1") { - # Pod::Escapes has a mapping table. - # It's in core of perl >= 5.9.3, and should be installed - # as one of the Pod::Simple's prereqs, which is a prereq - # of Pod::Text 3.x (see also below). - $author =~ s{ E<( (\d+) | ([A-Za-z]+) )> } - { - defined $2 - ? chr($2) - : defined $Pod::Escapes::Name2character_number{$1} - ? chr($Pod::Escapes::Name2character_number{$1}) - : do { - warn "Unknown escape: E<$1>"; - "E<$1>"; - }; - }gex; - } - elsif (eval "require Pod::Text; 1" && $Pod::Text::VERSION < 3) { - # Pod::Text < 3.0 has yet another mapping table, - # though the table name of 2.x and 1.x are different. - # (1.x is in core of Perl < 5.6, 2.x is in core of - # Perl < 5.9.3) - my $mapping = ($Pod::Text::VERSION < 2) - ? \%Pod::Text::HTML_Escapes - : \%Pod::Text::ESCAPES; - $author =~ s{ E<( (\d+) | ([A-Za-z]+) )> } - { - defined $2 - ? chr($2) - : defined $mapping->{$1} - ? $mapping->{$1} - : do { - warn "Unknown escape: E<$1>"; - "E<$1>"; - }; - }gex; - } - else { - $author =~ s{E}{<}g; - $author =~ s{E}{>}g; - } - $self->author($author); - } else { - warn "Cannot determine author info from $_[0]\n"; - } -} - -#Stolen from M::B -my %license_urls = ( - perl => 'http://dev.perl.org/licenses/', - apache => 'http://apache.org/licenses/LICENSE-2.0', - apache_1_1 => 'http://apache.org/licenses/LICENSE-1.1', - artistic => 'http://opensource.org/licenses/artistic-license.php', - artistic_2 => 'http://opensource.org/licenses/artistic-license-2.0.php', - lgpl => 'http://opensource.org/licenses/lgpl-license.php', - lgpl2 => 'http://opensource.org/licenses/lgpl-2.1.php', - lgpl3 => 'http://opensource.org/licenses/lgpl-3.0.html', - bsd => 'http://opensource.org/licenses/bsd-license.php', - gpl => 'http://opensource.org/licenses/gpl-license.php', - gpl2 => 'http://opensource.org/licenses/gpl-2.0.php', - gpl3 => 'http://opensource.org/licenses/gpl-3.0.html', - mit => 'http://opensource.org/licenses/mit-license.php', - mozilla => 'http://opensource.org/licenses/mozilla1.1.php', - open_source => undef, - unrestricted => undef, - restrictive => undef, - unknown => undef, -); - -sub license { - my $self = shift; - return $self->{values}->{license} unless @_; - my $license = shift or die( - 'Did not provide a value to license()' - ); - $license = __extract_license($license) || lc $license; - $self->{values}->{license} = $license; - - # Automatically fill in license URLs - if ( $license_urls{$license} ) { - $self->resources( license => $license_urls{$license} ); - } - - return 1; -} - -sub _extract_license { - my $pod = shift; - my $matched; - return __extract_license( - ($matched) = $pod =~ m/ - (=head \d \s+ L(?i:ICEN[CS]E|ICENSING)\b.*?) - (=head \d.*|=cut.*|)\z - /xms - ) || __extract_license( - ($matched) = $pod =~ m/ - (=head \d \s+ (?:C(?i:OPYRIGHTS?)|L(?i:EGAL))\b.*?) - (=head \d.*|=cut.*|)\z - /xms - ); -} - -sub __extract_license { - my $license_text = shift or return; - my @phrases = ( - '(?:under )?the same (?:terms|license) as (?:perl|the perl (?:\d )?programming language)' => 'perl', 1, - '(?:under )?the terms of (?:perl|the perl programming language) itself' => 'perl', 1, - 'Artistic and GPL' => 'perl', 1, - 'GNU general public license' => 'gpl', 1, - 'GNU public license' => 'gpl', 1, - 'GNU lesser general public license' => 'lgpl', 1, - 'GNU lesser public license' => 'lgpl', 1, - 'GNU library general public license' => 'lgpl', 1, - 'GNU library public license' => 'lgpl', 1, - 'GNU Free Documentation license' => 'unrestricted', 1, - 'GNU Affero General Public License' => 'open_source', 1, - '(?:Free)?BSD license' => 'bsd', 1, - 'Artistic license 2\.0' => 'artistic_2', 1, - 'Artistic license' => 'artistic', 1, - 'Apache (?:Software )?license' => 'apache', 1, - 'GPL' => 'gpl', 1, - 'LGPL' => 'lgpl', 1, - 'BSD' => 'bsd', 1, - 'Artistic' => 'artistic', 1, - 'MIT' => 'mit', 1, - 'Mozilla Public License' => 'mozilla', 1, - 'Q Public License' => 'open_source', 1, - 'OpenSSL License' => 'unrestricted', 1, - 'SSLeay License' => 'unrestricted', 1, - 'zlib License' => 'open_source', 1, - 'proprietary' => 'proprietary', 0, - ); - while ( my ($pattern, $license, $osi) = splice(@phrases, 0, 3) ) { - $pattern =~ s#\s+#\\s+#gs; - if ( $license_text =~ /\b$pattern\b/i ) { - return $license; - } - } - return ''; -} - -sub license_from { - my $self = shift; - if (my $license=_extract_license(Module::Install::_read($_[0]))) { - $self->license($license); - } else { - warn "Cannot determine license info from $_[0]\n"; - return 'unknown'; - } -} - -sub _extract_bugtracker { - my @links = $_[0] =~ m#L<( - https?\Q://rt.cpan.org/\E[^>]+| - https?\Q://github.com/\E[\w_]+/[\w_]+/issues| - https?\Q://code.google.com/p/\E[\w_\-]+/issues/list - )>#gx; - my %links; - @links{@links}=(); - @links=keys %links; - return @links; -} - -sub bugtracker_from { - my $self = shift; - my $content = Module::Install::_read($_[0]); - my @links = _extract_bugtracker($content); - unless ( @links ) { - warn "Cannot determine bugtracker info from $_[0]\n"; - return 0; - } - if ( @links > 1 ) { - warn "Found more than one bugtracker link in $_[0]\n"; - return 0; - } - - # Set the bugtracker - bugtracker( $links[0] ); - return 1; -} - -sub requires_from { - my $self = shift; - my $content = Module::Install::_readperl($_[0]); - my @requires = $content =~ m/^use\s+([^\W\d]\w*(?:::\w+)*)\s+(v?[\d\.]+)/mg; - while ( @requires ) { - my $module = shift @requires; - my $version = shift @requires; - $self->requires( $module => $version ); - } -} - -sub test_requires_from { - my $self = shift; - my $content = Module::Install::_readperl($_[0]); - my @requires = $content =~ m/^use\s+([^\W\d]\w*(?:::\w+)*)\s+([\d\.]+)/mg; - while ( @requires ) { - my $module = shift @requires; - my $version = shift @requires; - $self->test_requires( $module => $version ); - } -} - -# Convert triple-part versions (eg, 5.6.1 or 5.8.9) to -# numbers (eg, 5.006001 or 5.008009). -# Also, convert double-part versions (eg, 5.8) -sub _perl_version { - my $v = $_[-1]; - $v =~ s/^([1-9])\.([1-9]\d?\d?)$/sprintf("%d.%03d",$1,$2)/e; - $v =~ s/^([1-9])\.([1-9]\d?\d?)\.(0|[1-9]\d?\d?)$/sprintf("%d.%03d%03d",$1,$2,$3 || 0)/e; - $v =~ s/(\.\d\d\d)000$/$1/; - $v =~ s/_.+$//; - if ( ref($v) ) { - # Numify - $v = $v + 0; - } - return $v; -} - -sub add_metadata { - my $self = shift; - my %hash = @_; - for my $key (keys %hash) { - warn "add_metadata: $key is not prefixed with 'x_'.\n" . - "Use appopriate function to add non-private metadata.\n" unless $key =~ /^x_/; - $self->{values}->{$key} = $hash{$key}; - } -} - - -###################################################################### -# MYMETA Support - -sub WriteMyMeta { - die "WriteMyMeta has been deprecated"; -} - -sub write_mymeta_yaml { - my $self = shift; - - # We need YAML::Tiny to write the MYMETA.yml file - unless ( eval { require YAML::Tiny; 1; } ) { - return 1; - } - - # Generate the data - my $meta = $self->_write_mymeta_data or return 1; - - # Save as the MYMETA.yml file - print "Writing MYMETA.yml\n"; - YAML::Tiny::DumpFile('MYMETA.yml', $meta); -} - -sub write_mymeta_json { - my $self = shift; - - # We need JSON to write the MYMETA.json file - unless ( eval { require JSON; 1; } ) { - return 1; - } - - # Generate the data - my $meta = $self->_write_mymeta_data or return 1; - - # Save as the MYMETA.yml file - print "Writing MYMETA.json\n"; - Module::Install::_write( - 'MYMETA.json', - JSON->new->pretty(1)->canonical->encode($meta), - ); -} - -sub _write_mymeta_data { - my $self = shift; - - # If there's no existing META.yml there is nothing we can do - return undef unless -f 'META.yml'; - - # We need Parse::CPAN::Meta to load the file - unless ( eval { require Parse::CPAN::Meta; 1; } ) { - return undef; - } - - # Merge the perl version into the dependencies - my $val = $self->Meta->{values}; - my $perl = delete $val->{perl_version}; - if ( $perl ) { - $val->{requires} ||= []; - my $requires = $val->{requires}; - - # Canonize to three-dot version after Perl 5.6 - if ( $perl >= 5.006 ) { - $perl =~ s{^(\d+)\.(\d\d\d)(\d*)}{join('.', $1, int($2||0), int($3||0))}e - } - unshift @$requires, [ perl => $perl ]; - } - - # Load the advisory META.yml file - my @yaml = Parse::CPAN::Meta::LoadFile('META.yml'); - my $meta = $yaml[0]; - - # Overwrite the non-configure dependency hashs - delete $meta->{requires}; - delete $meta->{build_requires}; - delete $meta->{recommends}; - if ( exists $val->{requires} ) { - $meta->{requires} = { map { @$_ } @{ $val->{requires} } }; - } - if ( exists $val->{build_requires} ) { - $meta->{build_requires} = { map { @$_ } @{ $val->{build_requires} } }; - } - - return $meta; -} - -1; diff -Nru libmoosex-storage-perl-0.33/inc/Module/Install/Win32.pm libmoosex-storage-perl-0.45/inc/Module/Install/Win32.pm --- libmoosex-storage-perl-0.33/inc/Module/Install/Win32.pm 2013-03-30 02:07:01.000000000 +0000 +++ libmoosex-storage-perl-0.45/inc/Module/Install/Win32.pm 1970-01-01 00:00:00.000000000 +0000 @@ -1,64 +0,0 @@ -#line 1 -package Module::Install::Win32; - -use strict; -use Module::Install::Base (); - -use vars qw{$VERSION @ISA $ISCORE}; -BEGIN { - $VERSION = '1.06'; - @ISA = 'Module::Install::Base'; - $ISCORE = 1; -} - -# determine if the user needs nmake, and download it if needed -sub check_nmake { - my $self = shift; - $self->load('can_run'); - $self->load('get_file'); - - require Config; - return unless ( - $^O eq 'MSWin32' and - $Config::Config{make} and - $Config::Config{make} =~ /^nmake\b/i and - ! $self->can_run('nmake') - ); - - print "The required 'nmake' executable not found, fetching it...\n"; - - require File::Basename; - my $rv = $self->get_file( - url => 'http://download.microsoft.com/download/vc15/Patch/1.52/W95/EN-US/Nmake15.exe', - ftp_url => 'ftp://ftp.microsoft.com/Softlib/MSLFILES/Nmake15.exe', - local_dir => File::Basename::dirname($^X), - size => 51928, - run => 'Nmake15.exe /o > nul', - check_for => 'Nmake.exe', - remove => 1, - ); - - die <<'END_MESSAGE' unless $rv; - -------------------------------------------------------------------------------- - -Since you are using Microsoft Windows, you will need the 'nmake' utility -before installation. It's available at: - - http://download.microsoft.com/download/vc15/Patch/1.52/W95/EN-US/Nmake15.exe - or - ftp://ftp.microsoft.com/Softlib/MSLFILES/Nmake15.exe - -Please download the file manually, save it to a directory in %PATH% (e.g. -C:\WINDOWS\COMMAND\), then launch the MS-DOS command line shell, "cd" to -that directory, and run "Nmake15.exe" from there; that will create the -'nmake.exe' file needed by this module. - -You may then resume the installation process described in README. - -------------------------------------------------------------------------------- -END_MESSAGE - -} - -1; diff -Nru libmoosex-storage-perl-0.33/inc/Module/Install/WriteAll.pm libmoosex-storage-perl-0.45/inc/Module/Install/WriteAll.pm --- libmoosex-storage-perl-0.33/inc/Module/Install/WriteAll.pm 2013-03-30 02:07:01.000000000 +0000 +++ libmoosex-storage-perl-0.45/inc/Module/Install/WriteAll.pm 1970-01-01 00:00:00.000000000 +0000 @@ -1,63 +0,0 @@ -#line 1 -package Module::Install::WriteAll; - -use strict; -use Module::Install::Base (); - -use vars qw{$VERSION @ISA $ISCORE}; -BEGIN { - $VERSION = '1.06'; - @ISA = qw{Module::Install::Base}; - $ISCORE = 1; -} - -sub WriteAll { - my $self = shift; - my %args = ( - meta => 1, - sign => 0, - inline => 0, - check_nmake => 1, - @_, - ); - - $self->sign(1) if $args{sign}; - $self->admin->WriteAll(%args) if $self->is_admin; - - $self->check_nmake if $args{check_nmake}; - unless ( $self->makemaker_args->{PL_FILES} ) { - # XXX: This still may be a bit over-defensive... - unless ($self->makemaker(6.25)) { - $self->makemaker_args( PL_FILES => {} ) if -f 'Build.PL'; - } - } - - # Until ExtUtils::MakeMaker support MYMETA.yml, make sure - # we clean it up properly ourself. - $self->realclean_files('MYMETA.yml'); - - if ( $args{inline} ) { - $self->Inline->write; - } else { - $self->Makefile->write; - } - - # The Makefile write process adds a couple of dependencies, - # so write the META.yml files after the Makefile. - if ( $args{meta} ) { - $self->Meta->write; - } - - # Experimental support for MYMETA - if ( $ENV{X_MYMETA} ) { - if ( $ENV{X_MYMETA} eq 'JSON' ) { - $self->Meta->write_mymeta_json; - } else { - $self->Meta->write_mymeta_yaml; - } - } - - return 1; -} - -1; diff -Nru libmoosex-storage-perl-0.33/inc/Module/Install.pm libmoosex-storage-perl-0.45/inc/Module/Install.pm --- libmoosex-storage-perl-0.33/inc/Module/Install.pm 2013-03-30 02:07:00.000000000 +0000 +++ libmoosex-storage-perl-0.45/inc/Module/Install.pm 1970-01-01 00:00:00.000000000 +0000 @@ -1,470 +0,0 @@ -#line 1 -package Module::Install; - -# For any maintainers: -# The load order for Module::Install is a bit magic. -# It goes something like this... -# -# IF ( host has Module::Install installed, creating author mode ) { -# 1. Makefile.PL calls "use inc::Module::Install" -# 2. $INC{inc/Module/Install.pm} set to installed version of inc::Module::Install -# 3. The installed version of inc::Module::Install loads -# 4. inc::Module::Install calls "require Module::Install" -# 5. The ./inc/ version of Module::Install loads -# } ELSE { -# 1. Makefile.PL calls "use inc::Module::Install" -# 2. $INC{inc/Module/Install.pm} set to ./inc/ version of Module::Install -# 3. The ./inc/ version of Module::Install loads -# } - -use 5.005; -use strict 'vars'; -use Cwd (); -use File::Find (); -use File::Path (); - -use vars qw{$VERSION $MAIN}; -BEGIN { - # All Module::Install core packages now require synchronised versions. - # This will be used to ensure we don't accidentally load old or - # different versions of modules. - # This is not enforced yet, but will be some time in the next few - # releases once we can make sure it won't clash with custom - # Module::Install extensions. - $VERSION = '1.06'; - - # Storage for the pseudo-singleton - $MAIN = undef; - - *inc::Module::Install::VERSION = *VERSION; - @inc::Module::Install::ISA = __PACKAGE__; - -} - -sub import { - my $class = shift; - my $self = $class->new(@_); - my $who = $self->_caller; - - #------------------------------------------------------------- - # all of the following checks should be included in import(), - # to allow "eval 'require Module::Install; 1' to test - # installation of Module::Install. (RT #51267) - #------------------------------------------------------------- - - # Whether or not inc::Module::Install is actually loaded, the - # $INC{inc/Module/Install.pm} is what will still get set as long as - # the caller loaded module this in the documented manner. - # If not set, the caller may NOT have loaded the bundled version, and thus - # they may not have a MI version that works with the Makefile.PL. This would - # result in false errors or unexpected behaviour. And we don't want that. - my $file = join( '/', 'inc', split /::/, __PACKAGE__ ) . '.pm'; - unless ( $INC{$file} ) { die <<"END_DIE" } - -Please invoke ${\__PACKAGE__} with: - - use inc::${\__PACKAGE__}; - -not: - - use ${\__PACKAGE__}; - -END_DIE - - # This reportedly fixes a rare Win32 UTC file time issue, but - # as this is a non-cross-platform XS module not in the core, - # we shouldn't really depend on it. See RT #24194 for detail. - # (Also, this module only supports Perl 5.6 and above). - eval "use Win32::UTCFileTime" if $^O eq 'MSWin32' && $] >= 5.006; - - # If the script that is loading Module::Install is from the future, - # then make will detect this and cause it to re-run over and over - # again. This is bad. Rather than taking action to touch it (which - # is unreliable on some platforms and requires write permissions) - # for now we should catch this and refuse to run. - if ( -f $0 ) { - my $s = (stat($0))[9]; - - # If the modification time is only slightly in the future, - # sleep briefly to remove the problem. - my $a = $s - time; - if ( $a > 0 and $a < 5 ) { sleep 5 } - - # Too far in the future, throw an error. - my $t = time; - if ( $s > $t ) { die <<"END_DIE" } - -Your installer $0 has a modification time in the future ($s > $t). - -This is known to create infinite loops in make. - -Please correct this, then run $0 again. - -END_DIE - } - - - # Build.PL was formerly supported, but no longer is due to excessive - # difficulty in implementing every single feature twice. - if ( $0 =~ /Build.PL$/i ) { die <<"END_DIE" } - -Module::Install no longer supports Build.PL. - -It was impossible to maintain duel backends, and has been deprecated. - -Please remove all Build.PL files and only use the Makefile.PL installer. - -END_DIE - - #------------------------------------------------------------- - - # To save some more typing in Module::Install installers, every... - # use inc::Module::Install - # ...also acts as an implicit use strict. - $^H |= strict::bits(qw(refs subs vars)); - - #------------------------------------------------------------- - - unless ( -f $self->{file} ) { - foreach my $key (keys %INC) { - delete $INC{$key} if $key =~ /Module\/Install/; - } - - local $^W; - require "$self->{path}/$self->{dispatch}.pm"; - File::Path::mkpath("$self->{prefix}/$self->{author}"); - $self->{admin} = "$self->{name}::$self->{dispatch}"->new( _top => $self ); - $self->{admin}->init; - @_ = ($class, _self => $self); - goto &{"$self->{name}::import"}; - } - - local $^W; - *{"${who}::AUTOLOAD"} = $self->autoload; - $self->preload; - - # Unregister loader and worker packages so subdirs can use them again - delete $INC{'inc/Module/Install.pm'}; - delete $INC{'Module/Install.pm'}; - - # Save to the singleton - $MAIN = $self; - - return 1; -} - -sub autoload { - my $self = shift; - my $who = $self->_caller; - my $cwd = Cwd::cwd(); - my $sym = "${who}::AUTOLOAD"; - $sym->{$cwd} = sub { - my $pwd = Cwd::cwd(); - if ( my $code = $sym->{$pwd} ) { - # Delegate back to parent dirs - goto &$code unless $cwd eq $pwd; - } - unless ($$sym =~ s/([^:]+)$//) { - # XXX: it looks like we can't retrieve the missing function - # via $$sym (usually $main::AUTOLOAD) in this case. - # I'm still wondering if we should slurp Makefile.PL to - # get some context or not ... - my ($package, $file, $line) = caller; - die <<"EOT"; -Unknown function is found at $file line $line. -Execution of $file aborted due to runtime errors. - -If you're a contributor to a project, you may need to install -some Module::Install extensions from CPAN (or other repository). -If you're a user of a module, please contact the author. -EOT - } - my $method = $1; - if ( uc($method) eq $method ) { - # Do nothing - return; - } elsif ( $method =~ /^_/ and $self->can($method) ) { - # Dispatch to the root M:I class - return $self->$method(@_); - } - - # Dispatch to the appropriate plugin - unshift @_, ( $self, $1 ); - goto &{$self->can('call')}; - }; -} - -sub preload { - my $self = shift; - unless ( $self->{extensions} ) { - $self->load_extensions( - "$self->{prefix}/$self->{path}", $self - ); - } - - my @exts = @{$self->{extensions}}; - unless ( @exts ) { - @exts = $self->{admin}->load_all_extensions; - } - - my %seen; - foreach my $obj ( @exts ) { - while (my ($method, $glob) = each %{ref($obj) . '::'}) { - next unless $obj->can($method); - next if $method =~ /^_/; - next if $method eq uc($method); - $seen{$method}++; - } - } - - my $who = $self->_caller; - foreach my $name ( sort keys %seen ) { - local $^W; - *{"${who}::$name"} = sub { - ${"${who}::AUTOLOAD"} = "${who}::$name"; - goto &{"${who}::AUTOLOAD"}; - }; - } -} - -sub new { - my ($class, %args) = @_; - - delete $INC{'FindBin.pm'}; - { - # to suppress the redefine warning - local $SIG{__WARN__} = sub {}; - require FindBin; - } - - # ignore the prefix on extension modules built from top level. - my $base_path = Cwd::abs_path($FindBin::Bin); - unless ( Cwd::abs_path(Cwd::cwd()) eq $base_path ) { - delete $args{prefix}; - } - return $args{_self} if $args{_self}; - - $args{dispatch} ||= 'Admin'; - $args{prefix} ||= 'inc'; - $args{author} ||= ($^O eq 'VMS' ? '_author' : '.author'); - $args{bundle} ||= 'inc/BUNDLES'; - $args{base} ||= $base_path; - $class =~ s/^\Q$args{prefix}\E:://; - $args{name} ||= $class; - $args{version} ||= $class->VERSION; - unless ( $args{path} ) { - $args{path} = $args{name}; - $args{path} =~ s!::!/!g; - } - $args{file} ||= "$args{base}/$args{prefix}/$args{path}.pm"; - $args{wrote} = 0; - - bless( \%args, $class ); -} - -sub call { - my ($self, $method) = @_; - my $obj = $self->load($method) or return; - splice(@_, 0, 2, $obj); - goto &{$obj->can($method)}; -} - -sub load { - my ($self, $method) = @_; - - $self->load_extensions( - "$self->{prefix}/$self->{path}", $self - ) unless $self->{extensions}; - - foreach my $obj (@{$self->{extensions}}) { - return $obj if $obj->can($method); - } - - my $admin = $self->{admin} or die <<"END_DIE"; -The '$method' method does not exist in the '$self->{prefix}' path! -Please remove the '$self->{prefix}' directory and run $0 again to load it. -END_DIE - - my $obj = $admin->load($method, 1); - push @{$self->{extensions}}, $obj; - - $obj; -} - -sub load_extensions { - my ($self, $path, $top) = @_; - - my $should_reload = 0; - unless ( grep { ! ref $_ and lc $_ eq lc $self->{prefix} } @INC ) { - unshift @INC, $self->{prefix}; - $should_reload = 1; - } - - foreach my $rv ( $self->find_extensions($path) ) { - my ($file, $pkg) = @{$rv}; - next if $self->{pathnames}{$pkg}; - - local $@; - my $new = eval { local $^W; require $file; $pkg->can('new') }; - unless ( $new ) { - warn $@ if $@; - next; - } - $self->{pathnames}{$pkg} = - $should_reload ? delete $INC{$file} : $INC{$file}; - push @{$self->{extensions}}, &{$new}($pkg, _top => $top ); - } - - $self->{extensions} ||= []; -} - -sub find_extensions { - my ($self, $path) = @_; - - my @found; - File::Find::find( sub { - my $file = $File::Find::name; - return unless $file =~ m!^\Q$path\E/(.+)\.pm\Z!is; - my $subpath = $1; - return if lc($subpath) eq lc($self->{dispatch}); - - $file = "$self->{path}/$subpath.pm"; - my $pkg = "$self->{name}::$subpath"; - $pkg =~ s!/!::!g; - - # If we have a mixed-case package name, assume case has been preserved - # correctly. Otherwise, root through the file to locate the case-preserved - # version of the package name. - if ( $subpath eq lc($subpath) || $subpath eq uc($subpath) ) { - my $content = Module::Install::_read($subpath . '.pm'); - my $in_pod = 0; - foreach ( split //, $content ) { - $in_pod = 1 if /^=\w/; - $in_pod = 0 if /^=cut/; - next if ($in_pod || /^=cut/); # skip pod text - next if /^\s*#/; # and comments - if ( m/^\s*package\s+($pkg)\s*;/i ) { - $pkg = $1; - last; - } - } - } - - push @found, [ $file, $pkg ]; - }, $path ) if -d $path; - - @found; -} - - - - - -##################################################################### -# Common Utility Functions - -sub _caller { - my $depth = 0; - my $call = caller($depth); - while ( $call eq __PACKAGE__ ) { - $depth++; - $call = caller($depth); - } - return $call; -} - -# Done in evals to avoid confusing Perl::MinimumVersion -eval( $] >= 5.006 ? <<'END_NEW' : <<'END_OLD' ); die $@ if $@; -sub _read { - local *FH; - open( FH, '<', $_[0] ) or die "open($_[0]): $!"; - my $string = do { local $/; }; - close FH or die "close($_[0]): $!"; - return $string; -} -END_NEW -sub _read { - local *FH; - open( FH, "< $_[0]" ) or die "open($_[0]): $!"; - my $string = do { local $/; }; - close FH or die "close($_[0]): $!"; - return $string; -} -END_OLD - -sub _readperl { - my $string = Module::Install::_read($_[0]); - $string =~ s/(?:\015{1,2}\012|\015|\012)/\n/sg; - $string =~ s/(\n)\n*__(?:DATA|END)__\b.*\z/$1/s; - $string =~ s/\n\n=\w+.+?\n\n=cut\b.+?\n+/\n\n/sg; - return $string; -} - -sub _readpod { - my $string = Module::Install::_read($_[0]); - $string =~ s/(?:\015{1,2}\012|\015|\012)/\n/sg; - return $string if $_[0] =~ /\.pod\z/; - $string =~ s/(^|\n=cut\b.+?\n+)[^=\s].+?\n(\n=\w+|\z)/$1$2/sg; - $string =~ s/\n*=pod\b[^\n]*\n+/\n\n/sg; - $string =~ s/\n*=cut\b[^\n]*\n+/\n\n/sg; - $string =~ s/^\n+//s; - return $string; -} - -# Done in evals to avoid confusing Perl::MinimumVersion -eval( $] >= 5.006 ? <<'END_NEW' : <<'END_OLD' ); die $@ if $@; -sub _write { - local *FH; - open( FH, '>', $_[0] ) or die "open($_[0]): $!"; - foreach ( 1 .. $#_ ) { - print FH $_[$_] or die "print($_[0]): $!"; - } - close FH or die "close($_[0]): $!"; -} -END_NEW -sub _write { - local *FH; - open( FH, "> $_[0]" ) or die "open($_[0]): $!"; - foreach ( 1 .. $#_ ) { - print FH $_[$_] or die "print($_[0]): $!"; - } - close FH or die "close($_[0]): $!"; -} -END_OLD - -# _version is for processing module versions (eg, 1.03_05) not -# Perl versions (eg, 5.8.1). -sub _version ($) { - my $s = shift || 0; - my $d =()= $s =~ /(\.)/g; - if ( $d >= 2 ) { - # Normalise multipart versions - $s =~ s/(\.)(\d{1,3})/sprintf("$1%03d",$2)/eg; - } - $s =~ s/^(\d+)\.?//; - my $l = $1 || 0; - my @v = map { - $_ . '0' x (3 - length $_) - } $s =~ /(\d{1,3})\D?/g; - $l = $l . '.' . join '', @v if @v; - return $l + 0; -} - -sub _cmp ($$) { - _version($_[1]) <=> _version($_[2]); -} - -# Cloned from Params::Util::_CLASS -sub _CLASS ($) { - ( - defined $_[0] - and - ! ref $_[0] - and - $_[0] =~ m/^[^\W\d]\w*(?:::\w+)*\z/s - ) ? $_[0] : undef; -} - -1; - -# Copyright 2008 - 2012 Adam Kennedy. diff -Nru libmoosex-storage-perl-0.33/lib/MooseX/Storage/Base/WithChecksum.pm libmoosex-storage-perl-0.45/lib/MooseX/Storage/Base/WithChecksum.pm --- libmoosex-storage-perl-0.33/lib/MooseX/Storage/Base/WithChecksum.pm 2013-03-30 02:04:59.000000000 +0000 +++ libmoosex-storage-perl-0.45/lib/MooseX/Storage/Base/WithChecksum.pm 2013-12-22 00:48:35.000000000 +0000 @@ -1,4 +1,11 @@ package MooseX::Storage::Base::WithChecksum; +{ + $MooseX::Storage::Base::WithChecksum::VERSION = '0.45'; +} +BEGIN { + $MooseX::Storage::Base::WithChecksum::AUTHORITY = 'cpan:STEVAN'; +} +# ABSTRACT: A more secure serialization role use Moose::Role; with 'MooseX::Storage::Basic'; @@ -6,9 +13,6 @@ use Digest (); use Data::Dumper (); -our $VERSION = '0.33'; -our $AUTHORITY = 'cpan:STEVAN'; - our $DIGEST_MARKER = '__DIGEST__'; around pack => sub { @@ -97,10 +101,22 @@ =pod +=encoding UTF-8 + +=for :stopwords Chris Prather Stevan Little יובל קוג'מן (Yuval Kogman) Infinity +Interactive, Inc. Florian Ragwitz Johannes Plunien Jonathan Rockway Yu Jos +Boumans Karen Etheridge Ricardo Signes Robert Boone Shawn M Moore Tomas +Doran Cory Yuval Kogman Watson Dagfinn Ilmari Mannsåker David Golden +Steinbrunner + =head1 NAME MooseX::Storage::Base::WithChecksum - A more secure serialization role +=head1 VERSION + +version 0.45 + =head1 DESCRIPTION This is an early implementation of a more secure Storage role, @@ -134,19 +150,29 @@ exception. If you find a bug please either email me, or add the bug to cpan-RT. -=head1 AUTHOR +=head1 AUTHORS + +=over 4 -Stevan Little Estevan.little@iinteractive.comE +=item * -Yuval Kogman +Chris Prather -=head1 COPYRIGHT AND LICENSE +=item * + +Stevan Little + +=item * -Copyright 2007-2008 by Infinity Interactive, Inc. +יובל קוג'מן (Yuval Kogman) + +=back + +=head1 COPYRIGHT AND LICENSE -L +This software is copyright (c) 2007 by Infinity Interactive, Inc.. -This library is free software; you can redistribute it and/or modify -it under the same terms as Perl itself. +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 diff -Nru libmoosex-storage-perl-0.33/lib/MooseX/Storage/Basic.pm libmoosex-storage-perl-0.45/lib/MooseX/Storage/Basic.pm --- libmoosex-storage-perl-0.33/lib/MooseX/Storage/Basic.pm 2013-03-30 02:04:59.000000000 +0000 +++ libmoosex-storage-perl-0.45/lib/MooseX/Storage/Basic.pm 2013-12-22 00:48:35.000000000 +0000 @@ -1,12 +1,16 @@ package MooseX::Storage::Basic; +{ + $MooseX::Storage::Basic::VERSION = '0.45'; +} +BEGIN { + $MooseX::Storage::Basic::AUTHORITY = 'cpan:STEVAN'; +} +# ABSTRACT: The simplest level of serialization use Moose::Role; use MooseX::Storage::Engine; use String::RewritePrefix; -our $VERSION = '0.33'; -our $AUTHORITY = 'cpan:STEVAN'; - sub pack { my ( $self, %args ) = @_; my $e = $self->_storage_get_engine_class(%args)->new( object => $self ); @@ -63,18 +67,28 @@ =pod +=encoding UTF-8 + +=for :stopwords Chris Prather Stevan Little יובל קוג'מן (Yuval Kogman) Infinity +Interactive, Inc. Florian Ragwitz Johannes Plunien Jonathan Rockway Yu Jos +Boumans Karen Etheridge Ricardo Signes Robert Boone Shawn M Moore Tomas +Doran Cory Yuval Kogman Watson Dagfinn Ilmari Mannsåker David Golden +Steinbrunner + =head1 NAME MooseX::Storage::Basic - The simplest level of serialization +=head1 VERSION + +version 0.45 + =head1 SYNOPSIS package Point; use Moose; use MooseX::Storage; - our $VERSION = '0.01'; - with Storage; has 'x' => (is => 'rw', isa => 'Int'); @@ -135,19 +149,29 @@ exception. If you find a bug please either email me, or add the bug to cpan-RT. -=head1 AUTHOR +=head1 AUTHORS -Chris Prather Echris.prather@iinteractive.comE +=over 4 -Stevan Little Estevan.little@iinteractive.comE +=item * -=head1 COPYRIGHT AND LICENSE +Chris Prather + +=item * + +Stevan Little + +=item * -Copyright 2007-2008 by Infinity Interactive, Inc. +יובל קוג'מן (Yuval Kogman) + +=back + +=head1 COPYRIGHT AND LICENSE -L +This software is copyright (c) 2007 by Infinity Interactive, Inc.. -This library is free software; you can redistribute it and/or modify -it under the same terms as Perl itself. +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 diff -Nru libmoosex-storage-perl-0.33/lib/MooseX/Storage/Deferred.pm libmoosex-storage-perl-0.45/lib/MooseX/Storage/Deferred.pm --- libmoosex-storage-perl-0.33/lib/MooseX/Storage/Deferred.pm 2013-03-30 02:04:59.000000000 +0000 +++ libmoosex-storage-perl-0.45/lib/MooseX/Storage/Deferred.pm 2013-12-22 00:48:35.000000000 +0000 @@ -1,9 +1,13 @@ package MooseX::Storage::Deferred; +{ + $MooseX::Storage::Deferred::VERSION = '0.45'; +} +BEGIN { + $MooseX::Storage::Deferred::AUTHORITY = 'cpan:STEVAN'; +} +# ABSTRACT: A role for indecisive programmers use Moose::Role; -our $VERSION = '0.33'; -our $AUTHORITY = 'cpan:STEVAN'; - with 'MooseX::Storage::Basic'; sub __get_method { @@ -65,9 +69,18 @@ =pod +=encoding UTF-8 + +=for :stopwords Chris Prather Stevan Little יובל קוג'מן (Yuval Kogman) Infinity +Interactive, Inc. JSONpm + =head1 NAME -MooseX::Storage::Deferred - A role for undecisive programmers +MooseX::Storage::Deferred - A role for indecisive programmers + +=head1 VERSION + +version 0.45 =head1 SYNOPSIS @@ -75,8 +88,6 @@ use Moose; use MooseX::Storage; - our $VERSION = '0.01'; - with 'MooseX::Storage::Deferred'; has 'x' => (is => 'rw', isa => 'Int'); @@ -170,17 +181,29 @@ exception. If you find a bug please either email me, or add the bug to cpan-RT. -=head1 AUTHOR +=head1 AUTHORS + +=over 4 -Stevan Little Estevan.little@iinteractive.comE +=item * -=head1 COPYRIGHT AND LICENSE +Chris Prather + +=item * + +Stevan Little + +=item * -Copyright 2007-2008 by Infinity Interactive, Inc. +יובל קוג'מן (Yuval Kogman) + +=back + +=head1 COPYRIGHT AND LICENSE -L +This software is copyright (c) 2007 by Infinity Interactive, Inc.. -This library is free software; you can redistribute it and/or modify -it under the same terms as Perl itself. +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 diff -Nru libmoosex-storage-perl-0.33/lib/MooseX/Storage/Engine/IO/AtomicFile.pm libmoosex-storage-perl-0.45/lib/MooseX/Storage/Engine/IO/AtomicFile.pm --- libmoosex-storage-perl-0.33/lib/MooseX/Storage/Engine/IO/AtomicFile.pm 2013-03-30 02:04:59.000000000 +0000 +++ libmoosex-storage-perl-0.45/lib/MooseX/Storage/Engine/IO/AtomicFile.pm 2013-12-22 00:48:35.000000000 +0000 @@ -1,23 +1,25 @@ - package MooseX::Storage::Engine::IO::AtomicFile; +{ + $MooseX::Storage::Engine::IO::AtomicFile::VERSION = '0.45'; +} +BEGIN { + $MooseX::Storage::Engine::IO::AtomicFile::AUTHORITY = 'cpan:STEVAN'; +} +# ABSTRACT: The actually atomic file storage mechanism. use Moose; -use utf8 (); use IO::AtomicFile; -our $VERSION = '0.33'; -our $AUTHORITY = 'cpan:STEVAN'; - extends 'MooseX::Storage::Engine::IO::File'; sub store { - my ($self, $data) = @_; - my $fh = IO::AtomicFile->new($self->file, 'w') - || confess "Unable to open file (" . $self->file . ") for storing : $!"; - $fh->binmode(':utf8') if utf8::is_utf8($data); - print $fh $data; - $fh->close() - || confess "Could not write atomic file (" . $self->file . ") because: $!"; + my ($self, $data) = @_; + my $fh = IO::AtomicFile->new($self->file, 'w') + || confess "Unable to open file (" . $self->file . ") for storing : $!"; + $fh->binmode(':utf8') if utf8::is_utf8($data); + print $fh $data; + $fh->close() + || confess "Could not write atomic file (" . $self->file . ") because: $!"; } 1; @@ -26,10 +28,19 @@ =pod +=encoding UTF-8 + +=for :stopwords Chris Prather Stevan Little יובל קוג'מן (Yuval Kogman) Infinity +Interactive, Inc. + =head1 NAME MooseX::Storage::Engine::IO::AtomicFile - The actually atomic file storage mechanism. +=head1 VERSION + +version 0.45 + =head1 DESCRIPTION This provides the actual means to store data to a file atomically. @@ -56,23 +67,33 @@ =head1 BUGS -All complex software has bugs lurking in it, and this module is no +All complex software has bugs lurking in it, and this module is no exception. If you find a bug please either email me, or add the bug to cpan-RT. -=head1 AUTHOR +=head1 AUTHORS -Chris Prather Echris.prather@iinteractive.comE +=over 4 -Stevan Little Estevan.little@iinteractive.comE +=item * -=head1 COPYRIGHT AND LICENSE +Chris Prather + +=item * + +Stevan Little + +=item * -Copyright 2007-2008 by Infinity Interactive, Inc. +יובל קוג'מן (Yuval Kogman) + +=back + +=head1 COPYRIGHT AND LICENSE -L +This software is copyright (c) 2007 by Infinity Interactive, Inc.. -This library is free software; you can redistribute it and/or modify -it under the same terms as Perl itself. +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 diff -Nru libmoosex-storage-perl-0.33/lib/MooseX/Storage/Engine/IO/File.pm libmoosex-storage-perl-0.45/lib/MooseX/Storage/Engine/IO/File.pm --- libmoosex-storage-perl-0.33/lib/MooseX/Storage/Engine/IO/File.pm 2013-03-30 02:04:59.000000000 +0000 +++ libmoosex-storage-perl-0.45/lib/MooseX/Storage/Engine/IO/File.pm 2013-12-22 00:48:35.000000000 +0000 @@ -1,32 +1,34 @@ - package MooseX::Storage::Engine::IO::File; +{ + $MooseX::Storage::Engine::IO::File::VERSION = '0.45'; +} +BEGIN { + $MooseX::Storage::Engine::IO::File::AUTHORITY = 'cpan:STEVAN'; +} +# ABSTRACT: The actually file storage mechanism. use Moose; -use utf8 (); use IO::File; -our $VERSION = '0.33'; -our $AUTHORITY = 'cpan:STEVAN'; - has 'file' => ( - is => 'ro', - isa => 'Str', - required => 1, + is => 'ro', + isa => 'Str', + required => 1, ); -sub load { - my ($self) = @_; - my $fh = IO::File->new($self->file, 'r') - || confess "Unable to open file (" . $self->file . ") for loading : $!"; - return do { local $/; <$fh>; }; +sub load { + my ($self) = @_; + my $fh = IO::File->new($self->file, 'r') + || confess "Unable to open file (" . $self->file . ") for loading : $!"; + return do { local $/; <$fh>; }; } sub store { - my ($self, $data) = @_; - my $fh = IO::File->new($self->file, 'w') - || confess "Unable to open file (" . $self->file . ") for storing : $!"; - $fh->binmode(':utf8') if utf8::is_utf8($data); - print $fh $data; + my ($self, $data) = @_; + my $fh = IO::File->new($self->file, 'w') + || confess "Unable to open file (" . $self->file . ") for storing : $!"; + $fh->binmode(':utf8') if utf8::is_utf8($data); + print $fh $data; } 1; @@ -35,10 +37,22 @@ =pod +=encoding UTF-8 + +=for :stopwords Chris Prather Stevan Little יובל קוג'מן (Yuval Kogman) Infinity +Interactive, Inc. Florian Ragwitz Johannes Plunien Jonathan Rockway Yu Jos +Boumans Karen Etheridge Ricardo Signes Robert Boone Shawn M Moore Tomas +Doran Cory Yuval Kogman Watson Dagfinn Ilmari Mannsåker David Golden +Steinbrunner + =head1 NAME MooseX::Storage::Engine::IO::File - The actually file storage mechanism. +=head1 VERSION + +version 0.45 + =head1 DESCRIPTION This provides the actual means to store data to a file. @@ -65,23 +79,33 @@ =head1 BUGS -All complex software has bugs lurking in it, and this module is no +All complex software has bugs lurking in it, and this module is no exception. If you find a bug please either email me, or add the bug to cpan-RT. -=head1 AUTHOR +=head1 AUTHORS -Chris Prather Echris.prather@iinteractive.comE +=over 4 -Stevan Little Estevan.little@iinteractive.comE +=item * -=head1 COPYRIGHT AND LICENSE +Chris Prather + +=item * + +Stevan Little + +=item * -Copyright 2007-2008 by Infinity Interactive, Inc. +יובל קוג'מן (Yuval Kogman) + +=back + +=head1 COPYRIGHT AND LICENSE -L +This software is copyright (c) 2007 by Infinity Interactive, Inc.. -This library is free software; you can redistribute it and/or modify -it under the same terms as Perl itself. +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 diff -Nru libmoosex-storage-perl-0.33/lib/MooseX/Storage/Engine/Trait/DisableCycleDetection.pm libmoosex-storage-perl-0.45/lib/MooseX/Storage/Engine/Trait/DisableCycleDetection.pm --- libmoosex-storage-perl-0.33/lib/MooseX/Storage/Engine/Trait/DisableCycleDetection.pm 2013-03-30 02:04:59.000000000 +0000 +++ libmoosex-storage-perl-0.45/lib/MooseX/Storage/Engine/Trait/DisableCycleDetection.pm 2013-12-22 00:48:35.000000000 +0000 @@ -1,4 +1,12 @@ package MooseX::Storage::Engine::Trait::DisableCycleDetection; +{ + $MooseX::Storage::Engine::Trait::DisableCycleDetection::VERSION = '0.45'; +} +BEGIN { + $MooseX::Storage::Engine::Trait::DisableCycleDetection::AUTHORITY = 'cpan:STEVAN'; +} +# ABSTRACT: A custom trait to bypass cycle detection + use Moose::Role; around 'check_for_cycle_in_collapse' => sub { @@ -9,10 +17,26 @@ 1; +__END__ + +=pod + +=encoding UTF-8 + +=for :stopwords Chris Prather Stevan Little יובל קוג'מן (Yuval Kogman) Infinity +Interactive, Inc. Florian Ragwitz Johannes Plunien Jonathan Rockway Yu Jos +Boumans Karen Etheridge Ricardo Signes Robert Boone Shawn M Moore Tomas +Doran Cory Yuval Kogman Watson Dagfinn Ilmari Mannsåker David Golden +Steinbrunner + =head1 NAME MooseX::Storage::Engine::Trait::DisableCycleDetection - A custom trait to bypass cycle detection +=head1 VERSION + +version 0.45 + =head1 SYNOPSIS package Double; @@ -55,18 +79,29 @@ exception. If you find a bug please either email me, or add the bug to cpan-RT. -=head1 AUTHOR +=head1 AUTHORS -Stevan Little Estevan.little@iinteractive.comE +=over 4 -=head1 COPYRIGHT AND LICENSE +=item * -Copyright 2007-2008 by Infinity Interactive, Inc. +Chris Prather -L +=item * -This library is free software; you can redistribute it and/or modify -it under the same terms as Perl itself. +Stevan Little -=cut +=item * + +יובל קוג'מן (Yuval Kogman) +=back + +=head1 COPYRIGHT AND LICENSE + +This software is copyright (c) 2007 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 diff -Nru libmoosex-storage-perl-0.33/lib/MooseX/Storage/Engine/Trait/OnlyWhenBuilt.pm libmoosex-storage-perl-0.45/lib/MooseX/Storage/Engine/Trait/OnlyWhenBuilt.pm --- libmoosex-storage-perl-0.33/lib/MooseX/Storage/Engine/Trait/OnlyWhenBuilt.pm 2013-03-30 02:04:59.000000000 +0000 +++ libmoosex-storage-perl-0.45/lib/MooseX/Storage/Engine/Trait/OnlyWhenBuilt.pm 2013-12-22 00:48:35.000000000 +0000 @@ -1,4 +1,11 @@ package MooseX::Storage::Engine::Trait::OnlyWhenBuilt; +{ + $MooseX::Storage::Engine::Trait::OnlyWhenBuilt::VERSION = '0.45'; +} +BEGIN { + $MooseX::Storage::Engine::Trait::OnlyWhenBuilt::AUTHORITY = 'cpan:STEVAN'; +} +# ABSTRACT: An engine trait to bypass serialization use Moose::Role; # we should @@ -22,10 +29,22 @@ =pod +=encoding UTF-8 + +=for :stopwords Chris Prather Stevan Little יובל קוג'מן (Yuval Kogman) Infinity +Interactive, Inc. Florian Ragwitz Johannes Plunien Jonathan Rockway Yu Jos +Boumans Karen Etheridge Ricardo Signes Robert Boone Shawn M Moore Tomas +Doran Cory Yuval Kogman Watson Dagfinn Ilmari Mannsåker David Golden +Steinbrunner + =head1 NAME MooseX::Storage::Engine::Trait::OnlyWhenBuilt - An engine trait to bypass serialization +=head1 VERSION + +version 0.45 + =head1 SYNOPSIS { package Point; @@ -54,7 +73,7 @@ Sometimes you don't want a particular attribute to be part of the serialization if it has not been built yet. If you invoke C as outlined in the C, only attributes that have been built -(ie, where the predicate returns 'true') will be serialized. +(i.e., where the predicate returns 'true') will be serialized. This avoids any potentially expensive computations. This trait is applied to an instance of L, for the @@ -76,18 +95,29 @@ exception. If you find a bug please either email me, or add the bug to cpan-RT. -=head1 AUTHOR +=head1 AUTHORS -Stevan Little Estevan.little@iinteractive.comE +=over 4 -=head1 COPYRIGHT AND LICENSE +=item * -Copyright 2007-2008 by Infinity Interactive, Inc. +Chris Prather -L +=item * -This library is free software; you can redistribute it and/or modify -it under the same terms as Perl itself. +Stevan Little -=cut +=item * + +יובל קוג'מן (Yuval Kogman) +=back + +=head1 COPYRIGHT AND LICENSE + +This software is copyright (c) 2007 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 diff -Nru libmoosex-storage-perl-0.33/lib/MooseX/Storage/Engine.pm libmoosex-storage-perl-0.45/lib/MooseX/Storage/Engine.pm --- libmoosex-storage-perl-0.33/lib/MooseX/Storage/Engine.pm 2013-03-30 02:04:59.000000000 +0000 +++ libmoosex-storage-perl-0.45/lib/MooseX/Storage/Engine.pm 2013-12-22 00:48:35.000000000 +0000 @@ -1,11 +1,14 @@ - package MooseX::Storage::Engine; +{ + $MooseX::Storage::Engine::VERSION = '0.45'; +} +BEGIN { + $MooseX::Storage::Engine::AUTHORITY = 'cpan:STEVAN'; +} +# ABSTRACT: The meta-engine to handle collapsing and expanding objects use Moose; use Scalar::Util qw(refaddr); -our $VERSION = '0.33'; -our $AUTHORITY = 'cpan:STEVAN'; - # the class marker when # serializing an object. our $CLASS_MARKER = '__CLASS__'; @@ -30,13 +33,13 @@ sub collapse_object { my ( $self, %options ) = @_; - # NOTE: - # mark the root object as seen ... - $self->seen->{refaddr $self->object} = undef; - + # NOTE: + # mark the root object as seen ... + $self->seen->{refaddr $self->object} = undef; + $self->map_attributes('collapse_attribute', \%options); $self->storage->{$CLASS_MARKER} = $self->object->meta->identifier; - return $self->storage; + return $self->storage; } sub expand_object { @@ -45,12 +48,12 @@ $options{check_version} = 1 unless exists $options{check_version}; $options{check_authority} = 1 unless exists $options{check_authority}; - # NOTE: - # mark the root object as seen ... - $self->seen->{refaddr $data} = undef; + # NOTE: + # mark the root object as seen ... + $self->seen->{refaddr $data} = undef; $self->map_attributes('expand_attribute', $data, \%options); - return $self->storage; + return $self->storage; } ## this is the internal API ... @@ -71,13 +74,13 @@ sub collapse_attribute_value { my ($self, $attr, $options) = @_; # Faster, but breaks attributes without readers, do we care? - #my $value = $attr->get_read_method_ref->($self->object); - my $value = $attr->get_value($self->object); + #my $value = $attr->get_read_method_ref->($self->object); + my $value = $attr->get_value($self->object); - # NOTE: - # this might not be enough, we might - # need to make it possible for the - # cycle checker to return the value + # NOTE: + # this might not be enough, we might + # need to make it possible for the + # cycle checker to return the value $self->check_for_cycle_in_collapse($attr, $value) if ref $value; @@ -87,14 +90,14 @@ || confess "Cannot convert " . $attr->type_constraint->name; $value = $type_converter->{collapse}->($value, $options); } - return $value; + return $value; } sub expand_attribute_value { my ($self, $attr, $value, $options) = @_; - # NOTE: - # (see comment in method above ^^) + # NOTE: + # (see comment in method above ^^) if( ref $value and not( $options->{disable_cycle_check} or $self->class->does('MooseX::Storage::Traits::DisableCycleDetection') @@ -106,7 +109,7 @@ my $type_converter = $self->find_type_handler($attr->type_constraint, $value); $value = $type_converter->{expand}->($value, $options); } - return $value; + return $value; } # NOTE: @@ -218,6 +221,7 @@ 'Num' => { expand => sub { $_[0] + 0 }, collapse => sub { $_[0] + 0 } }, # These are boring ones, so they use the identity function ... 'Str' => { expand => sub { shift }, collapse => sub { shift } }, + 'Value' => { expand => sub { shift }, collapse => sub { shift } }, 'Bool' => { expand => sub { shift }, collapse => sub { shift } }, # These are the trickier ones, (see notes) # NOTE: @@ -243,7 +247,7 @@ collapse => sub { my ( $array, @args ) = @_; # NOTE: - # we need to make a copy cause + # we need to make a copy because # otherwise it will affect the # other real version. [ map { @@ -266,7 +270,7 @@ collapse => sub { my ( $hash, @args ) = @_; # NOTE: - # we need to make a copy cause + # we need to make a copy because # otherwise it will affect the # other real version. +{ map { @@ -288,14 +292,14 @@ ); sub add_custom_type_handler { - my ($class, $type_name, %handlers) = @_; + my ($self, $type_name, %handlers) = @_; (exists $handlers{expand} && exists $handlers{collapse}) || confess "Custom type handlers need an expand *and* a collapse method"; $TYPES{$type_name} = \%handlers; } sub remove_custom_type_handler { - my ($class, $type_name) = @_; + my ($self, $type_name) = @_; delete $TYPES{$type_name} if exists $TYPES{$type_name}; } @@ -330,8 +334,11 @@ # most cases. It is probably not # 100% ideal though, but until I # come up with a decent test case - # it will do for now. - foreach my $type (keys %TYPES) { + # it will do for now. We need to + # check more-specific types first. + my %seen; + my @fallback = grep { !$seen{$_}++ } qw/Int Num Str Value/, keys %TYPES; + foreach my $type ( @fallback ) { return $TYPES{$type} if $type_constraint->is_subtype_of($type); } @@ -368,10 +375,22 @@ =pod +=encoding UTF-8 + +=for :stopwords Chris Prather Stevan Little יובל קוג'מן (Yuval Kogman) Infinity +Interactive, Inc. Florian Ragwitz Johannes Plunien Jonathan Rockway Yu Jos +Boumans Karen Etheridge Ricardo Signes Robert Boone Shawn M Moore Tomas +Doran Cory Yuval Kogman Watson Dagfinn Ilmari Mannsåker David Golden +Steinbrunner + =head1 NAME MooseX::Storage::Engine - The meta-engine to handle collapsing and expanding objects +=head1 VERSION + +version 0.45 + =head1 DESCRIPTION There really aren't any major user serviceable parts here. However the typical @@ -460,22 +479,29 @@ exception. If you find a bug please either email me, or add the bug to cpan-RT. -=head1 AUTHOR +=head1 AUTHORS -Chris Prather Echris.prather@iinteractive.comE +=over 4 -Stevan Little Estevan.little@iinteractive.comE +=item * -=head1 COPYRIGHT AND LICENSE +Chris Prather -Copyright 2007-2008 by Infinity Interactive, Inc. +=item * -L +Stevan Little -This library is free software; you can redistribute it and/or modify -it under the same terms as Perl itself. +=item * -=cut +יובל קוג'מן (Yuval Kogman) +=back + +=head1 COPYRIGHT AND LICENSE +This software is copyright (c) 2007 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 diff -Nru libmoosex-storage-perl-0.33/lib/MooseX/Storage/Format/JSON.pm libmoosex-storage-perl-0.45/lib/MooseX/Storage/Format/JSON.pm --- libmoosex-storage-perl-0.33/lib/MooseX/Storage/Format/JSON.pm 2013-03-30 02:04:59.000000000 +0000 +++ libmoosex-storage-perl-0.45/lib/MooseX/Storage/Format/JSON.pm 2013-12-22 00:48:35.000000000 +0000 @@ -1,14 +1,16 @@ - package MooseX::Storage::Format::JSON; +{ + $MooseX::Storage::Format::JSON::VERSION = '0.45'; +} +BEGIN { + $MooseX::Storage::Format::JSON::AUTHORITY = 'cpan:STEVAN'; +} +# ABSTRACT: A JSON serialization role use Moose::Role; no warnings 'once'; use JSON::Any; -use utf8 (); - -our $VERSION = '0.33'; -our $AUTHORITY = 'cpan:STEVAN'; requires 'pack'; requires 'unpack'; @@ -34,10 +36,19 @@ =pod +=encoding UTF-8 + +=for :stopwords Chris Prather Stevan Little יובל קוג'מן (Yuval Kogman) Infinity +Interactive, Inc. + =head1 NAME MooseX::Storage::Format::JSON - A JSON serialization role +=head1 VERSION + +version 0.45 + =head1 SYNOPSIS package Point; @@ -87,23 +98,29 @@ exception. If you find a bug please either email me, or add the bug to cpan-RT. -=head1 AUTHOR +=head1 AUTHORS -Chris Prather Echris.prather@iinteractive.comE +=over 4 -Stevan Little Estevan.little@iinteractive.comE +=item * -Yuval Kogman Eyuval.kogman@iinteractive.comE +Chris Prather -=head1 COPYRIGHT AND LICENSE +=item * -Copyright 2007-2008 by Infinity Interactive, Inc. +Stevan Little -L +=item * -This library is free software; you can redistribute it and/or modify -it under the same terms as Perl itself. +יובל קוג'מן (Yuval Kogman) -=cut +=back +=head1 COPYRIGHT AND LICENSE + +This software is copyright (c) 2007 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 diff -Nru libmoosex-storage-perl-0.33/lib/MooseX/Storage/Format/Storable.pm libmoosex-storage-perl-0.45/lib/MooseX/Storage/Format/Storable.pm --- libmoosex-storage-perl-0.33/lib/MooseX/Storage/Format/Storable.pm 2013-03-30 02:04:59.000000000 +0000 +++ libmoosex-storage-perl-0.45/lib/MooseX/Storage/Format/Storable.pm 2013-12-22 00:48:35.000000000 +0000 @@ -1,12 +1,15 @@ - package MooseX::Storage::Format::Storable; +{ + $MooseX::Storage::Format::Storable::VERSION = '0.45'; +} +BEGIN { + $MooseX::Storage::Format::Storable::AUTHORITY = 'cpan:STEVAN'; +} +# ABSTRACT: A Storable serialization role use Moose::Role; use Storable (); -our $VERSION = '0.33'; -our $AUTHORITY = 'cpan:STEVAN'; - requires 'pack'; requires 'unpack'; @@ -28,10 +31,22 @@ =pod +=encoding UTF-8 + +=for :stopwords Chris Prather Stevan Little יובל קוג'מן (Yuval Kogman) Infinity +Interactive, Inc. Florian Ragwitz Johannes Plunien Jonathan Rockway Yu Jos +Boumans Karen Etheridge Ricardo Signes Robert Boone Shawn M Moore Tomas +Doran Cory Yuval Kogman Watson Dagfinn Ilmari Mannsåker David Golden +Steinbrunner IPC Storable's + =head1 NAME MooseX::Storage::Format::Storable - A Storable serialization role +=head1 VERSION + +version 0.45 + =head1 SYNOPSIS package Point; @@ -93,19 +108,29 @@ exception. If you find a bug please either email me, or add the bug to cpan-RT. -=head1 AUTHOR +=head1 AUTHORS + +=over 4 -Stevan Little Estevan.little@iinteractive.comE +=item * -=head1 COPYRIGHT AND LICENSE +Chris Prather -Copyright 2007-2008 by Infinity Interactive, Inc. +=item * -L +Stevan Little -This library is free software; you can redistribute it and/or modify -it under the same terms as Perl itself. +=item * -=cut +יובל קוג'מן (Yuval Kogman) +=back +=head1 COPYRIGHT AND LICENSE + +This software is copyright (c) 2007 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 diff -Nru libmoosex-storage-perl-0.33/lib/MooseX/Storage/Format/YAML.pm libmoosex-storage-perl-0.45/lib/MooseX/Storage/Format/YAML.pm --- libmoosex-storage-perl-0.33/lib/MooseX/Storage/Format/YAML.pm 2013-03-30 02:04:59.000000000 +0000 +++ libmoosex-storage-perl-0.45/lib/MooseX/Storage/Format/YAML.pm 2013-12-22 00:48:35.000000000 +0000 @@ -1,4 +1,11 @@ package MooseX::Storage::Format::YAML; +{ + $MooseX::Storage::Format::YAML::VERSION = '0.45'; +} +BEGIN { + $MooseX::Storage::Format::YAML::AUTHORITY = 'cpan:STEVAN'; +} +# ABSTRACT: A YAML serialization role use Moose::Role; # When I add YAML::LibYAML @@ -7,9 +14,6 @@ use YAML::Any qw(Load Dump); -our $VERSION = '0.33'; -our $AUTHORITY = 'cpan:STEVAN'; - requires 'pack'; requires 'unpack'; @@ -31,10 +35,22 @@ =pod +=encoding UTF-8 + +=for :stopwords Chris Prather Stevan Little יובל קוג'מן (Yuval Kogman) Infinity +Interactive, Inc. Florian Ragwitz Johannes Plunien Jonathan Rockway Yu Jos +Boumans Karen Etheridge Ricardo Signes Robert Boone Shawn M Moore Tomas +Doran Cory Yuval Kogman Watson Dagfinn Ilmari Mannsåker David Golden +Steinbrunner + =head1 NAME MooseX::Storage::Format::YAML - A YAML serialization role +=head1 VERSION + +version 0.45 + =head1 SYNOPSIS package Point; @@ -94,21 +110,29 @@ exception. If you find a bug please either email me, or add the bug to cpan-RT. -=head1 AUTHOR +=head1 AUTHORS + +=over 4 -Chris Prather Echris.prather@iinteractive.comE +=item * -Stevan Little Estevan.little@iinteractive.comE +Chris Prather -=head1 COPYRIGHT AND LICENSE +=item * -Copyright 2007-2008 by Infinity Interactive, Inc. +Stevan Little -L +=item * -This library is free software; you can redistribute it and/or modify -it under the same terms as Perl itself. +יובל קוג'מן (Yuval Kogman) -=cut +=back +=head1 COPYRIGHT AND LICENSE + +This software is copyright (c) 2007 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 diff -Nru libmoosex-storage-perl-0.33/lib/MooseX/Storage/IO/AtomicFile.pm libmoosex-storage-perl-0.45/lib/MooseX/Storage/IO/AtomicFile.pm --- libmoosex-storage-perl-0.33/lib/MooseX/Storage/IO/AtomicFile.pm 2013-03-30 02:04:59.000000000 +0000 +++ libmoosex-storage-perl-0.45/lib/MooseX/Storage/IO/AtomicFile.pm 2013-12-22 00:48:35.000000000 +0000 @@ -1,11 +1,15 @@ package MooseX::Storage::IO::AtomicFile; +{ + $MooseX::Storage::IO::AtomicFile::VERSION = '0.45'; +} +BEGIN { + $MooseX::Storage::IO::AtomicFile::AUTHORITY = 'cpan:STEVAN'; +} +# ABSTRACT: An Atomic File I/O role use Moose::Role; use MooseX::Storage::Engine::IO::AtomicFile; -our $VERSION = '0.33'; -our $AUTHORITY = 'cpan:STEVAN'; - with 'MooseX::Storage::IO::File'; sub store { @@ -21,10 +25,19 @@ =pod +=encoding UTF-8 + +=for :stopwords Chris Prather Stevan Little יובל קוג'מן (Yuval Kogman) Infinity +Interactive, Inc. + =head1 NAME MooseX::Storage::IO::AtomicFile - An Atomic File I/O role +=head1 VERSION + +version 0.45 + =head1 SYNOPSIS package Point; @@ -71,21 +84,29 @@ exception. If you find a bug please either email me, or add the bug to cpan-RT. -=head1 AUTHOR +=head1 AUTHORS + +=over 4 -Chris Prather Echris.prather@iinteractive.comE +=item * -Stevan Little Estevan.little@iinteractive.comE +Chris Prather -=head1 COPYRIGHT AND LICENSE +=item * -Copyright 2007-2008 by Infinity Interactive, Inc. +Stevan Little -L +=item * -This library is free software; you can redistribute it and/or modify -it under the same terms as Perl itself. +יובל קוג'מן (Yuval Kogman) -=cut +=back +=head1 COPYRIGHT AND LICENSE + +This software is copyright (c) 2007 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 diff -Nru libmoosex-storage-perl-0.33/lib/MooseX/Storage/IO/File.pm libmoosex-storage-perl-0.45/lib/MooseX/Storage/IO/File.pm --- libmoosex-storage-perl-0.33/lib/MooseX/Storage/IO/File.pm 2013-03-30 02:04:59.000000000 +0000 +++ libmoosex-storage-perl-0.45/lib/MooseX/Storage/IO/File.pm 2013-12-22 00:48:35.000000000 +0000 @@ -1,11 +1,15 @@ package MooseX::Storage::IO::File; +{ + $MooseX::Storage::IO::File::VERSION = '0.45'; +} +BEGIN { + $MooseX::Storage::IO::File::AUTHORITY = 'cpan:STEVAN'; +} +# ABSTRACT: A basic File I/O role use Moose::Role; use MooseX::Storage::Engine::IO::File; -our $VERSION = '0.33'; -our $AUTHORITY = 'cpan:STEVAN'; - requires 'thaw'; requires 'freeze'; @@ -27,10 +31,22 @@ =pod +=encoding UTF-8 + +=for :stopwords Chris Prather Stevan Little יובל קוג'מן (Yuval Kogman) Infinity +Interactive, Inc. Florian Ragwitz Johannes Plunien Jonathan Rockway Yu Jos +Boumans Karen Etheridge Ricardo Signes Robert Boone Shawn M Moore Tomas +Doran Cory Yuval Kogman Watson Dagfinn Ilmari Mannsåker David Golden +Steinbrunner + =head1 NAME MooseX::Storage::IO::File - A basic File I/O role +=head1 VERSION + +version 0.45 + =head1 SYNOPSIS package Point; @@ -77,21 +93,29 @@ exception. If you find a bug please either email me, or add the bug to cpan-RT. -=head1 AUTHOR +=head1 AUTHORS + +=over 4 -Chris Prather Echris.prather@iinteractive.comE +=item * -Stevan Little Estevan.little@iinteractive.comE +Chris Prather -=head1 COPYRIGHT AND LICENSE +=item * -Copyright 2007-2008 by Infinity Interactive, Inc. +Stevan Little -L +=item * -This library is free software; you can redistribute it and/or modify -it under the same terms as Perl itself. +יובל קוג'מן (Yuval Kogman) -=cut +=back +=head1 COPYRIGHT AND LICENSE + +This software is copyright (c) 2007 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 diff -Nru libmoosex-storage-perl-0.33/lib/MooseX/Storage/IO/StorableFile.pm libmoosex-storage-perl-0.45/lib/MooseX/Storage/IO/StorableFile.pm --- libmoosex-storage-perl-0.33/lib/MooseX/Storage/IO/StorableFile.pm 2013-03-30 02:04:59.000000000 +0000 +++ libmoosex-storage-perl-0.45/lib/MooseX/Storage/IO/StorableFile.pm 2013-12-22 00:48:35.000000000 +0000 @@ -1,11 +1,15 @@ package MooseX::Storage::IO::StorableFile; +{ + $MooseX::Storage::IO::StorableFile::VERSION = '0.45'; +} +BEGIN { + $MooseX::Storage::IO::StorableFile::AUTHORITY = 'cpan:STEVAN'; +} +# ABSTRACT: An Storable File I/O role use Moose::Role; use Storable (); -our $VERSION = '0.33'; -our $AUTHORITY = 'cpan:STEVAN'; - requires 'pack'; requires 'unpack'; @@ -35,10 +39,22 @@ =pod +=encoding UTF-8 + +=for :stopwords Chris Prather Stevan Little יובל קוג'מן (Yuval Kogman) Infinity +Interactive, Inc. Florian Ragwitz Johannes Plunien Jonathan Rockway Yu Jos +Boumans Karen Etheridge Ricardo Signes Robert Boone Shawn M Moore Tomas +Doran Cory Yuval Kogman Watson Dagfinn Ilmari Mannsåker David Golden +Steinbrunner + =head1 NAME MooseX::Storage::IO::StorableFile - An Storable File I/O role +=head1 VERSION + +version 0.45 + =head1 SYNOPSIS package Point; @@ -69,7 +85,7 @@ One important thing to note is that this module does not mix well with the other Format modules. Since Storable serialized perl data -structures in it's own format, those roles are lagely unnecessary. +structures in it's own format, those roles are largely unnecessary. However, there is always the possibility that having a set of C hooks can be useful, so because of that this module @@ -101,19 +117,29 @@ exception. If you find a bug please either email me, or add the bug to cpan-RT. -=head1 AUTHOR +=head1 AUTHORS -Stevan Little Estevan.little@iinteractive.comE +=over 4 -=head1 COPYRIGHT AND LICENSE +=item * -Copyright 2007-2008 by Infinity Interactive, Inc. +Chris Prather -L +=item * -This library is free software; you can redistribute it and/or modify -it under the same terms as Perl itself. +Stevan Little -=cut +=item * + +יובל קוג'מן (Yuval Kogman) + +=back +=head1 COPYRIGHT AND LICENSE + +This software is copyright (c) 2007 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 diff -Nru libmoosex-storage-perl-0.33/lib/MooseX/Storage/Meta/Attribute/DoNotSerialize.pm libmoosex-storage-perl-0.45/lib/MooseX/Storage/Meta/Attribute/DoNotSerialize.pm --- libmoosex-storage-perl-0.33/lib/MooseX/Storage/Meta/Attribute/DoNotSerialize.pm 2013-03-30 02:04:59.000000000 +0000 +++ libmoosex-storage-perl-0.45/lib/MooseX/Storage/Meta/Attribute/DoNotSerialize.pm 2013-12-22 00:48:35.000000000 +0000 @@ -1,18 +1,24 @@ - package MooseX::Storage::Meta::Attribute::DoNotSerialize; +{ + $MooseX::Storage::Meta::Attribute::DoNotSerialize::VERSION = '0.45'; +} +BEGIN { + $MooseX::Storage::Meta::Attribute::DoNotSerialize::AUTHORITY = 'cpan:STEVAN'; +} +# ABSTRACT: A custom meta-attribute to bypass serialization use Moose; -our $VERSION = '0.33'; -our $AUTHORITY = 'cpan:STEVAN'; - extends 'Moose::Meta::Attribute'; with 'MooseX::Storage::Meta::Attribute::Trait::DoNotSerialize'; # register this alias ... package Moose::Meta::Attribute::Custom::DoNotSerialize; - -our $VERSION = '0.33'; -our $AUTHORITY = 'cpan:STEVAN'; +{ + $Moose::Meta::Attribute::Custom::DoNotSerialize::VERSION = '0.45'; +} +BEGIN { + $Moose::Meta::Attribute::Custom::DoNotSerialize::AUTHORITY = 'cpan:STEVAN'; +} sub register_implementation { 'MooseX::Storage::Meta::Attribute::DoNotSerialize' } @@ -22,33 +28,45 @@ =pod +=encoding UTF-8 + +=for :stopwords Chris Prather Stevan Little יובל קוג'מן (Yuval Kogman) Infinity +Interactive, Inc. Florian Ragwitz Johannes Plunien Jonathan Rockway Yu Jos +Boumans Karen Etheridge Ricardo Signes Robert Boone Shawn M Moore Tomas +Doran Cory Yuval Kogman Watson Dagfinn Ilmari Mannsåker David Golden +Steinbrunner culted + =head1 NAME MooseX::Storage::Meta::Attribute::DoNotSerialize - A custom meta-attribute to bypass serialization +=head1 VERSION + +version 0.45 + =head1 SYNOPSIS package Point; use Moose; use MooseX::Storage; - + with Storage('format' => 'JSON', 'io' => 'File'); - + has 'x' => (is => 'rw', isa => 'Int'); has 'y' => (is => 'rw', isa => 'Int'); - + has 'foo' => ( metaclass => 'DoNotSerialize', is => 'rw', isa => 'CodeRef', ); - + 1; =head1 DESCRIPTION -Sometimes you don't want a particular attribute to be part of the -serialization, in this case, you want to make sure that attribute +Sometimes you don't want a particular attribute to be part of the +serialization, in this case, you want to make sure that attribute uses this custom meta-attribute. See the SYNOPSIS for a nice example that can be easily cargo-culted. @@ -64,23 +82,33 @@ =head1 BUGS -All complex software has bugs lurking in it, and this module is no +All complex software has bugs lurking in it, and this module is no exception. If you find a bug please either email me, or add the bug to cpan-RT. -=head1 AUTHOR +=head1 AUTHORS -Chris Prather Echris.prather@iinteractive.comE +=over 4 -Stevan Little Estevan.little@iinteractive.comE +=item * -=head1 COPYRIGHT AND LICENSE +Chris Prather + +=item * + +Stevan Little -Copyright 2007-2008 by Infinity Interactive, Inc. +=item * + +יובל קוג'מן (Yuval Kogman) + +=back + +=head1 COPYRIGHT AND LICENSE -L +This software is copyright (c) 2007 by Infinity Interactive, Inc.. -This library is free software; you can redistribute it and/or modify -it under the same terms as Perl itself. +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 diff -Nru libmoosex-storage-perl-0.33/lib/MooseX/Storage/Meta/Attribute/Trait/DoNotSerialize.pm libmoosex-storage-perl-0.45/lib/MooseX/Storage/Meta/Attribute/Trait/DoNotSerialize.pm --- libmoosex-storage-perl-0.33/lib/MooseX/Storage/Meta/Attribute/Trait/DoNotSerialize.pm 2013-03-30 02:04:59.000000000 +0000 +++ libmoosex-storage-perl-0.45/lib/MooseX/Storage/Meta/Attribute/Trait/DoNotSerialize.pm 2013-12-22 00:48:35.000000000 +0000 @@ -1,15 +1,22 @@ - package MooseX::Storage::Meta::Attribute::Trait::DoNotSerialize; -use Moose::Role; +{ + $MooseX::Storage::Meta::Attribute::Trait::DoNotSerialize::VERSION = '0.45'; +} +BEGIN { + $MooseX::Storage::Meta::Attribute::Trait::DoNotSerialize::AUTHORITY = 'cpan:STEVAN'; +} +# ABSTRACT: A custom meta-attribute-trait to bypass serialization -our $VERSION = '0.33'; -our $AUTHORITY = 'cpan:STEVAN'; +use Moose::Role; # register this alias ... package Moose::Meta::Attribute::Custom::Trait::DoNotSerialize; - -our $VERSION = '0.33'; -our $AUTHORITY = 'cpan:STEVAN'; +{ + $Moose::Meta::Attribute::Custom::Trait::DoNotSerialize::VERSION = '0.45'; +} +BEGIN { + $Moose::Meta::Attribute::Custom::Trait::DoNotSerialize::AUTHORITY = 'cpan:STEVAN'; +} sub register_implementation { 'MooseX::Storage::Meta::Attribute::Trait::DoNotSerialize' } @@ -19,34 +26,46 @@ =pod +=encoding UTF-8 + +=for :stopwords Chris Prather Stevan Little יובל קוג'מן (Yuval Kogman) Infinity +Interactive, Inc. Florian Ragwitz Johannes Plunien Jonathan Rockway Yu Jos +Boumans Karen Etheridge Ricardo Signes Robert Boone Shawn M Moore Tomas +Doran Cory Yuval Kogman Watson Dagfinn Ilmari Mannsåker David Golden +Steinbrunner culted + =head1 NAME MooseX::Storage::Meta::Attribute::Trait::DoNotSerialize - A custom meta-attribute-trait to bypass serialization +=head1 VERSION + +version 0.45 + =head1 SYNOPSIS package Point; use Moose; use MooseX::Storage; - + with Storage('format' => 'JSON', 'io' => 'File'); - + has 'x' => (is => 'rw', isa => 'Int'); has 'y' => (is => 'rw', isa => 'Int'); - + has 'foo' => ( traits => [ 'DoNotSerialize' ], is => 'rw', isa => 'CodeRef', ); - + 1; =head1 DESCRIPTION -Sometimes you don't want a particular attribute to be part of the -serialization, in this case, you want to make sure that attribute -uses this custom meta-attribute-trait. See the SYNOPSIS for a nice +Sometimes you don't want a particular attribute to be part of the +serialization, in this case, you want to make sure that attribute +uses this custom meta-attribute-trait. See the SYNOPSIS for a nice example that can be easily cargo-culted. =head1 METHODS @@ -61,21 +80,33 @@ =head1 BUGS -All complex software has bugs lurking in it, and this module is no +All complex software has bugs lurking in it, and this module is no exception. If you find a bug please either email me, or add the bug to cpan-RT. -=head1 AUTHOR +=head1 AUTHORS -Stevan Little Estevan.little@iinteractive.comE +=over 4 -=head1 COPYRIGHT AND LICENSE +=item * + +Chris Prather + +=item * + +Stevan Little -Copyright 2007-2008 by Infinity Interactive, Inc. +=item * + +יובל קוג'מן (Yuval Kogman) + +=back + +=head1 COPYRIGHT AND LICENSE -L +This software is copyright (c) 2007 by Infinity Interactive, Inc.. -This library is free software; you can redistribute it and/or modify -it under the same terms as Perl itself. +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 diff -Nru libmoosex-storage-perl-0.33/lib/MooseX/Storage/Traits/DisableCycleDetection.pm libmoosex-storage-perl-0.45/lib/MooseX/Storage/Traits/DisableCycleDetection.pm --- libmoosex-storage-perl-0.33/lib/MooseX/Storage/Traits/DisableCycleDetection.pm 2013-03-30 02:04:59.000000000 +0000 +++ libmoosex-storage-perl-0.45/lib/MooseX/Storage/Traits/DisableCycleDetection.pm 2013-12-22 00:48:35.000000000 +0000 @@ -1,9 +1,13 @@ package MooseX::Storage::Traits::DisableCycleDetection; +{ + $MooseX::Storage::Traits::DisableCycleDetection::VERSION = '0.45'; +} +BEGIN { + $MooseX::Storage::Traits::DisableCycleDetection::AUTHORITY = 'cpan:STEVAN'; +} +# ABSTRACT: A custom trait to bypass cycle detection use Moose::Role; -our $VERSION = '0.33'; -our $AUTHORITY = 'cpan:STEVAN'; - requires 'pack'; requires 'unpack'; @@ -29,12 +33,23 @@ =pod +=encoding UTF-8 + +=for :stopwords Chris Prather Stevan Little יובל קוג'מן (Yuval Kogman) Infinity +Interactive, Inc. Florian Ragwitz Johannes Plunien Jonathan Rockway Yu Jos +Boumans Karen Etheridge Ricardo Signes Robert Boone Shawn M Moore Tomas +Doran Cory Yuval Kogman Watson Dagfinn Ilmari Mannsåker David Golden +Steinbrunner culted + =head1 NAME MooseX::Storage::Traits::DisableCycleDetection - A custom trait to bypass cycle detection -=head1 SYNOPSIS +=head1 VERSION +version 0.45 + +=head1 SYNOPSIS package Double; use Moose; @@ -78,18 +93,29 @@ exception. If you find a bug please either email me, or add the bug to cpan-RT. -=head1 AUTHOR +=head1 AUTHORS -Stevan Little Estevan.little@iinteractive.comE +=over 4 -=head1 COPYRIGHT AND LICENSE +=item * -Copyright 2007-2008 by Infinity Interactive, Inc. +Chris Prather -L +=item * -This library is free software; you can redistribute it and/or modify -it under the same terms as Perl itself. +Stevan Little -=cut +=item * +יובל קוג'מן (Yuval Kogman) + +=back + +=head1 COPYRIGHT AND LICENSE + +This software is copyright (c) 2007 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 diff -Nru libmoosex-storage-perl-0.33/lib/MooseX/Storage/Traits/OnlyWhenBuilt.pm libmoosex-storage-perl-0.45/lib/MooseX/Storage/Traits/OnlyWhenBuilt.pm --- libmoosex-storage-perl-0.33/lib/MooseX/Storage/Traits/OnlyWhenBuilt.pm 2013-03-30 02:04:59.000000000 +0000 +++ libmoosex-storage-perl-0.45/lib/MooseX/Storage/Traits/OnlyWhenBuilt.pm 2013-12-22 00:48:35.000000000 +0000 @@ -1,9 +1,13 @@ package MooseX::Storage::Traits::OnlyWhenBuilt; +{ + $MooseX::Storage::Traits::OnlyWhenBuilt::VERSION = '0.45'; +} +BEGIN { + $MooseX::Storage::Traits::OnlyWhenBuilt::AUTHORITY = 'cpan:STEVAN'; +} +# ABSTRACT: A custom trait to bypass serialization use Moose::Role; -our $VERSION = '0.33'; -our $AUTHORITY = 'cpan:STEVAN'; - requires 'pack'; requires 'unpack'; @@ -29,12 +33,23 @@ =pod +=encoding UTF-8 + +=for :stopwords Chris Prather Stevan Little יובל קוג'מן (Yuval Kogman) Infinity +Interactive, Inc. Florian Ragwitz Johannes Plunien Jonathan Rockway Yu Jos +Boumans Karen Etheridge Ricardo Signes Robert Boone Shawn M Moore Tomas +Doran Cory Yuval Kogman Watson Dagfinn Ilmari Mannsåker David Golden +Steinbrunner culted + =head1 NAME MooseX::Storage::Traits::OnlyWhenBuilt - A custom trait to bypass serialization -=head1 SYNOPSIS +=head1 VERSION +version 0.45 + +=head1 SYNOPSIS { package Point; use Moose; @@ -63,7 +78,7 @@ Sometimes you don't want a particular attribute to be part of the serialization if it has not been built yet. If you invoke C as outlined in the C, only attributes that have been built -(ie, where the predicate returns 'true') will be serialized. +(i.e., where the predicate returns 'true') will be serialized. This avoids any potentially expensive computations. See the SYNOPSIS for a nice example that can be easily cargo-culted. @@ -84,17 +99,29 @@ exception. If you find a bug please either email me, or add the bug to cpan-RT. -=head1 AUTHOR +=head1 AUTHORS -Stevan Little Estevan.little@iinteractive.comE +=over 4 -=head1 COPYRIGHT AND LICENSE +=item * -Copyright 2007-2008 by Infinity Interactive, Inc. +Chris Prather + +=item * + +Stevan Little + +=item * + +יובל קוג'מן (Yuval Kogman) + +=back + +=head1 COPYRIGHT AND LICENSE -L +This software is copyright (c) 2007 by Infinity Interactive, Inc.. -This library is free software; you can redistribute it and/or modify -it under the same terms as Perl itself. +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 diff -Nru libmoosex-storage-perl-0.33/lib/MooseX/Storage/Util.pm libmoosex-storage-perl-0.45/lib/MooseX/Storage/Util.pm --- libmoosex-storage-perl-0.33/lib/MooseX/Storage/Util.pm 2013-03-30 02:04:59.000000000 +0000 +++ libmoosex-storage-perl-0.45/lib/MooseX/Storage/Util.pm 2013-12-22 00:48:35.000000000 +0000 @@ -1,11 +1,15 @@ package MooseX::Storage::Util; +{ + $MooseX::Storage::Util::VERSION = '0.45'; +} +BEGIN { + $MooseX::Storage::Util::AUTHORITY = 'cpan:STEVAN'; +} +# ABSTRACT: A MooseX::Storage Swiss Army chainsaw + use Moose qw(confess blessed); use MooseX::Storage::Engine (); -use utf8 (); - -our $VERSION = '0.33'; -our $AUTHORITY = 'cpan:STEVAN'; sub peek { my ($class, $data, %options) = @_; @@ -30,7 +34,7 @@ } sub _inflate_json { - my ($class, $json) = @_; + my ($self, $json) = @_; eval { require JSON::Any; JSON::Any->import }; confess "Could not load JSON module because : $@" if $@; @@ -46,18 +50,12 @@ } sub _inflate_yaml { - my ($class, $yaml) = @_; + my ($self, $yaml) = @_; - require Best; - eval { Best->import([[ qw[YAML::Syck YAML] ]]) }; + eval { require YAML::Any; YAML::Any->import }; confess "Could not load YAML module because : $@" if $@; - my $inflater = Best->which('YAML::Syck')->can('Load'); - - (defined $inflater) - || confess "Could not load the YAML inflator"; - - my $data = eval { $inflater->($yaml) }; + my $data = eval { Load($yaml) }; if ($@) { confess "There was an error when attempting to peek at YAML : $@"; } @@ -72,9 +70,21 @@ =pod +=encoding UTF-8 + +=for :stopwords Chris Prather Stevan Little יובל קוג'מן (Yuval Kogman) Infinity +Interactive, Inc. Florian Ragwitz Johannes Plunien Jonathan Rockway Yu Jos +Boumans Karen Etheridge Ricardo Signes Robert Boone Shawn M Moore Tomas +Doran Cory Yuval Kogman Watson Dagfinn Ilmari Mannsåker David Golden +Steinbrunner TODO + =head1 NAME -MooseX::Storage::Util - A MooseX::Storage swiss-army chainsaw +MooseX::Storage::Util - A MooseX::Storage Swiss Army chainsaw + +=head1 VERSION + +version 0.45 =head1 DESCRIPTION @@ -137,17 +147,29 @@ exception. If you find a bug please either email me, or add the bug to cpan-RT. -=head1 AUTHOR +=head1 AUTHORS -Stevan Little Estevan.little@iinteractive.comE +=over 4 -=head1 COPYRIGHT AND LICENSE +=item * + +Chris Prather + +=item * + +Stevan Little -Copyright 2007-2008 by Infinity Interactive, Inc. +=item * + +יובל קוג'מן (Yuval Kogman) + +=back + +=head1 COPYRIGHT AND LICENSE -L +This software is copyright (c) 2007 by Infinity Interactive, Inc.. -This library is free software; you can redistribute it and/or modify -it under the same terms as Perl itself. +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 diff -Nru libmoosex-storage-perl-0.33/lib/MooseX/Storage.pm libmoosex-storage-perl-0.45/lib/MooseX/Storage.pm --- libmoosex-storage-perl-0.33/lib/MooseX/Storage.pm 2013-03-30 02:04:59.000000000 +0000 +++ libmoosex-storage-perl-0.45/lib/MooseX/Storage.pm 2013-12-22 00:48:35.000000000 +0000 @@ -1,12 +1,18 @@ - package MooseX::Storage; +{ + $MooseX::Storage::VERSION = '0.45'; +} +# git description: v0.44-10-g01cb843 + +BEGIN { + $MooseX::Storage::AUTHORITY = 'cpan:STEVAN'; +} +# ABSTRACT: A serialization framework for Moose classes use Moose qw(confess); use MooseX::Storage::Meta::Attribute::DoNotSerialize; use String::RewritePrefix (); - -our $VERSION = '0.33'; -our $AUTHORITY = 'cpan:STEVAN'; +use Module::Runtime 'use_module'; sub import { my $pkg = caller(); @@ -43,7 +49,7 @@ my ($class, $param) = @$value; $class = $self->_rewrite_role_name($base => $class); - Class::MOP::load_class($class); + use_module($class); my $role = $class->meta->generate_role(parameters => $param); @@ -51,7 +57,7 @@ return $role->name; } else { my $class = $self->_rewrite_role_name($base, $value); - Class::MOP::load_class($class); + use_module($class); my $role = $class; @@ -76,7 +82,7 @@ # NOTE: # you don't have to have a format - # role, this just means you dont + # role, this just means you don't # get anything other than pack/unpack push @roles, __PACKAGE__->_expand_role(Format => $params{format}); @@ -86,7 +92,7 @@ # too, the exception being StorableFile # # NOTE: - # we dont need this code anymore, cause + # we don't need this code anymore, because # the role composition will catch it for # us. This allows the StorableFile to work #(exists $params{'format'}) @@ -109,18 +115,28 @@ =pod +=encoding UTF-8 + +=for :stopwords Chris Prather Stevan Little יובל קוג'מן (Yuval Kogman) Infinity +Interactive, Inc. Florian Ragwitz Johannes Plunien Jonathan Rockway Yu Jos +Boumans Karen Etheridge Ricardo Signes Robert Boone Shawn M Moore Tomas +Doran Cory Yuval Kogman Watson Dagfinn Ilmari Mannsåker David Golden +Steinbrunner io subtypes parameterized TODO + =head1 NAME MooseX::Storage - A serialization framework for Moose classes +=head1 VERSION + +version 0.45 + =head1 SYNOPSIS package Point; use Moose; use MooseX::Storage; - our $VERSION = '0.01'; - with Storage('format' => 'JSON', 'io' => 'File'); has 'x' => (is => 'rw', isa => 'Int'); @@ -184,7 +200,7 @@ class is serialized into a Perl HASH reference, it is tagged with the class name and each instance attribute is stored. Very simple. -This level is not optional, it is the bare minumum that +This level is not optional, it is the bare minimum that MooseX::Storage provides and all other levels build on top of this. See L for the fundamental implementation and @@ -224,7 +240,7 @@ =item OnlyWhenBuilt -Only attributes that have been built (ie, where the predicate returns +Only attributes that have been built (i.e., where the predicate returns 'true') will be serialized. This avoids any potentially expensive computations. See L for details. @@ -244,7 +260,7 @@ With Array and Hash references the first level down is inspected and any objects found are serialized/deserialized for you. We do not do -this recusively by default, however this feature may become an +this recursively by default, however this feature may become an option eventually. The specific serialize/deserialize routine is determined by the @@ -335,21 +351,99 @@ exception. If you find a bug please either email me, or add the bug to cpan-RT. -=head1 AUTHOR +=head1 AUTHORS + +=over 4 + +=item * + +Chris Prather -Chris Prather Echris.prather@iinteractive.comE +=item * -Stevan Little Estevan.little@iinteractive.comE +Stevan Little -Yuval Kogman Eyuval.kogman@iinteractive.comE +=item * + +יובל קוג'מן (Yuval Kogman) + +=back =head1 COPYRIGHT AND LICENSE -Copyright 2007-2008 by Infinity Interactive, Inc. +This software is copyright (c) 2007 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. + +=head1 CONTRIBUTORS + +=over 4 + +=item * + +Chris Prather + +=item * + +Cory Watson + +=item * + +Dagfinn Ilmari Mannsåker -L +=item * -This library is free software; you can redistribute it and/or modify -it under the same terms as Perl itself. +David Golden + +=item * + +David Steinbrunner + +=item * + +Florian Ragwitz + +=item * + +Johannes Plunien + +=item * + +Jonathan Rockway + +=item * + +Jonathan Yu + +=item * + +Jos Boumans + +=item * + +Karen Etheridge + +=item * + +Ricardo Signes + +=item * + +Robert Boone + +=item * + +Shawn M Moore + +=item * + +Tomas Doran + +=item * + +Yuval Kogman + +=back =cut diff -Nru libmoosex-storage-perl-0.33/t/00-report-prereqs.t libmoosex-storage-perl-0.45/t/00-report-prereqs.t --- libmoosex-storage-perl-0.33/t/00-report-prereqs.t 1970-01-01 00:00:00.000000000 +0000 +++ libmoosex-storage-perl-0.45/t/00-report-prereqs.t 2013-12-22 00:48:35.000000000 +0000 @@ -0,0 +1,142 @@ +#!perl + +use strict; +use warnings; + +# This test was generated by Dist::Zilla::Plugin::Test::ReportPrereqs 0.010 + +use Test::More tests => 1; + +use ExtUtils::MakeMaker; +use File::Spec::Functions; +use List::Util qw/max/; + +my @modules = qw( + CPAN::Meta + CPAN::Meta::Requirements + Data::Dumper + Digest + Digest::HMAC + Digest::SHA + ExtUtils::MakeMaker + File::Spec::Functions + IO::AtomicFile + IO::File + JSON::Any + Module::Build::Tiny + Module::Runtime + Moose + MooseX::Storage::Format::JSONpm + Scalar::Util + Storable + String::RewritePrefix + Test::Deep + Test::Deep::JSON + Test::Fatal + Test::More + Test::Requires + Test::Without::Module + YAML + YAML::Any + YAML::Syck + YAML::XS + perl +); + +my %exclude = map {; $_ => 1 } qw( + +); + +my ($source) = grep { -f $_ } qw/MYMETA.json MYMETA.yml META.json/; +$source = "META.yml" unless defined $source; + +# replace modules with dynamic results from MYMETA.json if we can +# (hide CPAN::Meta from prereq scanner) +my $cpan_meta = "CPAN::Meta"; +my $cpan_meta_req = "CPAN::Meta::Requirements"; +my $all_requires; +if ( -f $source && eval "require $cpan_meta" ) { ## no critic + if ( my $meta = eval { CPAN::Meta->load_file($source) } ) { + + # Get ALL modules mentioned in META (any phase/type) + my $prereqs = $meta->prereqs; + delete $prereqs->{develop} if not $ENV{AUTHOR_TESTING}; + my %uniq = map {$_ => 1} map { keys %$_ } map { values %$_ } values %$prereqs; + $uniq{$_} = 1 for @modules; # don't lose any static ones + @modules = sort grep { ! $exclude{$_} } keys %uniq; + + # If verifying, merge 'requires' only for major phases + if ( 1 ) { + $prereqs = $meta->effective_prereqs; # get the object, not the hash + if (eval "require $cpan_meta_req; 1") { ## no critic + $all_requires = $cpan_meta_req->new; + for my $phase ( qw/configure build test runtime/ ) { + $all_requires->add_requirements( + $prereqs->requirements_for($phase, 'requires') + ); + } + } + } + } +} + +my @reports = [qw/Version Module/]; +my @dep_errors; +my $req_hash = defined($all_requires) ? $all_requires->as_string_hash : {}; + +for my $mod ( @modules ) { + next if $mod eq 'perl'; + my $file = $mod; + $file =~ s{::}{/}g; + $file .= ".pm"; + my ($prefix) = grep { -e catfile($_, $file) } @INC; + if ( $prefix ) { + my $ver = MM->parse_version( catfile($prefix, $file) ); + $ver = "undef" unless defined $ver; # Newer MM should do this anyway + push @reports, [$ver, $mod]; + + if ( 1 && $all_requires ) { + my $req = $req_hash->{$mod}; + if ( defined $req && length $req ) { + if ( ! defined eval { version->parse($ver) } ) { + push @dep_errors, "$mod version '$ver' cannot be parsed (version '$req' required)"; + } + elsif ( ! $all_requires->accepts_module( $mod => $ver ) ) { + push @dep_errors, "$mod version '$ver' is not in required range '$req'"; + } + } + } + + } + else { + push @reports, ["missing", $mod]; + + if ( 1 && $all_requires ) { + my $req = $req_hash->{$mod}; + if ( defined $req && length $req ) { + push @dep_errors, "$mod is not installed (version '$req' required)"; + } + } + } +} + +if ( @reports ) { + my $vl = max map { length $_->[0] } @reports; + my $ml = max map { length $_->[1] } @reports; + splice @reports, 1, 0, ["-" x $vl, "-" x $ml]; + diag "\nVersions for all modules listed in $source (including optional ones):\n", + map {sprintf(" %*s %*s\n",$vl,$_->[0],-$ml,$_->[1])} @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=2 sts=2 sw=2 et: diff -Nru libmoosex-storage-perl-0.33/t/000_load.t libmoosex-storage-perl-0.45/t/000_load.t --- libmoosex-storage-perl-0.33/t/000_load.t 2010-11-21 08:41:25.000000000 +0000 +++ libmoosex-storage-perl-0.45/t/000_load.t 2013-12-22 00:48:35.000000000 +0000 @@ -1,5 +1,3 @@ -#!/usr/bin/perl - use strict; use warnings; @@ -7,4 +5,4 @@ BEGIN { use_ok('MooseX::Storage'); -} \ No newline at end of file +} diff -Nru libmoosex-storage-perl-0.33/t/001_basic.t libmoosex-storage-perl-0.45/t/001_basic.t --- libmoosex-storage-perl-0.33/t/001_basic.t 2010-11-21 08:41:25.000000000 +0000 +++ libmoosex-storage-perl-0.45/t/001_basic.t 2013-12-22 00:48:35.000000000 +0000 @@ -1,9 +1,8 @@ -#!/usr/bin/perl - use strict; use warnings; use Test::More tests => 14; +use Test::Deep; BEGIN { use_ok('MooseX::Storage'); @@ -42,7 +41,7 @@ ); isa_ok( $foo, 'Foo' ); - is_deeply( + cmp_deeply( $foo->pack, { __CLASS__ => 'Foo', @@ -87,8 +86,8 @@ is( $foo->string, 'foo', '... got the right string' ); ok( $foo->boolean, '... got the right boolean' ); is( $foo->float, 10.5, '... got the right float' ); - is_deeply( $foo->array, [ 1 .. 10 ], '... got the right array' ); - is_deeply( + cmp_deeply( $foo->array, [ 1 .. 10 ], '... got the right array' ); + cmp_deeply( $foo->hash, { map { $_ => undef } ( 1 .. 10 ) }, '... got the right hash' @@ -97,6 +96,6 @@ isa_ok( $foo->object, 'Foo' ); is( $foo->object->number, 2, '... got the right number (in the embedded object)' ); - is_deeply( $foo->union, [ 1 .. 3 ], '... got the right array (in the union)' ); + cmp_deeply( $foo->union, [ 1 .. 3 ], '... got the right array (in the union)' ); is( $foo->union2, 'A String', '... got the right string (in the union)' ); } diff -Nru libmoosex-storage-perl-0.33/t/002_basic_io.t libmoosex-storage-perl-0.45/t/002_basic_io.t --- libmoosex-storage-perl-0.33/t/002_basic_io.t 2010-11-21 08:41:25.000000000 +0000 +++ libmoosex-storage-perl-0.45/t/002_basic_io.t 2013-12-22 00:48:35.000000000 +0000 @@ -1,18 +1,15 @@ -#!/usr/bin/perl - use strict; use warnings; use Test::More; +use Test::Deep; use File::Temp qw(tempdir); use File::Spec::Functions; my $dir = tempdir; -use Test::Requires { - 'JSON::Any' => 0.01, # skip all if not installed -}; +use Test::Requires 'JSON::Any'; BEGIN { plan tests => 10; @@ -23,18 +20,18 @@ package Foo; use Moose; use MooseX::Storage; - + with Storage( format => 'JSON', io => 'File', ); - + has 'number' => (is => 'ro', isa => 'Int'); has 'string' => (is => 'ro', isa => 'Str'); - has 'float' => (is => 'ro', isa => 'Num'); + has 'float' => (is => 'ro', isa => 'Num'); has 'array' => (is => 'ro', isa => 'ArrayRef'); - has 'hash' => (is => 'ro', isa => 'HashRef'); - has 'object' => (is => 'ro', isa => 'Object'); + has 'hash' => (is => 'ro', isa => 'HashRef'); + has 'object' => (is => 'ro', isa => 'Object'); } my $file = catfile($dir, 'temp.json'); @@ -46,7 +43,7 @@ float => 10.5, array => [ 1 .. 10 ], hash => { map { $_ => undef } (1 .. 10) }, - object => Foo->new( number => 2 ), + object => Foo->new( number => 2 ), ); isa_ok($foo, 'Foo'); @@ -60,8 +57,8 @@ is($foo->number, 10, '... got the right number'); is($foo->string, 'foo', '... got the right string'); is($foo->float, 10.5, '... got the right float'); - is_deeply($foo->array, [ 1 .. 10], '... got the right array'); - is_deeply($foo->hash, { map { $_ => undef } (1 .. 10) }, '... got the right hash'); + cmp_deeply($foo->array, [ 1 .. 10], '... got the right array'); + cmp_deeply($foo->hash, { map { $_ => undef } (1 .. 10) }, '... got the right hash'); isa_ok($foo->object, 'Foo'); is($foo->object->number, 2, '... got the right number (in the embedded object)'); diff -Nru libmoosex-storage-perl-0.33/t/002_basic_w_subtypes.t libmoosex-storage-perl-0.45/t/002_basic_w_subtypes.t --- libmoosex-storage-perl-0.33/t/002_basic_w_subtypes.t 2010-11-21 08:41:25.000000000 +0000 +++ libmoosex-storage-perl-0.45/t/002_basic_w_subtypes.t 2013-12-22 00:48:35.000000000 +0000 @@ -1,9 +1,8 @@ -#!/usr/bin/perl - use strict; use warnings; use Test::More tests => 11; +use Test::Deep; BEGIN { use_ok('MooseX::Storage'); @@ -11,8 +10,8 @@ =pod -This extends the 001_basic test to -show that subtypes will DWIM in most +This extends the 001_basic test to +show that subtypes will DWIM in most cases. =cut @@ -26,25 +25,25 @@ use Scalar::Util 'looks_like_number'; - with Storage; - - subtype 'Natural' + with Storage; + + subtype 'Natural' => as 'Int' => where { $_ > 0 }; - - subtype 'HalfNum' + + subtype 'HalfNum' => as 'Num' - => where { "$_" =~ /\.5$/ }; - + => where { "$_" =~ /\.5$/ }; + subtype 'FooString' => as 'Str' => where { lc($_) eq 'foo' }; - - subtype 'IntArray' + + subtype 'IntArray' => as 'ArrayRef' => where { scalar grep { looks_like_number($_) } @{$_} }; - subtype 'UndefHash' + subtype 'UndefHash' => as 'HashRef' => where { scalar grep { !defined($_) } values %{$_} }; @@ -66,8 +65,8 @@ object => Foo->new( number => 2 ), ); isa_ok( $foo, 'Foo' ); - - is_deeply( + + cmp_deeply( $foo->pack, { __CLASS__ => 'Foo', @@ -76,10 +75,10 @@ float => 10.5, array => [ 1 .. 10 ], hash => { map { $_ => undef } ( 1 .. 10 ) }, - object => { - __CLASS__ => 'Foo', - number => 2 - }, + object => { + __CLASS__ => 'Foo', + number => 2 + }, }, '... got the right frozen class' ); @@ -94,19 +93,19 @@ float => 10.5, array => [ 1 .. 10 ], hash => { map { $_ => undef } ( 1 .. 10 ) }, - object => { - __CLASS__ => 'Foo', - number => 2 - }, - } + object => { + __CLASS__ => 'Foo', + number => 2 + }, + } ); isa_ok( $foo, 'Foo' ); is( $foo->number, 10, '... got the right number' ); is( $foo->string, 'foo', '... got the right string' ); is( $foo->float, 10.5, '... got the right float' ); - is_deeply( $foo->array, [ 1 .. 10 ], '... got the right array' ); - is_deeply( + cmp_deeply( $foo->array, [ 1 .. 10 ], '... got the right array' ); + cmp_deeply( $foo->hash, { map { $_ => undef } ( 1 .. 10 ) }, '... got the right hash' diff -Nru libmoosex-storage-perl-0.33/t/003_basic_w_embedded_objects.t libmoosex-storage-perl-0.45/t/003_basic_w_embedded_objects.t --- libmoosex-storage-perl-0.33/t/003_basic_w_embedded_objects.t 2010-11-21 08:41:25.000000000 +0000 +++ libmoosex-storage-perl-0.45/t/003_basic_w_embedded_objects.t 2013-12-22 00:48:35.000000000 +0000 @@ -1,9 +1,8 @@ -#!/usr/bin/perl - use strict; use warnings; use Test::More tests => 47; +use Test::Deep; BEGIN { use_ok('MooseX::Storage'); @@ -11,8 +10,8 @@ =pod -This test checks the single level -expansion and collpasing of the +This test checks the single level +expansion and collpasing of the ArrayRef and HashRef type handlers. =cut @@ -23,30 +22,30 @@ use MooseX::Storage; with Storage; - + has 'number' => (is => 'ro', isa => 'Int'); - + package Foo; use Moose; use MooseX::Storage; - with Storage; + with Storage; - has 'bars' => ( - is => 'ro', - isa => 'ArrayRef' + has 'bars' => ( + is => 'ro', + isa => 'ArrayRef' ); - + package Baz; use Moose; use MooseX::Storage; - with Storage; + with Storage; - has 'bars' => ( - is => 'ro', - isa => 'HashRef' - ); + has 'bars' => ( + is => 'ro', + isa => 'HashRef' + ); } { @@ -54,19 +53,19 @@ bars => [ map { Bar->new(number => $_) } (1 .. 10) ] ); isa_ok( $foo, 'Foo' ); - - is_deeply( + + cmp_deeply( $foo->pack, { __CLASS__ => 'Foo', - bars => [ + bars => [ map { { __CLASS__ => 'Bar', number => $_, - } + } } (1 .. 10) - ], + ], }, '... got the right frozen class' ); @@ -76,15 +75,15 @@ my $foo = Foo->unpack( { __CLASS__ => 'Foo', - bars => [ + bars => [ map { { __CLASS__ => 'Bar', number => $_, - } + } } (1 .. 10) - ], - } + ], + } ); isa_ok( $foo, 'Foo' ); @@ -100,8 +99,8 @@ bars => { map { ($_ => Bar->new(number => $_)) } (1 .. 10) } ); isa_ok( $baz, 'Baz' ); - - is_deeply( + + cmp_deeply( $baz->pack, { __CLASS__ => 'Baz', @@ -110,9 +109,9 @@ ($_ => { __CLASS__ => 'Bar', number => $_, - }) + }) } (1 .. 10) - }, + }, }, '... got the right frozen class' ); @@ -127,10 +126,10 @@ ($_ => { __CLASS__ => 'Bar', number => $_, - }) + }) } (1 .. 10) - }, - } + }, + } ); isa_ok( $baz, 'Baz' ); diff -Nru libmoosex-storage-perl-0.33/t/004_w_cycles.t libmoosex-storage-perl-0.45/t/004_w_cycles.t --- libmoosex-storage-perl-0.33/t/004_w_cycles.t 2010-11-21 08:49:22.000000000 +0000 +++ libmoosex-storage-perl-0.45/t/004_w_cycles.t 2013-12-22 00:48:35.000000000 +0000 @@ -1,24 +1,18 @@ -#!/usr/bin/perl - use strict; use warnings; use Test::More tests => 18; +use Test::Deep; use Test::Fatal; BEGIN { use_ok('MooseX::Storage'); } -=pod - -This test demonstrates two things: - -- cycles will not work in the default engine -- you can use a special metaclass to tell - MooseX::Storage to skip an attribute - -=cut +# This test demonstrates two things: +# +# - cycles will not work in the default engine +# - you can use a special metaclass to tell MooseX::Storage to skip an attribute { @@ -34,9 +28,9 @@ { my $circular = Circular->new; isa_ok($circular, 'Circular'); - + $circular->cycle($circular); - + like(exception { $circular->pack; }, qr/^Basic Engine does not support cycles/, @@ -62,19 +56,19 @@ with Storage; has 'node' => (is => 'rw'); - + has 'children' => ( - is => 'ro', - isa => 'ArrayRef', + is => 'ro', + isa => 'ArrayRef', default => sub {[]} ); - + has 'parent' => ( metaclass => 'DoNotSerialize', - is => 'rw', + is => 'rw', isa => 'Tree', ); - + sub add_child { my ($self, $child) = @_; $child->parent($self); @@ -85,28 +79,28 @@ { my $t = Tree->new(node => 100); isa_ok($t, 'Tree'); - - is_deeply( - $t->pack, + + cmp_deeply( + $t->pack, { __CLASS__ => 'Tree', node => 100, children => [], }, '... got the right packed version'); - + my $t2 = Tree->new(node => 200); - isa_ok($t2, 'Tree'); - + isa_ok($t2, 'Tree'); + $t->add_child($t2); - - is_deeply($t->children, [ $t2 ], '... got the right children in $t'); - + + cmp_deeply($t->children, [ $t2 ], '... got the right children in $t'); + is($t2->parent, $t, '... created the cycle correctly'); - isa_ok($t2->parent, 'Tree'); - - is_deeply( - $t->pack, + isa_ok($t2->parent, 'Tree'); + + cmp_deeply( + $t->pack, { __CLASS__ => 'Tree', node => 100, @@ -114,18 +108,18 @@ { __CLASS__ => 'Tree', node => 200, - children => [], - } + children => [], + } ], }, - '... got the right packed version (with parent attribute skipped in child)'); - - is_deeply( - $t2->pack, + '... got the right packed version (with parent attribute skipped in child)'); + + cmp_deeply( + $t2->pack, { __CLASS__ => 'Tree', node => 200, - children => [], + children => [], }, '... got the right packed version (with parent attribute skipped)'); } @@ -135,7 +129,7 @@ use Moose; use MooseX::Storage; with Storage; - + has 'x' => ( is => 'rw', isa => 'HashRef' ); has 'y' => ( is => 'rw', isa => 'HashRef' ); } @@ -154,13 +148,13 @@ ok( Double->unpack( $pack || {} ), " And unpacked again" ); } - + my $pack = $double->pack( engine_traits => [qw/DisableCycleDetection/] ); ok( $pack, " Object packs when cycle check is disabled"); ok( Double->unpack( $pack ), " And unpacked again" ); -} +} ### the same as above, but now done with a trait ### this fails with cycle detection on @@ -168,7 +162,7 @@ use Moose; use MooseX::Storage; with Storage( traits => ['DisableCycleDetection'] ); - + has 'x' => ( is => 'rw', isa => 'HashRef' ); has 'y' => ( is => 'rw', isa => 'HashRef' ); } @@ -180,4 +174,4 @@ ok( $pack, "Object packs with DisableCycleDetection trait"); ok( DoubleNoCycle->unpack( $pack ), " Unpacked again" ); -} +} diff -Nru libmoosex-storage-perl-0.33/t/005_w_versions_and_authority_check.t libmoosex-storage-perl-0.45/t/005_w_versions_and_authority_check.t --- libmoosex-storage-perl-0.33/t/005_w_versions_and_authority_check.t 2010-11-21 08:49:22.000000000 +0000 +++ libmoosex-storage-perl-0.45/t/005_w_versions_and_authority_check.t 2013-12-22 00:48:35.000000000 +0000 @@ -1,9 +1,8 @@ -#!/usr/bin/perl - use strict; use warnings; use Test::More tests => 8; +use Test::Deep; use Test::Fatal; BEGIN { @@ -12,7 +11,7 @@ =pod -This tests that the version and authority +This tests that the version and authority checks are performed upon object expansion. =cut @@ -21,27 +20,27 @@ package Bar; use Moose; use MooseX::Storage; - + our $VERSION = '0.01'; our $AUTHORITY = 'cpan:JRANDOM'; with Storage; - + has 'number' => (is => 'ro', isa => 'Int'); - + package Foo; use Moose; use MooseX::Storage; our $VERSION = '0.01'; - our $AUTHORITY = 'cpan:JRANDOM'; + our $AUTHORITY = 'cpan:JRANDOM'; - with Storage; + with Storage; - has 'bar' => ( - is => 'ro', - isa => 'Bar' - ); + has 'bar' => ( + is => 'ro', + isa => 'Bar' + ); } { @@ -49,15 +48,15 @@ bar => Bar->new(number => 1) ); isa_ok( $foo, 'Foo' ); - - is_deeply( + + cmp_deeply( $foo->pack, { __CLASS__ => 'Foo-0.01-cpan:JRANDOM', bar => { __CLASS__ => 'Bar-0.01-cpan:JRANDOM', number => 1, - } + } }, '... got the right frozen class' ); @@ -70,16 +69,16 @@ bar => { __CLASS__ => 'Bar-0.01-cpan:JRANDOM', number => 1, - } - }, + } + }, ); isa_ok( $foo, 'Foo' ); isa_ok( $foo->bar, 'Bar' ); is( $foo->bar->number, 1 , '... got the right number too' ); - + } -Moose::Meta::Class->create('Bar', +Moose::Meta::Class->create('Bar', version => '0.02', authority => 'cpan:JRANDOM', ); @@ -91,12 +90,12 @@ bar => { __CLASS__ => 'Bar-0.01-cpan:JRANDOM', number => 1, - } - } + } + } ); }, '... could not unpack, versions are different ' . $@); -Moose::Meta::Class->create('Bar', +Moose::Meta::Class->create('Bar', version => '0.01', authority => 'cpan:DSTATIC', ); @@ -108,7 +107,7 @@ bar => { __CLASS__ => 'Bar-0.01-cpan:JRANDOM', number => 1, - } - } + } + } ); }, '... could not unpack, authorities are different'); diff -Nru libmoosex-storage-perl-0.33/t/006_w_custom_type_handlers.t libmoosex-storage-perl-0.45/t/006_w_custom_type_handlers.t --- libmoosex-storage-perl-0.33/t/006_w_custom_type_handlers.t 2010-11-21 08:49:22.000000000 +0000 +++ libmoosex-storage-perl-0.45/t/006_w_custom_type_handlers.t 2013-12-22 00:48:35.000000000 +0000 @@ -1,36 +1,35 @@ -#!/usr/bin/perl - use strict; use warnings; use Test::More tests => 9; +use Test::Deep; use Test::Fatal; BEGIN { use_ok('MooseX::Storage'); - use_ok('MooseX::Storage::Engine'); + use_ok('MooseX::Storage::Engine'); } =pod -This is just a simple example of defining +This is just a simple example of defining a custom type handler to take care of custom -inflate and deflate needs. +inflate and deflate needs. =cut { package Bar; use Moose; - + has 'baz' => (is => 'rw', isa => 'Str'); - has 'boo' => (is => 'rw', isa => 'Str'); - + has 'boo' => (is => 'rw', isa => 'Str'); + sub encode { my $self = shift; $self->baz . '|' . $self->boo; } - + sub decode { my ($class, $packed) = @_; my ($baz, $boo) = split /\|/ => $packed; @@ -39,20 +38,20 @@ boo => $boo, ); } - + MooseX::Storage::Engine->add_custom_type_handler( 'Bar' => ( expand => sub { Bar->decode(shift) }, collapse => sub { (shift)->encode }, ) ); - + package Foo; use Moose; use MooseX::Storage; - + with Storage; - + has 'bar' => ( is => 'ro', isa => 'Bar', @@ -67,7 +66,7 @@ isa_ok($foo->bar, 'Bar'); -is_deeply( +cmp_deeply( $foo->pack, { __CLASS__ => "Foo", @@ -81,9 +80,9 @@ bar => "BAZ|BOO", }); isa_ok($foo, 'Foo'); - - isa_ok($foo->bar, 'Bar'); - + + isa_ok($foo->bar, 'Bar'); + is($foo->bar->baz, 'BAZ', '... got the right stuff'); is($foo->bar->boo, 'BOO', '... got the right stuff'); } diff -Nru libmoosex-storage-perl-0.33/t/007_false.t libmoosex-storage-perl-0.45/t/007_false.t --- libmoosex-storage-perl-0.33/t/007_false.t 2010-11-21 08:41:25.000000000 +0000 +++ libmoosex-storage-perl-0.45/t/007_false.t 2013-12-22 00:48:35.000000000 +0000 @@ -1,9 +1,8 @@ -#!/usr/bin/perl - use strict; use warnings; use Test::More tests => 8; +use Test::Deep; BEGIN { use_ok('MooseX::Storage'); @@ -29,10 +28,10 @@ boolean => 0, ); isa_ok( $foo, 'Foo' ); - + is($foo->boolean, 0, '... got the right boolean value'); - - is_deeply( + + cmp_deeply( $foo->pack, { __CLASS__ => 'Foo', @@ -51,7 +50,7 @@ number => 0, string => '', boolean => 0, - } + } ); isa_ok( $foo, 'Foo' ); diff -Nru libmoosex-storage-perl-0.33/t/008_do_not_serialize.t libmoosex-storage-perl-0.45/t/008_do_not_serialize.t --- libmoosex-storage-perl-0.33/t/008_do_not_serialize.t 2010-11-21 08:49:22.000000000 +0000 +++ libmoosex-storage-perl-0.45/t/008_do_not_serialize.t 2013-12-22 00:48:35.000000000 +0000 @@ -1,9 +1,8 @@ -#!/usr/bin/perl - use strict; use warnings; use Test::More tests => 13; +use Test::Deep; use Test::Fatal; BEGIN { @@ -20,31 +19,31 @@ has 'bar' => ( metaclass => 'DoNotSerialize', is => 'rw', - default => sub { 'BAR' } + default => sub { 'BAR' } ); - + has 'baz' => ( traits => [ 'DoNotSerialize' ], is => 'rw', - default => sub { 'BAZ' } - ); - + default => sub { 'BAZ' } + ); + has 'gorch' => ( - is => 'rw', + is => 'rw', default => sub { 'GORCH' } - ); + ); 1; } { my $foo = Foo->new; isa_ok($foo, 'Foo'); - + is($foo->bar, 'BAR', '... got the value we expected'); is($foo->baz, 'BAZ', '... got the value we expected'); is($foo->gorch, 'GORCH', '... got the value we expected'); - - is_deeply( + + cmp_deeply( $foo->pack, { __CLASS__ => 'Foo', @@ -67,36 +66,36 @@ is => 'rw', isa => 'Object', # type constraint is important ); - + has zot => ( default => sub { $$ }, is => 'rw', - ); + ); } { my $obj = bless {}; my $bar = Bar->new( foo => $obj ); - + ok( $bar, "New object created" ); is( $bar->foo, $obj, " ->foo => $obj" ); is( $bar->zot, $$, " ->zot => $$" ); - + my $bpack = $bar->pack; - is_deeply( + cmp_deeply( $bpack, { __CLASS__ => 'Bar', zot => $$, }, " Packed correctly" ); - + eval { Bar->unpack( $bpack ) }; ok( $@, " Unpack without required attribute fails" ); like( $@, qr/foo/, " Proper error recorded" ); - + my $bar2 = Bar->unpack( $bpack, inject => { foo => bless {} } ); - ok( $bar2, " Unpacked correctly with foo => Object"); -} - - - - + ok( $bar2, " Unpacked correctly with foo => Object"); +} + + + + diff -Nru libmoosex-storage-perl-0.33/t/009_do_not_serialize_lazy.t libmoosex-storage-perl-0.45/t/009_do_not_serialize_lazy.t --- libmoosex-storage-perl-0.33/t/009_do_not_serialize_lazy.t 2010-11-21 08:49:22.000000000 +0000 +++ libmoosex-storage-perl-0.45/t/009_do_not_serialize_lazy.t 2013-12-22 00:48:35.000000000 +0000 @@ -1,9 +1,8 @@ -#!/usr/bin/perl - use strict; use warnings; use Test::More 'no_plan';#tests => 6; +use Test::Deep; use Test::Fatal; BEGIN { @@ -19,8 +18,8 @@ has 'x' => (is => 'rw', lazy_build => 1 ); has 'y' => (is => 'rw', lazy_build => 1 ); has 'z' => (is => 'rw', builder => '_build_z' ); - - + + sub _build_x { 'x' } sub _build_y { 'y' } sub _build_z { 'z' } @@ -37,8 +36,8 @@ is( $href->{'z'}, 'z', " z => z" ); ok( not(exists($href->{'y'})), " y does not exist" ); -is_deeply( - $href, +cmp_deeply( + $href, { '__CLASS__' => 'Point', 'x' => $$, 'z' => 'z' diff -Nru libmoosex-storage-perl-0.33/t/010_basic_json.t libmoosex-storage-perl-0.45/t/010_basic_json.t --- libmoosex-storage-perl-0.33/t/010_basic_json.t 2010-11-21 08:41:25.000000000 +0000 +++ libmoosex-storage-perl-0.45/t/010_basic_json.t 2013-12-22 00:48:35.000000000 +0000 @@ -1,17 +1,16 @@ -#!/usr/bin/perl - use strict; use warnings; use Test::More; +use Test::Deep; -use Test::Requires { - 'Test::JSON' => 0.01, # skip all if not installed - 'JSON::Any' => 0.01, -}; +use Test::Requires qw( + JSON::Any + Test::Deep::JSON +); BEGIN { - plan tests => 12; + plan tests => 11; use_ok('MooseX::Storage'); } @@ -44,15 +43,22 @@ my $json = $foo->freeze; - is_valid_json($json, '.. this is valid JSON'); - - - is_json( + cmp_deeply( $json, -'{"array":[1,2,3,4,5,6,7,8,9,10],"hash":{"6":null,"3":null,"7":null,"9":null,"2":null,"8":null,"1":null,"4":null,"10":null,"5":null},"float":10.5,"object":{"number":2,"__CLASS__":"Foo"},"number":10,"__CLASS__":"Foo","string":"foo"}', - '... got the right JSON' + json({ + number => 10, + string => 'foo', + float => 10.5, + array => [ 1 .. 10 ], + hash => { map { $_ => undef } (1 .. 10) }, + __CLASS__ => 'Foo', + object => { + number => 2, + __CLASS__ => 'Foo' + }, + }), + 'is valid JSON and content matches', ); - } { @@ -65,8 +71,8 @@ is( $foo->number, 10, '... got the right number' ); is( $foo->string, 'foo', '... got the right string' ); is( $foo->float, 10.5, '... got the right float' ); - is_deeply( $foo->array, [ 1 .. 10 ], '... got the right array' ); - is_deeply( + cmp_deeply( $foo->array, [ 1 .. 10 ], '... got the right array' ); + cmp_deeply( $foo->hash, { map { $_ => undef } ( 1 .. 10 ) }, '... got the right hash' diff -Nru libmoosex-storage-perl-0.33/t/011_basic_json_w_utf8.t libmoosex-storage-perl-0.45/t/011_basic_json_w_utf8.t --- libmoosex-storage-perl-0.33/t/011_basic_json_w_utf8.t 2013-03-30 01:18:24.000000000 +0000 +++ libmoosex-storage-perl-0.45/t/011_basic_json_w_utf8.t 2013-12-22 00:48:35.000000000 +0000 @@ -1,37 +1,32 @@ -#!/usr/bin/perl - use strict; use warnings; use Test::More; -use Test::Requires { - 'Encode' => 0.01, # skip all if not installed - 'JSON::Any' => 0.01, -}; - +# NOTE: +# this is because JSON::XS (and Cpanel::JSON::XS) is +# the only one which really gets utf8 correct +# - SL BEGIN { - # NOTE: - # this is because JSON::XS is - # the only one which really gets - # utf8 correct - # - SL - BEGIN { - $ENV{JSON_ANY_ORDER} = qw(XS); - $ENV{JSON_ANY_CONFIG} = "utf8=0,canonical=1"; - } - - plan tests => 16; - use_ok('MooseX::Storage'); + $ENV{JSON_ANY_ORDER} = 'XS CPANEL'; + $ENV{JSON_ANY_CONFIG} = "utf8=0,canonical=1"; } +use Test::Requires qw( + Encode + JSON::Any +); + +plan tests => 16; +use_ok('MooseX::Storage'); + { package Foo; use Moose; use MooseX::Storage; with Storage( 'format' => 'JSON' ); - + has 'utf8_string' => ( is => 'rw', isa => 'Str', @@ -51,14 +46,14 @@ my $foo2 = Foo->thaw($json); isa_ok( $foo, 'Foo' ); - - is($foo2->utf8_string, - "ネットスーパー (Internet Shopping)", + + is($foo2->utf8_string, + "ネットスーパー (Internet Shopping)", '... got the string we expected'); - + is($foo2->freeze, '{"__CLASS__":"Foo","utf8_string":"ネットスーパー (Internet Shopping)"}', - '... got the right JSON'); + '... got the right JSON'); } { @@ -68,15 +63,15 @@ $test_string = "ネットスーパー (Internet Shopping)"; no utf8; } - + ok(utf8::is_utf8($test_string), '... got a utf8 string'); - ok(utf8::valid($test_string), '... got a valid utf8 string'); - + ok(utf8::valid($test_string), '... got a valid utf8 string'); + Encode::_utf8_off($test_string); - + ok(!utf8::is_utf8($test_string), '... no longer is utf8 string'); - ok(utf8::valid($test_string), '... got a valid utf8 string'); - + ok(utf8::valid($test_string), '... got a valid utf8 string'); + my $foo = Foo->new( utf8_string => $test_string ); @@ -86,11 +81,11 @@ ok(utf8::valid($foo->utf8_string), '... but is a valid utf8 string'); my $json = $foo->freeze; - + ok(utf8::is_utf8($json), '... is a utf8 string now'); - ok(utf8::valid($json), '... got a valid utf8 string'); + ok(utf8::valid($json), '... got a valid utf8 string'); is($json, '{"__CLASS__":"Foo","utf8_string":"ネットスーパー (Internet Shopping)"}', - '... got the right JSON'); + '... got the right JSON'); } diff -Nru libmoosex-storage-perl-0.33/t/012_param_json.t libmoosex-storage-perl-0.45/t/012_param_json.t --- libmoosex-storage-perl-0.33/t/012_param_json.t 2010-11-21 08:41:25.000000000 +0000 +++ libmoosex-storage-perl-0.45/t/012_param_json.t 2013-12-22 00:48:35.000000000 +0000 @@ -1,13 +1,10 @@ -#!/usr/bin/perl - use strict; use warnings; use Test::More; +use Test::Deep; -use Test::Requires { - 'MooseX::Storage::Format::JSONpm' => 0.01, # skip all if not installed -}; +use Test::Requires 'MooseX::Storage::Format::JSONpm'; BEGIN { plan tests => 6; @@ -64,7 +61,7 @@ my $json = eval { Bar->new(x => 10, y => 20)->freeze({ format => $p }) }; - is_deeply( + cmp_deeply( JSON->new->decode($json), { '__CLASS__' => 'Bar-0.01', diff -Nru libmoosex-storage-perl-0.33/t/020_basic_yaml.t libmoosex-storage-perl-0.45/t/020_basic_yaml.t --- libmoosex-storage-perl-0.33/t/020_basic_yaml.t 2010-11-21 08:41:25.000000000 +0000 +++ libmoosex-storage-perl-0.45/t/020_basic_yaml.t 2013-12-22 00:48:35.000000000 +0000 @@ -1,15 +1,15 @@ -#!/usr/bin/perl $|++; use strict; use warnings; use Test::More; +use Test::Deep; -use Test::Requires { - 'YAML::Any' => 0.01, # skip all if not installed - 'YAML' => 0.01, - 'Test::Without::Module' => 0.01, -}; +use Test::Requires qw( + YAML::Any + YAML + Test::Without::Module +); BEGIN { Test::Without::Module->import(YAML::Any->order); @@ -53,8 +53,8 @@ is( $bar->number, 10, '... got the right number' ); is( $bar->string, 'foo', '... got the right string' ); is( $bar->float, 10.5, '... got the right float' ); - is_deeply( $bar->array, [ 1 .. 10 ], '... got the right array' ); - is_deeply( + cmp_deeply( $bar->array, [ 1 .. 10 ], '... got the right array' ); + cmp_deeply( $bar->hash, { map { $_ => undef } ( 1 .. 10 ) }, '... got the right hash' diff -Nru libmoosex-storage-perl-0.33/t/020_basic_yaml_syck.t libmoosex-storage-perl-0.45/t/020_basic_yaml_syck.t --- libmoosex-storage-perl-0.33/t/020_basic_yaml_syck.t 2010-11-21 08:41:25.000000000 +0000 +++ libmoosex-storage-perl-0.45/t/020_basic_yaml_syck.t 2013-12-22 00:48:35.000000000 +0000 @@ -1,15 +1,15 @@ -#!/usr/bin/perl $|++; use strict; use warnings; use Test::More; +use Test::Deep; -use Test::Requires { - 'YAML::Any' => 0.01, # skip all if not installed - 'YAML::Syck' => 0.01, - 'Test::Without::Module' => 0.01, -}; +use Test::Requires qw( + YAML::Any + YAML::Syck + Test::Without::Module +); BEGIN { Test::Without::Module->import(YAML::Any->order); @@ -52,8 +52,8 @@ is( $bar->number, 10, '... got the right number' ); is( $bar->string, 'foo', '... got the right string' ); is( $bar->float, 10.5, '... got the right float' ); - is_deeply( $bar->array, [ 1 .. 10 ], '... got the right array' ); - is_deeply( + cmp_deeply( $bar->array, [ 1 .. 10 ], '... got the right array' ); + cmp_deeply( $bar->hash, { map { $_ => undef } ( 1 .. 10 ) }, '... got the right hash' diff -Nru libmoosex-storage-perl-0.33/t/020_basic_yaml_xs.t libmoosex-storage-perl-0.45/t/020_basic_yaml_xs.t --- libmoosex-storage-perl-0.33/t/020_basic_yaml_xs.t 2010-11-21 08:41:25.000000000 +0000 +++ libmoosex-storage-perl-0.45/t/020_basic_yaml_xs.t 2013-12-22 00:48:35.000000000 +0000 @@ -1,15 +1,15 @@ -#!/usr/bin/perl $|++; use strict; use warnings; use Test::More; +use Test::Deep; -use Test::Requires { - 'YAML::Any' => 0.01, # skip all if not installed - 'YAML::XS' => 0.01, - 'Test::Without::Module' => 0.01, -}; +use Test::Requires qw( + YAML::Any + YAML::XS + Test::Without::Module +); BEGIN { Test::Without::Module->import(YAML::Any->order); @@ -52,8 +52,8 @@ is( $bar->number, 10, '... got the right number' ); is( $bar->string, 'foo', '... got the right string' ); is( $bar->float, 10.5, '... got the right float' ); - is_deeply( $bar->array, [ 1 .. 10 ], '... got the right array' ); - is_deeply( + cmp_deeply( $bar->array, [ 1 .. 10 ], '... got the right array' ); + cmp_deeply( $bar->hash, { map { $_ => undef } ( 1 .. 10 ) }, '... got the right hash' diff -Nru libmoosex-storage-perl-0.33/t/030_with_checksum.t libmoosex-storage-perl-0.45/t/030_with_checksum.t --- libmoosex-storage-perl-0.33/t/030_with_checksum.t 2013-03-30 01:18:24.000000000 +0000 +++ libmoosex-storage-perl-0.45/t/030_with_checksum.t 2013-12-22 00:48:35.000000000 +0000 @@ -1,5 +1,3 @@ -#!/usr/bin/perl - use strict; use warnings; @@ -7,11 +5,11 @@ use Test::Fatal; use Test::Deep; -use Test::Requires { - 'Digest' => 0.01, # skip all if not installed - 'Digest::SHA' => 0.00, - 'JSON::Any' => 0.01, -}; +use Test::Requires qw( + Digest + Digest::SHA + JSON::Any +); BEGIN { plan tests => 26; @@ -43,9 +41,9 @@ object => Foo->new( number => 2 ), ); isa_ok( $foo, 'Foo' ); - + my $packed = $foo->pack; - + cmp_deeply( $packed, { @@ -56,11 +54,11 @@ float => 10.5, array => [ 1 .. 10 ], hash => { map { $_ => undef } ( 1 .. 10 ) }, - object => { - __CLASS__ => 'Foo', - __DIGEST__ => re('[0-9a-f]+'), - number => 2 - }, + object => { + __CLASS__ => 'Foo', + __DIGEST__ => re('[0-9a-f]+'), + number => 2 + }, }, '... got the right frozen class' ); @@ -70,7 +68,7 @@ $foo2 = Foo->unpack($packed); }, undef, '... unpacked okay'); isa_ok($foo2, 'Foo'); - + cmp_deeply( $foo2->pack, { @@ -81,14 +79,14 @@ float => 10.5, array => [ 1 .. 10 ], hash => { map { $_ => undef } ( 1 .. 10 ) }, - object => { - __CLASS__ => 'Foo', - __DIGEST__ => re('[0-9a-f]+'), - number => 2 - }, + object => { + __CLASS__ => 'Foo', + __DIGEST__ => re('[0-9a-f]+'), + number => 2 + }, }, '... got the right frozen class' - ); + ); } { @@ -118,7 +116,12 @@ SKIP: { eval { require Digest::HMAC_SHA1 }; - skip join( " ", "no Digest::HMAC", ( $@ =~ /\@INC/ ? () : do { chomp(my $e = $@); "($e)" } ) ), 15 if $@; + if ($@) + { + my $message = join( " ", "no Digest::HMAC", ( $@ =~ /\@INC/ ? () : do { chomp(my $e = $@); "($e)" } ) ); + die $message if $ENV{AUTHOR_TESTING}; + skip $message, 15; + } local $::DEBUG = 1; diff -Nru libmoosex-storage-perl-0.33/t/040_basic_utils.t libmoosex-storage-perl-0.45/t/040_basic_utils.t --- libmoosex-storage-perl-0.33/t/040_basic_utils.t 2010-11-21 08:41:25.000000000 +0000 +++ libmoosex-storage-perl-0.45/t/040_basic_utils.t 2013-12-22 00:48:35.000000000 +0000 @@ -1,5 +1,3 @@ -#!/usr/bin/perl - use strict; use warnings; @@ -7,7 +5,7 @@ BEGIN { use_ok('MooseX::Storage'); - use_ok('MooseX::Storage::Util'); + use_ok('MooseX::Storage::Util'); } my $packed = { @@ -17,16 +15,16 @@ float => 10.5, array => [ 1 .. 10 ], hash => { map { $_ => undef } ( 1 .. 10 ) }, - object => { - __CLASS__ => 'Foo', - number => 2 - }, + object => { + __CLASS__ => 'Foo', + number => 2 + }, }; my $json = '{"array":[1,2,3,4,5,6,7,8,9,10],"hash":{"6":null,"3":null,"7":null,"9":null,"2":null,"8":null,"1":null,"4":null,"10":null,"5":null},"float":10.5,"object":{"number":2,"__CLASS__":"Foo"},"number":10,"__CLASS__":"Foo","string":"foo"}'; -my $yaml = q{--- +my $yaml = q{--- __CLASS__: Foo -array: +array: - 1 - 2 - 3 @@ -38,7 +36,7 @@ - 9 - 10 float: 10.5 -hash: +hash: 1: ~ 10: ~ 2: ~ @@ -50,38 +48,38 @@ 8: ~ 9: ~ number: 10 -object: +object: __CLASS__: Foo number: 2 string: foo }; -is('Foo', MooseX::Storage::Util->peek($packed), +is('Foo', MooseX::Storage::Util->peek($packed), '... got the right class name from the packed item'); SKIP: { - my $classname = eval { - MooseX::Storage::Util->peek($json => ('format' => 'JSON')) + my $classname = eval { + MooseX::Storage::Util->peek($json => ('format' => 'JSON')) }; if ($@ =~ /^Could not load JSON module because/) { + die 'No JSON module found' if $ENV{AUTHOR_TESTING}; skip "No JSON module found", 1; } - is('Foo', $classname, + is('Foo', $classname, '... got the right class name from the json item'); } SKIP: { - my $classname = eval { + my $classname = eval { MooseX::Storage::Util->peek($yaml => ('format' => 'YAML')) }; - if ($@ =~ /^Could not load YAML module because/ - or $@ =~ /^Can't locate Best/ - ) { + if ($@ =~ /^Could not load YAML module because/) { + die 'No YAML module found' if $ENV{AUTHOR_TESTING}; skip "No YAML module found", 1; - } - - is('Foo', $classname, + } + + is('Foo', $classname, '... got the right class name from the yaml item'); } diff -Nru libmoosex-storage-perl-0.33/t/050_basic_storable.t libmoosex-storage-perl-0.45/t/050_basic_storable.t --- libmoosex-storage-perl-0.33/t/050_basic_storable.t 2010-11-21 08:41:25.000000000 +0000 +++ libmoosex-storage-perl-0.45/t/050_basic_storable.t 2013-12-22 00:48:35.000000000 +0000 @@ -1,9 +1,9 @@ -#!/usr/bin/perl $|++; use strict; use warnings; use Test::More tests => 11; +use Test::Deep; use Storable; BEGIN { @@ -36,19 +36,19 @@ object => Foo->new( number => 2 ), ); isa_ok( $foo, 'Foo' ); - + my $stored = $foo->freeze; my $struct = Storable::thaw($stored); - is_deeply( + cmp_deeply( $struct, { '__CLASS__' => 'Foo', 'float' => 10.5, 'number' => 10, - 'string' => 'foo', + 'string' => 'foo', 'array' => [ 1 .. 10], - 'hash' => { map { $_ => undef } 1 .. 10 }, + 'hash' => { map { $_ => undef } 1 .. 10 }, 'object' => { '__CLASS__' => 'Foo', 'number' => 2 @@ -63,23 +63,23 @@ '__CLASS__' => 'Foo', 'float' => 10.5, 'number' => 10, - 'string' => 'foo', + 'string' => 'foo', 'array' => [ 1 .. 10], - 'hash' => { map { $_ => undef } 1 .. 10 }, + 'hash' => { map { $_ => undef } 1 .. 10 }, 'object' => { '__CLASS__' => 'Foo', 'number' => 2 }, }); - + my $foo = Foo->thaw($stored); isa_ok( $foo, 'Foo' ); is( $foo->number, 10, '... got the right number' ); is( $foo->string, 'foo', '... got the right string' ); is( $foo->float, 10.5, '... got the right float' ); - is_deeply( $foo->array, [ 1 .. 10 ], '... got the right array' ); - is_deeply( + cmp_deeply( $foo->array, [ 1 .. 10 ], '... got the right array' ); + cmp_deeply( $foo->hash, { map { $_ => undef } ( 1 .. 10 ) }, '... got the right hash' diff -Nru libmoosex-storage-perl-0.33/t/060_basic_deferred.t libmoosex-storage-perl-0.45/t/060_basic_deferred.t --- libmoosex-storage-perl-0.33/t/060_basic_deferred.t 2010-11-21 08:41:25.000000000 +0000 +++ libmoosex-storage-perl-0.45/t/060_basic_deferred.t 2013-12-22 00:48:35.000000000 +0000 @@ -1,20 +1,19 @@ -#!/usr/bin/perl - $|++; use strict; use warnings; use Test::More; +use Test::Deep; use Storable; -use Test::Requires { - 'Test::JSON' => 0.01, # skip all if not installed - 'JSON::Any' => 0.01, - 'YAML::Any' => 0.01, -}; +use Test::Requires qw( + Test::Deep::JSON + JSON::Any + YAML::Any +); BEGIN { - plan tests => 31; + plan tests => 30; use_ok('MooseX::Storage'); } @@ -48,11 +47,20 @@ my $json = $foo->freeze({ 'format' => 'JSON' }); - is_valid_json($json, '.. this is valid JSON'); - - is_json( + cmp_deeply( $json, -'{"array":[1,2,3,4,5,6,7,8,9,10],"hash":{"6":null,"3":null,"7":null,"9":null,"2":null,"8":null,"1":null,"4":null,"10":null,"5":null},"float":10.5,"object":{"number":2,"__CLASS__":"Foo"},"number":10,"__CLASS__":"Foo","string":"foo"}', + json({ + number => 10, + string => 'foo', + float => 10.5, + array => [ 1 .. 10 ], + hash => { map { $_ => undef } ( 1 .. 10 ) }, + __CLASS__ => 'Foo', + object => { + number => 2, + __CLASS__ => 'Foo' + }, + }), '... got the right JSON' ); } @@ -60,15 +68,15 @@ { my $foo = Foo->thaw( '{"array":[1,2,3,4,5,6,7,8,9,10],"hash":{"6":null,"3":null,"7":null,"9":null,"2":null,"8":null,"1":null,"4":null,"10":null,"5":null},"float":10.5,"object":{"number":2,"__CLASS__":"Foo"},"number":10,"__CLASS__":"Foo","string":"foo"}', - { 'format' => 'JSON' } + { 'format' => 'JSON' } ); isa_ok( $foo, 'Foo' ); is( $foo->number, 10, '... got the right number' ); is( $foo->string, 'foo', '... got the right string' ); is( $foo->float, 10.5, '... got the right float' ); - is_deeply( $foo->array, [ 1 .. 10 ], '... got the right array' ); - is_deeply( + cmp_deeply( $foo->array, [ 1 .. 10 ], '... got the right array' ); + cmp_deeply( $foo->hash, { map { $_ => undef } ( 1 .. 10 ) }, '... got the right hash' @@ -89,19 +97,19 @@ object => Foo->new( number => 2 ), ); isa_ok( $foo, 'Foo' ); - + my $stored = $foo->freeze({ 'format' => 'Storable' }); my $struct = Storable::thaw($stored); - is_deeply( + cmp_deeply( $struct, { '__CLASS__' => 'Foo', 'float' => 10.5, 'number' => 10, - 'string' => 'foo', + 'string' => 'foo', 'array' => [ 1 .. 10], - 'hash' => { map { $_ => undef } 1 .. 10 }, + 'hash' => { map { $_ => undef } 1 .. 10 }, 'object' => { '__CLASS__' => 'Foo', 'number' => 2 @@ -116,23 +124,23 @@ '__CLASS__' => 'Foo', 'float' => 10.5, 'number' => 10, - 'string' => 'foo', + 'string' => 'foo', 'array' => [ 1 .. 10], - 'hash' => { map { $_ => undef } 1 .. 10 }, + 'hash' => { map { $_ => undef } 1 .. 10 }, 'object' => { '__CLASS__' => 'Foo', 'number' => 2 }, }); - + my $foo = Foo->thaw($stored, { 'format' => 'Storable' }); isa_ok( $foo, 'Foo' ); is( $foo->number, 10, '... got the right number' ); is( $foo->string, 'foo', '... got the right string' ); is( $foo->float, 10.5, '... got the right float' ); - is_deeply( $foo->array, [ 1 .. 10 ], '... got the right array' ); - is_deeply( + cmp_deeply( $foo->array, [ 1 .. 10 ], '... got the right array' ); + cmp_deeply( $foo->hash, { map { $_ => undef } ( 1 .. 10 ) }, '... got the right hash' @@ -162,8 +170,8 @@ is( $bar->number, 10, '... got the right number' ); is( $bar->string, 'foo', '... got the right string' ); is( $bar->float, 10.5, '... got the right float' ); - is_deeply( $bar->array, [ 1 .. 10 ], '... got the right array' ); - is_deeply( + cmp_deeply( $bar->array, [ 1 .. 10 ], '... got the right array' ); + cmp_deeply( $bar->hash, { map { $_ => undef } ( 1 .. 10 ) }, '... got the right hash' diff -Nru libmoosex-storage-perl-0.33/t/061_basic_deferred_w_io.t libmoosex-storage-perl-0.45/t/061_basic_deferred_w_io.t --- libmoosex-storage-perl-0.33/t/061_basic_deferred_w_io.t 2010-11-21 08:41:25.000000000 +0000 +++ libmoosex-storage-perl-0.45/t/061_basic_deferred_w_io.t 2013-12-22 00:48:35.000000000 +0000 @@ -1,18 +1,17 @@ -#!/usr/bin/perl - use strict; use warnings; use Test::More; +use Test::Deep; use File::Temp qw(tempdir); use File::Spec::Functions; my $dir = tempdir; -use Test::Requires { - 'IO::AtomicFile' => 0.01, # skip all if not installed - 'JSON::Any' => 0.01, -}; +use Test::Requires qw( + IO::AtomicFile + JSON::Any +); BEGIN { plan tests => 20; @@ -23,15 +22,15 @@ package Foo; use Moose; use MooseX::Storage; - + with 'MooseX::Storage::Deferred'; - + has 'number' => (is => 'ro', isa => 'Int'); has 'string' => (is => 'ro', isa => 'Str'); - has 'float' => (is => 'ro', isa => 'Num'); + has 'float' => (is => 'ro', isa => 'Num'); has 'array' => (is => 'ro', isa => 'ArrayRef'); - has 'hash' => (is => 'ro', isa => 'HashRef'); - has 'object' => (is => 'ro', isa => 'Object'); + has 'hash' => (is => 'ro', isa => 'HashRef'); + has 'object' => (is => 'ro', isa => 'Object'); } my $file = catfile($dir, 'temp.json'); @@ -43,7 +42,7 @@ float => 10.5, array => [ 1 .. 10 ], hash => { map { $_ => undef } (1 .. 10) }, - object => Foo->new( number => 2 ), + object => Foo->new( number => 2 ), ); isa_ok($foo, 'Foo'); @@ -57,8 +56,8 @@ is($foo->number, 10, '... got the right number'); is($foo->string, 'foo', '... got the right string'); is($foo->float, 10.5, '... got the right float'); - is_deeply($foo->array, [ 1 .. 10], '... got the right array'); - is_deeply($foo->hash, { map { $_ => undef } (1 .. 10) }, '... got the right hash'); + cmp_deeply($foo->array, [ 1 .. 10], '... got the right array'); + cmp_deeply($foo->hash, { map { $_ => undef } (1 .. 10) }, '... got the right hash'); isa_ok($foo->object, 'Foo'); is($foo->object->number, 2, '... got the right number (in the embedded object)'); @@ -74,7 +73,7 @@ float => 10.5, array => [ 1 .. 10 ], hash => { map { $_ => undef } (1 .. 10) }, - object => Foo->new( number => 2 ), + object => Foo->new( number => 2 ), ); isa_ok($foo, 'Foo'); @@ -88,8 +87,8 @@ is($foo->number, 10, '... got the right number'); is($foo->string, 'foo', '... got the right string'); is($foo->float, 10.5, '... got the right float'); - is_deeply($foo->array, [ 1 .. 10], '... got the right array'); - is_deeply($foo->hash, { map { $_ => undef } (1 .. 10) }, '... got the right hash'); + cmp_deeply($foo->array, [ 1 .. 10], '... got the right array'); + cmp_deeply($foo->hash, { map { $_ => undef } (1 .. 10) }, '... got the right hash'); isa_ok($foo->object, 'Foo'); is($foo->object->number, 2, '... got the right number (in the embedded object)'); diff -Nru libmoosex-storage-perl-0.33/t/070_basic_maybe.t libmoosex-storage-perl-0.45/t/070_basic_maybe.t --- libmoosex-storage-perl-0.33/t/070_basic_maybe.t 2010-11-21 08:41:25.000000000 +0000 +++ libmoosex-storage-perl-0.45/t/070_basic_maybe.t 2013-12-22 00:48:35.000000000 +0000 @@ -1,9 +1,8 @@ -#!/usr/bin/perl - use strict; use warnings; use Test::More tests => 22; +use Test::Deep; BEGIN { use_ok('MooseX::Storage'); @@ -37,8 +36,8 @@ object => Foo->new( number => 2 ), ); isa_ok( $foo, 'Foo' ); - - is_deeply( + + cmp_deeply( $foo->pack, { __CLASS__ => 'Foo', @@ -48,10 +47,10 @@ float => 10.5, array => [ 1 .. 10 ], hash => { map { $_ => undef } ( 1 .. 10 ) }, - object => { - __CLASS__ => 'Foo', - number => 2 - }, + object => { + __CLASS__ => 'Foo', + number => 2 + }, }, '... got the right frozen class' ); @@ -67,11 +66,11 @@ float => 10.5, array => [ 1 .. 10 ], hash => { map { $_ => undef } ( 1 .. 10 ) }, - object => { - __CLASS__ => 'Foo', - number => 2 - }, - } + object => { + __CLASS__ => 'Foo', + number => 2 + }, + } ); isa_ok( $foo, 'Foo' ); @@ -79,8 +78,8 @@ is( $foo->string, 'foo', '... got the right string' ); ok( $foo->boolean, '... got the right boolean' ); is( $foo->float, 10.5, '... got the right float' ); - is_deeply( $foo->array, [ 1 .. 10 ], '... got the right array' ); - is_deeply( + cmp_deeply( $foo->array, [ 1 .. 10 ], '... got the right array' ); + cmp_deeply( $foo->hash, { map { $_ => undef } ( 1 .. 10 ) }, '... got the right hash' @@ -101,25 +100,25 @@ use Scalar::Util 'looks_like_number'; - with Storage; - - subtype 'Natural' + with Storage; + + subtype 'Natural' => as 'Int' => where { $_ > 0 }; - - subtype 'HalfNum' + + subtype 'HalfNum' => as 'Num' - => where { "$_" =~ /\.5$/ }; - + => where { "$_" =~ /\.5$/ }; + subtype 'FooString' => as 'Str' => where { lc($_) eq 'foo' }; - - subtype 'IntArray' + + subtype 'IntArray' => as 'ArrayRef' => where { scalar grep { looks_like_number($_) } @{$_} }; - subtype 'UndefHash' + subtype 'UndefHash' => as 'HashRef' => where { scalar grep { !defined($_) } values %{$_} }; @@ -141,8 +140,8 @@ object => Foo->new( number => 2 ), ); isa_ok( $foo, 'Foo' ); - - is_deeply( + + cmp_deeply( $foo->pack, { __CLASS__ => 'Foo', @@ -151,10 +150,10 @@ float => 10.5, array => [ 1 .. 10 ], hash => { map { $_ => undef } ( 1 .. 10 ) }, - object => { - __CLASS__ => 'Foo', - number => 2 - }, + object => { + __CLASS__ => 'Foo', + number => 2 + }, }, '... got the right frozen class' ); @@ -169,19 +168,19 @@ float => 10.5, array => [ 1 .. 10 ], hash => { map { $_ => undef } ( 1 .. 10 ) }, - object => { - __CLASS__ => 'Foo', - number => 2 - }, - } + object => { + __CLASS__ => 'Foo', + number => 2 + }, + } ); isa_ok( $foo, 'Foo' ); is( $foo->number, 10, '... got the right number' ); is( $foo->string, 'foo', '... got the right string' ); is( $foo->float, 10.5, '... got the right float' ); - is_deeply( $foo->array, [ 1 .. 10 ], '... got the right array' ); - is_deeply( + cmp_deeply( $foo->array, [ 1 .. 10 ], '... got the right array' ); + cmp_deeply( $foo->hash, { map { $_ => undef } ( 1 .. 10 ) }, '... got the right hash' diff -Nru libmoosex-storage-perl-0.33/t/100_io.t libmoosex-storage-perl-0.45/t/100_io.t --- libmoosex-storage-perl-0.33/t/100_io.t 2010-11-21 08:41:25.000000000 +0000 +++ libmoosex-storage-perl-0.45/t/100_io.t 2013-12-22 00:48:35.000000000 +0000 @@ -1,16 +1,13 @@ -#!/usr/bin/perl - use strict; use warnings; use Test::More; +use Test::Deep; use File::Temp qw(tempdir); use File::Spec::Functions; my $dir = tempdir; -use Test::Requires { - 'JSON::Any' => 0.01, # skip all if not installed -}; +use Test::Requires 'JSON::Any'; BEGIN { plan tests => 10; @@ -21,15 +18,15 @@ package Foo; use Moose; use MooseX::Storage; - + with Storage(format => 'JSON', io => 'File'); - + has 'number' => (is => 'ro', isa => 'Int'); has 'string' => (is => 'ro', isa => 'Str'); - has 'float' => (is => 'ro', isa => 'Num'); + has 'float' => (is => 'ro', isa => 'Num'); has 'array' => (is => 'ro', isa => 'ArrayRef'); - has 'hash' => (is => 'ro', isa => 'HashRef'); - has 'object' => (is => 'ro', isa => 'Object'); + has 'hash' => (is => 'ro', isa => 'HashRef'); + has 'object' => (is => 'ro', isa => 'Object'); } my $file = catfile( $dir, 'temp.json' ); @@ -41,7 +38,7 @@ float => 10.5, array => [ 1 .. 10 ], hash => { map { $_ => undef } (1 .. 10) }, - object => Foo->new( number => 2 ), + object => Foo->new( number => 2 ), ); isa_ok($foo, 'Foo'); @@ -55,8 +52,8 @@ is($foo->number, 10, '... got the right number'); is($foo->string, 'foo', '... got the right string'); is($foo->float, 10.5, '... got the right float'); - is_deeply($foo->array, [ 1 .. 10], '... got the right array'); - is_deeply($foo->hash, { map { $_ => undef } (1 .. 10) }, '... got the right hash'); + cmp_deeply($foo->array, [ 1 .. 10], '... got the right array'); + cmp_deeply($foo->hash, { map { $_ => undef } (1 .. 10) }, '... got the right hash'); isa_ok($foo->object, 'Foo'); is($foo->object->number, 2, '... got the right number (in the embedded object)'); diff -Nru libmoosex-storage-perl-0.33/t/101_io_atomic.t libmoosex-storage-perl-0.45/t/101_io_atomic.t --- libmoosex-storage-perl-0.33/t/101_io_atomic.t 2010-11-21 08:41:25.000000000 +0000 +++ libmoosex-storage-perl-0.45/t/101_io_atomic.t 2013-12-22 00:48:35.000000000 +0000 @@ -1,17 +1,16 @@ -#!/usr/bin/perl - use strict; use warnings; use Test::More; +use Test::Deep; use File::Temp qw(tempdir); use File::Spec::Functions; my $dir = tempdir( CLEANUP => 1 ); -use Test::Requires { - 'JSON::Any' => 0.01, # skip all if not installed - 'IO::AtomicFile' => 0.01, -}; +use Test::Requires qw( + JSON::Any + IO::AtomicFile +); BEGIN { plan tests => 10; @@ -22,15 +21,15 @@ package Foo; use Moose; use MooseX::Storage; - + with Storage(format => 'JSON', io => 'AtomicFile'); - + has 'number' => (is => 'ro', isa => 'Int'); has 'string' => (is => 'ro', isa => 'Str'); - has 'float' => (is => 'ro', isa => 'Num'); + has 'float' => (is => 'ro', isa => 'Num'); has 'array' => (is => 'ro', isa => 'ArrayRef'); - has 'hash' => (is => 'ro', isa => 'HashRef'); - has 'object' => (is => 'ro', isa => 'Object'); + has 'hash' => (is => 'ro', isa => 'HashRef'); + has 'object' => (is => 'ro', isa => 'Object'); } my $file = catfile($dir,'temp.json'); @@ -42,7 +41,7 @@ float => 10.5, array => [ 1 .. 10 ], hash => { map { $_ => undef } (1 .. 10) }, - object => Foo->new( number => 2 ), + object => Foo->new( number => 2 ), ); isa_ok($foo, 'Foo'); @@ -56,8 +55,8 @@ is($foo->number, 10, '... got the right number'); is($foo->string, 'foo', '... got the right string'); is($foo->float, 10.5, '... got the right float'); - is_deeply($foo->array, [ 1 .. 10], '... got the right array'); - is_deeply($foo->hash, { map { $_ => undef } (1 .. 10) }, '... got the right hash'); + cmp_deeply($foo->array, [ 1 .. 10], '... got the right array'); + cmp_deeply($foo->hash, { map { $_ => undef } (1 .. 10) }, '... got the right hash'); isa_ok($foo->object, 'Foo'); is($foo->object->number, 2, '... got the right number (in the embedded object)'); diff -Nru libmoosex-storage-perl-0.33/t/102_io_storable_file.t libmoosex-storage-perl-0.45/t/102_io_storable_file.t --- libmoosex-storage-perl-0.33/t/102_io_storable_file.t 2010-11-21 08:41:25.000000000 +0000 +++ libmoosex-storage-perl-0.45/t/102_io_storable_file.t 2013-12-22 00:48:35.000000000 +0000 @@ -1,9 +1,8 @@ -#!/usr/bin/perl - use strict; use warnings; use Test::More tests => 10; +use Test::Deep; use File::Temp qw(tempdir); use File::Spec::Functions; my $dir = tempdir( CLEANUP => 1 ); @@ -16,15 +15,15 @@ package Foo; use Moose; use MooseX::Storage; - + with Storage(io => 'StorableFile'); - + has 'number' => (is => 'ro', isa => 'Int'); has 'string' => (is => 'ro', isa => 'Str'); - has 'float' => (is => 'ro', isa => 'Num'); + has 'float' => (is => 'ro', isa => 'Num'); has 'array' => (is => 'ro', isa => 'ArrayRef'); - has 'hash' => (is => 'ro', isa => 'HashRef'); - has 'object' => (is => 'ro', isa => 'Object'); + has 'hash' => (is => 'ro', isa => 'HashRef'); + has 'object' => (is => 'ro', isa => 'Object'); } my $file = catfile($dir,'temp.storable'); @@ -36,7 +35,7 @@ float => 10.5, array => [ 1 .. 10 ], hash => { map { $_ => undef } (1 .. 10) }, - object => Foo->new( number => 2 ), + object => Foo->new( number => 2 ), ); isa_ok($foo, 'Foo'); @@ -50,8 +49,8 @@ is($foo->number, 10, '... got the right number'); is($foo->string, 'foo', '... got the right string'); is($foo->float, 10.5, '... got the right float'); - is_deeply($foo->array, [ 1 .. 10], '... got the right array'); - is_deeply($foo->hash, { map { $_ => undef } (1 .. 10) }, '... got the right hash'); + cmp_deeply($foo->array, [ 1 .. 10], '... got the right array'); + cmp_deeply($foo->hash, { map { $_ => undef } (1 .. 10) }, '... got the right hash'); isa_ok($foo->object, 'Foo'); is($foo->object->number, 2, '... got the right number (in the embedded object)'); diff -Nru libmoosex-storage-perl-0.33/t/103_io_storable_file_custom.t libmoosex-storage-perl-0.45/t/103_io_storable_file_custom.t --- libmoosex-storage-perl-0.33/t/103_io_storable_file_custom.t 2010-11-21 08:41:25.000000000 +0000 +++ libmoosex-storage-perl-0.45/t/103_io_storable_file_custom.t 2013-12-22 00:48:35.000000000 +0000 @@ -1,9 +1,8 @@ -#!/usr/bin/perl - use strict; use warnings; use Test::More tests => 11; +use Test::Deep; use Storable (); use File::Temp qw(tempdir); use File::Spec::Functions; @@ -17,18 +16,18 @@ package Foo; use Moose; use MooseX::Storage; - + with Storage(io => 'StorableFile'); - + has 'number' => (is => 'ro', isa => 'Int'); has 'string' => (is => 'rw', isa => 'Str'); - has 'float' => (is => 'ro', isa => 'Num'); + has 'float' => (is => 'ro', isa => 'Num'); has 'array' => (is => 'ro', isa => 'ArrayRef'); - has 'hash' => (is => 'ro', isa => 'HashRef'); - has 'object' => (is => 'ro', isa => 'Object'); - - ## add some custom freeze/thaw hooks here ... - + has 'hash' => (is => 'ro', isa => 'HashRef'); + has 'object' => (is => 'ro', isa => 'Object'); + + ## add some custom freeze/thaw hooks here ... + sub thaw { my ( $class, $data ) = @_; my $self = $class->unpack( $data ); @@ -54,31 +53,31 @@ float => 10.5, array => [ 1 .. 10 ], hash => { map { $_ => undef } (1 .. 10) }, - object => Foo->new( number => 2 ), + object => Foo->new( number => 2 ), ); isa_ok($foo, 'Foo'); $foo->store($file); - + # check our custom freeze hook fired ... my $data = Storable::retrieve($file); - is_deeply( + cmp_deeply( $data, { '__CLASS__' => 'Foo', 'float' => 10.5, 'number' => 10, - 'string' => 'HELLO WORLD', + 'string' => 'HELLO WORLD', 'array' => [ 1 .. 10], - 'hash' => { map { $_ => undef } 1 .. 10 }, + 'hash' => { map { $_ => undef } 1 .. 10 }, 'object' => { '__CLASS__' => 'Foo', 'number' => 2 }, }, '... got the data struct we expected' - ); - + ); + } { @@ -90,8 +89,8 @@ is($foo->number, 10, '... got the right number'); is($foo->float, 10.5, '... got the right float'); - is_deeply($foo->array, [ 1 .. 10], '... got the right array'); - is_deeply($foo->hash, { map { $_ => undef } (1 .. 10) }, '... got the right hash'); + cmp_deeply($foo->array, [ 1 .. 10], '... got the right array'); + cmp_deeply($foo->hash, { map { $_ => undef } (1 .. 10) }, '... got the right hash'); isa_ok($foo->object, 'Foo'); is($foo->object->number, 2, '... got the right number (in the embedded object)'); diff -Nru libmoosex-storage-perl-0.33/t/104_io_w_utf8.t libmoosex-storage-perl-0.45/t/104_io_w_utf8.t --- libmoosex-storage-perl-0.33/t/104_io_w_utf8.t 2013-03-30 01:18:24.000000000 +0000 +++ libmoosex-storage-perl-0.45/t/104_io_w_utf8.t 2013-12-22 00:48:35.000000000 +0000 @@ -1,5 +1,3 @@ -#!/usr/bin/perl - use strict; use warnings; @@ -8,24 +6,22 @@ use File::Spec::Functions; my $dir = tempdir( CLEANUP => 1 ); -use Test::Requires { - 'JSON::Any' => 0.01, # skip all if not installed - 'IO::AtomicFile' => 0.01, -}; - -BEGIN { - # NOTE: - # this is because JSON::XS is - # the only one which really gets - # utf8 correct - # - SL - BEGIN { - $ENV{JSON_ANY_ORDER} = qw(XS); - $ENV{JSON_ANY_CONFIG} = "utf8=0,canonical=1"; - } - plan tests => 8; - use_ok('MooseX::Storage'); -} +# NOTE: +# this is because JSON::XS (and Cpanel::JSON::XS) is +# the only one which really gets utf8 correct +# - SL +BEGIN { + $ENV{JSON_ANY_ORDER} = 'XS CPANEL'; + $ENV{JSON_ANY_CONFIG} = "utf8=0,canonical=1"; +} + +use Test::Requires qw( + JSON::Any + IO::AtomicFile +); + +plan tests => 8; +use_ok('MooseX::Storage'); use utf8; @@ -35,7 +31,7 @@ use MooseX::Storage; with Storage( 'format' => 'JSON', 'io' => 'File' ); - + has 'utf8_string' => ( is => 'rw', isa => 'Str', @@ -48,16 +44,16 @@ { my $foo = Foo->new; isa_ok( $foo, 'Foo' ); - - $foo->store($file); + + $foo->store($file); } { my $foo = Foo->load($file); isa_ok($foo, 'Foo'); - is($foo->utf8_string, - "ネットスーパー (Internet Shopping)", + is($foo->utf8_string, + "ネットスーパー (Internet Shopping)", '... got the string we expected'); } @@ -70,18 +66,18 @@ utf8_string => 'Escritório' ); isa_ok( $foo, 'Foo' ); - - $foo->store($file); + + $foo->store($file); } { my $foo = Foo->load($file); isa_ok($foo, 'Foo'); - + ok(utf8::is_utf8($foo->utf8_string), '... the string is still utf8'); - is($foo->utf8_string, - "Escritório", + is($foo->utf8_string, + "Escritório", '... got the string we expected'); } diff -Nru libmoosex-storage-perl-0.33/t/105_io_atomic_w_utf8.t libmoosex-storage-perl-0.45/t/105_io_atomic_w_utf8.t --- libmoosex-storage-perl-0.33/t/105_io_atomic_w_utf8.t 2013-03-30 01:18:24.000000000 +0000 +++ libmoosex-storage-perl-0.45/t/105_io_atomic_w_utf8.t 2013-12-22 00:48:35.000000000 +0000 @@ -1,5 +1,3 @@ -#!/usr/bin/perl - use strict; use warnings; @@ -8,24 +6,22 @@ use File::Spec::Functions; my $dir = tempdir; -use Test::Requires { - 'JSON::Any' => 0.01, # skip all if not installed - 'IO::AtomicFile' => 0.01, -}; - -BEGIN { - # NOTE: - # this is because JSON::XS is - # the only one which really gets - # utf8 correct - # - SL - BEGIN { - $ENV{JSON_ANY_ORDER} = qw(XS); - $ENV{JSON_ANY_CONFIG} = "utf8=0,canonical=1"; - } - plan tests => 8; - use_ok('MooseX::Storage'); -} +# NOTE: +# this is because JSON::XS (and Cpanel::JSON::XS) is +# the only one which really gets utf8 correct +# - SL +BEGIN { + $ENV{JSON_ANY_ORDER} = 'XS CPANEL'; + $ENV{JSON_ANY_CONFIG} = "utf8=0,canonical=1"; +} + +use Test::Requires qw( + JSON::Any + IO::AtomicFile +); + +plan tests => 8; +use_ok('MooseX::Storage'); use utf8; @@ -35,7 +31,7 @@ use MooseX::Storage; with Storage( 'format' => 'JSON', 'io' => 'AtomicFile' ); - + has 'utf8_string' => ( is => 'rw', isa => 'Str', @@ -48,16 +44,16 @@ { my $foo = Foo->new; isa_ok( $foo, 'Foo' ); - - $foo->store($file); + + $foo->store($file); } { my $foo = Foo->load($file); isa_ok($foo, 'Foo'); - is($foo->utf8_string, - "ネットスーパー (Internet Shopping)", + is($foo->utf8_string, + "ネットスーパー (Internet Shopping)", '... got the string we expected'); } @@ -70,18 +66,18 @@ utf8_string => 'Escritório' ); isa_ok( $foo, 'Foo' ); - - $foo->store($file); + + $foo->store($file); } { my $foo = Foo->load($file); isa_ok($foo, 'Foo'); - + ok(utf8::is_utf8($foo->utf8_string), '... the string is still utf8'); - is($foo->utf8_string, - "Escritório", + is($foo->utf8_string, + "Escritório", '... got the string we expected'); } diff -Nru libmoosex-storage-perl-0.33/t/200_combined_in_roles.t libmoosex-storage-perl-0.45/t/200_combined_in_roles.t --- libmoosex-storage-perl-0.33/t/200_combined_in_roles.t 2010-11-21 08:49:22.000000000 +0000 +++ libmoosex-storage-perl-0.45/t/200_combined_in_roles.t 2013-12-22 00:48:35.000000000 +0000 @@ -1,4 +1,3 @@ -#/usr/bin/env perl use strict; use warnings; use Test::More tests => 1; diff -Nru libmoosex-storage-perl-0.33/t/300_overloaded.t libmoosex-storage-perl-0.45/t/300_overloaded.t --- libmoosex-storage-perl-0.33/t/300_overloaded.t 2010-11-21 08:49:22.000000000 +0000 +++ libmoosex-storage-perl-0.45/t/300_overloaded.t 2013-12-22 00:48:35.000000000 +0000 @@ -3,9 +3,7 @@ use Test::More; use Test::Fatal; -use Test::Requires { - 'JSON::Any' => 0.01, # skip all if not installed -}; +use Test::Requires 'JSON::Any'; { package Thing; diff -Nru libmoosex-storage-perl-0.33/t/author/pod-coverage.t libmoosex-storage-perl-0.45/t/author/pod-coverage.t --- libmoosex-storage-perl-0.33/t/author/pod-coverage.t 2010-08-28 18:11:46.000000000 +0000 +++ libmoosex-storage-perl-0.45/t/author/pod-coverage.t 1970-01-01 00:00:00.000000000 +0000 @@ -1,13 +0,0 @@ -#!perl -use Test::More; - -use Test::Pod::Coverage 1.08; - -my @modules = grep { ! /::Traits?::/ } all_modules(); - -plan tests => scalar(@modules); - -foreach my $module (@modules) { - pod_coverage_ok($module); -} - diff -Nru libmoosex-storage-perl-0.33/t/author/pod.t libmoosex-storage-perl-0.45/t/author/pod.t --- libmoosex-storage-perl-0.33/t/author/pod.t 2010-08-28 18:11:46.000000000 +0000 +++ libmoosex-storage-perl-0.45/t/author/pod.t 1970-01-01 00:00:00.000000000 +0000 @@ -1,5 +0,0 @@ -#!perl - -use Test::More; -use Test::Pod 1.14; -all_pod_files_ok(); diff -Nru libmoosex-storage-perl-0.33/weaver.ini libmoosex-storage-perl-0.45/weaver.ini --- libmoosex-storage-perl-0.33/weaver.ini 1970-01-01 00:00:00.000000000 +0000 +++ libmoosex-storage-perl-0.45/weaver.ini 2013-12-22 00:48:35.000000000 +0000 @@ -0,0 +1,8 @@ +[@Default] + +[-Transformer] +transformer = List + +[-StopWords] + +[Contributors] diff -Nru libmoosex-storage-perl-0.33/xt/author/00-compile.t libmoosex-storage-perl-0.45/xt/author/00-compile.t --- libmoosex-storage-perl-0.33/xt/author/00-compile.t 1970-01-01 00:00:00.000000000 +0000 +++ libmoosex-storage-perl-0.45/xt/author/00-compile.t 2013-12-22 00:48:35.000000000 +0000 @@ -0,0 +1,61 @@ +use 5.006; +use strict; +use warnings; + +# this test was generated with Dist::Zilla::Plugin::Test::Compile 2.039 + +use Test::More 0.94 tests => 12 + ($ENV{AUTHOR_TESTING} ? 1 : 0); + + + +my @module_files = ( + 'MooseX/Storage.pm', + 'MooseX/Storage/Base/WithChecksum.pm', + 'MooseX/Storage/Basic.pm', + 'MooseX/Storage/Deferred.pm', + 'MooseX/Storage/Engine.pm', + 'MooseX/Storage/Engine/Trait/DisableCycleDetection.pm', + 'MooseX/Storage/Engine/Trait/OnlyWhenBuilt.pm', + 'MooseX/Storage/Meta/Attribute/DoNotSerialize.pm', + 'MooseX/Storage/Meta/Attribute/Trait/DoNotSerialize.pm', + 'MooseX/Storage/Traits/DisableCycleDetection.pm', + 'MooseX/Storage/Traits/OnlyWhenBuilt.pm', + 'MooseX/Storage/Util.pm' +); + + + +# 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"); + + if (@_warnings) + { + warn @_warnings; + push @warnings, @_warnings; + } +} + + + +is(scalar(@warnings), 0, 'no warnings found') if $ENV{AUTHOR_TESTING}; + +BAIL_OUT("Compilation problems") if !Test::More->builder->is_passing; diff -Nru libmoosex-storage-perl-0.33/xt/author/pod-spell.t libmoosex-storage-perl-0.45/xt/author/pod-spell.t --- libmoosex-storage-perl-0.33/xt/author/pod-spell.t 1970-01-01 00:00:00.000000000 +0000 +++ libmoosex-storage-perl-0.45/xt/author/pod-spell.t 2013-12-22 00:48:35.000000000 +0000 @@ -0,0 +1,92 @@ +use strict; +use warnings; +use Test::More; + +# generated by Dist::Zilla::Plugin::Test::PodSpelling 2.006002 +use Test::Spelling 0.12; +use Pod::Wordlist; + + +add_stopwords(); +all_pod_files_spelling_ok( qw( bin lib ) ); +__DATA__ +cpan +Chris +Prather +chris +Stevan +Little +stevan +יובל +קוג +Yuval +Kogman +nothingmuch +Infinity +Interactive +Inc +Cory +Watson +gphat +Dagfinn +Ilmari +Mannsåker +ilmari +David +Golden +dagolden +Steinbrunner +dsteinbrunner +Florian +Ragwitz +rafl +Johannes +Plunien +plu +Jonathan +Rockway +jon +Yu +frequency +Jos +Boumans +jos +Karen +Etheridge +ether +Ricardo +Signes +rjbs +Robert +Boone +robo4288 +Shawn +Moore +sartak +Tomas +Doran +bobtfish +lib +MooseX +Storage +Engine +IO +File +Util +StorableFile +Base +WithChecksum +Deferred +AtomicFile +Format +JSON +Trait +OnlyWhenBuilt +Storable +YAML +Traits +DisableCycleDetection +Basic +Meta +Attribute +DoNotSerialize diff -Nru libmoosex-storage-perl-0.33/xt/release/changes_has_content.t libmoosex-storage-perl-0.45/xt/release/changes_has_content.t --- libmoosex-storage-perl-0.33/xt/release/changes_has_content.t 1970-01-01 00:00:00.000000000 +0000 +++ libmoosex-storage-perl-0.45/xt/release/changes_has_content.t 2013-12-22 00:48:35.000000000 +0000 @@ -0,0 +1,41 @@ +#!perl + +use Test::More tests => 2; + +note 'Checking Changes'; +my $changes_file = 'Changes'; +my $newver = '0.45'; +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; +} + diff -Nru libmoosex-storage-perl-0.33/xt/release/cpan-changes.t libmoosex-storage-perl-0.45/xt/release/cpan-changes.t --- libmoosex-storage-perl-0.33/xt/release/cpan-changes.t 1970-01-01 00:00:00.000000000 +0000 +++ libmoosex-storage-perl-0.45/xt/release/cpan-changes.t 2013-12-22 00:48:35.000000000 +0000 @@ -0,0 +1,11 @@ +#!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(); diff -Nru libmoosex-storage-perl-0.33/xt/release/distmeta.t libmoosex-storage-perl-0.45/xt/release/distmeta.t --- libmoosex-storage-perl-0.33/xt/release/distmeta.t 1970-01-01 00:00:00.000000000 +0000 +++ libmoosex-storage-perl-0.45/xt/release/distmeta.t 2013-12-22 00:48:35.000000000 +0000 @@ -0,0 +1,7 @@ +#!perl + +use Test::More; + +eval "use Test::CPAN::Meta"; +plan skip_all => "Test::CPAN::Meta required for testing META.yml" if $@; +meta_yaml_ok(); diff -Nru libmoosex-storage-perl-0.33/xt/release/eol.t libmoosex-storage-perl-0.45/xt/release/eol.t --- libmoosex-storage-perl-0.33/xt/release/eol.t 1970-01-01 00:00:00.000000000 +0000 +++ libmoosex-storage-perl-0.45/xt/release/eol.t 2013-12-22 00:48:35.000000000 +0000 @@ -0,0 +1,8 @@ +use strict; +use warnings; +use Test::More; + +eval 'use Test::EOL'; +plan skip_all => 'Test::EOL required' if $@; + +all_perl_files_ok({ trailing_whitespace => 1 }); diff -Nru libmoosex-storage-perl-0.33/xt/release/kwalitee.t libmoosex-storage-perl-0.45/xt/release/kwalitee.t --- libmoosex-storage-perl-0.33/xt/release/kwalitee.t 1970-01-01 00:00:00.000000000 +0000 +++ libmoosex-storage-perl-0.45/xt/release/kwalitee.t 2013-12-22 00:48:35.000000000 +0000 @@ -0,0 +1,4 @@ +# this test was generated with Dist::Zilla::Plugin::Test::Kwalitee 2.07 +use strict; +use warnings; +use Test::Kwalitee; diff -Nru libmoosex-storage-perl-0.33/xt/release/minimum-version.t libmoosex-storage-perl-0.45/xt/release/minimum-version.t --- libmoosex-storage-perl-0.33/xt/release/minimum-version.t 1970-01-01 00:00:00.000000000 +0000 +++ libmoosex-storage-perl-0.45/xt/release/minimum-version.t 2013-12-22 00:48:35.000000000 +0000 @@ -0,0 +1,8 @@ +#!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} ); diff -Nru libmoosex-storage-perl-0.33/xt/release/mojibake.t libmoosex-storage-perl-0.45/xt/release/mojibake.t --- libmoosex-storage-perl-0.33/xt/release/mojibake.t 1970-01-01 00:00:00.000000000 +0000 +++ libmoosex-storage-perl-0.45/xt/release/mojibake.t 2013-12-22 00:48:35.000000000 +0000 @@ -0,0 +1,12 @@ +#!perl + +use strict; +use warnings qw(all); + +use Test::More; + +## no critic (ProhibitStringyEval, RequireCheckingReturnValueOfEval) +eval q(use Test::Mojibake); +plan skip_all => q(Test::Mojibake required for source encoding testing) if $@; + +all_files_encoding_ok(); diff -Nru libmoosex-storage-perl-0.33/xt/release/no-tabs.t libmoosex-storage-perl-0.45/xt/release/no-tabs.t --- libmoosex-storage-perl-0.33/xt/release/no-tabs.t 1970-01-01 00:00:00.000000000 +0000 +++ libmoosex-storage-perl-0.45/xt/release/no-tabs.t 2013-12-22 00:48:35.000000000 +0000 @@ -0,0 +1,33 @@ +use strict; +use warnings; + +# this test was generated with Dist::Zilla::Plugin::Test::NoTabs 0.06 + +use Test::More 0.88; +use Test::NoTabs; + +my @files = ( + 'lib/MooseX/Storage.pm', + 'lib/MooseX/Storage/Base/WithChecksum.pm', + 'lib/MooseX/Storage/Basic.pm', + 'lib/MooseX/Storage/Deferred.pm', + 'lib/MooseX/Storage/Engine.pm', + 'lib/MooseX/Storage/Engine/IO/AtomicFile.pm', + 'lib/MooseX/Storage/Engine/IO/File.pm', + 'lib/MooseX/Storage/Engine/Trait/DisableCycleDetection.pm', + 'lib/MooseX/Storage/Engine/Trait/OnlyWhenBuilt.pm', + 'lib/MooseX/Storage/Format/JSON.pm', + 'lib/MooseX/Storage/Format/Storable.pm', + 'lib/MooseX/Storage/Format/YAML.pm', + 'lib/MooseX/Storage/IO/AtomicFile.pm', + 'lib/MooseX/Storage/IO/File.pm', + 'lib/MooseX/Storage/IO/StorableFile.pm', + 'lib/MooseX/Storage/Meta/Attribute/DoNotSerialize.pm', + 'lib/MooseX/Storage/Meta/Attribute/Trait/DoNotSerialize.pm', + 'lib/MooseX/Storage/Traits/DisableCycleDetection.pm', + 'lib/MooseX/Storage/Traits/OnlyWhenBuilt.pm', + 'lib/MooseX/Storage/Util.pm' +); + +notabs_ok($_) foreach @files; +done_testing; diff -Nru libmoosex-storage-perl-0.33/xt/release/pod-coverage.t libmoosex-storage-perl-0.45/xt/release/pod-coverage.t --- libmoosex-storage-perl-0.33/xt/release/pod-coverage.t 1970-01-01 00:00:00.000000000 +0000 +++ libmoosex-storage-perl-0.45/xt/release/pod-coverage.t 2013-12-22 00:48:35.000000000 +0000 @@ -0,0 +1,13 @@ +#!perl + +use Test::More; + +eval "use Test::Pod::Coverage 1.08"; +plan skip_all => "Test::Pod::Coverage 1.08 required for testing POD coverage" + if $@; + +eval "use Pod::Coverage::TrustPod"; +plan skip_all => "Pod::Coverage::TrustPod required for testing POD coverage" + if $@; + +all_pod_coverage_ok({ coverage_class => 'Pod::Coverage::TrustPod' }); diff -Nru libmoosex-storage-perl-0.33/xt/release/pod-no404s.t libmoosex-storage-perl-0.45/xt/release/pod-no404s.t --- libmoosex-storage-perl-0.33/xt/release/pod-no404s.t 1970-01-01 00:00:00.000000000 +0000 +++ libmoosex-storage-perl-0.45/xt/release/pod-no404s.t 2013-12-22 00:48:35.000000000 +0000 @@ -0,0 +1,21 @@ +#!perl + +use strict; +use warnings; +use Test::More; + +foreach my $env_skip ( qw( + SKIP_POD_NO404S + AUTOMATED_TESTING +) ){ + plan skip_all => "\$ENV{$env_skip} is set, skipping" + if $ENV{$env_skip}; +} + +eval "use Test::Pod::No404s"; +if ( $@ ) { + plan skip_all => 'Test::Pod::No404s required for testing POD'; +} +else { + all_pod_files_ok(); +} diff -Nru libmoosex-storage-perl-0.33/xt/release/pod-syntax.t libmoosex-storage-perl-0.45/xt/release/pod-syntax.t --- libmoosex-storage-perl-0.33/xt/release/pod-syntax.t 1970-01-01 00:00:00.000000000 +0000 +++ libmoosex-storage-perl-0.45/xt/release/pod-syntax.t 2013-12-22 00:48:35.000000000 +0000 @@ -0,0 +1,7 @@ +#!perl +use Test::More; + +eval "use Test::Pod 1.41"; +plan skip_all => "Test::Pod 1.41 required for testing POD" if $@; + +all_pod_files_ok(); diff -Nru libmoosex-storage-perl-0.33/xt/release/portability.t libmoosex-storage-perl-0.45/xt/release/portability.t --- libmoosex-storage-perl-0.33/xt/release/portability.t 1970-01-01 00:00:00.000000000 +0000 +++ libmoosex-storage-perl-0.45/xt/release/portability.t 2013-12-22 00:48:35.000000000 +0000 @@ -0,0 +1,11 @@ +#!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(); diff -Nru libmoosex-storage-perl-0.33/xt/release/test-version.t libmoosex-storage-perl-0.45/xt/release/test-version.t --- libmoosex-storage-perl-0.33/xt/release/test-version.t 1970-01-01 00:00:00.000000000 +0000 +++ libmoosex-storage-perl-0.45/xt/release/test-version.t 2013-12-22 00:48:35.000000000 +0000 @@ -0,0 +1,22 @@ +use strict; +use warnings; +use Test::More; + +# generated by Dist::Zilla::Plugin::Test::Version 0.002004 +BEGIN { eval "use Test::Version; 1;" or die $@; } + +my @imports = ( 'version_all_ok' ); + +my $params = { + is_strict => 1, + has_version => 1, +}; + +push @imports, $params + if version->parse( $Test::Version::VERSION ) >= version->parse('1.002'); + + +Test::Version->import(@imports); + +version_all_ok; +done_testing; diff -Nru libmoosex-storage-perl-0.33/xt/release/unused-vars.t libmoosex-storage-perl-0.45/xt/release/unused-vars.t --- libmoosex-storage-perl-0.33/xt/release/unused-vars.t 1970-01-01 00:00:00.000000000 +0000 +++ libmoosex-storage-perl-0.45/xt/release/unused-vars.t 2013-12-22 00:48:35.000000000 +0000 @@ -0,0 +1,8 @@ +#!perl + +use Test::More; + +eval "use Test::Vars"; +plan skip_all => "Test::Vars required for testing unused vars" + if $@; +all_vars_ok();