Test-Moose-More-0.037/0000775000175000017500000000000012653511243014676 5ustar rsrchboyrsrchboyTest-Moose-More-0.037/README0000644000175000017500000003054112653511243015557 0ustar rsrchboyrsrchboyNAME Test::Moose::More - More tools for testing Moose packages VERSION This document describes version 0.037 of Test::Moose::More - released January 31, 2016 as part of Test-Moose-More. SYNOPSIS use Test::Moose::More; is_class_ok 'Some::Class'; is_role_ok 'Some::Role'; has_method_ok 'Some::Class', 'foo'; # ... etc DESCRIPTION This package contains a number of additional tests that can be employed against Moose classes/roles. It is intended to replace Test::Moose in your tests, and re-exports any tests that it has and we do not, yet. FUNCTIONS known_sugar Returns a list of all the known standard Moose sugar (has, extends, etc). TEST FUNCTIONS meta_ok $thing Tests $thing to see if it has a metaclass; $thing may be the class name or instance of the class you wish to check. does_ok $thing, < $role | \@roles >, [ $message ] Checks to see if $thing does the given roles. $thing may be the class name or instance of the class you wish to check. Note that the message will be taken verbatim unless it contains %s somewhere; this will be replaced with the name of the role being tested for. does_not_ok $thing, < $role | \@roles >, [ $message ] Checks to see if $thing does not do the given roles. $thing may be the class name or instance of the class you wish to check. Note that the message will be taken verbatim unless it contains %s somewhere; this will be replaced with the name of the role being tested for. has_attribute_ok $thing, $attribute_name, [ $message ] Checks $thing for an attribute named $attribute_name; $thing may be a class name, instance, or role name. has_method_ok $thing, @methods Queries $thing's metaclass to see if $thing has the methods named in @methods. role_wraps_around_method_ok $role, @methods Queries $role's metaclass to see if $role wraps the methods named in @methods with an around method modifier. role_wraps_before_method_ok $role, @methods Queries $role's metaclass to see if $role wraps the methods named in @methods with an before method modifier. role_wraps_after_method_ok $role, @methods Queries $role's metaclass to see if $role wraps the methods named in @methods with an after method modifier. requires_method_ok $thing, @methods Queries $thing's metaclass to see if $thing requires the methods named in @methods. Note that this really only makes sense if $thing is a role. is_immutable_ok $thing Passes if $thing is immutable. is_not_immutable_ok $thing Passes if $thing is not immutable; that is, is mutable. is_role_ok $thing Passes if $thing's metaclass is a Moose::Meta::Role. is_class_ok $thing Passes if $thing's metaclass is a Moose::Meta::Class. is_anon_ok $thing Passes if $thing is "anonymous". is_not_anon_ok $thing Passes if $thing is not "anonymous". check_sugar_removed_ok $thing Ensures that all the standard Moose sugar is no longer directly callable on a given package. check_sugar_ok $thing Checks and makes sure a class/etc can still do all the standard Moose sugar. validate_thing Runs a bunch of tests against the given $thing, as defined: validate_thing $thing => ( attributes => [ ... ], methods => [ ... ], isa => [ ... ], # ensures sugar is/is-not present sugar => 0, # ensures $thing does these roles does => [ ... ], # ensures $thing does not do these roles does_not => [ ... ], ); $thing can be the name of a role or class, an object instance, or a metaclass. * -subtest => 'subtest name...' If set, all tests run will be wrapped in a subtest, the name of which will be whatever -subtest is set to. * isa => [ ... ] A list of superclasses thing should have. * anonymous => 0|1 Check to see if the class is/isn't anonymous. * does => [ ... ] A list of roles the thing should do. * does_not => [ ... ] A list of roles the thing should not do. * attributes => [ ... ] The attributes list specified here is in the form of a list of names, each optionally followed by a hashref of options to test the attribute for; this hashref takes the same arguments "validate_attribute" does. e.g.: validate_thing $thing => ( attributes => [ 'foo', 'bar', baz => { is => 'ro', ... }, 'bip', ], ); * methods => [ ... ] A list of methods the thing should have. * sugar => 0|1 Ensure that thing can/cannot do the standard Moose sugar. validate_role The same as validate_thing(), but ensures $thing is a role, and allows for additional role-specific tests. validate_role $thing => ( required_methods => [ ... ], # ...and all other options from validate_thing() ); * -compose => 0|1 When true, attempt to compose the role into an anonymous class, then use it to run "validate_class". The options we're given are passed to validate_class() directly, except that any required_methods entry is removed and its contents pushed onto methods. (A stub method for each entry in required_methods will also be created in the new class.) e.g.: ok 1 - TestRole has a metaclass ok 2 - TestRole is a Moose role ok 3 - TestRole requires method blargh ok 4 - TestRole does TestRole ok 5 - TestRole does not do TestRole::Two ok 6 - TestRole has method method1 ok 7 - TestRole has an attribute named bar # Subtest: role composed into Moose::Meta::Class::__ANON__::SERIAL::1 ok 1 - Moose::Meta::Class::__ANON__::SERIAL::1 has a metaclass ok 2 - Moose::Meta::Class::__ANON__::SERIAL::1 is a Moose class ok 3 - Moose::Meta::Class::__ANON__::SERIAL::1 does TestRole ok 4 - Moose::Meta::Class::__ANON__::SERIAL::1 does not do TestRole::Two ok 5 - Moose::Meta::Class::__ANON__::SERIAL::1 has method method1 ok 6 - Moose::Meta::Class::__ANON__::SERIAL::1 has method blargh ok 7 - Moose::Meta::Class::__ANON__::SERIAL::1 has an attribute named bar 1..7 ok 8 - role composed into Moose::Meta::Class::__ANON__::SERIAL::1 1..8 * -subtest => 'subtest name...' If set, all tests run will be wrapped in a subtest, the name of which will be whatever -subtest is set to. * required_methods => [ ... ] A list of methods the role requires a consuming class to supply. * before => [ ... ] A list of methods the role expects to wrap before, on application to a class. See "before" in Moose for information on before method modifiers. * around => [ ... ] A list of methods the role expects to wrap around, on application to a class. See "around" in Moose for information on around method modifiers. * after => [ ... ] A list of methods the role expects to wrap after, on application to a class. See "after" in Moose for information on after method modifiers. validate_class The same as validate_thing(), but ensures $thing is a class, and allows for additional class-specific tests. validate_class $thing => ( isa => [ ... ], attributes => [ ... ], methods => [ ... ], isa => [ ... ], # ensures sugar is/is-not present sugar => 0, # ensures $thing does these roles does => [ ... ], # ensures $thing does not do these roles does_not => [ ... ], # ...and all other options from validate_thing() ); * -subtest => 'subtest name...' If set, all tests run will be wrapped in a subtest, the name of which will be whatever -subtest is set to. * immutable => 0|1 Checks the class to see if it is/isn't immutable. validate_attribute validate_attribute() allows you to test how an attribute looks once built and attached to a class. Let's say you have an attribute defined like this: has foo => ( traits => [ 'TestRole' ], is => 'ro', isa => 'Int', builder => '_build_foo', lazy => 1, ); You can use validate_attribute() to ensure that it's built out in the way you expect: validate_attribute TestClass => foo => ( # tests the attribute metaclass instance to ensure it does the roles -does => [ 'TestRole' ], # tests the attribute metaclass instance's inheritance -isa => [ 'Moose::Meta::Attribute' ], # for demonstration's sake traits => [ 'TestRole' ], isa => 'Int', does => 'Bar', handles => { }, reader => 'foo', builder => '_build_foo', default => undef, init_arg => 'foo', lazy => 1, required => undef, ); Options passed to validate_attribute() prefixed with '-' test the attribute's metaclass instance rather than a setting on the attribute; that is, '-does' ensures that the metaclass does a particular role (e.g. MooseX::AttributeShortcuts), while 'does' tests the setting of the attribute to require the value do a given role. This function takes all the options "attribute_options_ok" takes, as well as the following: * -subtest => 'subtest name...' If set, all tests run will be wrapped in a subtest, the name of which will be whatever -subtest is set to. attribute_options_ok Validates that an attribute is set up as expected; like validate_attribute(), but only concerns itself with attribute options. Note that some of these options will skip if used against attributes defined in a role. * is => ro|rw Tests for reader/writer options set as one would expect. * isa => ... Validates that the attribute requires its value to be a given type. * does => ... Validates that the attribute requires its value to do a given role. * builder => '...' Validates that the attribute expects the method name given to be its builder. * default => ... Validates that the attribute has the given default. * init_arg => '...' Validates that the attribute has the given initial argument name. * lazy => 0|1 Validates that the attribute is/isn't lazy. * required => 0|1 Validates that setting the attribute's value is/isn't required. SEE ALSO Please see those modules/websites for more information related to this module. * Test::Moose BUGS Please report any bugs or feature requests on the bugtracker website https://github.com/RsrchBoy/Test-Moose-More/issues When submitting a bug or request, please include a test-file or a patch to an existing test-file that illustrates the bug or desired feature. AUTHOR Chris Weyl I'm a material boy in a material world Please note I do not expect to be gittip'ed or flattr'ed for this work, rather it is simply a very pleasant surprise. I largely create and release works like this because I need them or I find it enjoyable; however, don't let that stop you if you feel like it ;) Flattr , Gratipay , or indulge my Amazon Wishlist ... If and *only* if you so desire. CONTRIBUTORS * Chad Granum * Karen Etheridge COPYRIGHT AND LICENSE This software is Copyright (c) 2012 by Chris Weyl. This is free software, licensed under: The GNU Lesser General Public License, Version 2.1, February 1999 Test-Moose-More-0.037/Changes0000644000175000017500000001433512653511243016175 0ustar rsrchboyrsrchboyRevision history for Test-Moose-More 0.037 2016-01-31 17:02:52 CST-0600 * No code changes -- releasing 0.036 as GA 0.036-TRIAL 2016-01-20 20:48:30 CST-0600 * More test functions now honor "name" overrides, resulting in more sensible output when deeply testing using the validate_*() functions. 0.035 2015-08-26 12:40:38 PDT-0700 * validate_role() will now perform checks on a role to ensure the role intends to wrap methods on application. 0.034-TRIAL 2015-07-29 23:22:49 PDT-0700 * validate_role(), validate_class(), validate_thing(), and validate_attribute() now accept '-subtest', causing them to wrap all the tests they run under a subtest. 0.033 2015-07-29 18:25:51 PDT-0700 * validate_role($role, -compose => 1, ...) will now add a sanity test that the composed subclass actually does $role when composing the arguments to pass to validate_class(). 0.032 2015-07-11 22:47:44 PDT-0700 * Better documentation for most of the validate_*() functions. * Add a -compose option to validate_role(), to handle a common pattern automagically. * When checking attribute traits, we now attempt to resolve them with the appropriate functions from Moose::Util (so that things like native traits are found with a minimum of pain). 0.031 2015-06-30 18:30:27 PDT-0700 * We now export validate_thing() * Add subroutine parameters to the sugar functions. * Add sugar checking to validate_thing() ('sugar => 0|1') 0.030 2015-06-28 01:01:58 PDT-0700 * Add method modifier checks for roles. 0.029 2015-03-29 15:24:40 PDT-0700 * No code changes -- 0.028_01 doesn't seem to have broken anything, so release as non-dev. 0.028_01 2015-03-14 21:03:50 PDT-0700 * Sub::Exporter -> Sub::Exporter::Progressive * normalize test names to end with '_ok' (e.g. is_{role,class} -> is_{role,class}_ok) 0.028 2015-03-12 19:28:22 PDT-0700 * Add is_{,not_}immutable_ok tests * Add 'immutable' check to validate_class 0.027 2015-03-10 20:16:38 PDT-0700 * Drop autobox usage (thanks, @ether!) 0.026 2015-01-18 15:11:22 PST-0800 * **NO CODE CHANGES** Promote 0.025_01 to 0.026. For realz this time. *le sigh* 0.025_02 2015-01-18 15:09:18 PST-0800 * **NO CODE CHANGES** Promote 0.025_01 to 0.026 0.025_01 2014-12-23 23:48:18 PST-0800 * Handle role attributes in a kinder, gentler way * Set our test level correctly when validating attributes 0.025 2014-11-21 11:29:28 PST-0800 * Merge pull request #13 to handle the latest Test::More alphas. Thanks, @exodist! 0.024 2014-05-14 11:58:47 PDT-0700 * validate_thing() now does not try to run subtests against attributes it does not find 0.023 2014-01-21 22:39:47 PST-0800 * fix test error with Moose-2.1200 by adding missing coercions 0.022 2013-11-10 23:16:32 PST-0800 * ...and add an explicit dependency on TAP::SimpleOutput 0.002 0.021 2013-11-10 23:13:27 PST-0800 * Handle Test::More's new output for subtests in 0.98_05+ * Dodge isa_ok()'s output change by rolling our own 0.020 2013-08-01 07:33:57 PDT-0700 * Drop Perl6::Junction in favor of Syntax::Keyword::Junction Same thing -- essentially, AFAICT -- except that we don't get 'smartmatch operator is experimental' warnings in 5.18 :) 0.019 2013-01-21 07:35:07 PST-0800 * no code changes, netadata fixup only -- stop requiring Moose::Deprecated, as it is no longer indexed. 0.018 2013-01-09 07:48:01 PST8PDT * test if an attribute should coerce or not 0.017 2012-10-28 15:38:16 PST8PDT * Instead of failing on "unknown attribute options" when performing attribute validation checks, first look to see if they're actually an attribute on the attribute metaclass; this is a fairly common situation when attribute traits are used. * Check if an attribute is required or not. 0.016 2012-10-21 15:03:32 PST8PDT * add is_anon(), is_not_anon() * allow anonymous => 1|0 in validate_thing() (though not documented) * use validate_class() when checking attributes with validate_class() 0.015 2012-10-20 17:00:59 PST8PDT * NO CODE CHANGES from 0.014. We should be at a good point where the newer attribute checking tests are useable and won't need to change in any incompatible ways (hopefully!). 0.014 2012-10-04 20:28:49 PST8PDT * TRIAL release * better tests for our new validate_attribute and attribute_options_ok * use subtests when checking attributes in validate_class * drop t/funcs.pm in favor of TAP::SimpleOutput 0.013 2012-09-30 13:59:22 PST8PDT * TRIAL release * mark traits as a valid attribute option to test for, but not currently checked (skipped, that is). * Handle validating an attribute as a "thing" and its options at the same time by interperting all keys of options to check that start with '-' as a key for validate_thing(). This should allow the validate_*'s to pass off to validate_attribute() without much violence. 0.012 2012-09-29 23:18:12 PST8PDT * TRIAL release * add first pass at validate_attribute(), adapted from MooseX::AttributeShortcuts' test suite 0.011 2012-08-26 22:32:59 America/Los_Angeles * drop AttributeShortcuts req from t/, or we may run into build issues 0.010 2012-08-24 15:01:48 America/Los_Angeles * add has_required_methods_ok() * add required_methods() to validate_role(), and test 0.009 2012-04-26 22:34:16 America/Los_Angeles * initial (undocumented) attribute meta-validation via validate_*(). Undocumented until we settle on a coherent way to do this across the board. 0.008 2012-04-13 13:52:33 America/Los_Angeles * add has_attribute_ok, and extended to deal with attributes in roles, as the prior method seems to have stopped working. 0.007 2012-04-11 17:52:41 America/Los_Angeles * add does_not_ok() * add 'does_not' option to validate_thing()/etc 0.006 2012-04-07 23:19:40 America/Los_Angeles * fix POD and actually implement more of validate_thing() 0.005 2012-02-05 06:14:58 America/Los_Angeles * export Test::Moose::with_immutable() 0.004 2012-02-02 16:20:01 America/Los_Angeles * add does_ok(), meta_ok() 0.003 2012-01-23 15:15:39 America/Los_Angeles 0.002 2012-01-21 20:07:26 America/Los_Angeles * add check_sugar_ok and check_sugar_removed_ok 0.001 2012-01-21 10:52:14 America/Los_Angeles * initial release Test-Moose-More-0.037/LICENSE0000644000175000017500000006011712653511243015706 0ustar rsrchboyrsrchboyThis software is Copyright (c) 2012 by Chris Weyl. This is free software, licensed under: The GNU Lesser General Public License, Version 2.1, February 1999 The GNU Lesser General Public License (LGPL) Version 2.1, February 1999 (The master copy of this license lives on the GNU website.) Copyright (C) 1991, 1999 Free Software Foundation, Inc. 59 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. [This is the first released version of the Lesser GPL. It also counts as the successor of the GNU Library Public License, version 2, hence the version number 2.1.] Preamble The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public Licenses are intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This license, the Lesser General Public License, applies to some specially designated software packages--typically libraries--of the Free Software Foundation and other authors who decide to use it. You can use it too, but we suggest you first think carefully about whether this license or the ordinary General Public License is the better strategy to use in any particular case, based on the explanations below. When we speak of free software, we are referring to freedom of use, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish); that you receive source code or can get it if you want it; that you can change the software and use pieces of it in new free programs; and that you are informed that you can do these things. To protect your rights, we need to make restrictions that forbid distributors to deny you these rights or to ask you to surrender these rights. These restrictions translate to certain responsibilities for you if you distribute copies of the library or if you modify it. For example, if you distribute copies of the library, whether gratis or for a fee, you must give the recipients all the rights that we gave you. You must make sure that they, too, receive or can get the source code. If you link other code with the library, you must provide complete object files to the recipients, so that they can relink them with the library after making changes to the library and recompiling it. And you must show them these terms so they know their rights. We protect your rights with a two-step method: (1) we copyright the library, and (2) we offer you this license, which gives you legal permission to copy, distribute and/or modify the library. To protect each distributor, we want to make it very clear that there is no warranty for the free library. Also, if the library is modified by someone else and passed on, the recipients should know that what they have is not the original version, so that the original author's reputation will not be affected by problems that might be introduced by others. Finally, software patents pose a constant threat to the existence of any free program. We wish to make sure that a company cannot effectively restrict the users of a free program by obtaining a restrictive license from a patent holder. Therefore, we insist that any patent license obtained for a version of the library must be consistent with the full freedom of use specified in this license. Most GNU software, including some libraries, is covered by the ordinary GNU General Public License. This license, the GNU Lesser General Public License, applies to certain designated libraries, and is quite different from the ordinary General Public License. We use this license for certain libraries in order to permit linking those libraries into non-free programs. When a program is linked with a library, whether statically or using a shared library, the combination of the two is legally speaking a combined work, a derivative of the original library. The ordinary General Public License therefore permits such linking only if the entire combination fits its criteria of freedom. The Lesser General Public License permits more lax criteria for linking other code with the library. We call this license the "Lesser" General Public License because it does Less to protect the user's freedom than the ordinary General Public License. It also provides other free software developers Less of an advantage over competing non-free programs. These disadvantages are the reason we use the ordinary General Public License for many libraries. However, the Lesser license provides advantages in certain special circumstances. For example, on rare occasions, there may be a special need to encourage the widest possible use of a certain library, so that it becomes a de-facto standard. To achieve this, non-free programs must be allowed to use the library. A more frequent case is that a free library does the same job as widely used non-free libraries. In this case, there is little to gain by limiting the free library to free software only, so we use the Lesser General Public License. In other cases, permission to use a particular library in non-free programs enables a greater number of people to use a large body of free software. For example, permission to use the GNU C Library in non-free programs enables many more people to use the whole GNU operating system, as well as its variant, the GNU/Linux operating system. Although the Lesser General Public License is Less protective of the users' freedom, it does ensure that the user of a program that is linked with the Library has the freedom and the wherewithal to run that program using a modified version of the Library. The precise terms and conditions for copying, distribution and modification follow. Pay close attention to the difference between a "work based on the library" and a "work that uses the library". The former contains code derived from the library, whereas the latter must be combined with the library in order to run. TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License Agreement applies to any software library or other program which contains a notice placed by the copyright holder or other authorized party saying it may be distributed under the terms of this Lesser General Public License (also called "this License"). Each licensee is addressed as "you". A "library" means a collection of software functions and/or data prepared so as to be conveniently linked with application programs (which use some of those functions and data) to form executables. The "Library", below, refers to any such software library or work which has been distributed under these terms. A "work based on the Library" means either the Library or any derivative work under copyright law: that is to say, a work containing the Library or a portion of it, either verbatim or with modifications and/or translated straightforwardly into another language. (Hereinafter, translation is included without limitation in the term "modification".) "Source code" for a work means the preferred form of the work for making modifications to it. For a library, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the library. Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running a program using the Library is not restricted, and output from such a program is covered only if its contents constitute a work based on the Library (independent of the use of the Library in a tool for writing it). Whether that is true depends on what the Library does and what the program that uses the Library does. 1. You may copy and distribute verbatim copies of the Library's complete 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 License and to the absence of any warranty; and distribute a copy of this License along with the Library. 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. 2. You may modify your copy or copies of the Library or any portion of it, thus forming a work based on the Library, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: a) The modified work must itself be a software library. b) You must cause the files modified to carry prominent notices stating that you changed the files and the date of any change. c) You must cause the whole of the work to be licensed at no charge to all third parties under the terms of this License. d) If a facility in the modified Library refers to a function or a table of data to be supplied by an application program that uses the facility, other than as an argument passed when the facility is invoked, then you must make a good faith effort to ensure that, in the event an application does not supply such function or table, the facility still operates, and performs whatever part of its purpose remains meaningful. (For example, a function in a library to compute square roots has a purpose that is entirely well-defined independent of the application. Therefore, Subsection 2d requires that any application-supplied function or table used by this function must be optional: if the application does not supply it, the square root function must still compute square roots.) These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Library, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Library, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Library. In addition, mere aggregation of another work not based on the Library with the Library (or with a work based on the Library) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. 3. You may opt to apply the terms of the ordinary GNU General Public License instead of this License to a given copy of the Library. To do this, you must alter all the notices that refer to this License, so that they refer to the ordinary GNU General Public License, version 2, instead of to this License. (If a newer version than version 2 of the ordinary GNU General Public License has appeared, then you can specify that version instead if you wish.) Do not make any other change in these notices. Once this change is made in a given copy, it is irreversible for that copy, so the ordinary GNU General Public License applies to all subsequent copies and derivative works made from that copy. This option is useful when you wish to copy part of the code of the Library into a program that is not a library. 4. You may copy and distribute the Library (or a portion or derivative of it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange. If distribution of object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place satisfies the requirement to distribute the source code, even though third parties are not compelled to copy the source along with the object code. 5. A program that contains no derivative of any portion of the Library, but is designed to work with the Library by being compiled or linked with it, is called a "work that uses the Library". Such a work, in isolation, is not a derivative work of the Library, and therefore falls outside the scope of this License. However, linking a "work that uses the Library" with the Library creates an executable that is a derivative of the Library (because it contains portions of the Library), rather than a "work that uses the library". The executable is therefore covered by this License. Section 6 states terms for distribution of such executables. When a "work that uses the Library" uses material from a header file that is part of the Library, the object code for the work may be a derivative work of the Library even though the source code is not. Whether this is true is especially significant if the work can be linked without the Library, or if the work is itself a library. The threshold for this to be true is not precisely defined by law. If such an object file uses only numerical parameters, data structure layouts and accessors, and small macros and small inline functions (ten lines or less in length), then the use of the object file is unrestricted, regardless of whether it is legally a derivative work. (Executables containing this object code plus portions of the Library will still fall under Section 6.) Otherwise, if the work is a derivative of the Library, you may distribute the object code for the work under the terms of Section 6. Any executables containing that work also fall under Section 6, whether or not they are linked directly with the Library itself. 6. As an exception to the Sections above, you may also combine or link a "work that uses the Library" with the Library to produce a work containing portions of the Library, and distribute that work under terms of your choice, provided that the terms permit modification of the work for the customer's own use and reverse engineering for debugging such modifications. You must give prominent notice with each copy of the work that the Library is used in it and that the Library and its use are covered by this License. You must supply a copy of this License. If the work during execution displays copyright notices, you must include the copyright notice for the Library among them, as well as a reference directing the user to the copy of this License. Also, you must do one of these things: a) Accompany the work with the complete corresponding machine-readable source code for the Library including whatever changes were used in the work (which must be distributed under Sections 1 and 2 above); and, if the work is an executable linked with the Library, with the complete machine-readable "work that uses the Library", as object code and/or source code, so that the user can modify the Library and then relink to produce a modified executable containing the modified Library. (It is understood that the user who changes the contents of definitions files in the Library will not necessarily be able to recompile the application to use the modified definitions.) b) Use a suitable shared library mechanism for linking with the Library. A suitable mechanism is one that (1) uses at run time a copy of the library already present on the user's computer system, rather than copying library functions into the executable, and (2) will operate properly with a modified version of the library, if the user installs one, as long as the modified version is interface-compatible with the version that the work was made with. c) Accompany the work with a written offer, valid for at least three years, to give the same user the materials specified in Subsection 6a, above, for a charge no more than the cost of performing this distribution. d) If distribution of the work is made by offering access to copy from a designated place, offer equivalent access to copy the above specified materials from the same place. e) Verify that the user has already received a copy of these materials or that you have already sent this user a copy. For an executable, the required form of the "work that uses the Library" must include any data and utility programs needed for reproducing the executable from it. However, as a special exception, the materials to be distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. It may happen that this requirement contradicts the license restrictions of other proprietary libraries that do not normally accompany the operating system. Such a contradiction means you cannot use both them and the Library together in an executable that you distribute. 7. You may place library facilities that are a work based on the Library side-by-side in a single library together with other library facilities not covered by this License, and distribute such a combined library, provided that the separate distribution of the work based on the Library and of the other library facilities is otherwise permitted, and provided that you do these two things: a) Accompany the combined library with a copy of the same work based on the Library, uncombined with any other library facilities. This must be distributed under the terms of the Sections above. b) Give prominent notice with the combined library of the fact that part of it is a work based on the Library, and explaining where to find the accompanying uncombined form of the same work. 8. You may not copy, modify, sublicense, link with, or distribute the Library except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense, link with, or distribute the Library is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. 9. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Library or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Library (or any work based on the Library), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Library or works based on it. 10. Each time you redistribute the Library (or any work based on the Library), the recipient automatically receives a license from the original licensor to copy, distribute, link with or modify the Library subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties with this License. 11. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Library at all. For example, if a patent license would not permit royalty-free redistribution of the Library by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Library. If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply, and the section as a whole is intended to apply in other circumstances. It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. 12. If the distribution and/or use of the Library is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Library under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. 13. The Free Software Foundation may publish revised and/or new versions of the Lesser 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 Library specifies a version number of this 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 Library does not specify a license version number, you may choose any version ever published by the Free Software Foundation. 14. If you wish to incorporate parts of the Library into other free programs whose distribution conditions are incompatible with these, 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 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE LIBRARY "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 LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 16. 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 LIBRARY 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 LIBRARY (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 LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS Test-Moose-More-0.037/dist.ini0000644000175000017500000000074712653511243016350 0ustar rsrchboyrsrchboyname = Test-Moose-More author = Chris Weyl license = LGPL_2_1 copyright_holder = Chris Weyl copyright_year = 2012 [@RSRCHBOY] tweet = 1 autoprereqs_skip = ^(funcs|TestClass.*|TestRole.*)$ ReportVersions::Tiny.include[0] = Moose ReportVersions::Tiny.include[1] = Class::MOP [RemovePrereqs] ; this was excluded from cpan indexing around 2.0002, so depending on it leads ; to predictably fun mouse-in-a-wheel debugging sessions :\ remove = Moose::Deprecated Test-Moose-More-0.037/MANIFEST0000644000175000017500000000164112653511243016027 0ustar rsrchboyrsrchboy# This file was automatically generated by Dist::Zilla::Plugin::Manifest v5.043. .travis.yml Changes LICENSE MANIFEST META.json META.yml Makefile.PL README SIGNATURE cpanfile dist.ini lib/Test/Moose/More.pm t/00-check-deps.t t/00-compile.t t/00-report-prereqs.dd t/00-report-prereqs.t t/attribute/coerce.t t/check_sugar.t t/does_not_ok.t t/does_ok.t t/has_attribute_ok.t t/has_method_ok.t t/is_anon_ok.t t/is_class_ok.t t/is_immutable_ok.t t/is_not_anon_ok.t t/is_role_ok.t t/meta_ok.t t/requires_method_ok.t t/validate_attribute.t t/validate_attribute/in_roles.t t/validate_class.t t/validate_role/basic.t t/validate_role/compose.t t/validate_thing/sugar.t t/wrapped/in_roles.t xt/author/eol.t xt/author/no-tabs.t xt/author/pod-coverage.t xt/author/pod-spell.t xt/author/pod-syntax.t xt/release/consistent-version.t xt/release/has-version.t xt/release/minimum-version.t xt/release/no-smart-comments.t xt/release/pod-linkcheck.t Test-Moose-More-0.037/META.yml0000644000175000017500000005244012653511243016152 0ustar rsrchboyrsrchboy--- abstract: 'More tools for testing Moose packages' author: - 'Chris Weyl ' build_requires: ExtUtils::MakeMaker: '0' File::Spec: '0' IO::Handle: '0' IPC::Open3: '0' Moose: '0' Moose::Role: '0' Perl::Version: '0' TAP::SimpleOutput: '0.002' Test::Builder::Tester: '0' Test::CheckDeps: '0.010' Test::More: '0.94' aliased: '0' blib: '1.01' constant: '0' namespace::autoclean: '0' perl: '5.006' configure_requires: ExtUtils::MakeMaker: '0' perl: '5.006' dynamic_config: 0 generated_by: 'Dist::Zilla version 5.043, CPAN::Meta::Converter version 2.150005' license: lgpl meta-spec: url: http://module-build.sourceforge.net/META-spec-v1.4.html version: '1.4' name: Test-Moose-More no_index: directory: - corpus - t provides: Test::Moose::More: file: lib/Test/Moose/More.pm version: '0.037' requires: Data::OptList: '0' Moose::Util: '0' Moose::Util::TypeConstraints: '0' Scalar::Util: '0' Sub::Exporter::Progressive: '0' Syntax::Keyword::Junction: '0' Test::Builder: '0' Test::Moose: '0' Test::More: '0.94' perl: '5.006' strict: '0' warnings: '0' resources: bugtracker: https://github.com/RsrchBoy/Test-Moose-More/issues homepage: https://github.com/RsrchBoy/Test-Moose-More repository: https://github.com/RsrchBoy/Test-Moose-More.git version: '0.037' x_Dist_Zilla: perl: version: '5.020001' plugins: - class: Dist::Zilla::Plugin::NextRelease name: '@RSRCHBOY/NextRelease' version: '5.043' - class: Dist::Zilla::Plugin::Git::NextVersion config: Dist::Zilla::Plugin::Git::NextVersion: first_version: '0.001' version_by_branch: 0 version_regexp: (?^:^(\d.\d+(_\d\d)?)(-TRIAL|)$) Dist::Zilla::Role::Git::Repo: repo_root: . name: '@RSRCHBOY/Git::NextVersion' version: '2.036' - class: Dist::Zilla::Plugin::ContributorsFromGit name: '@RSRCHBOY/ContributorsFromGit' version: '0.017' - class: Dist::Zilla::Plugin::Git::CheckFor::CorrectBranch config: Dist::Zilla::Role::Git::Repo: repo_root: . name: '@RSRCHBOY/@Git::CheckFor/Git::CheckFor::CorrectBranch' version: '0.013' - class: Dist::Zilla::Plugin::Git::CheckFor::Fixups config: Dist::Zilla::Role::Git::Repo: repo_root: . name: '@RSRCHBOY/@Git::CheckFor/Git::CheckFor::Fixups' version: '0.013' - class: Dist::Zilla::Plugin::Git::CheckFor::MergeConflicts config: Dist::Zilla::Role::Git::Repo: repo_root: . name: '@RSRCHBOY/@Git::CheckFor/Git::CheckFor::MergeConflicts' version: '0.013' - class: Dist::Zilla::Plugin::GatherDir config: Dist::Zilla::Plugin::GatherDir: exclude_filename: - LICENSE - cpanfile exclude_match: [] follow_symlinks: 0 include_dotfiles: 0 prefix: '' prune_directory: [] root: . name: '@RSRCHBOY/GatherDir' version: '5.043' - class: Dist::Zilla::Plugin::PromptIfStale config: Dist::Zilla::Plugin::PromptIfStale: check_all_plugins: 0 check_all_prereqs: 0 modules: - Dist::Zilla - Dist::Zilla::PluginBundle::RSRCHBOY phase: build skip: [] name: '@RSRCHBOY/PromptIfStale' version: '0.047' - class: Dist::Zilla::Plugin::PruneCruft name: '@RSRCHBOY/PruneCruft' version: '5.043' - class: Dist::Zilla::Plugin::Git::Describe name: '@RSRCHBOY/Git::Describe' version: '0.006' - class: Dist::Zilla::Plugin::ExecDir name: '@RSRCHBOY/ExecDir' version: '5.043' - class: Dist::Zilla::Plugin::ShareDir name: '@RSRCHBOY/ShareDir' version: '5.043' - class: Dist::Zilla::Plugin::MakeMaker config: Dist::Zilla::Role::TestRunner: default_jobs: 1 name: '@RSRCHBOY/MakeMaker' version: '5.043' - class: Dist::Zilla::Plugin::Manifest name: '@RSRCHBOY/Manifest' version: '5.043' - class: Dist::Zilla::Plugin::SurgicalPkgVersion name: '@RSRCHBOY/SurgicalPkgVersion' version: '0.0019' - class: Dist::Zilla::Plugin::MinimumPerl name: '@RSRCHBOY/MinimumPerl' version: '1.006' - class: Dist::Zilla::Plugin::Test::ReportPrereqs name: '@RSRCHBOY/Test::ReportPrereqs' version: '0.021' - class: Dist::Zilla::Plugin::AutoPrereqs name: '@RSRCHBOY/AutoPrereqs' version: '5.043' - class: Dist::Zilla::Plugin::Prepender name: '@RSRCHBOY/Prepender' version: '2.002' - class: Dist::Zilla::Plugin::Prereqs config: Dist::Zilla::Plugin::Prereqs: phase: develop type: requires name: '@RSRCHBOY/AuthorBundleDevelopRequires' version: '5.043' - class: Dist::Zilla::Plugin::Test::PodSpelling config: Dist::Zilla::Plugin::Test::PodSpelling: directories: [] spell_cmd: '' stopwords: - ABEND - AFAICT - Formattable - Gratipay - RSRCHBOY - "RSRCHBOY's" - codebase - coderef - formattable - gpg - implementers - ini - metaclass - metaclasses - parameterization - parameterized - subclasses wordlist: Pod::Wordlist name: '@RSRCHBOY/Test::PodSpelling' version: '2.007000' - class: Dist::Zilla::Plugin::ConsistentVersionTest name: '@RSRCHBOY/ConsistentVersionTest' version: '0.02' - class: Dist::Zilla::Plugin::PodCoverageTests name: '@RSRCHBOY/PodCoverageTests' version: '5.043' - class: Dist::Zilla::Plugin::PodSyntaxTests name: '@RSRCHBOY/PodSyntaxTests' version: '5.043' - class: Dist::Zilla::Plugin::Test::NoTabs config: Dist::Zilla::Plugin::Test::NoTabs: filename: xt/author/no-tabs.t finder: - ':InstallModules' - ':ExecFiles' - ':TestFiles' name: '@RSRCHBOY/Test::NoTabs' version: '0.15' - class: Dist::Zilla::Plugin::Test::EOL config: Dist::Zilla::Plugin::Test::EOL: filename: xt/author/eol.t finder: - ':InstallModules' - ':ExecFiles' - ':TestFiles' trailing_whitespace: '1' name: '@RSRCHBOY/Test::EOL' version: '0.18' - class: Dist::Zilla::Plugin::HasVersionTests name: '@RSRCHBOY/HasVersionTests' version: '1.101420' - class: Dist::Zilla::Plugin::Test::Compile config: Dist::Zilla::Plugin::Test::Compile: bail_out_on_fail: '0' fail_on_warning: author fake_home: 0 filename: t/00-compile.t module_finder: - ':InstallModules' needs_display: 0 phase: test script_finder: - ':PerlExecFiles' skips: [] name: '@RSRCHBOY/Test::Compile' version: '2.054' - class: Dist::Zilla::Plugin::NoSmartCommentsTests name: '@RSRCHBOY/NoSmartCommentsTests' version: '0.008' - class: Dist::Zilla::Plugin::Test::Pod::LinkCheck name: '@RSRCHBOY/Test::Pod::LinkCheck' version: '1.002' - class: Dist::Zilla::Plugin::RunExtraTests config: Dist::Zilla::Role::TestRunner: default_jobs: 1 name: '@RSRCHBOY/RunExtraTests' version: '0.028' - class: Dist::Zilla::Plugin::CheckExtraTests name: '@RSRCHBOY/CheckExtraTests' version: '0.028' - class: Dist::Zilla::Plugin::Test::MinimumVersion name: '@RSRCHBOY/Test::MinimumVersion' version: '2.000006' - class: Dist::Zilla::Plugin::Authority name: '@RSRCHBOY/Authority' version: '1.009' - class: Dist::Zilla::Plugin::MetaConfig name: '@RSRCHBOY/MetaConfig' version: '5.043' - class: Dist::Zilla::Plugin::MetaJSON name: '@RSRCHBOY/MetaJSON' version: '5.043' - class: Dist::Zilla::Plugin::MetaYAML name: '@RSRCHBOY/MetaYAML' version: '5.043' - class: Dist::Zilla::Plugin::MetaNoIndex name: '@RSRCHBOY/MetaNoIndex' version: '5.043' - class: Dist::Zilla::Plugin::MetaProvides::Package config: Dist::Zilla::Plugin::MetaProvides::Package: finder_objects: - class: Dist::Zilla::Plugin::FinderCode name: '@RSRCHBOY/MetaProvides::Package/AUTOVIV/:InstallModulesPM' version: '5.043' Dist::Zilla::Role::MetaProvider::Provider: Dist::Zilla::Role::MetaProvider::Provider::VERSION: '2.001011' inherit_missing: '1' inherit_version: '1' meta_noindex: '1' name: '@RSRCHBOY/MetaProvides::Package' version: '2.003001' - class: Dist::Zilla::Plugin::GithubMeta name: '@RSRCHBOY/GithubMeta' version: '0.54' - class: Dist::Zilla::Plugin::TestRelease name: '@RSRCHBOY/TestRelease' version: '5.043' - class: Dist::Zilla::Plugin::CheckChangesHasContent name: '@RSRCHBOY/CheckChangesHasContent' version: '0.008' - class: Dist::Zilla::Plugin::CheckPrereqsIndexed name: '@RSRCHBOY/CheckPrereqsIndexed' version: '0.017' - class: Dist::Zilla::Plugin::Git::Remote::Update name: '@RSRCHBOY/GitFetchOrigin' version: 0.1.2 - class: Dist::Zilla::Plugin::Git::Remote::Check name: '@RSRCHBOY/GitCheckReleaseBranchSync' version: 0.1.2 - class: Dist::Zilla::Plugin::Git::Remote::Check name: '@RSRCHBOY/GitCheckMasterBranchSync' version: 0.1.2 - class: Dist::Zilla::Plugin::Git::Check config: Dist::Zilla::Plugin::Git::Check: untracked_files: die Dist::Zilla::Role::Git::DirtyFiles: allow_dirty: - .gitignore - .travis.yml - Changes - LICENSE - README.mkdn - cpanfile - dist.ini - weaver.ini allow_dirty_match: [] changelog: Changes Dist::Zilla::Role::Git::Repo: repo_root: . name: '@RSRCHBOY/Git::Check' version: '2.036' - class: Dist::Zilla::Plugin::Git::Commit config: Dist::Zilla::Plugin::Git::Commit: add_files_in: [] commit_msg: v%v%n%n%c Dist::Zilla::Role::Git::DirtyFiles: allow_dirty: - .gitignore - .travis.yml - Changes - LICENSE - README.mkdn - cpanfile - dist.ini - weaver.ini allow_dirty_match: [] changelog: Changes Dist::Zilla::Role::Git::Repo: repo_root: . Dist::Zilla::Role::Git::StringFormatter: time_zone: local name: '@RSRCHBOY/Git::Commit' version: '2.036' - class: Dist::Zilla::Plugin::Test::CheckDeps config: Dist::Zilla::Plugin::Test::CheckDeps: fatal: 1 filename: t/00-check-deps.t level: suggests todo_when: '0' name: '@RSRCHBOY/Test::CheckDeps' version: '0.013' - class: Dist::Zilla::Plugin::CheckSelfDependency config: Dist::Zilla::Plugin::CheckSelfDependency: finder: - ':InstallModules' Dist::Zilla::Role::ModuleMetadata: Module::Metadata: '1.000027' version: '0.003' name: '@RSRCHBOY/CheckSelfDependency' version: '0.011' - class: Dist::Zilla::Plugin::Travis::ConfigForReleaseBranch name: '@RSRCHBOY/Travis::ConfigForReleaseBranch' version: '0.004' - class: Dist::Zilla::Plugin::SchwartzRatio name: '@RSRCHBOY/SchwartzRatio' version: 0.2.0 - class: Dist::Zilla::Plugin::Git::Tag config: Dist::Zilla::Plugin::Git::Tag: branch: ~ changelog: Changes signed: 1 tag: '0.037' tag_format: '%v' tag_message: v%v Dist::Zilla::Role::Git::Repo: repo_root: . Dist::Zilla::Role::Git::StringFormatter: time_zone: local name: '@RSRCHBOY/Git::Tag' version: '2.036' - class: Dist::Zilla::Plugin::Git::CommitBuild config: Dist::Zilla::Plugin::Git::CommitBuild: branch: build/%b build_root: ~ message: 'Build results of %h (on %b)' multiple_inheritance: 0 release_branch: ~ release_message: 'Build results of %h (on %b)' Dist::Zilla::Role::Git::Repo: repo_root: . name: '@RSRCHBOY/Git::CommitBuild::Build' version: '2.036' - class: Dist::Zilla::Plugin::Git::CommitBuild config: Dist::Zilla::Plugin::Git::CommitBuild: branch: build/%b build_root: ~ message: 'Build results of %h (on %b)' multiple_inheritance: 1 release_branch: release/cpan release_message: 'Full build of CPAN release %v%t' Dist::Zilla::Role::Git::Repo: repo_root: . name: '@RSRCHBOY/Git::CommitBuild::Release' version: '2.036' - class: Dist::Zilla::Plugin::Git::Push config: Dist::Zilla::Plugin::Git::Push: push_to: - origin - 'origin refs/heads/release/cpan:refs/heads/release/cpan' remotes_must_exist: 1 Dist::Zilla::Role::Git::Repo: repo_root: . name: '@RSRCHBOY/Git::Push' version: '2.036' - class: Dist::Zilla::Plugin::UploadToCPAN name: '@RSRCHBOY/UploadToCPAN' version: '5.043' - class: Dist::Zilla::Plugin::Signature name: '@RSRCHBOY/Signature' version: '1.100930' - class: Dist::Zilla::Plugin::Twitter name: '@RSRCHBOY/Twitter' version: '0.026' - class: Dist::Zilla::Plugin::InstallRelease name: '@RSRCHBOY/InstallRelease' version: '0.008' - class: Dist::Zilla::Plugin::GitHub::Update config: Dist::Zilla::Plugin::GitHub::Update: metacpan: 1 name: '@RSRCHBOY/GitHub::Update' version: '0.42' - class: Dist::Zilla::Plugin::ArchiveRelease name: '@RSRCHBOY/ArchiveRelease' version: '4.26' - class: Dist::Zilla::Plugin::ConfirmRelease name: '@RSRCHBOY/ConfirmRelease' version: '5.043' - class: Dist::Zilla::Plugin::License name: '@RSRCHBOY/License' version: '5.043' - class: Dist::Zilla::Plugin::CPANFile name: '@RSRCHBOY/CPANFile' version: '5.043' - class: Dist::Zilla::Plugin::ReadmeAnyFromPod config: Dist::Zilla::Role::FileWatcher: version: '0.006' name: '@RSRCHBOY/ReadmeMarkdownInRoot' version: '0.150250' - class: Dist::Zilla::Plugin::ReadmeAnyFromPod config: Dist::Zilla::Role::FileWatcher: version: '0.006' name: '@RSRCHBOY/ReadmeTxt' version: '0.150250' - class: Dist::Zilla::Plugin::CopyFilesFromBuild name: '@RSRCHBOY/CopyFilesFromBuild' version: '0.151680' - class: Dist::Zilla::Plugin::GitHubREADME::Badge name: '@RSRCHBOY/GitHubREADME::Badge' version: '0.16' - class: Dist::Zilla::Plugin::PodWeaver config: Dist::Zilla::Plugin::PodWeaver: config_plugins: - '@RSRCHBOY' finder: - ':InstallModules' - ':ExecFiles' plugins: - class: Pod::Weaver::Plugin::StopWords name: '@RSRCHBOY/StopWords' version: '1.010' - class: Pod::Weaver::Plugin::EnsurePod5 name: '@CorePrep/EnsurePod5' version: '4.012' - class: Pod::Weaver::Plugin::H1Nester name: '@CorePrep/H1Nester' version: '4.012' - class: Pod::Weaver::Section::Name name: '@RSRCHBOY/Name' version: '4.012' - class: Pod::Weaver::Section::Version name: '@RSRCHBOY/Version' version: '4.012' - class: Pod::Weaver::Section::Region name: '@RSRCHBOY/prelude' version: '4.012' - class: Pod::Weaver::Section::Generic name: SYNOPSIS version: '4.012' - class: Pod::Weaver::Section::Generic name: DESCRIPTION version: '4.012' - class: Pod::Weaver::Section::Generic name: OVERVIEW version: '4.012' - class: Pod::Weaver::Section::Collect name: EXTENDS version: '4.012' - class: Pod::Weaver::Section::Collect name: IMPLEMENTS version: '4.012' - class: Pod::Weaver::Section::Collect name: CONSUMES version: '4.012' - class: Pod::Weaver::Section::RSRCHBOY::RoleParameters name: 'ROLE PARAMETERS' version: '0.066' - class: Pod::Weaver::Section::RSRCHBOY::RequiredAttributes name: 'REQUIRED ATTRIBUTES' version: '0.066' - class: Pod::Weaver::Section::RSRCHBOY::LazyAttributes name: 'LAZY ATTRIBUTES' version: '0.066' - class: Pod::Weaver::Section::Collect name: 'REQUIRED METHODS' version: '4.012' - class: Pod::Weaver::Section::Collect name: ATTRIBUTES version: '4.012' - class: Pod::Weaver::Section::Collect name: METHODS version: '4.012' - class: Pod::Weaver::Section::Collect name: 'PRIVATE METHODS' version: '4.012' - class: Pod::Weaver::Section::Collect name: FUNCTIONS version: '4.012' - class: Pod::Weaver::Section::Collect name: TYPES version: '4.012' - class: Pod::Weaver::Section::Collect name: 'TEST FUNCTIONS' version: '4.012' - class: Pod::Weaver::Section::Leftovers name: '@RSRCHBOY/Leftovers' version: '4.012' - class: Pod::Weaver::Section::Region name: '@RSRCHBOY/postlude' version: '4.012' - class: Pod::Weaver::Section::SeeAlso name: '@RSRCHBOY/SeeAlso' version: '1.003' - class: Pod::Weaver::Section::Bugs name: '@RSRCHBOY/Bugs' version: '4.012' - class: Pod::Weaver::Section::RSRCHBOY::Authors name: RSRCHBOY::Authors version: '0.066' - class: Pod::Weaver::Section::Contributors name: '@RSRCHBOY/Contributors' version: '0.009' - class: Pod::Weaver::Section::Legal name: '@RSRCHBOY/Legal' version: '4.012' - class: Pod::Weaver::Plugin::Transformer name: '@RSRCHBOY/List' version: '4.012' - class: Pod::Weaver::Plugin::SingleEncoding name: '@RSRCHBOY/SingleEncoding' version: '4.012' name: '@RSRCHBOY/PodWeaver' version: '4.006' - class: Dist::Zilla::Plugin::RemovePrereqs config: Dist::Zilla::Plugin::RemovePrereqs: modules_to_remove: - Moose::Deprecated name: RemovePrereqs version: '5.043' - class: Dist::Zilla::Plugin::FinderCode name: ':InstallModules' version: '5.043' - class: Dist::Zilla::Plugin::FinderCode name: ':IncModules' version: '5.043' - class: Dist::Zilla::Plugin::FinderCode name: ':TestFiles' version: '5.043' - class: Dist::Zilla::Plugin::FinderCode name: ':ExtraTestFiles' version: '5.043' - class: Dist::Zilla::Plugin::FinderCode name: ':ExecFiles' version: '5.043' - class: Dist::Zilla::Plugin::FinderCode name: ':PerlExecFiles' version: '5.043' - class: Dist::Zilla::Plugin::FinderCode name: ':ShareFiles' version: '5.043' - class: Dist::Zilla::Plugin::FinderCode name: ':MainModule' version: '5.043' - class: Dist::Zilla::Plugin::FinderCode name: ':AllFiles' version: '5.043' - class: Dist::Zilla::Plugin::FinderCode name: ':NoFiles' version: '5.043' - class: Dist::Zilla::Plugin::FinderCode name: '@RSRCHBOY/MetaProvides::Package/AUTOVIV/:InstallModulesPM' version: '5.043' zilla: class: Dist::Zilla::Dist::Builder config: is_trial: '0' version: '5.043' x_authority: cpan:RSRCHBOY x_contributors: - 'Chad Granum ' - 'Karen Etheridge ' Test-Moose-More-0.037/cpanfile0000644000175000017500000000305412653511243016402 0ustar rsrchboyrsrchboyrequires "Data::OptList" => "0"; requires "Moose::Util" => "0"; requires "Moose::Util::TypeConstraints" => "0"; requires "Scalar::Util" => "0"; requires "Sub::Exporter::Progressive" => "0"; requires "Syntax::Keyword::Junction" => "0"; requires "Test::Builder" => "0"; requires "Test::Moose" => "0"; requires "Test::More" => "0.94"; requires "perl" => "5.006"; requires "strict" => "0"; requires "warnings" => "0"; on 'test' => sub { requires "ExtUtils::MakeMaker" => "0"; requires "File::Spec" => "0"; requires "IO::Handle" => "0"; requires "IPC::Open3" => "0"; requires "Moose" => "0"; requires "Moose::Role" => "0"; requires "Perl::Version" => "0"; requires "TAP::SimpleOutput" => "0.002"; requires "Test::Builder::Tester" => "0"; requires "Test::CheckDeps" => "0.010"; requires "Test::More" => "0.94"; requires "aliased" => "0"; requires "blib" => "1.01"; requires "constant" => "0"; requires "namespace::autoclean" => "0"; requires "perl" => "5.006"; }; on 'test' => sub { recommends "CPAN::Meta" => "2.120900"; }; on 'configure' => sub { requires "ExtUtils::MakeMaker" => "0"; requires "perl" => "5.006"; }; on 'develop' => sub { requires "Dist::Zilla::PluginBundle::RSRCHBOY" => "0.066"; requires "Pod::Coverage::TrustPod" => "0"; requires "Pod::Wordlist" => "0"; requires "Test::EOL" => "0"; requires "Test::More" => "0.88"; requires "Test::NoTabs" => "0"; requires "Test::Pod" => "1.41"; requires "Test::Pod::Coverage" => "1.08"; requires "Test::Pod::LinkCheck" => "0"; requires "Test::Spelling" => "0.12"; }; Test-Moose-More-0.037/META.json0000644000175000017500000010177412653511243016327 0ustar rsrchboyrsrchboy{ "abstract" : "More tools for testing Moose packages", "author" : [ "Chris Weyl " ], "dynamic_config" : 0, "generated_by" : "Dist::Zilla version 5.043, CPAN::Meta::Converter version 2.150005", "license" : [ "lgpl_2_1" ], "meta-spec" : { "url" : "http://search.cpan.org/perldoc?CPAN::Meta::Spec", "version" : "2" }, "name" : "Test-Moose-More", "no_index" : { "directory" : [ "corpus", "t" ] }, "prereqs" : { "configure" : { "requires" : { "ExtUtils::MakeMaker" : "0", "perl" : "5.006" } }, "develop" : { "requires" : { "Dist::Zilla::PluginBundle::RSRCHBOY" : "0.066", "Pod::Coverage::TrustPod" : "0", "Pod::Wordlist" : "0", "Test::EOL" : "0", "Test::More" : "0.88", "Test::NoTabs" : "0", "Test::Pod" : "1.41", "Test::Pod::Coverage" : "1.08", "Test::Pod::LinkCheck" : "0", "Test::Spelling" : "0.12" } }, "runtime" : { "requires" : { "Data::OptList" : "0", "Moose::Util" : "0", "Moose::Util::TypeConstraints" : "0", "Scalar::Util" : "0", "Sub::Exporter::Progressive" : "0", "Syntax::Keyword::Junction" : "0", "Test::Builder" : "0", "Test::Moose" : "0", "Test::More" : "0.94", "perl" : "5.006", "strict" : "0", "warnings" : "0" } }, "test" : { "recommends" : { "CPAN::Meta" : "2.120900" }, "requires" : { "ExtUtils::MakeMaker" : "0", "File::Spec" : "0", "IO::Handle" : "0", "IPC::Open3" : "0", "Moose" : "0", "Moose::Role" : "0", "Perl::Version" : "0", "TAP::SimpleOutput" : "0.002", "Test::Builder::Tester" : "0", "Test::CheckDeps" : "0.010", "Test::More" : "0.94", "aliased" : "0", "blib" : "1.01", "constant" : "0", "namespace::autoclean" : "0", "perl" : "5.006" } } }, "provides" : { "Test::Moose::More" : { "file" : "lib/Test/Moose/More.pm", "version" : "0.037" } }, "release_status" : "stable", "resources" : { "bugtracker" : { "web" : "https://github.com/RsrchBoy/Test-Moose-More/issues" }, "homepage" : "https://github.com/RsrchBoy/Test-Moose-More", "repository" : { "type" : "git", "url" : "https://github.com/RsrchBoy/Test-Moose-More.git", "web" : "https://github.com/RsrchBoy/Test-Moose-More" } }, "version" : "0.037", "x_Dist_Zilla" : { "perl" : { "version" : "5.020001" }, "plugins" : [ { "class" : "Dist::Zilla::Plugin::NextRelease", "name" : "@RSRCHBOY/NextRelease", "version" : "5.043" }, { "class" : "Dist::Zilla::Plugin::Git::NextVersion", "config" : { "Dist::Zilla::Plugin::Git::NextVersion" : { "first_version" : "0.001", "version_by_branch" : 0, "version_regexp" : "(?^:^(\\d.\\d+(_\\d\\d)?)(-TRIAL|)$)" }, "Dist::Zilla::Role::Git::Repo" : { "repo_root" : "." } }, "name" : "@RSRCHBOY/Git::NextVersion", "version" : "2.036" }, { "class" : "Dist::Zilla::Plugin::ContributorsFromGit", "name" : "@RSRCHBOY/ContributorsFromGit", "version" : "0.017" }, { "class" : "Dist::Zilla::Plugin::Git::CheckFor::CorrectBranch", "config" : { "Dist::Zilla::Role::Git::Repo" : { "repo_root" : "." } }, "name" : "@RSRCHBOY/@Git::CheckFor/Git::CheckFor::CorrectBranch", "version" : "0.013" }, { "class" : "Dist::Zilla::Plugin::Git::CheckFor::Fixups", "config" : { "Dist::Zilla::Role::Git::Repo" : { "repo_root" : "." } }, "name" : "@RSRCHBOY/@Git::CheckFor/Git::CheckFor::Fixups", "version" : "0.013" }, { "class" : "Dist::Zilla::Plugin::Git::CheckFor::MergeConflicts", "config" : { "Dist::Zilla::Role::Git::Repo" : { "repo_root" : "." } }, "name" : "@RSRCHBOY/@Git::CheckFor/Git::CheckFor::MergeConflicts", "version" : "0.013" }, { "class" : "Dist::Zilla::Plugin::GatherDir", "config" : { "Dist::Zilla::Plugin::GatherDir" : { "exclude_filename" : [ "LICENSE", "cpanfile" ], "exclude_match" : [], "follow_symlinks" : 0, "include_dotfiles" : 0, "prefix" : "", "prune_directory" : [], "root" : "." } }, "name" : "@RSRCHBOY/GatherDir", "version" : "5.043" }, { "class" : "Dist::Zilla::Plugin::PromptIfStale", "config" : { "Dist::Zilla::Plugin::PromptIfStale" : { "check_all_plugins" : 0, "check_all_prereqs" : 0, "modules" : [ "Dist::Zilla", "Dist::Zilla::PluginBundle::RSRCHBOY" ], "phase" : "build", "skip" : [] } }, "name" : "@RSRCHBOY/PromptIfStale", "version" : "0.047" }, { "class" : "Dist::Zilla::Plugin::PruneCruft", "name" : "@RSRCHBOY/PruneCruft", "version" : "5.043" }, { "class" : "Dist::Zilla::Plugin::Git::Describe", "name" : "@RSRCHBOY/Git::Describe", "version" : "0.006" }, { "class" : "Dist::Zilla::Plugin::ExecDir", "name" : "@RSRCHBOY/ExecDir", "version" : "5.043" }, { "class" : "Dist::Zilla::Plugin::ShareDir", "name" : "@RSRCHBOY/ShareDir", "version" : "5.043" }, { "class" : "Dist::Zilla::Plugin::MakeMaker", "config" : { "Dist::Zilla::Role::TestRunner" : { "default_jobs" : 1 } }, "name" : "@RSRCHBOY/MakeMaker", "version" : "5.043" }, { "class" : "Dist::Zilla::Plugin::Manifest", "name" : "@RSRCHBOY/Manifest", "version" : "5.043" }, { "class" : "Dist::Zilla::Plugin::SurgicalPkgVersion", "name" : "@RSRCHBOY/SurgicalPkgVersion", "version" : "0.0019" }, { "class" : "Dist::Zilla::Plugin::MinimumPerl", "name" : "@RSRCHBOY/MinimumPerl", "version" : "1.006" }, { "class" : "Dist::Zilla::Plugin::Test::ReportPrereqs", "name" : "@RSRCHBOY/Test::ReportPrereqs", "version" : "0.021" }, { "class" : "Dist::Zilla::Plugin::AutoPrereqs", "name" : "@RSRCHBOY/AutoPrereqs", "version" : "5.043" }, { "class" : "Dist::Zilla::Plugin::Prepender", "name" : "@RSRCHBOY/Prepender", "version" : "2.002" }, { "class" : "Dist::Zilla::Plugin::Prereqs", "config" : { "Dist::Zilla::Plugin::Prereqs" : { "phase" : "develop", "type" : "requires" } }, "name" : "@RSRCHBOY/AuthorBundleDevelopRequires", "version" : "5.043" }, { "class" : "Dist::Zilla::Plugin::Test::PodSpelling", "config" : { "Dist::Zilla::Plugin::Test::PodSpelling" : { "directories" : [], "spell_cmd" : "", "stopwords" : [ "ABEND", "AFAICT", "Formattable", "Gratipay", "RSRCHBOY", "RSRCHBOY's", "codebase", "coderef", "formattable", "gpg", "implementers", "ini", "metaclass", "metaclasses", "parameterization", "parameterized", "subclasses" ], "wordlist" : "Pod::Wordlist" } }, "name" : "@RSRCHBOY/Test::PodSpelling", "version" : "2.007000" }, { "class" : "Dist::Zilla::Plugin::ConsistentVersionTest", "name" : "@RSRCHBOY/ConsistentVersionTest", "version" : "0.02" }, { "class" : "Dist::Zilla::Plugin::PodCoverageTests", "name" : "@RSRCHBOY/PodCoverageTests", "version" : "5.043" }, { "class" : "Dist::Zilla::Plugin::PodSyntaxTests", "name" : "@RSRCHBOY/PodSyntaxTests", "version" : "5.043" }, { "class" : "Dist::Zilla::Plugin::Test::NoTabs", "config" : { "Dist::Zilla::Plugin::Test::NoTabs" : { "filename" : "xt/author/no-tabs.t", "finder" : [ ":InstallModules", ":ExecFiles", ":TestFiles" ] } }, "name" : "@RSRCHBOY/Test::NoTabs", "version" : "0.15" }, { "class" : "Dist::Zilla::Plugin::Test::EOL", "config" : { "Dist::Zilla::Plugin::Test::EOL" : { "filename" : "xt/author/eol.t", "finder" : [ ":InstallModules", ":ExecFiles", ":TestFiles" ], "trailing_whitespace" : "1" } }, "name" : "@RSRCHBOY/Test::EOL", "version" : "0.18" }, { "class" : "Dist::Zilla::Plugin::HasVersionTests", "name" : "@RSRCHBOY/HasVersionTests", "version" : "1.101420" }, { "class" : "Dist::Zilla::Plugin::Test::Compile", "config" : { "Dist::Zilla::Plugin::Test::Compile" : { "bail_out_on_fail" : "0", "fail_on_warning" : "author", "fake_home" : 0, "filename" : "t/00-compile.t", "module_finder" : [ ":InstallModules" ], "needs_display" : 0, "phase" : "test", "script_finder" : [ ":PerlExecFiles" ], "skips" : [] } }, "name" : "@RSRCHBOY/Test::Compile", "version" : "2.054" }, { "class" : "Dist::Zilla::Plugin::NoSmartCommentsTests", "name" : "@RSRCHBOY/NoSmartCommentsTests", "version" : "0.008" }, { "class" : "Dist::Zilla::Plugin::Test::Pod::LinkCheck", "name" : "@RSRCHBOY/Test::Pod::LinkCheck", "version" : "1.002" }, { "class" : "Dist::Zilla::Plugin::RunExtraTests", "config" : { "Dist::Zilla::Role::TestRunner" : { "default_jobs" : 1 } }, "name" : "@RSRCHBOY/RunExtraTests", "version" : "0.028" }, { "class" : "Dist::Zilla::Plugin::CheckExtraTests", "name" : "@RSRCHBOY/CheckExtraTests", "version" : "0.028" }, { "class" : "Dist::Zilla::Plugin::Test::MinimumVersion", "name" : "@RSRCHBOY/Test::MinimumVersion", "version" : "2.000006" }, { "class" : "Dist::Zilla::Plugin::Authority", "name" : "@RSRCHBOY/Authority", "version" : "1.009" }, { "class" : "Dist::Zilla::Plugin::MetaConfig", "name" : "@RSRCHBOY/MetaConfig", "version" : "5.043" }, { "class" : "Dist::Zilla::Plugin::MetaJSON", "name" : "@RSRCHBOY/MetaJSON", "version" : "5.043" }, { "class" : "Dist::Zilla::Plugin::MetaYAML", "name" : "@RSRCHBOY/MetaYAML", "version" : "5.043" }, { "class" : "Dist::Zilla::Plugin::MetaNoIndex", "name" : "@RSRCHBOY/MetaNoIndex", "version" : "5.043" }, { "class" : "Dist::Zilla::Plugin::MetaProvides::Package", "config" : { "Dist::Zilla::Plugin::MetaProvides::Package" : { "finder_objects" : [ { "class" : "Dist::Zilla::Plugin::FinderCode", "name" : "@RSRCHBOY/MetaProvides::Package/AUTOVIV/:InstallModulesPM", "version" : "5.043" } ] }, "Dist::Zilla::Role::MetaProvider::Provider" : { "Dist::Zilla::Role::MetaProvider::Provider::VERSION" : "2.001011", "inherit_missing" : "1", "inherit_version" : "1", "meta_noindex" : "1" } }, "name" : "@RSRCHBOY/MetaProvides::Package", "version" : "2.003001" }, { "class" : "Dist::Zilla::Plugin::GithubMeta", "name" : "@RSRCHBOY/GithubMeta", "version" : "0.54" }, { "class" : "Dist::Zilla::Plugin::TestRelease", "name" : "@RSRCHBOY/TestRelease", "version" : "5.043" }, { "class" : "Dist::Zilla::Plugin::CheckChangesHasContent", "name" : "@RSRCHBOY/CheckChangesHasContent", "version" : "0.008" }, { "class" : "Dist::Zilla::Plugin::CheckPrereqsIndexed", "name" : "@RSRCHBOY/CheckPrereqsIndexed", "version" : "0.017" }, { "class" : "Dist::Zilla::Plugin::Git::Remote::Update", "name" : "@RSRCHBOY/GitFetchOrigin", "version" : "0.1.2" }, { "class" : "Dist::Zilla::Plugin::Git::Remote::Check", "name" : "@RSRCHBOY/GitCheckReleaseBranchSync", "version" : "0.1.2" }, { "class" : "Dist::Zilla::Plugin::Git::Remote::Check", "name" : "@RSRCHBOY/GitCheckMasterBranchSync", "version" : "0.1.2" }, { "class" : "Dist::Zilla::Plugin::Git::Check", "config" : { "Dist::Zilla::Plugin::Git::Check" : { "untracked_files" : "die" }, "Dist::Zilla::Role::Git::DirtyFiles" : { "allow_dirty" : [ ".gitignore", ".travis.yml", "Changes", "LICENSE", "README.mkdn", "cpanfile", "dist.ini", "weaver.ini" ], "allow_dirty_match" : [], "changelog" : "Changes" }, "Dist::Zilla::Role::Git::Repo" : { "repo_root" : "." } }, "name" : "@RSRCHBOY/Git::Check", "version" : "2.036" }, { "class" : "Dist::Zilla::Plugin::Git::Commit", "config" : { "Dist::Zilla::Plugin::Git::Commit" : { "add_files_in" : [], "commit_msg" : "v%v%n%n%c" }, "Dist::Zilla::Role::Git::DirtyFiles" : { "allow_dirty" : [ ".gitignore", ".travis.yml", "Changes", "LICENSE", "README.mkdn", "cpanfile", "dist.ini", "weaver.ini" ], "allow_dirty_match" : [], "changelog" : "Changes" }, "Dist::Zilla::Role::Git::Repo" : { "repo_root" : "." }, "Dist::Zilla::Role::Git::StringFormatter" : { "time_zone" : "local" } }, "name" : "@RSRCHBOY/Git::Commit", "version" : "2.036" }, { "class" : "Dist::Zilla::Plugin::Test::CheckDeps", "config" : { "Dist::Zilla::Plugin::Test::CheckDeps" : { "fatal" : 1, "filename" : "t/00-check-deps.t", "level" : "suggests", "todo_when" : "0" } }, "name" : "@RSRCHBOY/Test::CheckDeps", "version" : "0.013" }, { "class" : "Dist::Zilla::Plugin::CheckSelfDependency", "config" : { "Dist::Zilla::Plugin::CheckSelfDependency" : { "finder" : [ ":InstallModules" ] }, "Dist::Zilla::Role::ModuleMetadata" : { "Module::Metadata" : "1.000027", "version" : "0.003" } }, "name" : "@RSRCHBOY/CheckSelfDependency", "version" : "0.011" }, { "class" : "Dist::Zilla::Plugin::Travis::ConfigForReleaseBranch", "name" : "@RSRCHBOY/Travis::ConfigForReleaseBranch", "version" : "0.004" }, { "class" : "Dist::Zilla::Plugin::SchwartzRatio", "name" : "@RSRCHBOY/SchwartzRatio", "version" : "0.2.0" }, { "class" : "Dist::Zilla::Plugin::Git::Tag", "config" : { "Dist::Zilla::Plugin::Git::Tag" : { "branch" : null, "changelog" : "Changes", "signed" : 1, "tag" : "0.037", "tag_format" : "%v", "tag_message" : "v%v" }, "Dist::Zilla::Role::Git::Repo" : { "repo_root" : "." }, "Dist::Zilla::Role::Git::StringFormatter" : { "time_zone" : "local" } }, "name" : "@RSRCHBOY/Git::Tag", "version" : "2.036" }, { "class" : "Dist::Zilla::Plugin::Git::CommitBuild", "config" : { "Dist::Zilla::Plugin::Git::CommitBuild" : { "branch" : "build/%b", "build_root" : null, "message" : "Build results of %h (on %b)", "multiple_inheritance" : 0, "release_branch" : null, "release_message" : "Build results of %h (on %b)" }, "Dist::Zilla::Role::Git::Repo" : { "repo_root" : "." } }, "name" : "@RSRCHBOY/Git::CommitBuild::Build", "version" : "2.036" }, { "class" : "Dist::Zilla::Plugin::Git::CommitBuild", "config" : { "Dist::Zilla::Plugin::Git::CommitBuild" : { "branch" : "build/%b", "build_root" : null, "message" : "Build results of %h (on %b)", "multiple_inheritance" : 1, "release_branch" : "release/cpan", "release_message" : "Full build of CPAN release %v%t" }, "Dist::Zilla::Role::Git::Repo" : { "repo_root" : "." } }, "name" : "@RSRCHBOY/Git::CommitBuild::Release", "version" : "2.036" }, { "class" : "Dist::Zilla::Plugin::Git::Push", "config" : { "Dist::Zilla::Plugin::Git::Push" : { "push_to" : [ "origin", "origin refs/heads/release/cpan:refs/heads/release/cpan" ], "remotes_must_exist" : 1 }, "Dist::Zilla::Role::Git::Repo" : { "repo_root" : "." } }, "name" : "@RSRCHBOY/Git::Push", "version" : "2.036" }, { "class" : "Dist::Zilla::Plugin::UploadToCPAN", "name" : "@RSRCHBOY/UploadToCPAN", "version" : "5.043" }, { "class" : "Dist::Zilla::Plugin::Signature", "name" : "@RSRCHBOY/Signature", "version" : "1.100930" }, { "class" : "Dist::Zilla::Plugin::Twitter", "name" : "@RSRCHBOY/Twitter", "version" : "0.026" }, { "class" : "Dist::Zilla::Plugin::InstallRelease", "name" : "@RSRCHBOY/InstallRelease", "version" : "0.008" }, { "class" : "Dist::Zilla::Plugin::GitHub::Update", "config" : { "Dist::Zilla::Plugin::GitHub::Update" : { "metacpan" : 1 } }, "name" : "@RSRCHBOY/GitHub::Update", "version" : "0.42" }, { "class" : "Dist::Zilla::Plugin::ArchiveRelease", "name" : "@RSRCHBOY/ArchiveRelease", "version" : "4.26" }, { "class" : "Dist::Zilla::Plugin::ConfirmRelease", "name" : "@RSRCHBOY/ConfirmRelease", "version" : "5.043" }, { "class" : "Dist::Zilla::Plugin::License", "name" : "@RSRCHBOY/License", "version" : "5.043" }, { "class" : "Dist::Zilla::Plugin::CPANFile", "name" : "@RSRCHBOY/CPANFile", "version" : "5.043" }, { "class" : "Dist::Zilla::Plugin::ReadmeAnyFromPod", "config" : { "Dist::Zilla::Role::FileWatcher" : { "version" : "0.006" } }, "name" : "@RSRCHBOY/ReadmeMarkdownInRoot", "version" : "0.150250" }, { "class" : "Dist::Zilla::Plugin::ReadmeAnyFromPod", "config" : { "Dist::Zilla::Role::FileWatcher" : { "version" : "0.006" } }, "name" : "@RSRCHBOY/ReadmeTxt", "version" : "0.150250" }, { "class" : "Dist::Zilla::Plugin::CopyFilesFromBuild", "name" : "@RSRCHBOY/CopyFilesFromBuild", "version" : "0.151680" }, { "class" : "Dist::Zilla::Plugin::GitHubREADME::Badge", "name" : "@RSRCHBOY/GitHubREADME::Badge", "version" : "0.16" }, { "class" : "Dist::Zilla::Plugin::PodWeaver", "config" : { "Dist::Zilla::Plugin::PodWeaver" : { "config_plugins" : [ "@RSRCHBOY" ], "finder" : [ ":InstallModules", ":ExecFiles" ], "plugins" : [ { "class" : "Pod::Weaver::Plugin::StopWords", "name" : "@RSRCHBOY/StopWords", "version" : "1.010" }, { "class" : "Pod::Weaver::Plugin::EnsurePod5", "name" : "@CorePrep/EnsurePod5", "version" : "4.012" }, { "class" : "Pod::Weaver::Plugin::H1Nester", "name" : "@CorePrep/H1Nester", "version" : "4.012" }, { "class" : "Pod::Weaver::Section::Name", "name" : "@RSRCHBOY/Name", "version" : "4.012" }, { "class" : "Pod::Weaver::Section::Version", "name" : "@RSRCHBOY/Version", "version" : "4.012" }, { "class" : "Pod::Weaver::Section::Region", "name" : "@RSRCHBOY/prelude", "version" : "4.012" }, { "class" : "Pod::Weaver::Section::Generic", "name" : "SYNOPSIS", "version" : "4.012" }, { "class" : "Pod::Weaver::Section::Generic", "name" : "DESCRIPTION", "version" : "4.012" }, { "class" : "Pod::Weaver::Section::Generic", "name" : "OVERVIEW", "version" : "4.012" }, { "class" : "Pod::Weaver::Section::Collect", "name" : "EXTENDS", "version" : "4.012" }, { "class" : "Pod::Weaver::Section::Collect", "name" : "IMPLEMENTS", "version" : "4.012" }, { "class" : "Pod::Weaver::Section::Collect", "name" : "CONSUMES", "version" : "4.012" }, { "class" : "Pod::Weaver::Section::RSRCHBOY::RoleParameters", "name" : "ROLE PARAMETERS", "version" : "0.066" }, { "class" : "Pod::Weaver::Section::RSRCHBOY::RequiredAttributes", "name" : "REQUIRED ATTRIBUTES", "version" : "0.066" }, { "class" : "Pod::Weaver::Section::RSRCHBOY::LazyAttributes", "name" : "LAZY ATTRIBUTES", "version" : "0.066" }, { "class" : "Pod::Weaver::Section::Collect", "name" : "REQUIRED METHODS", "version" : "4.012" }, { "class" : "Pod::Weaver::Section::Collect", "name" : "ATTRIBUTES", "version" : "4.012" }, { "class" : "Pod::Weaver::Section::Collect", "name" : "METHODS", "version" : "4.012" }, { "class" : "Pod::Weaver::Section::Collect", "name" : "PRIVATE METHODS", "version" : "4.012" }, { "class" : "Pod::Weaver::Section::Collect", "name" : "FUNCTIONS", "version" : "4.012" }, { "class" : "Pod::Weaver::Section::Collect", "name" : "TYPES", "version" : "4.012" }, { "class" : "Pod::Weaver::Section::Collect", "name" : "TEST FUNCTIONS", "version" : "4.012" }, { "class" : "Pod::Weaver::Section::Leftovers", "name" : "@RSRCHBOY/Leftovers", "version" : "4.012" }, { "class" : "Pod::Weaver::Section::Region", "name" : "@RSRCHBOY/postlude", "version" : "4.012" }, { "class" : "Pod::Weaver::Section::SeeAlso", "name" : "@RSRCHBOY/SeeAlso", "version" : "1.003" }, { "class" : "Pod::Weaver::Section::Bugs", "name" : "@RSRCHBOY/Bugs", "version" : "4.012" }, { "class" : "Pod::Weaver::Section::RSRCHBOY::Authors", "name" : "RSRCHBOY::Authors", "version" : "0.066" }, { "class" : "Pod::Weaver::Section::Contributors", "name" : "@RSRCHBOY/Contributors", "version" : "0.009" }, { "class" : "Pod::Weaver::Section::Legal", "name" : "@RSRCHBOY/Legal", "version" : "4.012" }, { "class" : "Pod::Weaver::Plugin::Transformer", "name" : "@RSRCHBOY/List", "version" : "4.012" }, { "class" : "Pod::Weaver::Plugin::SingleEncoding", "name" : "@RSRCHBOY/SingleEncoding", "version" : "4.012" } ] } }, "name" : "@RSRCHBOY/PodWeaver", "version" : "4.006" }, { "class" : "Dist::Zilla::Plugin::RemovePrereqs", "config" : { "Dist::Zilla::Plugin::RemovePrereqs" : { "modules_to_remove" : [ "Moose::Deprecated" ] } }, "name" : "RemovePrereqs", "version" : "5.043" }, { "class" : "Dist::Zilla::Plugin::FinderCode", "name" : ":InstallModules", "version" : "5.043" }, { "class" : "Dist::Zilla::Plugin::FinderCode", "name" : ":IncModules", "version" : "5.043" }, { "class" : "Dist::Zilla::Plugin::FinderCode", "name" : ":TestFiles", "version" : "5.043" }, { "class" : "Dist::Zilla::Plugin::FinderCode", "name" : ":ExtraTestFiles", "version" : "5.043" }, { "class" : "Dist::Zilla::Plugin::FinderCode", "name" : ":ExecFiles", "version" : "5.043" }, { "class" : "Dist::Zilla::Plugin::FinderCode", "name" : ":PerlExecFiles", "version" : "5.043" }, { "class" : "Dist::Zilla::Plugin::FinderCode", "name" : ":ShareFiles", "version" : "5.043" }, { "class" : "Dist::Zilla::Plugin::FinderCode", "name" : ":MainModule", "version" : "5.043" }, { "class" : "Dist::Zilla::Plugin::FinderCode", "name" : ":AllFiles", "version" : "5.043" }, { "class" : "Dist::Zilla::Plugin::FinderCode", "name" : ":NoFiles", "version" : "5.043" }, { "class" : "Dist::Zilla::Plugin::FinderCode", "name" : "@RSRCHBOY/MetaProvides::Package/AUTOVIV/:InstallModulesPM", "version" : "5.043" } ], "zilla" : { "class" : "Dist::Zilla::Dist::Builder", "config" : { "is_trial" : "0" }, "version" : "5.043" } }, "x_authority" : "cpan:RSRCHBOY", "x_contributors" : [ "Chad Granum ", "Karen Etheridge " ] } Test-Moose-More-0.037/SIGNATURE0000644000175000017500000000751312653511243016166 0ustar rsrchboyrsrchboyThis file contains message digests of all files listed in MANIFEST, signed via the Module::Signature module, version 0.79. To verify the content in this distribution, first make sure you have Module::Signature installed, then type: % cpansign -v It will check each file's integrity, as well as the signature's validity. If "==> Signature verified OK! <==" is not displayed, the distribution may already have been compromised, and you should not run its Makefile.PL or Build.PL. -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 SHA1 007d9eadef38d89600c372861a631e950cadab7e .travis.yml SHA1 f9fa3d8cfe806ed1a8ecb31ccd1caefa0f39b66c Changes SHA1 bf2d713ceca5b8ad3d680ed15baba1b89df7e149 LICENSE SHA1 35b4701ac89dbb635dbbb6888ee1924107f99e79 MANIFEST SHA1 a91e7d9fdd3ac1d8ca95ef0c147d901d8b303df7 META.json SHA1 7fd878b0ee6d4cf5a110aea35f48ed4b68d9788f META.yml SHA1 49dfe14e2eef249576bb8216119bb25c87246895 Makefile.PL SHA1 7b006b9a6bc768362ee71c517b336f3d26443819 README SHA1 c998f11afd4e48305e8c534d4ba124531befdbf8 cpanfile SHA1 b916e5e22dce319b385382dbb6694a1d4b7ac634 dist.ini SHA1 bfedaf87421ac857f6b924b84c243c7298181189 lib/Test/Moose/More.pm SHA1 d27bb5bf5ad7a8c9178763037fd437a6a5fcd1b0 t/00-check-deps.t SHA1 e58f84289bff6015c55e414d0de25ab09c3fe684 t/00-compile.t SHA1 df426f47eb8c15dcd834649af2bed07c71b94eac t/00-report-prereqs.dd SHA1 b689b534fc1a6a30eac5e5c4c844193fd79ec0c7 t/00-report-prereqs.t SHA1 f342105ead74ba486876bee67cbf3b11f22fff5e t/attribute/coerce.t SHA1 184cd396cdd45481169f5248992011f8ec90392d t/check_sugar.t SHA1 2b36ce7cc4fee13acdc6ce3748cfb57cd6a1dffb t/does_not_ok.t SHA1 c99877f39ec141a5e54d565feac04254e40bab6b t/does_ok.t SHA1 6d28f78d54ce90d525713095c5b350cee4b3d7f5 t/has_attribute_ok.t SHA1 e2756bb9f42afb3c3de8a19e8e49cb2385d5f5c7 t/has_method_ok.t SHA1 0d0fc1e01444cf49baa6c54ecfeba70ce7a734de t/is_anon_ok.t SHA1 fea5000217091f970afcb7a566754b63dd27b7be t/is_class_ok.t SHA1 e776ceeb1a9e37afa1d77becc6c5a4e82e540676 t/is_immutable_ok.t SHA1 5bbd08043c6ffe760da4f0e22fdbb3f2bb112d77 t/is_not_anon_ok.t SHA1 ef4337fc54ee2dc9d829fa1a9dd01566a156be96 t/is_role_ok.t SHA1 4e15b688710f882cf42c2453db1b4b0827c64f4f t/meta_ok.t SHA1 0b37159cee56de9f844667a664e4ebe7e8612977 t/requires_method_ok.t SHA1 8417ad1ff196ed44bdb88862a00e7062af6087be t/validate_attribute.t SHA1 78876637f3ee3f98bd00d3980cfeac0e3f57d25a t/validate_attribute/in_roles.t SHA1 9a1b72aaf664a4f83eb98c3c5390b190c2a3cc6b t/validate_class.t SHA1 d347de6d163478b3a0ab6ef7907f383f314d872a t/validate_role/basic.t SHA1 5d5df40857826057c1ada07ad99e95bea4b18411 t/validate_role/compose.t SHA1 01de23982f45d1963c8b25ac0aabb92e7b18d333 t/validate_thing/sugar.t SHA1 37f0fc8d581bfbc8c4c958871c6f7bc1718e94ec t/wrapped/in_roles.t SHA1 6bf55986df653b67d9c03173d2bc27373958c04a xt/author/eol.t SHA1 7508b4a686eeb7cacfec3485906c54877ccf87cf xt/author/no-tabs.t SHA1 9b9533b39ea716aaccb533a2ae28478471f8383a xt/author/pod-coverage.t SHA1 0a63cc4e3c276e01bb46478ce2777b25725c1445 xt/author/pod-spell.t SHA1 df7123c703c4daaea7635951ae8567eda4e26866 xt/author/pod-syntax.t SHA1 a7948d34cfaad400286ea5d5fa6206c4c7e2552c xt/release/consistent-version.t SHA1 9a21b3840753f6223630c9eda458e91085174ece xt/release/has-version.t SHA1 e91052db2912055e66889853bc5cb1f38db60665 xt/release/minimum-version.t SHA1 4e8369cf7a921d36a4e1b0f392963341e9c11d75 xt/release/no-smart-comments.t SHA1 fd53f1ea2ac5884abce47c17a77545c05e47bc2f xt/release/pod-linkcheck.t -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQEcBAEBAgAGBQJWrpKjAAoJEFh1SEj8MIMvMZ4H/RYpf3EbY0/nPmgHVHJ5kVxo cnJ6c0eb2/nmVpyb6ezE97Mfstf4XbMJ8HiWrcAJ+dlYKGelkqxjFUcbklALENO0 yR/gj6rCZHzm25Nu0jxSIVwtl0zHRI2zjbE1JadPBgJnJMDQs+D/VgpizJULmkbA xvKTTmesoa8/nUS/+qPNcpoiSoQjug55cTwE+WxZQUJHukJP4WWtPhq6aPFa8Ug1 9oRfVbcDXwiBvAMXwIdMfL6gjf3mcgb4Hus9sMEQ1bF0Cu1rccQ5SmAkosakp7wd AQ/6FkCYu6V5xZPvWgQIgqS/7Ie0pim+xxLdJELqomvRx3g2lCdzUFy+5u37SHU= =otod -----END PGP SIGNATURE----- Test-Moose-More-0.037/t/0000775000175000017500000000000012653511243015141 5ustar rsrchboyrsrchboyTest-Moose-More-0.037/t/meta_ok.t0000600000175000017500000000141212653511243016731 0ustar rsrchboyrsrchboyuse strict; use warnings; { package TestRole; use Moose::Role; } { package TestClass; use Moose; } { package TestClass::Fail; } use Test::Builder::Tester; # tests => 1; use Test::More; use Test::Moose::More; use TAP::SimpleOutput 'counters'; my $ROLE = 'TestRole::Role'; for my $thing (qw{ TestClass TestRole }) { # role - OK my ($_ok, $_nok) = counters(); test_out $_ok->("$thing has a meta"); meta_ok $thing; test_test "$thing is found to have a metaclass correctly"; } for my $thing (qw{ TestClass::Fail }) { # role - NOT OK my ($_ok, $_nok) = counters(); test_out $_nok->("$thing has a meta"); test_fail 1; meta_ok $thing; test_test "$thing is found to not have a metaclass correctly"; } done_testing; Test-Moose-More-0.037/t/does_ok.t0000600000175000017500000000765212653511243016751 0ustar rsrchboyrsrchboyuse strict; use warnings; { package TestRole::Role; use Moose::Role; } { package TestRole::Role2; use Moose::Role; } { package TestRole; use Moose::Role; with 'TestRole::Role'; } { package TestClass; use Moose; with 'TestRole::Role'; } { package TestRole::Two; use Moose::Role; with 'TestRole::Role'; with 'TestRole::Role2'; } { package TestClass::Two; use Moose; with 'TestRole::Role'; with 'TestRole::Role2'; } { package TestRole::Fail; use Moose::Role; } { package TestClass::Fail; use Moose; } { package TestRole::Fail2; use Moose::Role; with 'TestRole::Role2'; } { package TestClass::Fail2; use Moose; with 'TestRole::Role2'; } { package TestClass::NotMoosey; } use Test::Builder::Tester; use Test::More; use Test::Moose::More; use TAP::SimpleOutput 'counters'; my $ROLE = 'TestRole::Role'; my @ROLES = qw{ TestRole::Role TestRole::Role2 }; note 'single role, default message - OK'; for my $thing (qw{ TestClass TestRole }) { my ($_ok, $_nok) = counters(); test_out $_ok->("$thing does $ROLE"); does_ok $thing, $ROLE; test_test "$thing is found to do $ROLE correctly"; } note 'single role, custom message - OK'; for my $thing (qw{ TestClass TestRole }) { my ($_ok, $_nok) = counters(); test_out $_ok->('wah-wah'); does_ok $thing, $ROLE, 'wah-wah'; test_test "$thing: custom messages work as expected"; } note 'single role, "complex" custom message - OK'; for my $thing (qw{ TestClass TestRole }) { my ($_ok, $_nok) = counters(); test_out $_ok->("wah-wah $ROLE"); does_ok $thing, $ROLE, 'wah-wah %s'; test_test "$thing: 'complex' custom messages work as expected"; } note 'multiple roles, default message - OK'; for my $thing (qw{ TestClass::Two TestRole::Two }) { # role - OK my ($_ok, $_nok) = counters(); test_out $_ok->("$thing does $_") for @ROLES; does_ok $thing, [ @ROLES ]; test_test "$thing is found to do the roles correctly"; } note 'multiple roles, custom message - OK'; for my $thing (qw{ TestClass::Two TestRole::Two }) { # role - OK my ($_ok, $_nok) = counters(); my $msg = 'wah-wah'; test_out $_ok->($msg) for @ROLES; does_ok $thing, [ @ROLES ], $msg; test_test "$thing: multiple roles, custom messages work as expected"; } note 'multiple roles, "complex" custom message - OK'; for my $thing (qw{ TestClass::Two TestRole::Two }) { # role - OK my ($_ok, $_nok) = counters(); my $msg = 'wah-wah'; test_out $_ok->("$msg $_") for @ROLES; does_ok $thing, [ @ROLES ], "$msg %s"; test_test "$thing: multiple roles, 'complex' custom messages work as expected"; } note 'role - NOT OK'; for my $thing (qw{ TestClass::Fail TestRole::Fail }) { # role - NOT OK my ($_ok, $_nok) = counters(); test_out $_nok->("$thing does $ROLE"); test_fail 1; does_ok $thing, $ROLE; test_test "$thing is found to not do $ROLE correctly"; } note 'multiple roles - NOT OK'; for my $thing (qw{ TestClass::Fail TestRole::Fail }) { # role - OK my ($_ok, $_nok) = counters(); do { test_out $_nok->("$thing does $_"); test_fail 1 } for @ROLES; does_ok $thing, [ @ROLES ]; test_test "$thing: multiple roles fail as expected"; } note 'multiple roles - PARTIALLY OK'; for my $thing (qw{ TestClass::Fail2 TestRole::Fail2 }) { # role - OK my ($_ok, $_nok) = counters(); do { test_out $_nok->("$thing does $_"); test_fail 2 } for $ROLES[0]; do { test_out $_ok->("$thing does $_") } for $ROLES[1]; does_ok $thing, [ @ROLES ]; test_test "$thing: multiple roles partially fail as expected"; } done_testing; Test-Moose-More-0.037/t/is_anon_ok.t0000644000175000017500000000250512653511243017445 0ustar rsrchboyrsrchboyuse strict; use warnings; use Test::Builder::Tester; use Moose::Util 'with_traits'; use Test::More; use Test::Moose::More; use TAP::SimpleOutput 'counters'; { package TestRole; use Moose::Role; use namespace::autoclean; } { package TestClass; use Moose; } # initial tests, covering the most straight-forward cases (IMHO) my $anon_class = with_traits('TestClass' => 'TestRole'); my $anon_role = Moose::Meta::Role ->create_anon_role(weaken => 0) ->name ; note 'simple anon class'; { my ($_ok, $_nok, $_skip) = counters(); test_out $_ok->("$anon_class is anonymous"); is_anon_ok $anon_class; test_test 'is_anon_ok works correctly on anon class'; } note 'simple anon role'; { my ($_ok, $_nok, $_skip) = counters(); test_out $_ok->("$anon_role is anonymous"); is_anon_ok $anon_role; test_test 'is_anon_ok works correctly on anon role'; } note 'simple !anon class'; { my ($_ok, $_nok, $_skip) = counters(); test_out $_nok->('TestClass is anonymous'); test_fail 1; is_anon_ok 'TestClass'; test_test 'is_anon_ok works correctly on !anon class'; } note 'simple !anon role'; { my ($_ok, $_nok, $_skip) = counters(); test_out $_nok->('TestRole is anonymous'); test_fail 1; is_anon_ok 'TestRole'; test_test 'is_anon_ok works correctly on !anon role'; } done_testing; Test-Moose-More-0.037/t/is_role_ok.t0000644000175000017500000000151012653511243017446 0ustar rsrchboyrsrchboyuse strict; use warnings; { package TestRole; use Moose::Role; } { package TestClass; use Moose; } { package TestClass::NotMoosey; } use Test::Builder::Tester; # tests => 1; use Test::More; use Test::Moose::More; # is_role_ok vs role test_out 'ok 1 - TestRole has a metaclass'; test_out 'ok 2 - TestRole is a Moose role'; is_role_ok 'TestRole'; test_test 'is_role_ok works correctly'; # is_role_ok vs class test_out 'ok 1 - TestClass has a metaclass'; test_out 'not ok 2 - TestClass is a Moose role'; test_fail(1); is_role_ok 'TestClass'; test_test 'is_role_ok works correctly with classes'; # is_role_ok vs plain-old-package test_out 'not ok 1 - TestClass::NotMoosey has a metaclass'; test_fail(1); is_role_ok 'TestClass::NotMoosey'; test_test 'is_role_ok works correctly with plain-old-packages'; done_testing; Test-Moose-More-0.037/t/00-compile.t0000644000175000017500000000233412653511243017173 0ustar rsrchboyrsrchboyuse 5.006; use strict; use warnings; # this test was generated with Dist::Zilla::Plugin::Test::Compile 2.054 use Test::More; plan tests => 1 + ($ENV{AUTHOR_TESTING} ? 1 : 0); my @module_files = ( 'Test/Moose/More.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"); shift @_warnings if @_warnings and $_warnings[0] =~ /^Using .*\bblib/ and not eval { require blib; blib->VERSION('1.01') }; if (@_warnings) { warn @_warnings; push @warnings, @_warnings; } } is(scalar(@warnings), 0, 'no warnings found') or diag 'got warnings: ', ( Test::More->can('explain') ? Test::More::explain(\@warnings) : join("\n", '', @warnings) ) if $ENV{AUTHOR_TESTING}; Test-Moose-More-0.037/t/is_class_ok.t0000644000175000017500000000152312653511243017616 0ustar rsrchboyrsrchboyuse strict; use warnings; { package TestRole; use Moose::Role; } { package TestClass; use Moose; } { package TestClass::NotMoosey; } use Test::Builder::Tester; # tests => 1; use Test::More; use Test::Moose::More; # is_class_ok vs role test_out 'ok 1 - TestRole has a metaclass'; test_out 'not ok 2 - TestRole is a Moose class'; test_fail(1); is_class_ok 'TestRole'; test_test 'is_class_ok works correctly'; # is_class_ok vs class test_out 'ok 1 - TestClass has a metaclass'; test_out 'ok 2 - TestClass is a Moose class'; is_class_ok 'TestClass'; test_test 'is_class_ok works correctly with classes'; # is_class_ok vs plain-old-package test_out 'not ok 1 - TestClass::NotMoosey has a metaclass'; test_fail(1); is_class_ok 'TestClass::NotMoosey'; test_test 'is_class_ok works correctly with plain-old-packages'; done_testing; Test-Moose-More-0.037/t/check_sugar.t0000600000175000017500000000300112653511243017564 0ustar rsrchboyrsrchboyuse strict; use warnings; { package TestClass; use Moose; } { package TestClass::NotCleaned; use Moose; no Moose; } use Test::Builder::Tester; # tests => 1; use Test::More; use Test::Moose::More; # not ok 1 - TestRole can has # not ok 2 - TestRole can around # not ok 3 - TestRole can augment # not ok 4 - TestRole can inner # not ok 5 - TestRole can before # not ok 6 - TestRole can after # not ok 7 - TestRole can blessed # not ok 8 - TestRole can confess # check for sugar in a class that still has it my $i; do { $i++; test_out "ok $i - TestClass can $_" } for Test::Moose::More::known_sugar(); check_sugar_ok 'TestClass'; test_test 'check_sugar_ok works correctly'; # check for sugar in a class that has none $i = 0; do { $i++; test_out "not ok $i - TestClass::NotCleaned can $_"; test_fail(2) } for Test::Moose::More::known_sugar(); check_sugar_ok 'TestClass::NotCleaned'; test_test 'check_sugar_ok works correctly on classes without sugar'; # check for no sugar in a class that still has it $i = 0; do { $i++; test_out "not ok $i - TestClass cannot $_"; test_fail(2) } for Test::Moose::More::known_sugar(); check_sugar_removed_ok 'TestClass'; test_test 'check_sugar_removed_ok works correctly with sugar'; # check for no sugar in a class that has none $i = 0; do { $i++; test_out "ok $i - TestClass::NotCleaned cannot $_" } for Test::Moose::More::known_sugar(); check_sugar_removed_ok 'TestClass::NotCleaned'; test_test 'check_sugar_removed_ok works correctly w/o sugar'; done_testing; Test-Moose-More-0.037/t/does_not_ok.t0000600000175000017500000000726212653511243017626 0ustar rsrchboyrsrchboyuse strict; use warnings; { package TestRole::Role; use Moose::Role; } { package TestRole::Role2; use Moose::Role; } { package TestRole::Fail; use Moose::Role; with 'TestRole::Role'; with 'TestRole::Role2'; } { package TestClass::Fail; use Moose; with 'TestRole::Role'; with 'TestRole::Role2'; } { package TestRole; use Moose::Role; } { package TestClass; use Moose; } { package TestRole::Fail2; use Moose::Role; with 'TestRole::Role'; } { package TestClass::Fail2; use Moose; with 'TestRole::Role'; } use Test::Builder::Tester; use Test::More; use Test::Moose::More; use TAP::SimpleOutput 'counters'; my $ROLE = 'TestRole::Role'; my @ROLES = qw{ TestRole::Role TestRole::Role2 }; note 'single role, default message - OK'; for my $thing (qw{ TestClass TestRole }) { my ($_ok, $_nok) = counters(); test_out $_ok->("$thing does not do $ROLE"); does_not_ok $thing, $ROLE; test_test "$thing is found to not do $ROLE correctly"; } note 'single role, custom message - OK'; for my $thing (qw{ TestClass TestRole }) { my ($_ok, $_nok) = counters(); test_out $_ok->('wah-wah'); does_not_ok $thing, $ROLE, 'wah-wah'; test_test "$thing: custom messages work as expected"; } note 'single role, "complex" custom message - OK'; for my $thing (qw{ TestClass TestRole }) { my ($_ok, $_nok) = counters(); test_out $_ok->("wah-wah $ROLE"); does_not_ok $thing, $ROLE, 'wah-wah %s'; test_test "$thing: 'complex' custom messages work as expected"; } note 'multiple roles, default message - OK'; for my $thing (qw{ TestClass TestRole }) { # role - OK my ($_ok, $_nok) = counters(); test_out $_ok->("$thing does not do $_") for @ROLES; does_not_ok $thing, [ @ROLES ]; test_test "$thing is found to not do the roles correctly"; } note 'multiple roles, custom message - OK'; for my $thing (qw{ TestClass TestRole }) { # role - OK my ($_ok, $_nok) = counters(); my $msg = 'wah-wah'; test_out $_ok->($msg) for @ROLES; does_not_ok $thing, [ @ROLES ], $msg; test_test "$thing: multiple roles, custom messages work as expected"; } note 'multiple roles, "complex" custom message - OK'; for my $thing (qw{ TestClass TestRole }) { # role - OK my ($_ok, $_nok) = counters(); my $msg = 'wah-wah'; test_out $_ok->("$msg $_") for @ROLES; does_not_ok $thing, [ @ROLES ], "$msg %s"; test_test "$thing: multiple roles, 'complex' custom messages work as expected"; } note 'role - NOT OK'; for my $thing (qw{ TestClass::Fail TestRole::Fail }) { # role - NOT OK my ($_ok, $_nok) = counters(); test_out $_nok->("$thing does not do $ROLE"); test_fail 1; does_not_ok $thing, $ROLE; test_test "$thing is found to not do $ROLE correctly"; } note 'multiple roles - NOT OK'; for my $thing (qw{ TestClass::Fail TestRole::Fail }) { # role - OK my ($_ok, $_nok) = counters(); do { test_out $_nok->("$thing does not do $_"); test_fail 1 } for @ROLES; does_not_ok $thing, [ @ROLES ]; test_test "$thing: multiple roles fail as expected"; } note 'multiple roles - PARTIALLY OK'; for my $thing (qw{ TestClass::Fail2 TestRole::Fail2 }) { # role - OK my ($_ok, $_nok) = counters(); do { test_out $_nok->("$thing does not do $_"); test_fail 2 } for $ROLES[0]; do { test_out $_ok->("$thing does not do $_") } for $ROLES[1]; does_not_ok $thing, [ @ROLES ]; test_test "$thing: multiple roles partially fail as expected"; } done_testing; Test-Moose-More-0.037/t/has_method_ok.t0000644000175000017500000000075612653511243020140 0ustar rsrchboyrsrchboyuse strict; use warnings; { package TestClass; use Moose; sub foo { } } use Test::Builder::Tester; use Test::More; use Test::Moose::More; test_out 'ok 1 - TestClass has method foo'; has_method_ok 'TestClass', 'foo'; test_test 'has_method_ok works correctly with methods'; # is_role_ok vs plain-old-package test_out 'not ok 1 - TestClass has method bar'; test_fail(1); has_method_ok 'TestClass', 'bar'; test_test 'has_method_ok works correctly with DNE methods'; done_testing; Test-Moose-More-0.037/t/00-check-deps.t0000644000175000017500000000043612653511243017552 0ustar rsrchboyrsrchboyuse strict; use warnings; # this test was generated with Dist::Zilla::Plugin::Test::CheckDeps 0.013 use Test::More 0.94; use Test::CheckDeps 0.010; check_dependencies('suggests'); if (1) { BAIL_OUT("Missing dependencies") if !Test::More->builder->is_passing; } done_testing; Test-Moose-More-0.037/t/validate_class.t0000644000175000017500000001421412653511243020304 0ustar rsrchboyrsrchboyuse strict; use warnings; use Moose::Util 'with_traits'; { package TestRole; use Moose::Role; } { package TestRole::Two; use Moose::Role; } { package TestClass::Invalid; use Moose; with 'TestRole::Two'; } { package TestClass::NonMoosey; } { package TestClass; use Moose; with 'TestRole'; has foo => (is => 'ro'); has baz => (traits => ['TestRole::Two'], is => 'ro'); sub method1 { } has bar => ( traits => ['Array'], isa => 'ArrayRef', is => 'ro', lazy => 1, builder => '_build_bar', handles => { has_bar => 'count', num_bars => 'count', } ); } use Test::Builder::Tester; # tests => 1; use Test::More; use Test::Moose::More; use aliased 'Perl::Version' => 'PV'; use constant NEEDS_SUBTEST_HEADER => do { PV->new(Test::More->VERSION) >= PV->new('0.98_05') }; use TAP::SimpleOutput 0.002 'counters'; note 'validate w/valid class'; { my ($_ok, $_nok) = counters(); test_out $_ok->('TestClass has a metaclass'); test_out $_ok->('TestClass is a Moose class'); test_out $_ok->('TestClass isa Moose::Object'); test_out $_ok->('TestClass is not immutable'); test_out $_ok->('TestClass is not anonymous'); test_out $_ok->('TestClass does TestRole'); test_out $_ok->('TestClass does not do TestRole::Two'); test_out $_ok->("TestClass has method $_") for qw{ foo method1 has_bar }; test_out $_ok->('TestClass has an attribute named bar'); validate_class 'TestClass' => ( anonymous => 0, immutable => 0, isa => [ 'Moose::Object' ], attributes => [ 'bar' ], does => [ 'TestRole' ], does_not => [ 'TestRole::Two' ], methods => [ qw{ foo method1 has_bar } ], ); test_test 'validate_class works correctly for valid classes'; } validate_class 'TestClass' => ( -subtest => 'demo/validation of -subtest for validate_class()', attributes => [ 'bar' ], ); subtest 'validate w/valid class -- standalone run' => sub { validate_class 'TestClass' => ( anonymous => 0, immutable => 0, isa => [ 'Moose::Object' ], attributes => [ 'bar' ], does => [ 'TestRole' ], does_not => [ 'TestRole::Two' ], methods => [ qw{ foo method1 has_bar } ], ); }; note 'simple validation w/anonymous_class'; { my $anon = with_traits 'TestClass' => 'TestRole::Two'; my ($_ok, $_nok) = counters(); test_out $_ok->("$anon has a metaclass"); test_out $_ok->("$anon is a Moose class"); test_out $_ok->("$anon is anonymous"); test_out $_ok->("$anon does TestRole::Two"); validate_class $anon => ( anonymous => 1, does => [ qw{ TestRole::Two } ], ); test_test 'simple validation w/anonymous_class'; } note 'simple is-anonymous validation w/anonymous_class'; { my $anon = with_traits 'TestClass' => 'TestRole::Two'; my ($_ok, $_nok) = counters(); test_out $_ok->("$anon has a metaclass"); test_out $_ok->("$anon is a Moose class"); test_out $_nok->("$anon is not anonymous"); test_fail 2; test_out $_ok->("$anon does TestRole::Two"); validate_class $anon => ( anonymous => 0, does => [ qw{ TestRole::Two } ], ); test_test 'simple not-anonymous validation w/anonymous_class'; } note 'validate w/non-moose package'; { my ($_ok, $_nok) = counters(); test_out $_nok->('TestClass::NonMoosey has a metaclass'); test_fail 1; validate_class 'TestClass::NonMoosey' => ( does => [ 'TestRole' ], methods => [ qw{ foo method1 has_bar } ], ); test_test 'validate_class works correctly for non-moose classes'; } note 'validate invalid class'; { my ($_ok, $_nok) = counters(); test_out $_ok->('TestClass::Invalid has a metaclass'); test_out $_ok->('TestClass::Invalid is a Moose class'); test_out $_nok->('TestClass::Invalid does TestRole'); test_fail 6; test_out $_nok->('TestClass::Invalid does not do TestRole::Two'); test_fail 4; do { test_out $_nok->("TestClass::Invalid has method $_"); test_fail 3 } for qw{ foo method1 has_bar }; validate_class 'TestClass::Invalid' => ( does => [ 'TestRole' ], does_not => [ 'TestRole::Two' ], methods => [ qw{ foo method1 has_bar } ], ); test_test 'validate_class works correctly for invalid classes'; } note 'validate w/attribute validation'; { my ($_ok, $_nok, undef, undef, undef, $__any) = counters(); test_out $_ok->('TestClass has a metaclass'); test_out $_ok->('TestClass is a Moose class'); test_out $_ok->('TestClass has an attribute named bar'); test_out $_ok->('TestClass has an attribute named baz'); my $__ok = $_ok; my $st_name = do { my ($_ok, $_nok, $_skip, $_plan, undef, $_any) = counters(1, my $name = q{checking TestClass's attribute baz}); if (NEEDS_SUBTEST_HEADER) { if ($INC{'Test/Stream.pm'}) { test_out $__any->("# Subtest: $name") } else { test_out $_any->("# Subtest: $name") } } test_out $_ok->(q{TestClass's attribute baz has a metaclass}); test_out $_ok->(q{TestClass's attribute baz is a Moose class}); test_out $_ok->(q{TestClass's attribute baz does TestRole::Two}); test_out $_ok->(q{TestClass's attribute baz has a reader}); test_out $_ok->(q{TestClass's attribute baz option reader correct}); test_out $_plan->(); $name; }; test_out $_ok->($st_name); test_out $_ok->('TestClass has an attribute named foo'); validate_class 'TestClass' => ( attributes => [ 'bar', baz => { -does => [ 'TestRole::Two' ], reader => 'baz', }, 'foo', ], ); test_test 'validate_class works correctly for attribute meta checking'; } done_testing; Test-Moose-More-0.037/t/is_not_anon_ok.t0000644000175000017500000000256512653511243020333 0ustar rsrchboyrsrchboyuse strict; use warnings; use Test::Builder::Tester; use Moose::Util 'with_traits'; use Test::More; use Test::Moose::More; use TAP::SimpleOutput 'counters'; { package TestRole; use Moose::Role; use namespace::autoclean; } { package TestClass; use Moose; } # initial tests, covering the most straight-forward cases (IMHO) my $anon_class = with_traits('TestClass' => 'TestRole'); my $anon_role = Moose::Meta::Role ->create_anon_role(weaken => 0) ->name ; note 'simple anon class'; { my ($_ok, $_nok, $_skip) = counters(); test_out $_nok->("$anon_class is not anonymous"); test_fail 1; is_not_anon_ok $anon_class; test_test 'is_not_anon_ok works correctly on anon class'; } note 'simple anon role'; { my ($_ok, $_nok, $_skip) = counters(); test_out $_nok->("$anon_role is not anonymous"); test_fail 1; is_not_anon_ok $anon_role; test_test 'is_not_anon_ok works correctly on anon role'; } note 'simple !anon class'; { my ($_ok, $_nok, $_skip) = counters(); test_out $_ok->('TestClass is not anonymous'); is_not_anon_ok 'TestClass'; test_test 'is_not_anon_ok works correctly on !anon class'; } note 'simple !anon role'; { my ($_ok, $_nok, $_skip) = counters(); test_out $_ok->('TestRole is not anonymous'); is_not_anon_ok 'TestRole'; test_test 'is_not_anon_ok works correctly on !anon role'; } done_testing; Test-Moose-More-0.037/t/is_immutable_ok.t0000644000175000017500000000234512653511243020473 0ustar rsrchboyrsrchboyuse strict; use warnings; { package TestClass; use Moose; __PACKAGE__->meta->make_immutable; } { package TestClass::Mutable; use Moose; } use Test::Builder::Tester; use Test::More; use Test::Moose::More; use TAP::SimpleOutput 0.002 'counters'; # immutable class, is_immutable_ok { my ($_ok, $_nok, $_skip) = counters(); test_out $_ok->('TestClass is immutable'); is_immutable_ok 'TestClass'; test_test 'is_immutable_ok, immutable class'; } # mutable class, is_immutable_ok { my ($_ok, $_nok, $_skip) = counters(); test_out $_nok->('TestClass::Mutable is immutable'); test_fail 1; is_immutable_ok 'TestClass::Mutable'; test_test 'is_immutable_ok, mutable class'; } # mutable class, is_not_immutable_ok { my ($_ok, $_nok, $_skip) = counters(); test_out $_ok->('TestClass::Mutable is not immutable'); is_not_immutable_ok 'TestClass::Mutable'; test_test 'is_not_immutable_ok, mutable class'; } # immutable class, is_not_immutable_ok { my ($_ok, $_nok, $_skip) = counters(); test_out $_nok->('TestClass is not immutable'); test_fail 1; is_not_immutable_ok 'TestClass'; test_test 'is_not_immutable_ok, immutable class'; } done_testing; Test-Moose-More-0.037/t/has_attribute_ok.t0000600000175000017500000001053012653511243020642 0ustar rsrchboyrsrchboyuse strict; use warnings; { package TestRole; use Moose::Role; has foo => (is => 'ro'); } { package TestClass; use Moose; has foo => (is => 'ro'); } { package TestRole::Fail; use Moose::Role; with 'TestRole'; } { package TestClass::Fail; use Moose; with 'TestRole'; } { package TestClass::NotMoosey; } use Test::Builder::Tester; use Test::More; use Test::Moose::More; use Scalar::Util 'blessed'; use TAP::SimpleOutput 'counters'; my @THINGS = (TestClass->new(), qw{ TestClass TestRole }); my @FAILS = (qw{ TestClass::Fail TestRole::Fail }); note 'default message - OK'; for my $thing (@THINGS) { my $att = 'foo'; my $thing_name = blessed $thing || $thing; my ($_ok, $_nok) = counters(); test_out $_ok->("$thing_name has an attribute named $att"); has_attribute_ok $thing, $att; test_test "$thing is found to have attribute $att correctly"; } note 'custom message - OK'; for my $thing (@THINGS) { my $att = 'foo'; my $thing_name = blessed $thing || $thing; my ($_ok, $_nok) = counters(); test_out $_ok->('whee!'); has_attribute_ok $thing, $att, 'whee!'; test_test "$thing is found to have attribute $att correctly"; } note 'default message - NOK'; for my $thing (@FAILS) { my $att = 'bar'; my $thing_name = blessed $thing || $thing; my ($_ok, $_nok) = counters(); test_out $_nok->("$thing_name has an attribute named $att"); test_fail 1; has_attribute_ok $thing, $att; test_test "$thing is found to not have attribute $att correctly"; } note 'custom message - NOK'; for my $thing (@FAILS) { my $att = 'bar'; my $thing_name = blessed $thing || $thing; my ($_ok, $_nok) = counters(); test_out $_nok->('whee!'); test_fail 1; has_attribute_ok $thing, $att, 'whee!'; test_test "$thing is found to not have attribute $att correctly"; } done_testing; __END__ note 'single role, custom message - OK'; for my $thing (qw{ TestClass TestRole }) { my ($_ok, $_nok) = counters(); test_out $_ok->('wah-wah'); does_ok $thing, $ROLE, 'wah-wah'; test_test "$thing: custom messages work as expected"; } note 'single role, "complex" custom message - OK'; for my $thing (qw{ TestClass TestRole }) { my ($_ok, $_nok) = counters(); test_out $_ok->("wah-wah $ROLE"); does_ok $thing, $ROLE, 'wah-wah %s'; test_test "$thing: 'complex' custom messages work as expected"; } note 'multiple roles, default message - OK'; for my $thing (qw{ TestClass::Two TestRole::Two }) { # role - OK my ($_ok, $_nok) = counters(); test_out $_ok->("$thing does $_") for @ROLES; does_ok $thing, [ @ROLES ]; test_test "$thing is found to do the roles correctly"; } note 'multiple roles, custom message - OK'; for my $thing (qw{ TestClass::Two TestRole::Two }) { # role - OK my ($_ok, $_nok) = counters(); my $msg = 'wah-wah'; test_out $_ok->($msg) for @ROLES; does_ok $thing, [ @ROLES ], $msg; test_test "$thing: multiple roles, custom messages work as expected"; } note 'multiple roles, "complex" custom message - OK'; for my $thing (qw{ TestClass::Two TestRole::Two }) { # role - OK my ($_ok, $_nok) = counters(); my $msg = 'wah-wah'; test_out $_ok->("$msg $_") for @ROLES; does_ok $thing, [ @ROLES ], "$msg %s"; test_test "$thing: multiple roles, 'complex' custom messages work as expected"; } note 'role - NOT OK'; for my $thing (qw{ TestClass::Fail TestRole::Fail }) { # role - NOT OK my ($_ok, $_nok) = counters(); test_out $_nok->("$thing does $ROLE"); test_fail 1; does_ok $thing, $ROLE; test_test "$thing is found to not do $ROLE correctly"; } note 'multiple roles - NOT OK'; for my $thing (qw{ TestClass::Fail TestRole::Fail }) { # role - OK my ($_ok, $_nok) = counters(); do { test_out $_nok->("$thing does $_"); test_fail 1 } for @ROLES; does_ok $thing, [ @ROLES ]; test_test "$thing: multiple roles fail as expected"; } note 'multiple roles - PARTIALLY OK'; for my $thing (qw{ TestClass::Fail2 TestRole::Fail2 }) { # role - OK my ($_ok, $_nok) = counters(); do { test_out $_nok->("$thing does $_"); test_fail 2 } for $ROLES[0]; do { test_out $_ok->("$thing does $_") } for $ROLES[1]; does_ok $thing, [ @ROLES ]; test_test "$thing: multiple roles partially fail as expected"; } done_testing; Test-Moose-More-0.037/t/attribute/0000775000175000017500000000000012653511243017144 5ustar rsrchboyrsrchboyTest-Moose-More-0.037/t/attribute/coerce.t0000644000175000017500000000476212653511243020600 0ustar rsrchboyrsrchboyuse strict; use warnings; use Test::Builder::Tester; use Test::More; use Test::Moose::More; use TAP::SimpleOutput 'counters'; use Moose::Util::TypeConstraints; subtype 'AllCaps', as 'Str', where { !m/[a-z]/ }, message { 'String contains some lower-case chars' }; coerce 'AllCaps', from 'Str', via { tr/[a-z]/A-Z]/ }; { package TestRole; use Moose::Role; use Moose::Deprecated -api_version => '1.07'; # don't complain use namespace::autoclean; has yes_coerce => (is => 'ro', isa => 'AllCaps', coerce => 1); has no_coerce => (is => 'ro', isa => 'AllCaps', coerce => 0); has null_coerce => (is => 'ro', isa => 'AllCaps'); } { package TestClass; use Moose; use Moose::Deprecated -api_version => '1.07'; # don't complain use namespace::autoclean; has yes_coerce => (is => 'ro', isa => 'AllCaps', coerce => 1); has no_coerce => (is => 'ro', isa => 'AllCaps', coerce => 0); has null_coerce => (is => 'ro', isa => 'AllCaps'); } note 'finds coercion correctly'; for my $thing (qw{ TestClass TestRole }) { my ($_ok, $_nok, $_skip) = counters(); my $name = 'yes_coerce'; test_out $_ok->("$thing has an attribute named $name"); test_out $_ok->("$name should coerce"); test_out $_ok->("$thing has an attribute named $name"); test_out $_nok->("$name should not coerce"); test_fail 7; test_out $_ok->("$thing has an attribute named $name"); test_out $_nok->("$name should not coerce"); test_fail 7; validate_attribute $thing => $name => ( coerce => 1, ); validate_attribute $thing => $name => ( coerce => 0, ); validate_attribute $thing => $name => ( coerce => undef, ); test_test "finds coercion correctly in $thing"; } note 'finds no coercion correctly'; for my $thing (qw{ TestClass TestRole}) { my ($_ok, $_nok, $_skip) = counters(); my $name = 'no_coerce'; test_out $_ok->("$thing has an attribute named $name"); test_out $_nok->("$name should coerce"); test_fail 5; test_out $_ok->("$thing has an attribute named $name"); test_out $_ok->("$name should not coerce"); test_out $_ok->("$thing has an attribute named $name"); test_out $_ok->("$name should not coerce"); validate_attribute $thing => $name => ( coerce => 1, ); validate_attribute $thing => $name => ( coerce => 0, ); validate_attribute $thing => $name => ( coerce => undef, ); test_test "finds no coercion correctly in $thing"; } done_testing; Test-Moose-More-0.037/t/wrapped/0000775000175000017500000000000012653511243016603 5ustar rsrchboyrsrchboyTest-Moose-More-0.037/t/wrapped/in_roles.t0000644000175000017500000000322612653511243020603 0ustar rsrchboyrsrchboyuse strict; use warnings; use Test::Builder::Tester; use Moose::Util 'with_traits'; use Test::More; use Test::Moose::More; use TAP::SimpleOutput 'counters'; { package TestRole; use Moose::Role; around hiya => sub { }; before there => sub { }; after sailor => sub { }; } subtest 'sanity checks of the tests themselves' => sub { role_wraps_around_method_ok 'TestRole' => 'hiya'; role_wraps_before_method_ok 'TestRole' => 'there'; role_wraps_after_method_ok 'TestRole' => 'sailor'; }; { note 'role_wraps_around_method_ok'; my ($_ok, $_nok, $_skip) = counters(); test_out $_ok->('TestRole wraps around method hiya'); test_out $_nok->('TestRole wraps around method sailor'); test_fail(2); role_wraps_around_method_ok 'TestRole' => 'hiya'; role_wraps_around_method_ok 'TestRole' => 'sailor'; test_test 'role_wraps_around_method_ok OK'; } { note 'role_wraps_before_method_ok'; my ($_ok, $_nok, $_skip) = counters(); test_out $_ok->('TestRole wraps before method there'); test_out $_nok->('TestRole wraps before method sailor'); test_fail(2); role_wraps_before_method_ok 'TestRole' => 'there'; role_wraps_before_method_ok 'TestRole' => 'sailor'; test_test 'role_wraps_before_method_ok OK'; } { note 'role_wraps_after_method_ok'; my ($_ok, $_nok, $_skip) = counters(); test_out $_ok->('TestRole wraps after method sailor'); test_out $_nok->('TestRole wraps after method hiya'); test_fail(2); role_wraps_after_method_ok 'TestRole' => 'sailor'; role_wraps_after_method_ok 'TestRole' => 'hiya'; test_test 'role_wraps_after_method_ok OK'; } done_testing; Test-Moose-More-0.037/t/00-report-prereqs.t0000644000175000017500000001325612653511243020542 0ustar rsrchboyrsrchboy#!perl # # This file is part of Test-Moose-More # # This software is Copyright (c) 2012 by Chris Weyl. # # This is free software, licensed under: # # The GNU Lesser General Public License, Version 2.1, February 1999 # use strict; use warnings; # This test was generated by Dist::Zilla::Plugin::Test::ReportPrereqs 0.021 use Test::More tests => 1; use ExtUtils::MakeMaker; use File::Spec; # from $version::LAX my $lax_version_re = qr/(?: undef | (?: (?:[0-9]+) (?: \. | (?:\.[0-9]+) (?:_[0-9]+)? )? | (?:\.[0-9]+) (?:_[0-9]+)? ) | (?: v (?:[0-9]+) (?: (?:\.[0-9]+)+ (?:_[0-9]+)? )? | (?:[0-9]+)? (?:\.[0-9]+){2,} (?:_[0-9]+)? ) )/x; # hide optional CPAN::Meta modules from prereq scanner # and check if they are available my $cpan_meta = "CPAN::Meta"; my $cpan_meta_pre = "CPAN::Meta::Prereqs"; my $HAS_CPAN_META = eval "require $cpan_meta; $cpan_meta->VERSION('2.120900')" && eval "require $cpan_meta_pre"; ## no critic # Verify requirements? my $DO_VERIFY_PREREQS = 1; sub _max { my $max = shift; $max = ( $_ > $max ) ? $_ : $max for @_; return $max; } sub _merge_prereqs { my ($collector, $prereqs) = @_; # CPAN::Meta::Prereqs object if (ref $collector eq $cpan_meta_pre) { return $collector->with_merged_prereqs( CPAN::Meta::Prereqs->new( $prereqs ) ); } # Raw hashrefs for my $phase ( keys %$prereqs ) { for my $type ( keys %{ $prereqs->{$phase} } ) { for my $module ( keys %{ $prereqs->{$phase}{$type} } ) { $collector->{$phase}{$type}{$module} = $prereqs->{$phase}{$type}{$module}; } } } return $collector; } my @include = qw( ); my @exclude = qw( ); # Add static prereqs to the included modules list my $static_prereqs = do 't/00-report-prereqs.dd'; # Merge all prereqs (either with ::Prereqs or a hashref) my $full_prereqs = _merge_prereqs( ( $HAS_CPAN_META ? $cpan_meta_pre->new : {} ), $static_prereqs ); # Add dynamic prereqs to the included modules list (if we can) my ($source) = grep { -f } 'MYMETA.json', 'MYMETA.yml'; if ( $source && $HAS_CPAN_META ) { if ( my $meta = eval { CPAN::Meta->load_file($source) } ) { $full_prereqs = _merge_prereqs($full_prereqs, $meta->prereqs); } } else { $source = 'static metadata'; } my @full_reports; my @dep_errors; my $req_hash = $HAS_CPAN_META ? $full_prereqs->as_string_hash : $full_prereqs; # Add static includes into a fake section for my $mod (@include) { $req_hash->{other}{modules}{$mod} = 0; } for my $phase ( qw(configure build test runtime develop other) ) { next unless $req_hash->{$phase}; next if ($phase eq 'develop' and not $ENV{AUTHOR_TESTING}); for my $type ( qw(requires recommends suggests conflicts modules) ) { next unless $req_hash->{$phase}{$type}; my $title = ucfirst($phase).' '.ucfirst($type); my @reports = [qw/Module Want Have/]; for my $mod ( sort keys %{ $req_hash->{$phase}{$type} } ) { next if $mod eq 'perl'; next if grep { $_ eq $mod } @exclude; my $file = $mod; $file =~ s{::}{/}g; $file .= ".pm"; my ($prefix) = grep { -e File::Spec->catfile($_, $file) } @INC; my $want = $req_hash->{$phase}{$type}{$mod}; $want = "undef" unless defined $want; $want = "any" if !$want && $want == 0; my $req_string = $want eq 'any' ? 'any version required' : "version '$want' required"; if ($prefix) { my $have = MM->parse_version( File::Spec->catfile($prefix, $file) ); $have = "undef" unless defined $have; push @reports, [$mod, $want, $have]; if ( $DO_VERIFY_PREREQS && $HAS_CPAN_META && $type eq 'requires' ) { if ( $have !~ /\A$lax_version_re\z/ ) { push @dep_errors, "$mod version '$have' cannot be parsed ($req_string)"; } elsif ( ! $full_prereqs->requirements_for( $phase, $type )->accepts_module( $mod => $have ) ) { push @dep_errors, "$mod version '$have' is not in required range '$want'"; } } } else { push @reports, [$mod, $want, "missing"]; if ( $DO_VERIFY_PREREQS && $type eq 'requires' ) { push @dep_errors, "$mod is not installed ($req_string)"; } } } if ( @reports ) { push @full_reports, "=== $title ===\n\n"; my $ml = _max( map { length $_->[0] } @reports ); my $wl = _max( map { length $_->[1] } @reports ); my $hl = _max( map { length $_->[2] } @reports ); if ($type eq 'modules') { splice @reports, 1, 0, ["-" x $ml, "", "-" x $hl]; push @full_reports, map { sprintf(" %*s %*s\n", -$ml, $_->[0], $hl, $_->[2]) } @reports; } else { splice @reports, 1, 0, ["-" x $ml, "-" x $wl, "-" x $hl]; push @full_reports, map { sprintf(" %*s %*s %*s\n", -$ml, $_->[0], $wl, $_->[1], $hl, $_->[2]) } @reports; } push @full_reports, "\n"; } } } if ( @full_reports ) { diag "\nVersions for all modules listed in $source (including optional ones):\n\n", @full_reports; } if ( @dep_errors ) { diag join("\n", "\n*** WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING ***\n", "The following REQUIRED prerequisites were not satisfied:\n", @dep_errors, "\n" ); } pass; # vim: ts=4 sts=4 sw=4 et: Test-Moose-More-0.037/t/validate_attribute.t0000644000175000017500000001141212653511243021177 0ustar rsrchboyrsrchboyuse strict; use warnings; use Test::Builder::Tester; use Test::More; use Test::Moose::More; use TAP::SimpleOutput 0.002 'counters'; { package TestRole; use Moose::Role; use namespace::autoclean; has thinger => (is => 'ro', predicate => 'has_thinger'); } { package TestClass; use Moose; use namespace::autoclean; has foo => ( traits => [ 'TestRole' ], required => 1, is => 'ro', isa => 'Int', builder => '_build_foo', lazy => 1, thinger => 'foo', ); } # initial tests, covering the most straight-forward cases (IMHO) note 'validate attribute validation'; { my ($_ok, $_nok, $_skip) = counters(); test_out $_ok->('TestClass has an attribute named foo'); test_out $_ok->(q{Moose::Meta::Class::__ANON__::SERIAL::1 has a metaclass}); test_out $_ok->(q{Moose::Meta::Class::__ANON__::SERIAL::1 is a Moose class}); test_out $_ok->('Moose::Meta::Class::__ANON__::SERIAL::1 isa Moose::Meta::Attribute'); test_out $_ok->('Moose::Meta::Class::__ANON__::SERIAL::1 does TestRole'); test_out $_ok->('foo is required'); test_out $_ok->('foo has a builder'); test_out $_ok->('foo option builder correct'); test_out $_ok->('foo does not have a default'); test_out $_ok->('foo option default correct'); test_out $_ok->('foo has a reader'); test_out $_ok->('foo option reader correct'); test_out $_skip->("cannot test 'isa' options yet"); test_out $_skip->("cannot test 'does' options yet"); test_out $_skip->("cannot test 'handles' options yet"); test_out $_skip->("cannot test 'traits' options yet"); test_out $_ok->('foo has a init_arg'); test_out $_ok->('foo option init_arg correct'); test_out $_ok->('foo is lazy'); test_out $_nok->('unknown attribute option: binger'); test_fail 3; test_out $_ok->('foo has a thinger'); test_out $_ok->('foo option thinger correct'); validate_attribute TestClass => foo => ( -does => [ 'TestRole' ], -isa => [ 'Moose::Meta::Attribute' ], traits => [ 'TestRole' ], isa => 'Int', does => 'Bar', handles => { }, reader => 'foo', builder => '_build_foo', default => undef, init_arg => 'foo', lazy => 1, required => 1, thinger => 'foo', binger => 'bar', ); test_test 'validate_attribute works correctly'; } subtest 'a standalone run of validate_attribute' => sub { note 'of necessity, these exclude the "failing" tests'; validate_attribute TestClass => foo => ( -does => [ 'TestRole' ], -isa => [ 'Moose::Meta::Attribute' ], traits => [ 'TestRole' ], isa => 'Int', does => 'Bar', handles => { }, reader => 'foo', builder => '_build_foo', default => undef, init_arg => 'foo', required => 1, lazy => 1, thinger => 'foo', ); }; note 'attribute_options_ok validation'; { my ($_ok, $_nok, $_skip) = counters(); test_out $_ok->('TestClass has an attribute named foo'); test_out $_ok->('foo has a builder'); test_out $_ok->('foo option builder correct'); test_out $_ok->('foo does not have a default'); test_out $_ok->('foo option default correct'); test_out $_ok->('foo has a reader'); test_out $_ok->('foo option reader correct'); test_out $_skip->("cannot test 'isa' options yet"); test_out $_skip->("cannot test 'does' options yet"); test_out $_skip->("cannot test 'handles' options yet"); test_out $_skip->("cannot test 'traits' options yet"); test_out $_ok->('foo has a init_arg'); test_out $_ok->('foo option init_arg correct'); test_out $_ok->('foo is lazy'); test_out $_nok->('unknown attribute option: binger'); test_fail 3; test_out $_ok->('foo has a thinger'); test_out $_ok->('foo option thinger correct'); attribute_options_ok TestClass => foo => ( traits => [ 'TestRole' ], isa => 'Int', does => 'Bar', handles => { }, reader => 'foo', builder => '_build_foo', default => undef, init_arg => 'foo', lazy => 1, thinger => 'foo', binger => 'bar', ); test_test 'attribute_options_ok works as expected'; } subtest 'a standalone run of attribute_options_ok' => sub { note 'of necessity, these exclude the "failing" tests'; attribute_options_ok TestClass => foo => ( traits => [ 'TestRole' ], isa => 'Int', does => 'Bar', handles => { }, reader => 'foo', builder => '_build_foo', default => undef, init_arg => 'foo', lazy => 1, ); }; done_testing; Test-Moose-More-0.037/t/requires_method_ok.t0000644000175000017500000000104712653511243021216 0ustar rsrchboyrsrchboyuse strict; use warnings; { package TestRole; use Moose::Role; requires 'foo'; } use Test::Builder::Tester; use Test::More; use Test::Moose::More; my $THING = 'TestRole'; test_out "ok 1 - $THING requires method foo"; requires_method_ok $THING, 'foo'; test_test 'requires_method_ok works correctly with methods'; # is_role_ok vs plain-old-package test_out "not ok 1 - $THING requires method bar"; test_fail(1); requires_method_ok $THING, 'bar'; test_test 'requires_method_ok works correctly with methods not required'; done_testing; Test-Moose-More-0.037/t/00-report-prereqs.dd0000644000175000017500000000611012653511243020655 0ustar rsrchboyrsrchboydo { my $x = { 'configure' => { 'requires' => { 'ExtUtils::MakeMaker' => '0', 'perl' => '5.006' } }, 'develop' => { 'requires' => { 'Dist::Zilla::PluginBundle::RSRCHBOY' => '0.066', 'Pod::Coverage::TrustPod' => '0', 'Pod::Wordlist' => '0', 'Test::EOL' => '0', 'Test::More' => '0.88', 'Test::NoTabs' => '0', 'Test::Pod' => '1.41', 'Test::Pod::Coverage' => '1.08', 'Test::Pod::LinkCheck' => '0', 'Test::Spelling' => '0.12' } }, 'runtime' => { 'requires' => { 'Data::OptList' => '0', 'Moose::Util' => '0', 'Moose::Util::TypeConstraints' => '0', 'Scalar::Util' => '0', 'Sub::Exporter::Progressive' => '0', 'Syntax::Keyword::Junction' => '0', 'Test::Builder' => '0', 'Test::Moose' => '0', 'Test::More' => '0.94', 'perl' => '5.006', 'strict' => '0', 'warnings' => '0' } }, 'test' => { 'recommends' => { 'CPAN::Meta' => '2.120900' }, 'requires' => { 'ExtUtils::MakeMaker' => '0', 'File::Spec' => '0', 'IO::Handle' => '0', 'IPC::Open3' => '0', 'Moose' => '0', 'Moose::Role' => '0', 'Perl::Version' => '0', 'TAP::SimpleOutput' => '0.002', 'Test::Builder::Tester' => '0', 'Test::CheckDeps' => '0.010', 'Test::More' => '0.94', 'aliased' => '0', 'blib' => '1.01', 'constant' => '0', 'namespace::autoclean' => '0', 'perl' => '5.006' } } }; $x; }Test-Moose-More-0.037/t/validate_role/0000775000175000017500000000000012653511243017753 5ustar rsrchboyrsrchboyTest-Moose-More-0.037/t/validate_role/basic.t0000644000175000017500000001007112653511243021216 0ustar rsrchboyrsrchboyuse strict; use warnings; { package TestRole::One; use Moose::Role; } { package TestRole::Two; use Moose::Role; } { package TestRole::Invalid; use Moose::Role; with 'TestRole::Two'; } { package TestClass::NonMoosey; } { package TestRole; use Moose::Role; with 'TestRole::One'; has foo => (is => 'ro'); has baz => (traits => ['TestRole::Two'], is => 'ro'); sub method1 { } requires 'blargh'; before before_wrapped => sub { }; around around_wrapped => sub { }; after after_wrapped => sub { }; has bar => ( traits => ['Array'], isa => 'ArrayRef', is => 'ro', lazy => 1, builder => '_build_bar', handles => { has_bar => 'count', num_bars => 'count', } ); } use Test::Builder::Tester; # tests => 1; use Test::More; use Test::Moose::More; use TAP::SimpleOutput 'counters'; validate_role TestRole => ( -subtest => 'simple -subtest demo/validation', methods => [ qw{ method1 } ], ); note 'validate w/valid role'; { my ($_ok, $_nok) = counters(); test_out $_ok->('TestRole has a metaclass'); test_out $_ok->('TestRole is a Moose role'); test_out $_ok->('TestRole requires method blargh'); test_out $_ok->("TestRole wraps before method before_wrapped"); test_out $_ok->("TestRole wraps around method around_wrapped"); test_out $_ok->("TestRole wraps after method after_wrapped"); test_out $_ok->('TestRole does TestRole'); test_out $_ok->('TestRole does not do TestRole::Two'); test_out $_ok->("TestRole has method $_") for qw{ method1 }; test_out $_ok->('TestRole has an attribute named bar'); validate_role 'TestRole' => ( attributes => [ 'bar' ], does => [ 'TestRole' ], does_not => [ 'TestRole::Two' ], # XXX cannot check for accessor methods in a role at the moment #methods => [ qw{ foo method1 has_bar } ], methods => [ qw{ method1 } ], required_methods => [ qw{ blargh } ], before => [ 'before_wrapped' ], around => [ 'around_wrapped' ], after => [ 'after_wrapped' ], ); test_test 'validate_role works correctly for valid roles'; } note 'validate w/non-moose package'; { my ($_ok, $_nok) = counters(); test_out $_nok->('TestClass::NonMoosey has a metaclass'); test_fail 1; validate_role 'TestClass::NonMoosey' => ( does => [ 'TestRole' ], methods => [ qw{ foo method1 has_bar } ], ); test_test 'validate_role works correctly for non-moose classes'; } note 'validate invalid role'; { my ($_ok, $_nok) = counters(); test_out $_ok->('TestRole::Invalid has a metaclass'); test_out $_ok->('TestRole::Invalid is a Moose role'); test_out $_nok->('TestRole::Invalid does TestRole'); test_fail 6; test_out $_nok->('TestRole::Invalid does not do TestRole::Two'); test_fail 4; do { test_out $_nok->("TestRole::Invalid has method $_"); test_fail 3 } for qw{ foo method1 has_bar }; validate_role 'TestRole::Invalid' => ( does => [ 'TestRole' ], does_not => [ 'TestRole::Two' ], methods => [ qw{ foo method1 has_bar } ], ); test_test 'validate_role works correctly for invalid roles'; } note 'validate w/attribute validation'; { my ($_ok, $_nok, $_skip) = counters(); test_out $_ok->('TestRole has a metaclass'); test_out $_ok->('TestRole is a Moose role'); test_out $_ok->('TestRole has an attribute named bar'); test_out $_ok->('TestRole has an attribute named baz'); test_out $_skip->(q{Cannot examine attribute metaclass in roles}); test_out $_ok->('TestRole has an attribute named foo'); validate_role 'TestRole' => ( attributes => [ 'bar', baz => { does => [ 'TestRole::Two' ] }, 'foo' ], ); test_test 'validate_role works correctly for attribute meta checking'; } done_testing; Test-Moose-More-0.037/t/validate_role/compose.t0000644000175000017500000000216612653511243021610 0ustar rsrchboyrsrchboyuse strict; use warnings; # FIXME yup, these aren't real tests, really. { package TestRole::One; use Moose::Role; } { package TestRole::Two; use Moose::Role; } { package TestRole; use Moose::Role; with 'TestRole::One'; has foo => (is => 'ro'); has baz => (traits => ['TestRole::Two'], is => 'ro'); sub method1 { } requires 'blargh'; has bar => ( traits => ['Array'], isa => 'ArrayRef', is => 'ro', lazy => 1, builder => '_build_bar', handles => { has_bar => 'count', num_bars => 'count', } ); } use Test::Builder::Tester; # tests => 1; use Test::More; use Test::Moose::More; use TAP::SimpleOutput 'counters'; validate_role 'TestRole' => ( -compose => 1, attributes => [ bar => { -does => ['Array'] } ], does => [ 'TestRole::One' ], does_not => [ 'TestRole::Two' ], methods => [ qw{ method1 } ], required_methods => [ qw{ blargh } ], ); done_testing; __END__ Test-Moose-More-0.037/t/validate_thing/0000775000175000017500000000000012653511243020123 5ustar rsrchboyrsrchboyTest-Moose-More-0.037/t/validate_thing/sugar.t0000644000175000017500000000142612653511243021432 0ustar rsrchboyrsrchboyuse strict; use warnings; use Test::More; use Test::Moose::More; use Test::Builder::Tester; { package TC1; use Moose; use namespace::autoclean } { package TC2; use Moose; } { package TR1; use Moose::Role; use namespace::autoclean } { package TR2; use Moose::Role; } use TAP::SimpleOutput 0.002 'counters'; sub _validate { my ($thing, $sugar) = @_; my ($_ok, $_nok) = counters(); my $verb = $sugar ? 'can' : 'cannot'; test_out $_ok->("$thing $verb $_") for Test::Moose::More::known_sugar(); validate_thing $thing => (sugar => $sugar); test_test "validate_thing: $thing, sugar => $sugar"; } _validate('TC1', 0); _validate('TC2', 1); _validate('TR1', 0); _validate('TR2', 1); done_testing; Test-Moose-More-0.037/t/validate_attribute/0000775000175000017500000000000012653511243021015 5ustar rsrchboyrsrchboyTest-Moose-More-0.037/t/validate_attribute/in_roles.t0000644000175000017500000000236212653511243023015 0ustar rsrchboyrsrchboyuse strict; use warnings; use Test::Builder::Tester; use Test::More; use Test::Moose::More; use TAP::SimpleOutput 0.002 'counters'; { package TestRole; use Moose::Role; use namespace::autoclean; has thinger => (is => 'ro', predicate => 'has_thinger'); } subtest 'a standalone run of validate_attribute (thinger)' => sub { validate_attribute TestRole => thinger => ( reader => 'thinger', predicate => 'has_thinger', ); }; { note my $test_title = 'validate_attribute() for a valid role attribute'; my ($_ok, $_nok, $_skip, $_todo, $_other) = counters(); test_out $_ok->('TestRole has an attribute named thinger'); test_out $_skip->('cannot yet test role attribute layouts'); validate_attribute TestRole => thinger => ( reader => 'thinger', predicate => 'has_thinger', ); test_test $test_title; } { note my $test_title = 'validate_attribute() for an invalid role attribute'; my ($_ok, $_nok, $_skip, $_todo, $_other) = counters(); test_out $_nok->('TestRole has an attribute named dne'); test_fail 1; validate_attribute TestRole => dne => ( reader => 'dne', predicate => 'has_dne', ); test_test $test_title; } done_testing; Test-Moose-More-0.037/Makefile.PL0000644000175000017500000000505712653511243016655 0ustar rsrchboyrsrchboy# # This file is part of Test-Moose-More # # This software is Copyright (c) 2012 by Chris Weyl. # # This is free software, licensed under: # # The GNU Lesser General Public License, Version 2.1, February 1999 # # This file was automatically generated by Dist::Zilla::Plugin::MakeMaker v5.043. use strict; use warnings; use 5.006; use ExtUtils::MakeMaker; my %WriteMakefileArgs = ( "ABSTRACT" => "More tools for testing Moose packages", "AUTHOR" => "Chris Weyl ", "CONFIGURE_REQUIRES" => { "ExtUtils::MakeMaker" => 0 }, "DISTNAME" => "Test-Moose-More", "LICENSE" => "lgpl", "MIN_PERL_VERSION" => "5.006", "NAME" => "Test::Moose::More", "PREREQ_PM" => { "Data::OptList" => 0, "Moose::Util" => 0, "Moose::Util::TypeConstraints" => 0, "Scalar::Util" => 0, "Sub::Exporter::Progressive" => 0, "Syntax::Keyword::Junction" => 0, "Test::Builder" => 0, "Test::Moose" => 0, "Test::More" => "0.94", "strict" => 0, "warnings" => 0 }, "TEST_REQUIRES" => { "ExtUtils::MakeMaker" => 0, "File::Spec" => 0, "IO::Handle" => 0, "IPC::Open3" => 0, "Moose" => 0, "Moose::Role" => 0, "Perl::Version" => 0, "TAP::SimpleOutput" => "0.002", "Test::Builder::Tester" => 0, "Test::CheckDeps" => "0.010", "Test::More" => "0.94", "aliased" => 0, "blib" => "1.01", "constant" => 0, "namespace::autoclean" => 0 }, "VERSION" => "0.037", "test" => { "TESTS" => "t/*.t t/attribute/*.t t/validate_attribute/*.t t/validate_role/*.t t/validate_thing/*.t t/wrapped/*.t" } ); my %FallbackPrereqs = ( "Data::OptList" => 0, "ExtUtils::MakeMaker" => 0, "File::Spec" => 0, "IO::Handle" => 0, "IPC::Open3" => 0, "Moose" => 0, "Moose::Role" => 0, "Moose::Util" => 0, "Moose::Util::TypeConstraints" => 0, "Perl::Version" => 0, "Scalar::Util" => 0, "Sub::Exporter::Progressive" => 0, "Syntax::Keyword::Junction" => 0, "TAP::SimpleOutput" => "0.002", "Test::Builder" => 0, "Test::Builder::Tester" => 0, "Test::CheckDeps" => "0.010", "Test::Moose" => 0, "Test::More" => "0.94", "aliased" => 0, "blib" => "1.01", "constant" => 0, "namespace::autoclean" => 0, "strict" => 0, "warnings" => 0 ); unless ( eval { ExtUtils::MakeMaker->VERSION(6.63_03) } ) { delete $WriteMakefileArgs{TEST_REQUIRES}; delete $WriteMakefileArgs{BUILD_REQUIRES}; $WriteMakefileArgs{PREREQ_PM} = \%FallbackPrereqs; } delete $WriteMakefileArgs{CONFIGURE_REQUIRES} unless eval { ExtUtils::MakeMaker->VERSION(6.52) }; WriteMakefile(%WriteMakefileArgs); Test-Moose-More-0.037/.travis.yml0000644000175000017500000000057012653511243017007 0ustar rsrchboyrsrchboy# use the container-based infrastructure sudo: false language: perl perl: - "5.8" - "5.10" - "5.12" - "5.14" - "5.16" - "5.18" - "5.20" - "5.21" matrix: allow_failures: - perl: "5.8" - perl: "5.21" before_install: # git bits sometimes needed... - git config user.name 'Travis-CI' - git config user.email 'travis@nowhere.dne' Test-Moose-More-0.037/xt/0000775000175000017500000000000012653511243015331 5ustar rsrchboyrsrchboyTest-Moose-More-0.037/xt/author/0000775000175000017500000000000012653511243016633 5ustar rsrchboyrsrchboyTest-Moose-More-0.037/xt/author/eol.t0000644000175000017500000000157712653511243017607 0ustar rsrchboyrsrchboyuse strict; use warnings; # this test was generated with Dist::Zilla::Plugin::Test::EOL 0.18 use Test::More 0.88; use Test::EOL; my @files = ( 'lib/Test/Moose/More.pm', 't/00-check-deps.t', 't/00-compile.t', 't/00-report-prereqs.dd', 't/00-report-prereqs.t', 't/attribute/coerce.t', 't/check_sugar.t', 't/does_not_ok.t', 't/does_ok.t', 't/has_attribute_ok.t', 't/has_method_ok.t', 't/is_anon_ok.t', 't/is_class_ok.t', 't/is_immutable_ok.t', 't/is_not_anon_ok.t', 't/is_role_ok.t', 't/meta_ok.t', 't/requires_method_ok.t', 't/validate_attribute.t', 't/validate_attribute/in_roles.t', 't/validate_class.t', 't/validate_role/basic.t', 't/validate_role/compose.t', 't/validate_thing/sugar.t', 't/wrapped/in_roles.t' ); eol_unix_ok($_, { trailing_whitespace => 1 }) foreach @files; done_testing; Test-Moose-More-0.037/xt/author/no-tabs.t0000644000175000017500000000154512653511243020366 0ustar rsrchboyrsrchboyuse strict; use warnings; # this test was generated with Dist::Zilla::Plugin::Test::NoTabs 0.15 use Test::More 0.88; use Test::NoTabs; my @files = ( 'lib/Test/Moose/More.pm', 't/00-check-deps.t', 't/00-compile.t', 't/00-report-prereqs.dd', 't/00-report-prereqs.t', 't/attribute/coerce.t', 't/check_sugar.t', 't/does_not_ok.t', 't/does_ok.t', 't/has_attribute_ok.t', 't/has_method_ok.t', 't/is_anon_ok.t', 't/is_class_ok.t', 't/is_immutable_ok.t', 't/is_not_anon_ok.t', 't/is_role_ok.t', 't/meta_ok.t', 't/requires_method_ok.t', 't/validate_attribute.t', 't/validate_attribute/in_roles.t', 't/validate_class.t', 't/validate_role/basic.t', 't/validate_role/compose.t', 't/validate_thing/sugar.t', 't/wrapped/in_roles.t' ); notabs_ok($_) foreach @files; done_testing; Test-Moose-More-0.037/xt/author/pod-spell.t0000644000175000017500000000073112653511243020716 0ustar rsrchboyrsrchboyuse strict; use warnings; use Test::More; # generated by Dist::Zilla::Plugin::Test::PodSpelling 2.007000 use Test::Spelling 0.12; use Pod::Wordlist; add_stopwords(); all_pod_files_spelling_ok( qw( bin lib ) ); __DATA__ ABEND AFAICT Gratipay RSRCHBOY RSRCHBOY's codebase coderef gpg implementers ini metaclass metaclasses parameterization parameterized subclasses Formattable formattable Chris Weyl cweyl Chad Granum chad Karen Etheridge ether lib Test Moose More Test-Moose-More-0.037/xt/author/pod-syntax.t0000644000175000017500000000057712653511243021135 0ustar rsrchboyrsrchboy#!perl # # This file is part of Test-Moose-More # # This software is Copyright (c) 2012 by Chris Weyl. # # This is free software, licensed under: # # The GNU Lesser General Public License, Version 2.1, February 1999 # # This file was automatically generated by Dist::Zilla::Plugin::PodSyntaxTests. use strict; use warnings; use Test::More; use Test::Pod 1.41; all_pod_files_ok(); Test-Moose-More-0.037/xt/author/pod-coverage.t0000644000175000017500000000066112653511243021374 0ustar rsrchboyrsrchboy#!perl # # This file is part of Test-Moose-More # # This software is Copyright (c) 2012 by Chris Weyl. # # This is free software, licensed under: # # The GNU Lesser General Public License, Version 2.1, February 1999 # # This file was automatically generated by Dist::Zilla::Plugin::PodCoverageTests. use Test::Pod::Coverage 1.08; use Pod::Coverage::TrustPod; all_pod_coverage_ok({ coverage_class => 'Pod::Coverage::TrustPod' }); Test-Moose-More-0.037/xt/release/0000775000175000017500000000000012653511243016751 5ustar rsrchboyrsrchboyTest-Moose-More-0.037/xt/release/has-version.t0000644000175000017500000000056212653511243021375 0ustar rsrchboyrsrchboy#!perl # # This file is part of Test-Moose-More # # This software is Copyright (c) 2012 by Chris Weyl. # # This is free software, licensed under: # # The GNU Lesser General Public License, Version 2.1, February 1999 # use Test::More; eval "use Test::HasVersion"; plan skip_all => "Test::HasVersion required for testing version numbers" if $@; all_pm_version_ok(); Test-Moose-More-0.037/xt/release/pod-linkcheck.t0000644000175000017500000000106412653511243021650 0ustar rsrchboyrsrchboy#!perl # # This file is part of Test-Moose-More # # This software is Copyright (c) 2012 by Chris Weyl. # # This is free software, licensed under: # # The GNU Lesser General Public License, Version 2.1, February 1999 # use strict; use warnings; use Test::More; foreach my $env_skip ( qw( SKIP_POD_LINKCHECK ) ){ plan skip_all => "\$ENV{$env_skip} is set, skipping" if $ENV{$env_skip}; } eval "use Test::Pod::LinkCheck"; if ( $@ ) { plan skip_all => 'Test::Pod::LinkCheck required for testing POD'; } else { Test::Pod::LinkCheck->new->all_pod_ok; } Test-Moose-More-0.037/xt/release/minimum-version.t0000644000175000017500000000061612653511243022275 0ustar rsrchboyrsrchboy#!perl # # This file is part of Test-Moose-More # # This software is Copyright (c) 2012 by Chris Weyl. # # This is free software, licensed under: # # The GNU Lesser General Public License, Version 2.1, February 1999 # use Test::More; eval "use Test::MinimumVersion"; plan skip_all => "Test::MinimumVersion required for testing minimum versions" if $@; all_minimum_version_ok( qq{5.008008} ); Test-Moose-More-0.037/xt/release/no-smart-comments.t0000644000175000017500000000273112653511243022522 0ustar rsrchboyrsrchboy#!/usr/bin/env perl # # This file is part of Test-Moose-More # # This software is Copyright (c) 2012 by Chris Weyl. # # This is free software, licensed under: # # The GNU Lesser General Public License, Version 2.1, February 1999 # use strict; use warnings; use Test::More 0.88; eval "use Test::NoSmartComments"; plan skip_all => 'Test::NoSmartComments required for checking comment IQ' if $@; no_smart_comments_in("lib/Test/Moose/More.pm"); no_smart_comments_in("t/00-compile.t"); no_smart_comments_in("t/00-report-prereqs.dd"); no_smart_comments_in("t/00-report-prereqs.t"); no_smart_comments_in("t/attribute/coerce.t"); no_smart_comments_in("t/check_sugar.t"); no_smart_comments_in("t/does_not_ok.t"); no_smart_comments_in("t/does_ok.t"); no_smart_comments_in("t/has_attribute_ok.t"); no_smart_comments_in("t/has_method_ok.t"); no_smart_comments_in("t/is_anon_ok.t"); no_smart_comments_in("t/is_class_ok.t"); no_smart_comments_in("t/is_immutable_ok.t"); no_smart_comments_in("t/is_not_anon_ok.t"); no_smart_comments_in("t/is_role_ok.t"); no_smart_comments_in("t/meta_ok.t"); no_smart_comments_in("t/requires_method_ok.t"); no_smart_comments_in("t/validate_attribute.t"); no_smart_comments_in("t/validate_attribute/in_roles.t"); no_smart_comments_in("t/validate_class.t"); no_smart_comments_in("t/validate_role/basic.t"); no_smart_comments_in("t/validate_role/compose.t"); no_smart_comments_in("t/validate_thing/sugar.t"); no_smart_comments_in("t/wrapped/in_roles.t"); done_testing(); Test-Moose-More-0.037/xt/release/consistent-version.t0000644000175000017500000000032412653511243023007 0ustar rsrchboyrsrchboyuse strict; use warnings; use Test::More; eval "use Test::ConsistentVersion"; plan skip_all => "Test::ConsistentVersion required for this test" if $@; Test::ConsistentVersion::check_consistent_versions(); Test-Moose-More-0.037/lib/0000775000175000017500000000000012653511243015444 5ustar rsrchboyrsrchboyTest-Moose-More-0.037/lib/Test/0000775000175000017500000000000012653511243016363 5ustar rsrchboyrsrchboyTest-Moose-More-0.037/lib/Test/Moose/0000775000175000017500000000000012653511243017445 5ustar rsrchboyrsrchboyTest-Moose-More-0.037/lib/Test/Moose/More.pm0000644000175000017500000006746412653511243020724 0ustar rsrchboyrsrchboy# # This file is part of Test-Moose-More # # This software is Copyright (c) 2012 by Chris Weyl. # # This is free software, licensed under: # # The GNU Lesser General Public License, Version 2.1, February 1999 # package Test::Moose::More; our $AUTHORITY = 'cpan:RSRCHBOY'; # git description: 0.036-0-gd30d56e $Test::Moose::More::VERSION = '0.037'; # ABSTRACT: More tools for testing Moose packages use strict; use warnings; use Sub::Exporter::Progressive -setup => { exports => [ qw{ attribute_options_ok check_sugar_ok check_sugar_removed_ok does_not_ok does_ok has_attribute_ok has_method_ok is_anon_ok is_class_ok is_immutable_ok is_not_anon_ok is_not_immutable_ok is_role_ok meta_ok requires_method_ok validate_attribute validate_class validate_role validate_thing with_immutable role_wraps_around_method_ok role_wraps_before_method_ok role_wraps_after_method_ok is_anon is_class is_not_anon is_role } ], groups => { default => [ ':all' ] }, }; use Test::Builder; use Test::More; use Test::Moose 'with_immutable'; use Scalar::Util 'blessed'; use Syntax::Keyword::Junction 'any'; use Moose::Util 'resolve_metatrait_alias', 'does_role', 'find_meta'; use Moose::Util::TypeConstraints; use Data::OptList; # debugging... #use Smart::Comments; my $tb = Test::Builder->new(); our $THING_NAME; sub _thing_name { my ($thing, $thing_meta) = @_; return $THING_NAME if $THING_NAME; $thing_meta ||= find_meta($thing); # try very hard to come up with a meaningful name my $desc = !!$thing_meta ? $thing_meta->name : blessed $thing ? ref $thing : ref $thing ? 'The object' : $thing ; return $desc; } sub meta_ok ($;$) { my ($thing, $message) = @_; my $thing_meta = find_meta($thing); $message ||= _thing_name($thing, $thing_meta) . ' has a meta'; return $tb->ok(!!$thing_meta, $message); } sub does_ok { my ($thing, $roles, $message) = @_; my $thing_meta = find_meta($thing); $roles = [ $roles ] unless ref $roles; $message ||= _thing_name($thing, $thing_meta) . ' does %s'; $tb->ok(!!$thing_meta->does_role($_), sprintf($message, $_)) for @$roles; return; } sub does_not_ok { my ($thing, $roles, $message) = @_; my $thing_meta = find_meta($thing); $roles = [ $roles ] unless ref $roles; $message ||= _thing_name($thing, $thing_meta) . ' does not do %s'; $tb->ok(!$thing_meta->does_role($_), sprintf($message, $_)) for @$roles; return; } # helper to dig for an attribute sub _find_attribute { my ($thing, $attr_name) = @_; my $meta = find_meta($thing); # if $thing is a role, find_attribute_by_name() is not available to us return $meta->isa('Moose::Meta::Role') ? $meta->get_attribute($attr_name) : $meta->find_attribute_by_name($attr_name) ; } sub has_attribute_ok ($$;$) { my ($thing, $attr_name, $message) = @_; $message ||= _thing_name($thing) . " has an attribute named $attr_name"; return $tb->ok(!!_find_attribute($thing => $attr_name), $message); } sub has_method_ok { my ($thing, @methods) = @_; ### $thing my $meta = find_meta($thing); my $name = $meta->name; ### @methods $tb->ok(!!$meta->has_method($_), "$name has method $_") for @methods; return; } sub role_wraps_around_method_ok { unshift @_, 'around'; goto \&_role_wraps } sub role_wraps_before_method_ok { unshift @_, 'before'; goto \&_role_wraps } sub role_wraps_after_method_ok { unshift @_, 'after'; goto \&_role_wraps } sub _role_wraps { my ($style, $thing, @methods) = @_; my $meta_method = "get_${style}_method_modifiers"; ### $thing my $meta = find_meta($thing); my $name = $meta->name; ### @methods $tb->ok(!!$meta->$meta_method($_), "$name wraps $style method $_") for @methods; return; } sub requires_method_ok { my ($thing, @methods) = @_; ### $thing my $meta = find_meta($thing); my $name = $meta->name; ### @methods $tb->ok(!!$meta->requires_method($_), "$name requires method $_") for @methods; return; } sub is_immutable_ok($;$) { my ($thing, $message) = @_; ### $thing my $meta = find_meta($thing); $message ||= _thing_name($thing, $meta) . ' is immutable'; return $tb->ok($meta->is_immutable, $message); } sub is_not_immutable_ok($;$) { my ($thing, $message) = @_; ### $thing my $meta = find_meta($thing); $message ||= _thing_name($thing, $meta) . ' is not immutable'; return $tb->ok(!$meta->is_immutable, $message); } # NOTE: deprecate at some point late 2015 sub is_role { goto \&is_role_ok } sub is_class { goto \&is_class_ok } sub is_role_ok { unshift @_, 'Role'; goto \&_is_moosey_ok } sub is_class_ok { unshift @_, 'Class'; goto \&_is_moosey_ok } sub _is_moosey_ok { my ($type, $thing) = @_; my $thing_name = _thing_name($thing); my $meta = find_meta($thing); $tb->ok(!!$meta, "$thing_name has a metaclass"); return unless !!$meta; return $tb->ok($meta->isa("Moose::Meta::$type"), "$thing_name is a Moose " . lc $type); } # NOTE: deprecate at some point late 2015 sub is_anon { goto \&is_anon_ok } sub is_not_anon { goto \&is_not_anon_ok } sub is_anon_ok { my ($thing, $message) = @_; my $thing_meta = find_meta($thing); $message ||= _thing_name($thing, $thing_meta) . ' is anonymous'; return $tb->ok(!!$thing_meta->is_anon, $message); } sub is_not_anon_ok { my ($thing, $message) = @_; my $thing_meta = find_meta($thing); $message ||= _thing_name($thing, $thing_meta) . ' is not anonymous'; return $tb->ok(!$thing_meta->is_anon, $message); } sub known_sugar() { qw{ has around augment inner before after blessed confess } } sub check_sugar_removed_ok($) { my $t = shift @_; # check some (not all) Moose sugar to make sure it has been cleared $tb->ok(!$t->can($_) => "$t cannot $_") for known_sugar; return; } sub check_sugar_ok($) { my $t = shift @_; # check some (not all) Moose sugar to make sure it has been cleared $tb->ok($t->can($_) => "$t can $_") for known_sugar; return; } sub validate_thing { _validate_subtest_wrapper(\&_validate_thing_guts, @_) } sub validate_class { _validate_subtest_wrapper(\&_validate_class_guts, @_) } sub validate_role { _validate_subtest_wrapper(\&_validate_role_guts, @_) } sub _validate_subtest_wrapper { my ($func, $thing, %args) = @_; # note incrementing by 2 because of our upper curried function local $Test::Builder::Level = $Test::Builder::Level + 2; # run tests w/o a subtest wrapper... return $func->($thing => %args) unless $args{-subtest}; # ...or with one. return $tb->subtest(delete $args{-subtest} => sub { $func->($thing => %args) }); } sub _validate_thing_guts { my ($thing, %args) = @_; local $Test::Builder::Level = $Test::Builder::Level + 1; ### anonymous... $args{anonymous} ? is_anon_ok $thing : is_not_anon_ok $thing if exists $args{anonymous}; ### sugar checking... $args{sugar} ? check_sugar_ok $thing : check_sugar_removed_ok $thing if exists $args{sugar}; ### roles... do { does_ok($thing, $_) for @{$args{does}} } if exists $args{does}; do { does_not_ok($thing, $_) for @{$args{does_not}} } if exists $args{does_not}; ### methods... do { has_method_ok($thing, $_) for @{$args{methods}} } if exists $args{methods}; ### attributes... ATTRIBUTE_LOOP: for my $attribute (@{Data::OptList::mkopt($args{attributes} || [])}) { my ($name, $opts) = @$attribute; has_attribute_ok($thing, $name); if ($opts && (my $att = find_meta($thing)->get_attribute($name))) { SKIP: { skip 'Cannot examine attribute metaclass in roles', 1 if (find_meta($thing)->isa('Moose::Meta::Role')); local $THING_NAME = _thing_name($thing) . "'s attribute $name"; _validate_attribute($att => ( -subtest => "checking $THING_NAME", %$opts, )); } } } return; } sub _validate_class_guts { my ($class, %args) = @_; local $Test::Builder::Level = $Test::Builder::Level + 1; return unless is_class_ok $class; my $name = ref $class || $class; do { ok($class->isa($_), "$name isa $_") for @{$args{isa}} } if exists $args{isa}; # check our mutability do { is_immutable_ok $class } if exists $args{immutable} && $args{immutable}; do { is_not_immutable_ok $class } if exists $args{immutable} && !$args{immutable}; return validate_thing $class => %args; } # _validate_role_guts() is where the main logic of validate_role() lives; # we're broken out here so as to allow it all to be easily wrapped -- or not # -- in a subtest. sub _validate_role_guts { my ($role, %args) = @_; local $Test::Builder::Level = $Test::Builder::Level + 1; # basic role validation return unless is_role_ok $role; requires_method_ok($role => @{ $args{required_methods} }) if defined $args{required_methods}; role_wraps_before_method_ok($role => @{ $args{before} }) if defined $args{before}; role_wraps_around_method_ok($role => @{ $args{around} }) if defined $args{around}; role_wraps_after_method_ok($role => @{ $args{after} }) if defined $args{after}; $args{-compose} ? validate_thing $role => %args : return validate_thing $role => %args ; # compose it and validate that class. my $anon = Moose::Meta::Class->create_anon_class( roles => [$role], methods => { map { $_ => sub {} } @{ $args{required_methods} || [] } }, ); # take anything in required_methods and put it in methods for this test $args{methods} = defined $args{methods} ? [ @{$args{methods}}, @{$args{required_methods} || []} ] : [ @{$args{required_methods} || []} ] ; delete $args{required_methods}; # and add a test for the role we're actually testing... $args{does} = [ $role, @{ $args{does} || [] } ]; # aaaand a subtest wrapper to make it easier to read... return validate_class $anon->name => ( -subtest => 'role composed into ' . $anon->name, %args, ); } sub _validate_attribute { _validate_subtest_wrapper(\&__validate_attribute_guts, @_) } sub validate_attribute { _validate_subtest_wrapper( \&_validate_attribute_guts, [shift, shift], @_) } sub _validate_attribute_guts { my ($thingname, %opts) = @_; my ($thing, $name) = @$thingname; local $Test::Builder::Level = $Test::Builder::Level + 1; return unless has_attribute_ok($thing, $name); my $att = _find_attribute($thing => $name); return _validate_attribute($att, %opts); } sub __validate_attribute_guts { my ($att, %opts) = @_; local $Test::Builder::Level = $Test::Builder::Level + 1; my %thing_opts = map { $_ => delete $opts{"-$_"} } map { s/^-//; $_ } grep { /^-/ } sort keys %opts ; $thing_opts{does} = [ map { resolve_metatrait_alias(Attribute => $_) } @{$thing_opts{does}} ] if $thing_opts{does}; ### %thing_opts validate_class $att => %thing_opts if keys %thing_opts; return _attribute_options_ok($att, %opts); } sub attribute_options_ok { my ($thing, $name, %opts) = @_; local $Test::Builder::Level = $Test::Builder::Level + 1; return unless has_attribute_ok($thing, $name); my $att = _find_attribute($thing => $name); return _attribute_options_ok($att, %opts); } sub _attribute_options_ok { my ($att, %opts) = @_; goto \&_role_attribute_options_ok if $att->isa('Moose::Meta::Role::Attribute'); goto \&_class_attribute_options_ok; } sub _role_attribute_options_ok { my ($att, %opts) = @_; local $Test::Builder::Level = $Test::Builder::Level + 1; my $name = $att->name; my $thing_name = _thing_name($name, $att); # this much works, at least if (exists $opts{coerce}) { delete $opts{coerce} ? ok( $att->should_coerce, "$thing_name should coerce") : ok(!$att->should_coerce, "$thing_name should not coerce") ; } ### for now, skip role attributes: blessed $att return $tb->skip('cannot yet test role attribute layouts') if keys %opts; } sub _class_attribute_options_ok { my ($att, %opts) = @_; ### for now, skip role attributes: blessed $att return $tb->skip('cannot yet test role attribute layouts') if $att->isa('Moose::Meta::Role::Attribute'); my @check_opts = qw{ reader writer accessor predicate default builder clearer }; my @unhandled_opts = qw{ isa does handles traits }; local $Test::Builder::Level = $Test::Builder::Level + 1; my $name = $att->name; my $thing_name = _thing_name($name, $att); # XXX do we really want to do this? if (my $is = delete $opts{is}) { $opts{accessor} = $name if $is eq 'rw' && ! exists $opts{accessor}; $opts{reader} = $name if $is eq 'ro' && ! exists $opts{reader}; } # helper to check an attribute option we expect to be a string, !exist, or # undef my $check = sub { my $property = shift || $_; my $value = delete $opts{$property}; my $has = "has_$property"; # deeper and deeper down the rabbit hole... local $Test::Builder::Level = $Test::Builder::Level + 1; defined $value ? ok($att->$has, "$thing_name has a $property") : ok(!$att->$has, "$thing_name does not have a $property") ; is($att->$property, $value, "$thing_name option $property correct") }; if (my $is_required = delete $opts{required}) { $is_required ? ok($att->is_required, "$thing_name is required") : ok(!$att->is_required, "$thing_name is not required") ; } $check->($_) for grep { any(@check_opts) eq $_ } sort keys %opts; do { $tb->skip("cannot test '$_' options yet", 1); delete $opts{$_} } for grep { exists $opts{$_} } @unhandled_opts; if (exists $opts{init_arg}) { $opts{init_arg} ? $check->('init_arg') : ok(!$att->has_init_arg, "$thing_name has no init_arg") ; delete $opts{init_arg}; } if (exists $opts{lazy}) { delete $opts{lazy} ? ok($att->is_lazy, "$thing_name is lazy") : ok(!$att->is_lazy, "$thing_name is not lazy") ; } if (exists $opts{coerce}) { delete $opts{coerce} ? ok( $att->should_coerce, "$thing_name should coerce") : ok(!$att->should_coerce, "$thing_name should not coerce") ; } for my $opt (sort keys %opts) { do { fail "unknown attribute option: $opt"; next } unless $att->meta->find_attribute_by_name($opt); $check->($opt); } #fail "unknown attribute option: $_" #for sort keys %opts; return; } 1; !!42; __END__ =pod =encoding UTF-8 =for :stopwords Chris Weyl Chad Etheridge Granum Karen subtest =for :stopwords Wishlist flattr flattr'ed gittip gittip'ed =head1 NAME Test::Moose::More - More tools for testing Moose packages =head1 VERSION This document describes version 0.037 of Test::Moose::More - released January 31, 2016 as part of Test-Moose-More. =head1 SYNOPSIS use Test::Moose::More; is_class_ok 'Some::Class'; is_role_ok 'Some::Role'; has_method_ok 'Some::Class', 'foo'; # ... etc =head1 DESCRIPTION This package contains a number of additional tests that can be employed against Moose classes/roles. It is intended to replace L in your tests, and re-exports any tests that it has and we do not, yet. =head1 FUNCTIONS =head2 known_sugar Returns a list of all the known standard Moose sugar (has, extends, etc). =head1 TEST FUNCTIONS =head2 meta_ok $thing Tests $thing to see if it has a metaclass; $thing may be the class name or instance of the class you wish to check. =head2 does_ok $thing, < $role | \@roles >, [ $message ] Checks to see if $thing does the given roles. $thing may be the class name or instance of the class you wish to check. Note that the message will be taken verbatim unless it contains C<%s> somewhere; this will be replaced with the name of the role being tested for. =head2 does_not_ok $thing, < $role | \@roles >, [ $message ] Checks to see if $thing does not do the given roles. $thing may be the class name or instance of the class you wish to check. Note that the message will be taken verbatim unless it contains C<%s> somewhere; this will be replaced with the name of the role being tested for. =head2 has_attribute_ok $thing, $attribute_name, [ $message ] Checks C<$thing> for an attribute named C<$attribute_name>; C<$thing> may be a class name, instance, or role name. =head2 has_method_ok $thing, @methods Queries $thing's metaclass to see if $thing has the methods named in @methods. =head2 role_wraps_around_method_ok $role, @methods Queries $role's metaclass to see if $role wraps the methods named in @methods with an around method modifier. =head2 role_wraps_before_method_ok $role, @methods Queries $role's metaclass to see if $role wraps the methods named in @methods with an before method modifier. =head2 role_wraps_after_method_ok $role, @methods Queries $role's metaclass to see if $role wraps the methods named in @methods with an after method modifier. =head2 requires_method_ok $thing, @methods Queries $thing's metaclass to see if $thing requires the methods named in @methods. Note that this really only makes sense if $thing is a role. =head2 is_immutable_ok $thing Passes if $thing is immutable. =head2 is_not_immutable_ok $thing Passes if $thing is not immutable; that is, is mutable. =head2 is_role_ok $thing Passes if $thing's metaclass is a L. =head2 is_class_ok $thing Passes if $thing's metaclass is a L. =head2 is_anon_ok $thing Passes if $thing is "anonymous". =head2 is_not_anon_ok $thing Passes if $thing is not "anonymous". =head2 check_sugar_removed_ok $thing Ensures that all the standard Moose sugar is no longer directly callable on a given package. =head2 check_sugar_ok $thing Checks and makes sure a class/etc can still do all the standard Moose sugar. =head2 validate_thing Runs a bunch of tests against the given C<$thing>, as defined: validate_thing $thing => ( attributes => [ ... ], methods => [ ... ], isa => [ ... ], # ensures sugar is/is-not present sugar => 0, # ensures $thing does these roles does => [ ... ], # ensures $thing does not do these roles does_not => [ ... ], ); C<$thing> can be the name of a role or class, an object instance, or a metaclass. =over 4 =item * -subtest => 'subtest name...' If set, all tests run will be wrapped in a subtest, the name of which will be whatever C<-subtest> is set to. =item * isa => [ ... ] A list of superclasses thing should have. =item * anonymous => 0|1 Check to see if the class is/isn't anonymous. =item * does => [ ... ] A list of roles the thing should do. =item * does_not => [ ... ] A list of roles the thing should not do. =item * attributes => [ ... ] The attributes list specified here is in the form of a list of names, each optionally followed by a hashref of options to test the attribute for; this hashref takes the same arguments L does. e.g.: validate_thing $thing => ( attributes => [ 'foo', 'bar', baz => { is => 'ro', ... }, 'bip', ], ); =item * methods => [ ... ] A list of methods the thing should have. =item * sugar => 0|1 Ensure that thing can/cannot do the standard Moose sugar. =back =head2 validate_role The same as validate_thing(), but ensures C<$thing> is a role, and allows for additional role-specific tests. validate_role $thing => ( required_methods => [ ... ], # ...and all other options from validate_thing() ); =over 4 =item * -compose => 0|1 When true, attempt to compose the role into an anonymous class, then use it to run L. The options we're given are passed to validate_class() directly, except that any C entry is removed and its contents pushed onto C. (A stub method for each entry in C will also be created in the new class.) e.g.: ok 1 - TestRole has a metaclass ok 2 - TestRole is a Moose role ok 3 - TestRole requires method blargh ok 4 - TestRole does TestRole ok 5 - TestRole does not do TestRole::Two ok 6 - TestRole has method method1 ok 7 - TestRole has an attribute named bar # Subtest: role composed into Moose::Meta::Class::__ANON__::SERIAL::1 ok 1 - Moose::Meta::Class::__ANON__::SERIAL::1 has a metaclass ok 2 - Moose::Meta::Class::__ANON__::SERIAL::1 is a Moose class ok 3 - Moose::Meta::Class::__ANON__::SERIAL::1 does TestRole ok 4 - Moose::Meta::Class::__ANON__::SERIAL::1 does not do TestRole::Two ok 5 - Moose::Meta::Class::__ANON__::SERIAL::1 has method method1 ok 6 - Moose::Meta::Class::__ANON__::SERIAL::1 has method blargh ok 7 - Moose::Meta::Class::__ANON__::SERIAL::1 has an attribute named bar 1..7 ok 8 - role composed into Moose::Meta::Class::__ANON__::SERIAL::1 1..8 =item * -subtest => 'subtest name...' If set, all tests run will be wrapped in a subtest, the name of which will be whatever C<-subtest> is set to. =item * required_methods => [ ... ] A list of methods the role requires a consuming class to supply. =item * before => [ ... ] A list of methods the role expects to wrap before, on application to a class. See L for information on before method modifiers. =item * around => [ ... ] A list of methods the role expects to wrap around, on application to a class. See L for information on around method modifiers. =item * after => [ ... ] A list of methods the role expects to wrap after, on application to a class. See L for information on after method modifiers. =back =head2 validate_class The same as validate_thing(), but ensures C<$thing> is a class, and allows for additional class-specific tests. validate_class $thing => ( isa => [ ... ], attributes => [ ... ], methods => [ ... ], isa => [ ... ], # ensures sugar is/is-not present sugar => 0, # ensures $thing does these roles does => [ ... ], # ensures $thing does not do these roles does_not => [ ... ], # ...and all other options from validate_thing() ); =over 4 =item * -subtest => 'subtest name...' If set, all tests run will be wrapped in a subtest, the name of which will be whatever C<-subtest> is set to. =item * immutable => 0|1 Checks the class to see if it is/isn't immutable. =back =head2 validate_attribute validate_attribute() allows you to test how an attribute looks once built and attached to a class. Let's say you have an attribute defined like this: has foo => ( traits => [ 'TestRole' ], is => 'ro', isa => 'Int', builder => '_build_foo', lazy => 1, ); You can use validate_attribute() to ensure that it's built out in the way you expect: validate_attribute TestClass => foo => ( # tests the attribute metaclass instance to ensure it does the roles -does => [ 'TestRole' ], # tests the attribute metaclass instance's inheritance -isa => [ 'Moose::Meta::Attribute' ], # for demonstration's sake traits => [ 'TestRole' ], isa => 'Int', does => 'Bar', handles => { }, reader => 'foo', builder => '_build_foo', default => undef, init_arg => 'foo', lazy => 1, required => undef, ); Options passed to validate_attribute() prefixed with '-' test the attribute's metaclass instance rather than a setting on the attribute; that is, '-does' ensures that the metaclass does a particular role (e.g. L), while 'does' tests the setting of the attribute to require the value do a given role. This function takes all the options L takes, as well as the following: =over 4 =item * -subtest => 'subtest name...' If set, all tests run will be wrapped in a subtest, the name of which will be whatever C<-subtest> is set to. =back =head2 attribute_options_ok Validates that an attribute is set up as expected; like validate_attribute(), but only concerns itself with attribute options. Note that some of these options will skip if used against attributes defined in a role. =over 4 =item * is => ro|rw Tests for reader/writer options set as one would expect. =item * isa => ... Validates that the attribute requires its value to be a given type. =item * does => ... Validates that the attribute requires its value to do a given role. =item * builder => '...' Validates that the attribute expects the method name given to be its builder. =item * default => ... Validates that the attribute has the given default. =item * init_arg => '...' Validates that the attribute has the given initial argument name. =item * lazy => 0|1 Validates that the attribute is/isn't lazy. =item * required => 0|1 Validates that setting the attribute's value is/isn't required. =back =for Pod::Coverage is_anon is_class is_not_anon is_role =head1 SEE ALSO Please see those modules/websites for more information related to this module. =over 4 =item * L =back =head1 BUGS Please report any bugs or feature requests on the bugtracker website https://github.com/RsrchBoy/Test-Moose-More/issues When submitting a bug or request, please include a test-file or a patch to an existing test-file that illustrates the bug or desired feature. =head1 AUTHOR Chris Weyl =head2 I'm a material boy in a material world =begin html =end html Please note B, rather B. I largely create and release works like this because I need them or I find it enjoyable; however, don't let that stop you if you feel like it ;) L, L, or indulge my L... If and *only* if you so desire. =head1 CONTRIBUTORS =for stopwords Chad Granum Karen Etheridge =over 4 =item * Chad Granum =item * Karen Etheridge =back =head1 COPYRIGHT AND LICENSE This software is Copyright (c) 2012 by Chris Weyl. This is free software, licensed under: The GNU Lesser General Public License, Version 2.1, February 1999 =cut