Moose-2.1604/000700 000766 000024 00000000000 12617452415 013140 5ustar00etherstaff000000 000000 Moose-2.1604/author/000700 000766 000024 00000000000 12617452415 014442 5ustar00etherstaff000000 000000 Moose-2.1604/benchmarks/000700 000766 000024 00000000000 12617452415 015255 5ustar00etherstaff000000 000000 Moose-2.1604/bin/000700 000766 000024 00000000000 12617452415 013710 5ustar00etherstaff000000 000000 Moose-2.1604/Changes000600 000766 000024 00000471634 12617452415 014454 0ustar00etherstaff000000 000000 Also see Moose::Manual::Delta for more details of, and workarounds for, noteworthy changes. 2.1604 2015-11-07 [OTHER] - minimum perl requirement is now set in configure-requires, as well as runtime-requires, to ensure that smokers bail out early enough to declare the installation N/A rather than FAIL. 2.1603 2015-08-28 - No changes from 2.1602-TRIAL (other than a minor documentation tweak). 2.1602 2015-08-14 (TRIAL RELEASE) [BUG FIXES] - Replaced uses of overload::Overloaded with the new Devel::OverloadInfo::is_overloaded (thanks, ilmari!) to work around more issues with overload handling in older versions of perl. 2.1601 2015-08-10 (TRIAL RELEASE) [BUG FIXES] - Explicit boolean overload handling has been added to Class::MOP::Method and Moose::Meta::Role::Method::Required, to work around a bug with the handling of overload fallbacks on perl 5.8.x. In particular this fixes issues observed in MooseX::MethodAttributes. 2.1600 2015-07-31 [DOCUMENTATION] - Made all docs use =head2 and =head3 for methods/functions so that they appear as part of the table of contents on MetaCPAN. 2.1501 2015-07-20 (TRIAL RELEASE) [DOCUMENTATION] - Added a new slideshow by Shawn M. Moore (sartak) to Moose::Manual::Resources - Documentation for exception classes has been rewritten, with Moose::Manual::Exceptions::Manifest changing how it describes each class's attributes and methods. (Dave Rolsky, PR#95) [REVERSIONS] - The change in 2.1500 to allow DOES to check delegated options has been reverted. This turned out to have a variety of issues both in concept and implementation; it will be refined further in MooseX::Does::Delegated. [CHANGED] - The name for an anonymous sub that is used in method modifiers (that shows up in stack traces etc) now identifies the package and method being modified. (Philipp Gortan, PR#94) 2.1500 2015-07-01 (TRIAL RELEASE) [ENHANCEMENTS] - An object's DOES method now also checks roles composed by delegated objects (Chris Prather, PR#104) 2.1405 2015-06-06 [BUG FIXES] - The native 'Array' trait 'sort' accessor now returns the number of elements in scalar context, instead of the undefined value (or a different, seemingly-random, value under 5.23.x). 2.1404 2015-04-17 [BUG FIXES] - Add Sub::Identify to prereqs. (RT #101661) - bump List::Util prereq to avoid a memory leak (RT#101124) [DOCUMENTATION] - Added section to Moose::Manual::Resources to list external links related to Moose (RT #101993, Michael LaGrasta) 2.1403 2014-12-07 [DOCUMENTATION] - Added a section to Moose::Manual::MethodModifiers illustrating how method modifiers work with inheritance. (Andreas Koenig, RT #98940) - Added docs to Moose.pm on the -meta_name import option. This addresses RT #98488. [BUG FIXES] - Fix a test that fails on MSWin32 systems using nmake - fix dev build compilation error when using MSVC (A. Sinan Unur) [OTHER] - the modules in the git repository now have a defined $VERSION, to make it easier to test MooseX::* and other code under development. 2.1402 2014-11-05 [BUG FIXES] - Fix a test that was trying to load Test::Exception instead of Test::Fatal. (Michael Schout) 2.1401 2014-11-03 [BUG FIXES] - The core overloading support interacted badly with MooseX::MarkAsMethods. If you used MooseX::MarkAsMethods in a role that provided overloading, then that overloading would not be properly applied to consuming classes, leading to very weird errors of the form: Can't resolve method "???" overloading """" in package "Class2" ... Note that the problems that MooseX::MarkAsMethods fixes are no longer present if you are using Moose 2.1400+ and namespace::autoclean 0.16+. We encourage you to upgrade both of these modules and remove MooseX::MarkAsMethods from your code base. 2.1400 2014-11-01 [BUG FIXES] - Moose exception classes now stringify all stack frames, to avoid issues in global destruction (see RT#99811) 2.1307 2014-10-26 (TRIAL RELEASE) [ENHANCEMENTS] - Support added to Moose::Exporter for exporting subs by their fully qualified name, as well as coderefs. This avoids internal breakage if some other module has monkey-patched a sub to be exported and left it anonymous (e.g. RT#88669). (Graham Knop, PR#84) [BUG FIXES] - Further refined the overloading fixes from 2.1306, fixing fallback handling on older perl versions (Dave Rolsky, PR#85) 2.1306 2014-10-25 (TRIAL RELEASE) [ENHANCEMENTS] - Rewrote overloading implementation to use a new Class::MOP::Overload object. This object properly captures all overloading information. The Class::MOP::Method::Overload class has been removed. (Dave Rolsky, PR#83) [BUG FIXES] - If a role had method-based overloading but did not actually implement the specified method, its overloading was simply ignored when applying overloading to other roles or classes. Reported by rjbs. RT #98531. 2.1305 2014-10-23 (TRIAL RELEASE) [ENHANCEMENTS] - By default, exceptions thrown from inside Moose now remove most of the Moose internals from their stack trace when stringifying. This makes for much more readable error messages in most cases. Set the MOOSE_FULL_EXCEPTION env var to true to get the complete stack trace. 2.1304 2014-09-25 (TRIAL RELEASE) [BUG FIXES] - closed a memory leak in Moose exception objects where captured stack trace frames would contain circular references to the exception objects themselves (Graham Knop, PR#81) 2.1303 2014-09-20 (TRIAL RELEASE) [TEST FIXES] - fix tests that fail on altered warning messages in perl 5.21.4 (RT#98987) 2.1302 2014-08-20 (TRIAL RELEASE) [BUG FIXES] - When a role consumes another role and they differ in their overloading fallback settings, the consuming role now silently wins instead of throwing an exception. This is consistent with how other role-consumes-role conflicts are handled. - Fixed the docs for overloading conflicts to match reality. 2.1301 2014-08-19 (TRIAL RELEASE) [BUG FIXES] - Conflict detection for overloading operators is now more correct. If a class consumed two roles that both had identical overloading methods (because they got them from some other role, for example), this caused an error, but it shouldn't. GH #4. (rjbs) - Similarly, when a role consumes another role, conflicts in overloading operators are now silently resolved in favor of the consuming role, just as they are with methods. Note that conflicts between the fallback setting for roles are still an error. 2.1300 2014-08-11 (TRIAL RELEASE) [ENHANCEMENTS] - Moose now has core support for overloading in roles. When a role with overloading is applied to classes or other roles, the overloading settings are transferred to the consumer. Conflicts between roles are treated much like method conflicts. This obviates the need for MooseX::Role::WithOverloading. If you are using MooseX::Role::WithOverloading, upgrade to version 0.15+ and it will simply become a no-op when used with this version of Moose. [OTHER] - The overloading info methods for roles and classes no longer treat "fallback" as an overloaded op. Instead, there are new get_overload_fallback_value() and set_overload_fallback_value() methods to deal with this explicitly. This is arguably a bug fix. 2.1213 2014-09-25 [BUG FIXES] - closed a memory leak in Moose exception objects where captured stack trace frames would contain circular references to the exception objects themselves (Graham Knop, PR#81) 2.1212 2014-09-19 [TEST FIXES] - fix tests that fail on altered warning messages in perl 5.21.4 (RT#98987) 2.1211 2014-08-12 [DOCUMENTATION] - Updated Changes and Moose::Manual::Delta to note when we started removing lazy_build from docs. Also added a note in the Moose::Meta::Attribute docs stating that use of this feature is discouraged. - Added a pointer from the auto_deref feature to Moose::Meta::Attribute::Native. This is often a better choice. [OTHER] - The subs installed by Moose::Exporter->setup_import_methods are now named using Sub::Name (Dave Rolsky, RT#97572) 2.1210 2014-07-03 [DOCUMENTATION] - Clarify that Moose::Exception exists for internal usage and that user code is better off using the Throwable role or Throwable::Error superclass. - Moose::Manual::Support policy clarified regarding legacy Perl versions [OTHER] - logic has been removed for an alpha branch of Test::Builder that will never see the light of day, and will break with upcoming Test::Builder changes (Exodist) 2.1209 2014-06-05 [OTHER] - The is_anon method now always returns false when called on Moose::Meta::Role::Composite objects. This isn't strictly right, but for the purposes of Moose internals, where "is_anon" really means "needs to be cleaned up", it's correct. This fixes warnings that were seen when using recent Moose (2.1100+) and MooseX::Role::Parameterized roles as part of a composite role. These warnings only appear with Perl 5.16 and earlier. 2.1208 2014-06-01 [BUG FIXES] - fix implementation of throw_exception in internal Class::MOP traits, caused by changes in 2.1207 (ether, RT#96112) 2.1207 2014-05-26 [OTHER] - Fixed Specio support to work with the latest Specio (0.10). This version of Specio no longer uses Moose internally. - exceptions in Class::MOP no longer use Moose::Util, instead using their own private implementation of throw_exception, to avoid needless premature loading of Moose logic. 2.1206 2014-05-14 [BUG FIXES] - exceptions should not throw other exceptions; fixes cases where exceptions were reporting the wrong error (Upasana, RT#92818 and RT#94795) [OTHER] - prereqs needed strictly for building with Dist::Zilla have been moved from develop requires to develop recommends, to simplify automated testing on older perls that cannot install all Dist::Zilla components - removed instances of metaobjects in exception classes where they're not really required 2.1205 2014-04-16 [ENHANCEMENTS] - new utility interface: Moose::Util::is_role [BUG FIXES] - better error message provided when trying to load a trait class that does not exist in @INC (Upasana, RT#94731) [OTHER] - new test added, to run last, which runs `moose-outdated` as a possibly more visible mechanism to provide important information to the user (re RT#92780) 2.1204 2014-02-07 [BUG FIXES] - bump minimum prereq needed for optional test using MooseX::NonMoose (which broke with new Module::Runtime, see 2.1203), so users can install Moose and pass tests before updating MooseX::NonMoose. 2.1203 2014-02-07 [BUG FIXES] - bump prereq on Module::Runtime to properly detect when a module fails to load, and fix how we call these subs (Zefram, RT#92770, RT#86394, RT#92791) [ENHANCEMENTS] - line numbers in shipped code are now almost the same (within 3) as the repository source, for easier debugging 2.1202 2014-01-20 [BUG FIXES] - string comparisons are now possible with Moose exceptions (RT#92232) 2.1201 2014-01-11 [OTHER] - re-release to index pod files (Moose::Cookbook::*, Moose::Manual::* etc). 2.1200 2014-01-06 [OTHER] - Releasing 2.1108 as stable (last stable release was 2.1005). 2.1108 2014-01-05 (TRIAL RELEASE) [OTHER] - fixed distribution manifest - minor documentation and metadata updates 2.1107 2013-11-29 (TRIAL RELEASE) [OTHER] - many additions to the list of conflicting modules (those that require updates after installing Moose), reflecting recent API changes - now failing early at build time, with a useful error message, if a compiler is not available 2.1106 2013-11-05 (TRIAL RELEASE) [BUG FIXES] - throw_error import cleaned from Moose::Object after use (doy) - resolved new circular load issue between Moose::Util and Class::MOP (Kent Fredric, RT#89713 and PR#42) 2.1105 2013-10-31 (TRIAL RELEASE) [BUG FIXES] - legacy throw_error now takes multiple arguments, like confess does (Karen Etheridge) 2.1104 2013-10-30 (TRIAL RELEASE) [BUG FIXES] - Class::MOP::Object::_inline_throw_error is back, used by some MooseX modules (Upasana) 2.1103 2013-10-26 (TRIAL RELEASE) [BUG FIXES] - fix errors in last trial release relating to Moose::Error::Default, Moose::Util::throw_error (Upasana) 2.1102 2013-10-20 (TRIAL RELEASE) [BUG FIXES] - die if a role to consume can't be found -- this restores behaviour as in 2.1005 (doy) - fix test to accomodate Devel::PartialDump possibly not being installed (Upasana) 2.1101 2013-10-20 (TRIAL RELEASE) [ENHANCEMENTS] - Moose string exceptions have been replaced by Moose::Exception objects. See Moose::Manual::Delta for details. 2.1100 2013-09-07 (TRIAL RELEASE) [DEPRECATIONS] - Class::MOP::load_class, Class::MOP::is_class_loaded, and Class::MOP::load_first_existing_class are now deprecated. See Moose::Manual::Delta for details. - The non-arrayref forms of enum and duck_type have been deprecated. See Moose::Manual::Delta for details. - Many deprecated features have now been removed: - optimize_as for type constraints - the "default is" and "default default" features for native delegations - setting coerce => 1 on an attribute whose type constraint has no coercion - the public version of Moose::Meta::Method::Destructor::initialize_body [ENHANCEMENTS] - Creating classes with Moose now always sets the appropriate entry in %INC, even if it wasn't loaded from a file. This should make writing classes inline easier, and will allow us to be more intelligent about figuring out when classes are loaded in the future. See Moose::Manual::Delta for more details. Note that this is slightly backwards-incompatible in some edge cases. - Moose now uses Module::Runtime instead of Class::Load to load classes. This means that there are no more issues with the weird heuristics that Class::Load does to determine if a class was previously loaded (inheriting from an empty package is now possible, for instance). See Moose::Manual::Delta for more details. This is also slightly backwards-incompatible in some edge cases. 2.1005 2013-08-07 [ENHANCEMENTS] - add_method now accepts blessed subs (Graham Knop, PR#28) [BUG FIXES] - If a role consumed another role, we resolve method conflicts just like a class consuming a role, but when metaclass compat tried to fix up metaclass roles, we were putting all methods into one composite role and allowing methods in the metaclass roles to conflict. Now we resolve them as we should. (Jesse Luehrs, PR#27) - Some edge cases in tests with base.pm and non-existent module files are handled more strictly (see also perl RT#118561) (Graham Knop, PR#25) 2.1004 2013-07-26 [BUG FIXES] - 2.1003 was released with some bad metadata, which caused the prereq test to fail. 2.1003 2013-07-26 [OTHER] - Releasing 2.0901 as stable. 2.0901 2013-06-21 (TRIAL RELEASE) [ENHANCEMENTS] - The with_immutable() sub from Test::Moose now passes a boolean value to the code block containing tests indicating whether or not the classes have been made immutable. This can make for nicer test descriptions. (Dave Rolsky) - You can now use Specio types instead of Moose builtins or MooseX::Types. However, this support is still experimental (as is Specio), so use it with care. (Dave Rolsky) 2.0900 2013-05-27 (TRIAL RELEASE) [API CHANGES] - Fixed the Num builtin type to reject NaN, Inf, numbers with whitespace, and other questionable strings. The MooseX::Types::LaxNum distribution implements the old behavior. RT#70539 (Upasana) 2.0802 2013-05-07 [ENHANCEMENTS] - fix incompatibilities with Test::Builder 1.005+ (Karen Etheridge) - Moose::Manual::Contributing updated to reflect the change of primary repository from git.moose.perl.org to github.com 2.0801 2013-03-28 [BUG FIXES] - properly apply traits at compile time (error introduced in 2.0800, RT#77974). (doy) 2.0800 2013-03-28 [ENHANCEMENTS] - The super() subroutine now carps if you pass it arguments. These arguments are always ignored, but we used to ignore them silently. RT #77383. - Roles can now override methods from other roles they consume directly, without needing to manually exclude them (just like classes can). (mst) [BUG FIXES] - Fix false positive when checking for circular references for modules that use the "also" parameter with Moose::Exporter. Reported by Jon Swartz. Fixed by Matthew Wickline. RT #63818. - Fix memory leak in type unions. (Karen Etheridge) RT#83929. - Fix application of traits at compile time. (doy) RT#77974. 2.0604 2012-09-19 [BUG FIXES] - Fix nonsensical error message for inlined accessors of required attributes. (doy) - Stop trying to localize a lexical (blead now throws an error for this). RT #79257, perl #114628. (sprout) [OTHER] - Depend on a version of Carp new enough to have caller_info. RT #79367. (pshangov) 2.0603 2012-06-28 [BUG FIXES] - Fix test failure in blead. RT #78085. 2.0602 2012-05-07 [BUG FIXES] - Ensure that the Moose::Exporter-generated init_meta returns the same value that it did previously. This isn't really a bug, since the return value has never been tested or documented, but since the generated init_meta is nothing more than a compatibility shim at this point, there's no reason to not make it as compatible as possible. Reported by Moritz Onken. (doy) [DOCUMENTATION] - The lazy_build attribute feature was removed from Moose::Manual::BestPractices. 2.0601 2012-05-01 [BUG FIXES] - Fix init_meta order when multiple also packages are specified (this matters when one of them is being used to actually initalize the metaclass, typically with also => 'Moose'). Reported by Randy Stauner. (doy) 2.0600 2012-04-29 [OTHER] - Releasing 2.0502 as stable. 2.0502 2012-04-25 (TRIAL RELEASE) [OTHER] - The Test::DependentModules test now covers a much wider range of downstream dependents (all of them in fact, for some definition of "all"). This should allow us to track inadvertent backwards compatibility breakages much more effectively. (doy) - A few test tweaks to avoid spurious failures. (doy) 2.0501 2012-04-03 (TRIAL RELEASE) [BUG FIXES] - Avoid syntax errors on pre-5.14. (doy) 2.0500 2012-04-03 (TRIAL RELEASE) [NEW FEATURES] - Class::MOP::Class now has methods for introspecting and modifying the overloaded operators for a class. (doy) [ENHANCEMENTS] - The cookbook recipes have all been renamed. Instead of numbered recipes (Basics::Recipe1), we now have descriptive names (Basics::Point_AttributesAndSubclassing). This makes it easier for us to add and remove recipes in the future, and makes it a little easier to converse about them, since the name gives us some clue of what they contain. [BUG FIXES] - Re-declaring a class_type or role_type constraint that has already been declared now just returns the original type constraint, rather than replacing the original constraint and ergo losing any coercions that were on the original constraint. Fixes RT #73289. (t0m) - Moose::Exporter now calls init_meta methods in the correct order, when multiple levels of 'also' parameters are specified. Reported by Rocco Caputo. (doy, perigrin) - Moose::Exporter no longer generates init_meta methods in order to apply metaroles, since the metaclass itself isn't guaranteed to exist yet at that point. Metaroles are now applied at the end of import, after all user-defined init_meta methods have been called. Fixes RT #51561. (doy) - Fixed a memory leak. This occurred when creating an anonymous class. Immutabilizing an anonymous class still leaks memory due to a bug in Eval::Closure (which should hopefully be fixed soon). Based on code and bug report from Carlos Lima. RT #74650. - Fix a segfault when adding a method to a class which was defined in a package which was deleted. (doy) 2.0403 2012-04-03 [OTHER] - No changes, reupload to fix indexing. 2.0402 2012-02-04 [OTHER] - Minor documentation fixes. - Fix test failure on blead (test was unnecessarily strict). Reported by Nicholas Clark. (doy) 2.0401 2011-11-17 [BUG FIXES] - Attributes with weak_ref now weaken their associated slot when they are initialized through a lazy default or builder. Reported by tome. (doy) 2.0400 2011-11-15 [OTHER] - No changes from 2.0302 (other than a few minor documentation tweaks). 2.0302 2011-11-02 (TRIAL RELEASE) [BUG FIXES] - Fix test failure on 5.8. (Dave Rolsky) - Make make_immutable return value consistent and document it to be true. (mst) 2.0301 2011-10-21 (TRIAL RELEASE) [BUG FIXES] - Fix compilation on 5.8. Reported by ether. (doy) - A custom error class caused a warning when the class that used it was made immutable. Reported by Maroš Kollár. RT #71514. (Dave Rolsky) [ENHANCEMENTS] - The enum type will now allow single value enumerations. Previously, two or more values were required. (rjbs) 2.0300 2011-09-23 (TRIAL RELEASE) [DEPRECATIONS] - The optimize_as option for type constraints has been deprecated. Use the inline_as option to provide inlining code instead. (Dave Rolsky) [API CHANGES] - Methods to introspect a class's methods will now return methods defined in UNIVERSAL (isa, can, etc.). This also means that you can wrap these methods with method modifiers. RT #69839. Reported by Vyacheslav Matyukhin. (Dave Rolsky) - The ->parent and ->parents method for a union now return the nearest common ancestor of that union's component types. See Moose::Manual::Delta for more details. (Dave Rolsky) - The ->parents method used to return an arrayref for union types, and a list of one or more types for all other types. Now they all return lists. (Dave Rolsky) - The ->is_subtype_of and ->is_a_type_of methods have changed their behavior for union types. Previously, they returned true if any of their member types returned true for a given type. Now, all of the member types must return true. RT #67731. (Dave Rolsky) [ENHANCEMENTS] - The Moose::Exporter module now has a "meta_lookup" option when creating an importer. This allows you to specify an alternate method for determining the metaclass of a caller. This is useful for modules like MooseX::Role::Parameterized which generate new metaclasses on the fly. (sartak) - Added a Moose::Meta::Method->is_stub method. (Dave Rolsky) [BUG FIXES] - A subtype of a union type did not return the right results when you called ->is_subtype_of or ->is_a_type_of on it. This has been fixed. RT #70322. (Dave Rolsky) - An attribute accessor or delegation method can overwrite a stub method and this will no longer throw an error. Reported by Mark-Jason Dominus. RT #69988. (Dave Rolsky) - The error generated by unfulfilled method requirements during role composition now mentions how to work around imported methods not being recognized. Reported by Michael Schwern. RT #60583. (doy) - class_type and role_type will now throw errors if you attempt to use them to override existing types, just like type and subtype have always done. (doy) - Implicitly creating class or role types by using them as the 'isa' or 'does' parameter to attribute construction will now register the type. This means that it cannot later be redefined as something else. (doy) - $class_type->is_subtype_of no longer returns true if passed the name of the class that the class type represents when the class type wasn't registered. (doy) - Removing anonymous metaclasses prematurely no longer prevents reaping of the associated stash. (doy) [OTHER] - The Class::MOP::load_class and Class::MOP::is_class_loaded subroutines are no longer documented, and will cause a deprecation warning in the future. Moose now uses Class::Load to provide this functionality, and you should as well. (Dave Rolsky) 2.0205 2011-09-06 [NEW FEATURES] - The Array and Hash native traits now provide a "shallow_clone" method, which will return a reference to a new container with the same contents as the attribute's reference. [ENHANCEMENTS] - Specifying an invalid value in a hashref 'handles' value now throws a sensible error. Reported by Mark-Jason Dominus. RT #69990. (Dave Rolsky) [BUG FIXES] - When specifying an attribute trait, passing options for the trait besides -alias or -excludes caused a warning. However, passing other options is totally valid when using MooseX::Role::Parameterized. Fixes RT #70419. (sartak) - Allow regexp objects in duck_type constraints (to bring this in line with the Object constraint). 2.0204 2011-08-25 [BUG FIXES] - Validating duck_type type constraint turned out to work only by accident, and only when not running under the debugger. This has been fixed. (Florian Ragwitz) [OTHER] - Loosen the dependency on ExtUtils::ParseXS. 2.0203 2011-08-23 [BUG FIXES] - is_class_loaded now properly detects packages which have a version object in their $VERSION. - Fix XS compilation under blead. 2.0202 2011-07-26 [BUG FIXES] - Be more consistent about how type constraint messages are handled. 2.0201 2011-07-22 [BUG FIXES] - Moose::Util::does_role shouldn't call ->does on things that don't inherit from Moose::Object. - Make ->does initialize the metaclass, so that calling it as a class method on a class which sets up inheritance via some method other than extends works properly (this fixes an issue with MooseX::Types). - Make Dist::CheckConflicts a runtime requirement, so moose-outdated always works. 2.0200 2011-07-18 [OTHER] - No changes from 2.0105 (other than a few minor documentation tweaks). 2.0105 2011-06-27 (TRIAL RELEASE) [ENHANCEMENTS] - Moose::Util::does_role now respects overridden ->does methods. (doy) 2.0104 2011-06-20 (TRIAL RELEASE) [OTHER] - Include changes from 2.0010. 2.0103 2011-06-20 (TRIAL RELEASE) [DEPRECATIONS] - Several things that have been deprecated for a while have been removed. See the 2.0000 section in Moose::Manual::Delta for details. [NEW FEATURES] - New Moose::Util::TypeConstraints::union function for creating union type constraints without having to rely on the string type constraint parsing. This also allows for creating unions of anonymous type constraints. (kentnl) [OTHER] - Include changes from Moose 2.0009. 2.0102 2011-06-18 (TRIAL RELEASE) [ENHANCEMENTS] - The native Array trait now has a 'first_index' method, which works just like the version in List::MoreUtils. (Karen Etheridge) - Clean up some internal code to help out extensions. [OTHER] - Include changes from Moose 2.0008. 2.0101 2011-06-06 (TRIAL RELEASE) [OTHER] - Various packaging issues. 2.0100 2011-06-06 (TRIAL RELEASE) [DEPRECATIONS] - Using a hand-optimized type constraint is now deprecated. In keeping with our release policy, this won't actually start warning until the 2.0200 release. [NEW FEATURES] - Type constraints can now provide inlined versions, which should make inlined code which uses type constraints (such as accessors) faster. This replaces the existing hand-optimized constraint feature. (Dave Rolsky) [ENHANCEMENTS] - Remove a lot of cases where generated methods closed over meta objects. Most simple cases should now only close over simple data types and coderefs. This should make deparsing simpler. 2.0010 2011-06-20 [BUG FIXES] - Fix regression in 2.0009 and 2.0103 when applying roles during init_meta in an exporter that also re-exports Moose or Moose::Role. (t0m, ilmari) 2.0009 2011-06-19 [BUG FIXES] - duck_type type constraints now report reasonable errors when given something which isn't an instance of an object. (t0m) - Moose::Util::apply_all_roles now works even if the applicant is a non-Moose class. (perigrin) - When an object is reblessed, triggers are called on attributes that are set during the reblessing. (Karen Etheridge). [OTHER] - Better error message if Moose->init_meta is called with a 'metaclass' option when that metaclass hasn't been loaded. (jasonmay) 2.0008 2011-06-16 [BUG FIXES] - The 'accessor' native delegation for hashrefs now allows setting the value to undef. (sugoik, doy) [ENHANCEMENTS] - Various generated methods have more useful context information. (doy) 2.0007 2011-05-15 [BUG FIXES] - Make sure weak attributes remain weak when cloning. (doy, rafl) 2.0006 2011-05-09 [BUG FIXES] - Revert the List::MoreUtils version bump, as it breaks backwards compatibility. The dependency will be bumped with Moose 2.0200. 2.0005 2011-05-09 [BUG FIXES] - Only sort the alias keys when determining caching. 2.0004 2011-05-09 [BUG FIXES] - Bump the List::MoreUtils dep to avoid buggy behavior in old versions. - Sort the list of roles and the alias and excludes parameters when determining caching, since their order doesn't matter. 2.0003 2011-05-09 [BUG FIXES] - Applying multiple role objects (rather than role names) at once no longer skips every other role. (rjbs) - Caching of anon classes now works more sanely in the presence of role application parameters - alias and excludes options are taken into account, and caching is disabled entirely if other parameters exist. Asking for caching (instead of just not weakening) when parameters are given will begin warning in Moose 2.0200. (doy, autarch) 2.0002 2011-04-28 [ENHANCEMENTS] - Provide definition context information for constructors and destructors, so that they will show up as something other than "generated method (unknown origin)". Also, add the package that accessors are defined in to their definition context. - Use Devel::PartialDump in type constraint error messages, if it is installed. [BUG FIXES] - Stop hiding warnings produced by throwing errors in DEMOLISH methods. - The 'reset' native delegation for Counter attributes will now also respect builders (previously, it only respected defaults). 2.0001 2011-04-22 [ENHANCEMENTS] - Anonymous classes and roles now have a unified implementation in Class::MOP::Package. This means that anonymous packages are now also possible. (Shawn M Moore, doy) [BUG FIXES] - No longer call XSLoader from multiple places, as this causes issues on older perls. (doy, ribasushi) - Moose::Meta::Role->create now accepts the 'roles' parameter, as it was documented to. (Chris Weyl) - Depend on Eval::Closure 0.04, which fixes some issues in mod_perl environments. (doy, mateu) 2.0000 2011-04-11 [API CHANGES] - The RegexpRef type constraint now accepts regular expressions blessed into other classes, such as those found in pluggable regexp engines. Additionally the 'Object' constraint no longer rejects objects implemented as a blessed regular expression. (David Leadbeater) [DOCUMENTATION] - The lazy_build attribute feature was mostly removed from the docs and is no longer encouraged. [OTHER] - Moose::Manual::Support now explicitly states when major releases are allowed to happen (January, April, July, or October). 1.9906 2011-04-04 (TRIAL RELEASE) [OTHER] - Update conflicts list. - Minor pod updates. 1.9905 2011-03-28 (TRIAL RELEASE) [NEW FEATURES] - The Moose::Meta::Role::Attribute class now has an original_role method which returns the role which first defined an attribute. See the docs for details. (Dave Rolsky) - Moose::Util::MetaRole will make sure that the class to which you're applying metaroles or base class roles can actually have them applied. If not (it's not a Moose class, it has a non-Moose metaclass, etc.), then it gives a useful error message. Previously, this would just end up dying in the MetaRole code without a useful message. (Dave Rolsky) [BUG FIXES] - When a role had its own applied_attribute metaclass (usually from MetaRole application), that metaclass would get lost when that role participated in role composition. It was also lost if that role was consumed by some other role. Both of these cases have been fixed. Attributes are always applied with the applied_attribute metaclass of the role which originally defined them. (Dave Rolsky) 1.9904 2011-03-04 (TRIAL RELEASE) [BUG FIXES] - Reinitializing anonymous roles used to accidentally clear out the role's stash in some circumstances. This is now fixed. (doy) - The Int type constraint now rejects integers with trailing newlines. (Matthew Horsfall) 1.9903 2011-02-28 (TRIAL RELEASE) [BUG FIXES] - Reverse the order that Moose::Exporter 'also' exports are dispatched. When trying to re-export from a package that itself exported a modified set of Moose sugar, you'd get the original Moose sugar instead of the overrides. There are also now tests for this. (perigrin) - Don't initialize lazy attributes with defaults in the constructor (for immutable classes). (mo) - When reinitializing meta objects for classes and roles, we failed to preserve roles and role applications. This led to weird bugs. Many MooseX modules end up reinitializing your class or role. (Dave Rolsky) 1.9902 2011-01-03 (TRIAL RELEASE) [OTHER] - Fix generation of CCFLAGS. - Add a bit more Dist::Zilla functionality. 1.9901 2011-01-03 (TRIAL RELEASE) [OTHER] - Fix some indexing issues. - Fix a few issues with the conflict checking stuff. 1.9900 2011-01-01 (TRIAL RELEASE) [OTHER] - The entire Class::MOP distribution has been merged with Moose. In the future, the Class::MOP code itself will be merged into Moose, and eventually the Class::MOP namespace will disappear entirely. For the current release, we have simply changed how Class::MOP is distributed. (Dave Rolsky). - Switched to Dist::Zilla for development. However, we still have a minimal Makefile.PL in the repository that can be used for development. (Dave Rolsky) [API CHANGES] - Roles now have their own default attribute metaclass to use during application to a class, rather than just using the class's attribute_metaclass. This is also overridable via ::MetaRole, with the applied_attribute key in the role_metaroles hashref (doy). - The internal code used to generate inlined methods (accessor, constructor, etc.) has been massively rewritten. MooseX modules that do inlining will almost certainly need to be updated as well. [ENHANCEMENTS] - We now load the roles needed for native delegations only as needed. This speeds up the compilation time for Moose itself. (doy) 1.25 2011-04-01 [BUG FIXES] - Reinitializing anonymous roles used to accidentally clear out the role's stash in some circumstances. This is now fixed. (doy) (backported from 1.9904) 1.24 2011-02-22 [BUG FIXES] - Reverse the order that Moose::Exporter 'also' exports are dispatched. When trying to re-export from a package that itself exported a modified set of Moose sugar, you'd get the original Moose sugar instead of the overrides. There are also now tests for this. (perigrin) (backported from 1.9903) 1.23 2011-02-13 [PACKAGING FIX] - The 1.22 release had a bad MANIFEST. This has been fixed. 1.22 2011-02-13 [BUG FIXES] - When reinitializing meta objects for classes and roles, we failed to preserve roles and role applications. This led to weird bugs. Many MooseX modules end up reinitializing your class or role. (Dave Rolsky) (backported from 1.9903) 1.21 2010-11-24 [ENHANCEMENTS] - The Support manual has been updated to reflect our new major/minor version policy. (Chris Prather) - The Contributing manual has been updated to reflect workflow changes based on this new support policy. (doy) [BUG FIXES] - The role attribute metaclass did not inherit from Class::MOP::Object, which could cause errors when trying to resolve metaclass compatibility issues. Reported by Daniel Ruoso. (doy) - The lazy_build feature was accidentally removed from all the docs. Now it's listed in Moose.pm again. (Chris Prather) 1.20 2010-11-19 [BUG FIXES] - When using native delegations, if an array or hash ref member failed a type constraint check, Moose ended up erroring out with "Can't call method "get_message" on unblessed reference" instead of generating a useful error based on the failed type constraint. Reported by t0m. RT #63113. (Dave Rolsky) 1.19 2010-11-02 [BUG FIXES] - There was still one place in the code trying to load Test::Exception instead of Test::Fatal. (Karen Etheridge) 1.18 2010-10-31 [ENHANCEMENTS] - Type constraint objects now have an assert_coerce method which will either return a valid value or throw an error. (rjbs) - We now warn when an accessor for one attribute overwrites an accessor for another attribute. RT #57510. (Dave Rolsky) [BUG FIXES] - The native Array and Hash delegation methods now coerce individual new members if the _member type_ has a coercion. In other words, if the array reference is defined as an ArrayRef[DateTime], and you've defined a coercion from Int to DateTime, then pushing an integer via a delegation method will coerce the integer to a DateTime object. Reported by Karen Etheridge. RT #62351. (Dave Rolsky) - An attribute using native delegations did not always properly coerce and type check a lazily set default value. (doy and Dave Rolsky) - Using a regexp to define delegations for a class which was not yet loaded did not actually work, but did not explicitly fail. However, it caused an error when the class was loaded later. Reported by Max Kanat-Alexander. RT #60596. (Dave Rolsky) - Attempting to delegate to a class or role which is not yet loaded will now throw an explicit error. (Dave Rolsky) - Attempting to set lazy_build in an inherited attribute was ignored. RT #62057. (perigrin) [OTHER] - The Moose test suite now uses Test::Fatal instead of Test::Exception. (rjbs) 1.17 2010-10-19 [BUG FIXES] - Make native delegation inlining work with instance metaclasses where slot access is an do {} block, like Kioku. This fixes the use of native delegations together with Kioku. (Scott, doy) 1.16 2010-10-18 [ENHANCEMENTS] - Almost every native delegation method which changes the attribute value now has an explicitly documented return value. In general, this return value matches what Perl would return for the same operation. (Dave Rolsky) - Lots of work on native delegation documentation, including documenting what arguments each native delegation method allows or requires. (Dave Rolsky) - Passing an odd number of args to ->new() now gives a more useful warning than Perl's builtin warning. Suggested by Sir Robert Burbridge. (Dave Rolsky) - Allow disabling stack traces by setting an environment variable. See Moose::Error::Default for details. This feature is considered experimental, and may change in a future release. (Marcus Ramberg) - The deprecation warning for using alias and excludes without a leading dash now tells you the role being applied and what it was being applied to. (mst). [BUG FIXES] - A number of native trait methods which expected strings as arguments did not allow the empty string. This included Array->join, String->match, String->replace, and String->substr. Reported by Whitney Jackson. RT #61962. (Dave Rolsky) - 'no Moose' no longer inadvertently removes imports it didn't create itself. RT #60013. (Florian Ragwitz, doy) - Roles now support passing an array reference of method names to method modifier sugar functions. (doy) - Native traits no longer use optimized inlining routines if the instance requests it (in particular, if inline_get_slot_value doesn't return something that can be assigned to). This should fix issues with KiokuDB::Class. (doy) - We now ignore all Class::MOP and Moose classes when determining what package called a deprecated feature. This should make the deprecation warnings saner, and make it possible to turn them off more easily. (Dave Rolsky) - The deprecated "default is" warning no longer happens if the attribute has any accessor method defined (accessor, reader, writer). Also, this warning only happens when a method that was generated because of the "default is" gets called, rather than when the attribute is defined. (Dave Rolsky) - The "default default" code for some native delegations no longer issues a deprecation warning when the attribute is required or has a builder. (Dave Rolsky) - Setting a "default default" caused a fatal error if you used the builder or lazy_build options for the attribute. Reported by Kent Fredric. RT #59613. (Dave Rolsky) 1.15 2010-10-05 [API CHANGES] - Major changes to Native Traits, most of which make them act more like "normal" attributes. This should be mostly compatible with existing code, but see Moose::Manual::Delta for details. - A few native traits (String, Counter, Bool) provide default values of "is" and "default" when you created an attribute. Allowing them to provide these values is now deprecated. Supply the value yourself when creating the attribute. - New option 'trait_aliases' for Moose::Exporter, which will allow you to generate non-global aliases for your traits (and allow your users to rename the aliases, etc). (doy) - 'use Moose' and 'use Moose::Role' now accept a '-meta_name' option, to determine which name to install the 'meta' name under. Passing 'undef' to this option will suppress generation of the meta method entirely. (doy) - Moose now warns if it overwrites an existing method named "meta" in your class when you "use Moose". (doy) [ENHANCEMENTS] - Native Trait delegations are now all generated as inline code. This should be much faster than the previous method of delegation. In the best case, native trait methods will be very highly optimized. - Reinitializing a metaclass no longer removes the existing method and attribute objects (it instead fixes them so they are correct for the reinitialized metaclass). This should make the order of loading many MooseX modules less of an issue. (doy) - The Moose::Manual docs have been revised and updated. (Dave Rolsky) [BUG FIXES] - If an attribute was weak, setting it to a non-ref value after the object was constructed caused an error. Now we only call weaken when the new value is a reference. - t/040_type_constraints/036_match_type_operator.t failed on 5.13.5+. Fixed based on a patch from Andreas Koenig. 1.14 2010-09-21 [BUG FIXES] - Work around what looks like a bug in List::MoreUtils::any. This bug caused a weird error when defining the same union type twice, but only when using MooseX::Types. Reported by Curtis Jewell. RT #61001. (Dave Rolsky) 1.13 2010-09-13 [API CHANGES] - The deprecation warnings for alias and excludes are back, use -alias and -excludes instead. (Dave Rolsky) [ENHANCEMENTS] - When composing one role into another and there is an attribute conflict, the error message now includes the attribute name. Reported by Sam Graham. RT #59985. (Dave Rolsky) - When a class is made immutable, the does_role method is overridden with a much faster version that simply looks role names up in a hash. Code which uses lots of role-based type constraints should be faster. (Dave Rolsky) 1.12 2010-08-28 [BUG FIXES] - Fix the MANIFEST. Fixes RT #60831, reported by Alberto Simões. 1.11 2010-08-27 [API CHANGES] - An attribute in a subclass can now override the value of "is". (doy) - The deprecation warnings for alias and excludes have been turned back off for this release, to give other module authors a chance to tweak their code. (Dave Rolsky) [BUG FIXES] - mro::get_linear_isa was being called as a function rather than a method, which caused problems with Perl 5.8.x. (t0m) - Union types always created a type constraint, even if their constituent constraints did not have any coercions. This bogus coercion always returned undef, which meant that a union which included Undef as a member always coerced bad values to undef. Reported by Eric Brine. RT #58411. (Dave Rolsky) - Union types with coercions would always fall back to coercing the value to undef (unintentionally). Now if all the coercions for a union type fail, the value returned by the coercion is the original value that we attempted to coerce. (Dave Rolsky). 1.10 2010-08-22 [API CHANGES] - The long-deprecated alias and excludes options for role applications now issue a deprecation warning. Use -alias and -excludes instead. (Dave Rolsky) [BUG FIXES] - Inlined code no longer stringifies numeric attribute defaults. (vg, doy) - default => undef now works properly. (doy) - Enum type constraints now throw errors if their values are nonsensical. (Sartak) [ENHANCEMENTS] - Optimizations that should help speed up compilation time (Dave Rolsky). 1.09 2010-07-25 [API CHANGES] - You can no longer pass "coerce => 1" for an attribute unless its type constraint has a coercion defined. Doing so will issue a deprecation warning. (Dave Rolsky) - Previously, '+foo' only allowed a specific set of options to be overridden, which made it impossible to change attribute options related to extensions. Now we blacklist some options, and anything else is allowed. (doy, Tuomas Jormola) - Most features which have been declared deprecated now issue a warning using Moose::Deprecated. Warnings are issued once per calling package, not repeatedly. See Moose::Deprecated for information on how you can shut these warnings up entirely. Note that deprecated features will eventually be removed, so shutting up the warnings may not be the best idea. (Dave Rolsky) - Removed the long-deprecated Moose::Meta::Role->alias_method method. (Dave Rolsky). [NEW FEATURES] - We no longer unimport strict and warnings when Moose, Moose::Role, or Moose::Exporter are unimported. Doing this was broken if the user explicitly loaded strict and warnings themself, and the results could be generally surprising. We decided that it was best to err on the side of safety and leave these on. Reported by David Wheeler. RT #58310. (Dave Rolsky) - New with_traits helper function in Moose::Util. (doy) [BUG FIXES] - Accessors will no longer be inlined if the instance metaclass isn't inlinable. (doy) - Use Perl 5.10's new recursive regex features, if possible, for the type constraint parser. (doy, nothingmuch) [ENHANCEMENTS] - Attributes now warn if their accessors overwrite a locally defined function (not just method). (doy) [OTHER] - Bump our required perl version to 5.8.3, since earlier versions fail tests and aren't easily installable/testable. 1.08 2010-06-15 [ENHANCEMENTS] - Refactored a small amount of Moose::Meta::Method::Constructor to allow it to be overridden more easily (doy). 1.07 2010-06-05 [BUG FIXES] - Fixed a minor metaclass compatibility fixing bug dealing with immutable classes and non-class metaclass traits (doy, dougdude). 1.06 2010-06-01 [NEW FEATURES] - Added '0+' overloading in Moose::Meta::TypeConstraint so that we can more uniformly compare type constraints between 'classic' Moose type constraints and MooseX::Types based type constraints. 1.05 2010-05-20 [API CHANGES] - Packages and modules no longer have methods - this functionality was moved back up into Moose::Meta::Class and Moose::Meta::Role individually (through the Class::MOP::Mixin::HasMethods mixin) (doy). - BUILDALL is now called by Moose::Meta::Class::new_object, rather than by Moose::Object::new. (doy) [NEW FEATURES] - strict and warnings are now unimported when Moose, Moose::Role, or Moose::Exporter are unimported. (doy, Adam Kennedy) - Added a 'consumers' method to Moose::Meta::Role for finding all classes/roles which consume the given role. (doy) [BUG FIXES] - Fix has '+attr' in Roles to explode immediately, rather than when the role is applied to a class (t0m). - Fix type constraint validation messages to not include the string 'failed' twice in the same sentence (Florian Ragwitz). - New type constraints will default to being unequal, rather than equal (rjbs). - The tests no longer check for perl's behavior of clobbering $@, which has been fixed in perl-5.13.1 (Florian Ragwitz). - Metaclass compatibility fixing has been completely rewritten, and should be much more robust. (doy) 1.04 2010-05-20 - This release was broken and has been deleted from CPAN shortly after its upload. 1.03 2010-05-06 [NEW FEATURES] - Allow specifying required versions when setting superclasses or applying roles (Florian Ragwitz). 1.02 2010-05-01 [BUG FIXES] - Stop the natatime method provided by the native Array trait from returning an exhausted iterator when being called with a callback. (Florian Ragwitz) - Make Moose::Meta::TypeConstraint::Class correctly reject RegexpRefs. (Florian Ragwitz) - Calling is_subtype_of on a Moose::Meta::TypeConstraint::Class with itself or the class the TC represents as an argument incorrectly returned true. This behavior is correct for is_type_of, not is_subtype_of. (Guillermo Roditi) - Use File::Temp for temp files created during tests. Previously, files were written to the t/ dir, which could cause problems of the user running the tests did not have write access to that directory.. (Chris Weyl, Ævar Arnfjörð Bjarmason) - Pass role arguments along when applying roles to instances. (doy, lsm) 1.01 2010-03-26 [NEW FEATURES] - The handles option now also accepts a role type constraint in addition to a plain role name. (Florian Ragwitz) [OTHER] - Record the Sartak/doy debt properly in Changes (perigrin) 1.00 2010-03-25 [BUG FIXES] - Moose::Meta::Attribute::Native::Trait::Code no longer creates reader methods by default. (Florian Ragwitz) [DOCUMENTATION] - Improve various parts of the documentation and fix many typos. (Dave Rolsky, Mateu Hunter, Graham Knop, Robin V, Jay Hannah, Jesse Luehrs) [OTHER] - Paid the $10 debt to doy from 0.80 2009-06-06 (Sartak) 0.99 2010-03-08 [NEW FEATURES] - New method find_type_for in Moose::Meta::TypeConstraint::Union, for finding which member of the union a given value validates for. (Cory Watson) [BUG FIXES] - DEMOLISH methods in mutable subclasses of immutable classes are now called properly (Chia-liang Kao, Jesse Luehrs) [NEW DOCUMENTATION] - Added Moose::Manual::Support that defines the support, compatiblity, and release policies for Moose. (Chris Prather) 0.98 2010-02-10 [BUG FIXES] - An internals change in 0.97 broke role application to an instance in some cases. The bug occurred when two different roles were applied to different instances of the same class. (Rafael Kitover) 0.97 2010-02-09 [BUG FIXES] - Calling ->reinitialize on a cached anonymous class effectively uncached the metaclass object, causing the metaclass to go out of scope unexpectedly. This could easily happen at a distance by applying a metarole to an anonymous class. (Dave Rolsky). 0.96 2010-02-06 [NEW FEATURES] - ScalarRef is now a parameterized type. You can now specify a type constraint for whatever the reference points to. (Closes RT#50857) (Michael G. Schwern, Florian Ragwitz) [BUG FIXES] - ScalarRef now accepts references to other references. (Closes RT#50934) (Michael G. Schwern) 0.95 2010-02-04 [NEW FEATURES] - Moose::Meta::Attribute::Native::Trait::Code now provides execute_method as a delegation option. This allows the code reference to be called as a method on the object. (Florian Ragwitz) [ENHANCEMENTS] - Moose::Object::does no longer checks the entire inheritance tree, since Moose::Meta::Class::does_role already does this. (doy) - Moose::Util::add_method_modifier (and subsequently the sugar functions Moose::before, Moose::after, and Moose::around) can now accept arrayrefs, with the same behavior as lists. Types other than arrayref and regexp result in an error. (Dylan Hardison) 0.94 2010-01-18 [API CHANGES] - Please see the changes listed for 0.93_01 and Moose::Manual::Delta. [ENHANCEMENTS] - Improved support for anonymous roles by changing various APIs to take Moose::Meta::Role objects as well as role names. This included - Moose::Meta::Class->does_role - Moose::Meta::Role->does_role - Moose::Util::does_role - Moose::Util::apply_all_roles - Moose::Util::ensure_all_roles - Moose::Util::search_class_by_role Requested by Shawn Moore. Addresses RT #51143 (and then some). (Dave Rolsky) [BUG FIXES] - Fix handling of non-alphanumeric attributes names like '@foo'. This should work as long as the accessor method names are explicitly set to valid Perl method names. Reported by Doug Treder. RT #53731. (Dave Rolsky) 0.93_03 2010-01-05 [BUG FIXES] - Portability fixes to our XS code so we compile with 5.8.8 and Visual C++. Fixes RT #53391. Reported by Taro Nishino. (rafl) 0.93_02 2010-01-05 [BUG FIXES] - Depend on Class::MOP 0.97_01 so we can get useful results from CPAN testers. (Dave Rolsky) 0.93_01 2010-01-04 [API CHANGES] See Moose::Manual::Delta for more details on backwards compatiblity issues. - Role attributes are now objects of the Moose::Meta::Role::Attribute class. (Dave Rolsky). - There were major changes to how metaroles are applied. We now distinguish between metaroles for classes vs those for roles. See the Moose::Util::MetaRole docs for details. (Dave Rolsky) - The old MetaRole API has been deprecated, but will continue to work. However, if you are applying an attribute metaclass role, this may break because of the fact that roles now have an attribute metaclass too. (Dave Rolsky) - Moose::Util::MetaRole::apply_metaclass_roles is now called apply_metaroles. The old name is deprecated. (Dave Rolsky) - The unimport subs created by Moose::Exporter now clean up re-exported functions like blessed and confess, unless the caller imported them from somewhere else too. See Moose::Manua::Delta for backcompat details. (rafl) [ENHANCEMENTS AND BUG FIXES] - Changed the Str constraint to accept magic lvalue strings like one gets from substr et al, again. (sorear) - Sped up the type constraint parsing regex. (Sam Vilain) - The Moose::Cookbook::Extending::Recipe2 recipe was broken. Fix suggested by jrey. - Added Moose::Util::TypeConstraints exports when using oose.pm to allow easier testing of TypeConstraints from the command line. (perigrin) - Added a with_immutable test function to Test::Moose, to run a block of tests with and without certain classes being immutable. (doy) - We now use Module::Install extensions explicitly to avoid confusing errors if they're not installed. We use Module::Install::AuthorRequires to stop test extraction and general failures if you don't have the author side dependencies installed. - Fixed a grammar error in Moose::Cookbook::Basics::Recipe4. rt.cpan.org #51791. (Amir E. Aharoni) 0.93 2009-11-19 - Moose::Object - Calling $object->new() is no longer deprecated, and no longer warns. (doy) - Moose::Meta::Role - The get_attribute_map method is now deprecated. (Dave Rolsky) - Moose::Meta::Method::Delegation - Preserve variable aliasing in @_ for delegated methods, so that altering @_ affects the passed value. (doy) - Moose::Util::TypeConstraints - Allow array refs for non-anonymous form of enum and duck_type, not just anonymous. The non-arrayref forms may be removed in the future. (doy) - Changed Str constraint to not accept globs (*STDIN or *FOO). (chansen) - Properly document Int being a subtype of Str. (doy) - Moose::Exporter - Moose::Exporter using modules can now export their functions to the main package. This applied to Moose and Moose::Role, among others. (nothingmuch) - Moose::Meta::Attribute - Don't remove attribute accessors we never installed, during remove_accessors. (doy) - Moose::Meta::Attribute::Native::Trait::Array - Don't bypass prototype checking when calling List::Util::first, to avoid a segfault when it is called with a non-code argument. (doy) - Moose::Meta::Attribute::Native::Trait::Code - Fix passing arguments to code execute helpers. (doy) 0.92 2009-09-22 - Moose::Util::TypeConstraints - added the match_on_type operator (Stevan) - added tests and docs for this (Stevan) - Moose::Meta::Class - Metaclass compat fixing should already happen recursively, there's no need to explicitly walk up the inheritance tree. (doy) - Moose::Meta::Attribute - Add tests for set_raw_value and get_raw_value. (nothingmuch) 0.91 2009-09-17 - Moose::Object - Don't import any functions, in order to avoid polluting our namespace with things that can look like methods (blessed, try, etc) (nothingmuch) - Moose::Meta::Method::Constructor - The generated code needs to called Scalar::Util::blessed by its fully-qualified name or else Perl can interpret the call to blessed as an indirect method call. This broke Search::GIN, which in turn broke KiokuDB. (nothingmuch) 0.90 2009-09-15 - Moose::Meta::Attribute::Native::Trait::Counter - Moose::Meta::Attribute::Native::Trait::String - For these two traits, an attribute which did not explicitly provide methods to handles magically ended up delegating *all* the helper methods. This has been removed. You must be explicit in your handles declaration for all Native Traits. (Dave Rolsky) - Moose::Object - DEMOLISHALL behavior has changed. If any DEMOLISH method dies, we make sure to rethrow its error message. However, we also localize $@ before this so that if all the DEMOLISH methods success, the value of $@ will be preserved. (nothingmuch and Dave Rolsky) - We now also localize $? during object destruction. (nothingmuch and Dave Rolsky) - The handling of DEMOLISH methods was broken for immutablized classes, which were not receiving the value of Devel::GlobalDestruction::in_global_destruction. - These two fixes address some of RT #48271, reported by Zefram. - This is all now documented in Moose::Manual::Construction. - Calling $object->new() is now deprecated. A warning will be issued. (perigrin) - Moose::Meta::Role - Added more hooks to customize how roles are applied. The role summation class, used to create composite roles, can now be changed and/or have meta-roles applied to it. (rafl) - The get_method_list method no longer explicitly excludes the "meta" method. This was a hack that has been replaced by better hacks. (Dave Rolsky) - Moose::Meta::Method::Delegation - fixed delegated methods to make sure that any modifiers attached to the accessor being delegated on will be called (Stevan) - added tests for this (Stevan) - Moose::Meta::Class - Moose no longer warns when a class that is being made immutable has mutable ancestors. While in theory this is a good thing to warn about, we found so many exceptions to this that doing this properly became quite problematic. 0.89_02 2009-09-10 - Moose::Meta::Attribute::Native - Fix Hash, which still had 'empty' instead of 'is_empty'. (hdp) - Moose::Meta::Attribute::Native::Trait::Array - Added a number of functions from List::Util and List::MoreUtils, including reduce, shuffle, uniq, and natatime. (doy) - Moose::Exporter - This module will now generate an init_meta method for your exporting class if you pass it options for Moose::Util::MetaRole::apply_metaclass_roles or apply_base_class_roles. This eliminates a lot of repetitive boilerplate for typical MooseX modules. (doy). - Documented the with_meta feature, which is a replacement for with_caller. This feature was added by josh a while ago. - The with_caller feature is now deprecated, but will not issue a warning yet. (Dave Rolsky) - If you try to wrap/export a subroutine which doesn't actually exist, Moose::Exporter will warn you about this. (doy) - Moose::Meta::Role::Application::ToRole - When a role aliased a method from another role, it was only getting the new (aliased) name, not the original name. This differed from what happens when a class aliases a role's methods. If you _only_ want the aliased name, make sure to also exclue the original name. (Dave Rolsky) 0.89_01 2009-09-02 - Moose::Meta::Attribute - Added the currying syntax for delegation from AttributeHelpers to the existing delegation API. (hdp) - Moose::Meta::Attribute::Native - We have merged the functionality of MooseX::AttributeHelpers into the Moose core with some API tweaks. You can continue to use MooseX::AttributeHelpers, but it will not be maintained except (perhaps) for critical bug fixes in the future. See Moose::Manual::Delta for details. (hdp, jhannah, rbuels, Sartak, perigrin, doy) - Moose::Error::Croak - Moose::Error::Confess - Clarify documentation on how to use different error-throwing modules. (Curtis Jewell) - Moose - Correct POD for builder to point to Recipe8, not 9. (gphat) - Moose::Exporter - When a nonexistent sub name is passed to as_is, with_caller, or with_meta, throw a warning and skip the exporting, rather than installing a broken sub. (doy) - Moose::Meta::Class - Moose now warns if you call C for a class with mutable ancestors. (doy) 0.89 2009-08-13 - Moose::Manual::Attributes - Clarify "is", include discussion of "bare". (Sartak) - Moose::Meta::Role::Method::Conflicting - Moose::Meta::Role::Application::ToClass - For the first set of roles involved in a conflict, report all unresolved method conflicts, not just the first method. Fixes #47210 reported by Ovid. (Sartak) - Moose::Meta::TypeConstraint - Add assert_valid method to use a TypeConstraint for assertion (rjbs) - Moose::Exporter - Make "use Moose -metaclass => 'Foo'" do alias resolution, like -traits does. (doy) - Allow specifying role options (alias, excludes, MXRP stuff) in the arrayref passed to "use Moose -traits" (doy) - Moose::Util - Add functions meta_class_alias and meta_attribute_alias for creating aliases for class and attribute metaclasses and metatraits. (doy) - Moose::Meta::Attribute - Moose::Meta::Method::Accessor - A trigger now receives the old value as a second argument, if the attribute had one. (Dave Rolsky) - Moose::Meta::Method::Constructor - Fix a bug with $obj->new when $obj has stringify overloading. Reported by Andrew Suffield [rt.cpan.org #47882] (Sartak) - However, we will probably deprecate $obj->new, so please don't start using it for new code! - Moose::Meta::Role::Application - Moose::Meta::Role::Application::RoleSummation - Rename alias and excludes to -alias and -excludes (but keep the old names for now, for backcompat) (doy) 0.88 2009-07-24 - Moose::Manual::Contributing - Re-write the Moose::Manual::Contributing document to reflect the new layout and methods of work for the Git repository. All work now should be done in topic branches and reviewed by a core committer before being applied to master. All releases are done by a cabal member and merged from master to stable. This plan was devised by Yuval, blame him. (perigrin) - Moose::Meta::Role - Create metaclass attributes for the different role application classes. (rafl) - Moose::Util::MetaRole - Allow applying roles to a meta role's role application classes. (rafl) - Moose::Meta::Attribute - Add weak_ref to allowed options for "has '+foo'" (mst) - Moose::Meta::Method::Accessor - No longer uses inline_slot_access in accessors, to support non-lvalue-based meta instances. (sorear) 0.87 2009-07-07 - Moose::Meta::Method::Delegation - Once again allow class names as well as objects for delegation. This was changed in 0.86. 0.86 2009-07-03 - Moose::Meta::Class::Immutable::Trait - Fixes to work with the latest Class::MOP. - Moose::Meta::Method::Delegation - Delegation now dies with a more useful error message if the attribute's accessor returns something defined but unblessed. (hdp) 0.85 2009-06-26 - Moose::Meta::Attribute - The warning for 'no associated methods' is now split out into the _check_associated_methods method, so that extensions can safely call 'after install_accessors => ...'. This fixes a warning from MooseX::AttributeHelpers. (hdp) 0.84 2009-06-26 - Moose::Role - has now sets definition_context for attributes defined in roles. (doy) - Moose::Meta::Attribute - When adding an attribute to a metaclass, if the attribute has no associated methods, it will give a deprecation warning. (hdp) - Methods generated by delegation were not being added to associated_methods. (hdp) - Attribute accessors (reader, writer, accessor, predicate, clearer) now warn if they overwrite an existing method. (doy) - Attribute constructors now warn very noisily about unknown (or misspelled) arguments - Moose::Util::TypeConstraints - Deprecated the totally useless Role type name, which just checked if $object->can('does'). Note that this is _not_ the same as a type created by calling role_type('RoleName'). - Moose::Util::TypeConstraints - Moose::Meta::TypeConstraint::DuckType - Reify duck type from a regular subtype into an actual class (Sartak) - Document this because Sartak did all my work for me (perigrin) - Moose::Meta::Attribute - Allow Moose::Meta::TypeConstraint::DuckType in handles, since it is just a list of methods (Sartak) - Moose::Meta::Role - The get_*_method_modifiers methods would die if the role had no modifiers of the given type (Robert Buels). 0.83 2009-06-23 - Moose::Meta::Class - Fix _construct_instance not setting the special __MOP__ object key in instances of anon classes. (doy) 0.82 2009-06-21 - Moose::Manual::Types - Mention MooseX::Types early to avoid users falling down the string parsing rathole (mst) - Moose::Manual::MooseX - Add warnings about class-level extensions and mention considering using plain objects instead 0.81 2009-06-07 - Bumped our Class::MOP prereq to the latest version (0.85), since that's what we need. 0.80 2009-06-06 - Moose::Manual::FAQ - Add FAQ about the coercion change from 0.76 because it came up three times today (perigrin) - Win doy $10 dollars because Sartak didn't think anybody would document this fast enough (perigrin) - Moose::Meta::Method::Destructor - Inline a DESTROY method even if there are no DEMOLISH methods to prevent unnecessary introspection in Moose::Object::DEMOLISHALL - Moose::* - A role's required methods are now represented by Moose::Meta::Role::Method::Required objects. Conflicts are now represented by Moose::Meta::Role::Method::Conflicting objects. The benefit for end-users in that unresolved conflicts generate different, more instructive, errors, resolving Ovid's #44895. (Sartak) - Moose::Role - Improve the error message of "extends" as suggested by Adam Kennedy and confound (Sartak) - Link to Moose::Manual::Roles from Moose::Role as we now have excellent documentation (Adam Kennedy) - Tests - Update test suite for subname change in Class::MOP (nothingmuch) - Add TODO test for infinite recursion in Moose::Meta::Class (groditi) 0.79 2009-05-13 - Tests - More fixes for Win32 problems. Reported by Robert Krimen. - Moose::Object - The DEMOLISHALL method could still blow up in some cases during global destruction. This method has been made more resilient in the face of global destruction's random garbage collection order. - Moose::Exporter - If you "also" a module that isn't loaded, the error message now acknowledges that (Sartak) - Moose - When your ->meta method does not return a Moose::Meta::Class, the error message gave the wrong output (Sartak) 0.78 2009-05-12 - Moose::Cookbook::FAQ and Moose::Cookbook::WTF - Merged these documents into what is now Moose::Manual::FAQ - Moose::Unsweetened - Moved to Moose::Manual::Unsweetened - Moose::Cookbook::Basics::Recipes 9-12 - Renamed to be 8-11, since recipe 8 did not exist - Moose::Exporter - Make Moose::Exporter import strict and warnings into packages that use it (doy) - Moose::Object - Fix DEMOLISHALL sometimes not being able to find DEMOLISH methods during global destruction (doy) - Moose::Meta::Class - Moose::Meta::Role::Application::ToClass - Track the Role::Application objects created during class-role consumption (Sartak) - Moose::Meta::Class - Fix metaclass incompatibility errors when extending a vanilla perl class which isa Moose class with a metaclass role applied (t0m) - Moose::Meta::Role - Add a role-combination hook, _role_for_combination, for the benefit of MooseX::Role::Parameterized (Sartak) - Tests - Some tests were failing on Win32 because they explicit checked warning output for newlines. Reported by Nickolay Platonov. 0.77 2009-05-02 - Moose::Meta::Role - Add explicit use of Devel::GlobalDestruction and Sub::Name (perigrin) - Moose::Object - Pass a boolean to DEMOLISHALL and DEMOLISH indicating whether or not we are currently in global destruction (doy) - Add explicit use of Devel::GlobalDestruction and Sub::Name (perigrin) - Moose::Cookbook::FAQ - Reworked much of the existing content to be more useful to modern Moose hackers (Sartak) - Makefile.PL - Depend on Class::MOP 0.83 instead of 0.82_01. 0.76 2009-04-27 - Moose::Meta::TypeConstraint - Do not run coercions in coerce() if the value already passes the type constraint (hdp) - Moose::Meta::TypeConstraint::Class - In validation error messages, specifically say that the value is not an instance of the class. This should alleviate some frustrating forgot-to-load-my-type bugs. rt.cpan.org #44639 (Sartak) - Moose::Meta::Role::Application::ToClass - Revert the class-overrides-role warning in favor of a solution outside of the Moose core (Sartak) - Tests - Make Test::Output optional again, since it's only used in a few files (Sartak) 0.75_01 2009-04-23 - Moose::Meta::Role::Application::ToClass - Moose now warns about each class overriding methods from roles it consumes (Sartak) - Tests - Warnings tests have standardized on Test::Output which is now an unconditionally dependency (Sartak) - Moose::Meta::Class - Changes to immutabilization to work with Class::MOP 0.82_01+. 0.75 2009-04-20 - Moose - Moose::Meta::Class - Move validation of not inheriting from roles from Moose::extends to Moose::Meta::Class::superclasses (doy) - Moose::Util - add ensure_all_roles() function to encapsulate the common "apply this role unless the object already does it" pattern (hdp) - Moose::Exporter - Users can now select a different metaclass with the "-metaclass" option to import, for classes and roles (Sartak) - Moose::Meta::Role - Make method_metaclass an attr so that it can accept a metarole application. (jdv) 0.74 2009-04-07 - Moose::Meta::Role - Moose::Meta::Method::Destructor - Include stack traces in the deprecation warnings. (Florian Ragwitz) - Moose::Meta::Class - Removed the long-deprecated _apply_all_roles method. - Moose::Meta::TypeConstraint - Removed the long-deprecated union method. 0.73_02 2009-04-06 - More deprecations and renamings - Moose::Meta::Method::Constructor - initialize_body => _initialize_body (this is always called when an object is constructed) - Moose::Object - The DEMOLISHALL method could throw an exception during global destruction, meaning that your class's DEMOLISH methods would not be properly called. Reported by t0m. - Moose::Meta::Method::Destructor - Destructor inlining was totally broken by the change to the is_needed method in 0.72_01. Now there is a test for this feature, and it works again. - Moose::Util - Bold the word 'not' in the POD for find_meta (t0m) 0.73_01 2009-04-05 - Moose::* - Call user_class->meta in fewer places, with the eventual goal of allowing the user to rename or exclude ->meta altogether. Instead uses Class::MOP::class_of. (Sartak) - Moose::Meta::Method::Accessor - If an attribute had a lazy default, and that value did not pass the attribute's type constraint, it did not get the message from the type constraint, instead using a generic message. Test provided by perigrin. - Moose::Util::TypeConstraints - Add duck_type keyword. It's sugar over making sure an object can() a list of methods. This is easier than jrockway's suggestion to fork all of CPAN. (perigrin) - add tests and documentation (perigrin) - Moose - Document the fact that init_meta() returns the target class's metaclass object. (hdp) - Moose::Cookbook::Extending::Recipe1 - Moose::Cookbook::Extending::Recipe2 - Moose::Cookbook::Extending::Recipe3 - Moose::Cookbook::Extending::Recipe4 - Make init_meta() examples explicitly return the metaclass and point out this fact. (hdp) - Moose::Cookbook::Basics::Recipe12 - A new recipe, creating a custom meta-method class. - Moose::Cookbook::Meta::Recipe6 - A new recipe, creating a custom meta-method class. - Moose::Meta::Class - Moose::Meta::Method::Constructor - Attribute triggers no longer receive the meta-attribute object as an argument in any circumstance. Previously, triggers called during instance construction were passed the meta-attribute, but triggers called by normal accessors were not. Fixes RT#44429, reported by Mark Swayne. (hdp) - Moose::Manual::Attributes - Remove references to triggers receving the meta-attribute object as an argument. (hdp) - Moose::Cookbook::FAQ - Remove recommendation for deprecated Moose::Policy and Moose::Policy::FollowPBP; recommend MooseX::FollowPBP instead. (hdp) - Many methods have been renamed with a leading underscore, and a few have been deprecated entirely. The methods with a leading underscore are consider "internals only". People writing subclasses or extensions to Moose should feel free to override them, but they are not for "public" use. - Moose::Meta::Class - check_metaclass_compatibility => _check_metaclass_compatibility - Moose::Meta::Method::Accessor - initialize_body => _initialize_body (this is always called when an object is constructed) - /(generate_.*_method(?:_inline)?)/ => '_' . $1 - Moose::Meta::Method::Constructor - initialize_body => _initialize_body (this is always called when an object is constructed) - /(generate_constructor_method(?:_inline)?)/ => '_' . $1 - attributes => _attributes (now inherited from parent) - meta_instance => _meta_instance (now inherited from parent) - Moose::Meta::Role - alias_method is deprecated. Use add_method 0.73 2009-03-27 - No changes from 0.72_01. 0.72_01 2009-03-26 - Everything - Almost every module has complete API documentation. A few methods (and even whole classes) have been intentionally excluded pending some rethinking of their APIs. - Moose::Util::TypeConstraints - Calling subtype with a name as the only argument is now an exception. If you want an anonymous subtype do: my $subtype = subtype as 'Foo'; - Moose::Cookbook::Meta::Recipe7 - A new recipe, creating a custom meta-instance class. - Moose::Cookbook::Basics::Recipe5 - Fix various typos and mistakes. Includes a patch from Radu Greab. - Moose::Cookbook::Basics::Recipe9 - Link to this recipe from Moose.pm's builder blurb - Moose::Exporter - When wrapping a function with a prototype, Moose::Exporter now makes sure the wrapped function still has the same prototype. (Daisuke Maki) - Moose::Meta::Attribute - Allow a subclass to set lazy_build for an inherited attribute. (hdp) - Makefile.PL - Explicitly depend on Data::OptList. We already had this dependency via Sub::Exporter, but since we're using it directly we're better off with it listed. (Sartak) - Moose::Meta::Method::Constructor - Make it easier to subclass the inlining behaviour. (Ash Berlin) - Moose::Manual::Delta - Details significant changes in the history of Moose, along with recommended workarounds. - Moose::Manual::Contributing - Contributor's guide to Moose. - Moose::Meta::Method::Constructor - The long-deprecated intialize_body method has been removed (yes, spelled like that). - Moose::Meta::Method::Destructor - This is_needed method is now always a class method. - Moose::Meta::Class - Changes to the internals of how make_immutable works to match changes in latest Class::MOP. 0.72 2009-02-23 - Moose::Object - Moose::Meta::Method::Constructor - A mutable class accepted Foo->new(undef) without complaint, while an immutable class would blow up with an unhelpful error. Now, in both cases we throw a helpful error instead. Reported by doy. 0.71_01 2009-02-22 - Moose::Cookbook - Hopefully fixed some POD errors in a few recipes that caused them to display weird on search.cpan.org. - Moose::Util::TypeConstraints - Calling type or subtype without the sugar helpers (as, where, message) is now deprecated. - The subtype function tried hard to guess what you meant, but often got it wrong. For example: my $subtype = subtype as 'ArrayRef[Object]'; This caused an error in the past, but now works as you'd expect. - Everywhere - Make sure Moose.pm is loaded before calling Moose->throw_error. This wasn't normally an issue, but could bite you in weird cases. 0.71 2009-02-19 - Moose::Cookbook::Basics::Recipe11 - A new recipe which demonstrates the use of BUILDARGS and BUILD. (Dave Rolsky) - Moose::Cookbook::Roles::Recipe3 - A new recipe, applying a role to an object instance. (Dave Rolsky) - Moose::Exporter - Allow overriding specific keywords from "also" packages. (doy) - Tests - Replace hardcoded cookbook tests with Test::Inline to ensure the tests match the actual code in the recipes. (Dave Rolsky) - Moose::Cookbook - Working on the above turned up a number of little bugs in the recipe code. (Dave Rolsky) - Moose::Util::TypeConstraints::Optimized - Just use Class::MOP for the optimized ClassName check. (Dave Rolsky) 0.70 2009-02-14 - Moose::Util::TypeConstraints - Added the RoleName type (stevan) - added tests for this (stevan) - Moose::Cookbook::Basics::Recipe3 - Updated the before qw[left right] sub to be a little more defensive about what it accepts (stevan) - added more tests to t/000_recipies/basics/003_binary_tree.t (stevan) - Moose::Object - We now always call DEMOLISHALL, even if a class does not define DEMOLISH. This makes sure that method modifiers on DEMOLISHALL work as expected. (doy) - added tests for this (EvanCarroll) - Moose::Util::MetaRole - Accept roles for the wrapped_method_metaclass (rafl) - added tests for this (rafl) - Moose::Meta::Attribute - We no longer pass the meta-attribute object as a final argument to triggers. This actually changed for inlined code a while back, but the non-inlined version and the docs were still out of date. - Tests - Some tests tried to use Test::Warn 0.10, which had bugs. Now they require 0.11. (Dave Rolsky) - Documentation - Lots of small changes to the manual, cookbook, and elsewhere. These were based on feedback from various users, too many to list here. (Dave Rolsky) 0.69 2009-02-12 - Moose - Make some keyword errors use throw_error instead of croak since Moose::Exporter wraps keywords now (Sartak) - Moose::Cookbook::* - Revised every recipe for style and clarity. Also moved some documentation out of cookbook recipes and into Moose::Manual pages. This work was funded as part of the Moose docs grant from TPF. (Dave Rolsky) - Moose::Meta::Method::Delegation - If the attribute doing the delegation was not populated, the error message did not specify the attribute name properly. (doy) 0.68 2009-02-04 - POD - Many spelling, typo, and formatting fixes by daxim. - Moose::Manual::Attributes - The NAME section in the POD used "Attribute" so search.cpan didn't resolve links from other documents properly. - Moose::Meta::Method::Overriden - Now properly spelled as Overridden. Thanks to daxim for noticing this. 0.67 2009-02-03 - Moose::Manual::* - Lots of little typo fixes and a few clarifications. Several pages didn't have proper titles, and so weren't actually visible on search.cpan.org. Thanks to hanekomu for a variety of fixes and formatting improvements. 0.66 2009-02-03 - Moose::Manual - This is a brand new, extensive manual for Moose. This aims to provide a complete introduction to all of Moose's features. This work was funded as part of the Moose docs grant from TPF. (Dave Rolsky) - Moose::Meta::Attribute - Added a delegation_metaclass method to replace a hard-coded use of Moose::Meta::Method::Delegation. (Dave Rolsky) - Moose::Util::TypeConstraints - If you created a subtype and passed a parent that Moose didn't know about, it simply ignored the parent. Now it automatically creates the parent as a class type. This may not be what you want, but is less broken than before. (Dave Rolsky) - Moose::Util::TypeConstraints - This module tried throw errors by calling Moose->throw_error, but it did not ensure that Moose was loaded first. This could cause very unhelpful errors when it tried to throw an error before Moose was loaded. (Dave Rolsky) - Moose::Util::TypeConstraints - You could declare a name with subtype such as "Foo!Bar" that would be allowed, but if you used it in a parameterized type such as "ArrayRef[Foo!Bar]" it wouldn't work. We now do some vetting on names created via the sugar functions, so that they can only contain alphanumerics, ":", and ".". (Dave Rolsky) 0.65 2009-01-22 - Moose and Moose::Meta::Method::Overridden - If an overridden method called super(), and then the superclass's method (not overridden) _also_ called super(), Moose went into an endless recursion loop. Test provided by Chris Prather. (Dave Rolsky) - Moose::Meta::TypeConstraint - All methods are now documented. (gphat) - t/100_bugs/011_DEMOLISH_eats_exceptions.t - Fixed some bogus failures that occurred because we tried to validate filesystem paths in a very ad-hoc and not-quite-correct way. (Dave Rolsky) - Moose::Util::TypeConstraints - Added maybe_type to exports. See docs for details. (rjbs) - Moose - Added Moose::Util::TypeConstraints to the SEE ALSO section. (pjf) - Moose::Role - Methods created via an attribute can now fulfill a "requires" declaration for a role. (nothingmuch) - Moose::Meta::Method::* - Stack traces from inlined code will now report its line and file as being in your class, as opposed to in Moose guts. (nothingmuch). 0.64 2008-12-31 - Moose::Meta::Method::Accessor - Always inline predicate and clearer methods (Sartak) - Moose::Meta::Attribute - Support for parameterized traits (Sartak) - verify_against_type_constraint method to avoid duplication and enhance extensibility (Sartak) - Moose::Meta::Class - Tests (but no support yet) for parameterized traits (Sartak) - Moose - Require Class::MOP 0.75+, which has the side effect of making sure we work on Win32. (Dave Rolsky) 0.63 2008-12-08 - Moose::Unsweetened - Some small grammar tweaks and bug fixes in non-Moose example code. (Dave Rolsky) 0.62_02 2008-12-05 - Moose::Meta::Role::Application::ToClass - When a class does not provide all of a role's required methods, the error thrown now mentions all of the missing methods, as opposed to just the first one found. Requested by Curtis Poe (RT #41119). (Dave Rolsky) - Moose::Meta::Method::Constructor - Moose will no longer inline a constructor for your class unless it inherits its constructor from Moose::Object, and will warn when it doesn't inline. If you want to force inlining anyway, pass "replace_constructor => 1" to make_immutable. Addresses RT #40968, reported by Jon Swartz. (Dave Rolsky) - The quoting of default values could be broken if the default contained a single quote ('). Now we use quotemeta to escape anything potentially dangerous in the defaults. (Dave Rolsky) 0.62_01 2008-12-03 - Moose::Object - use the method->execute API for BUILDALL and DEMOLISHALL (Sartak) - Moose::Util::TypeConstraints - We now make all the type constraint meta classes immutable before creating the default types provided by Moose. This should make loading Moose a little faster. (Dave Rolsky) 0.62 2008-11-26 - Moose::Meta::Role::Application::ToClass Moose::Meta::Role::Application::ToRole - fixed issues where excluding and aliasing the same methods for a single role did not work right (worked just fine with multiple roles) (stevan) - added test for this (stevan) - Moose::Meta::Role::Application::RoleSummation - fixed the error message when trying to compose a role with a role it excludes (Sartak) - Moose::Exporter - Catch another case where recursion caused the value of $CALLER to be stamped on (t0m) - added test for this (t0m) - Moose - Remove the make_immutable keyword, which has been deprecated since April. It breaks metaclasses that use Moose without no Moose (Sartak) - Moose::Meta::Attribute - Removing an attribute from a class now also removes delegation (handles) methods installed for that attribute (t0m) - added test for this (t0m) - Moose::Meta::Method::Constructor - An attribute with a default that looked like a number (but was really a string) would accidentally be treated as a number when the constructor was made immutable (perigrin) - added test for this (perigrin) - Moose::Meta::Role - create method for constructing a role dynamically (Sartak) - added test for this (Sartak) - anonymous roles! (Sartak) - added test for this (Sartak) - Moose::Role - more consistent error messages (Sartak) - Moose::Cookbook::Roles::Recipe1 - attempt to explain why a role that just requires methods is useful (Sartak) 0.61 2008-11-07 - Moose::Meta::Attribute - When passing a role to handles, it will be loaded if necessary (perigrin) - Moose::Meta::Class - Method objects returned by get_method (and other methods) Could end up being returned without an associated_metaclass attribute. Removing get_method_map, which is provided by Class::MOP::Class, fixed this. The Moose version did nothing different from its parent except introduce a bug. (Dave Rolsky) - added tests for this (jdv79) - Various - Added a $VERSION to all .pm files which didn't have one. Fixes RT #40049, reported by Adam Kennedy. (Dave Rolsky) - Moose::Cookbook::Basics::Recipe4 - Moose::Cookbook::Basics::Recipe6 - These files had spaces on the first line of the SYNOPSIS, as opposed to a totally empty line. According to RT #40432, this confuses POD parsers. (Dave Rolsky) 0.60 2008-10-24 - Moose::Exporter - Passing "-traits" when loading Moose caused the Moose.pm exports to be broken. Reported by t0m. (Dave Rolsky) - Tests for this bug. (t0m) - Moose::Util - Change resolve_metaclass alias to use the new load_first_existing_class function. This makes it a lot simpler, and also around 5 times faster. (t0m) - Add caching to resolve_metaclass_alias, which gives an order of magnitude speedup to things which repeatedly call the Moose::Meta::Attribute->does method, notably MooseX::Storage (t0m) - Moose::Util::TypeConstraint - Put back the changes for parameterized constraints that shouldn't have been removed in 0.59. We still cannot parse them, but MooseX modules can create them in some other way. See the 0.58 changes for more details. (jnapiorkowski) - Changed the way subtypes are created so that the job is delegated to a type constraint parent. This clears up some hardcoded checking and should allow correct subtypes of Moose::Meta::Type::Constraint. Don't rely on this new API too much (create_child_type) because it may go away in the future. (jnapiorkowski) - Moose::Meta::TypeConstraint::Union - Type constraint names are sorted as strings, not numbers. (jnapiorkowski) - Moose::Meta::TypeConstraint::Parameterizable - New parameterize method. This can be used as a factory method to make a new type constraint with a given parameterized type. (jnapiorkowski) - added tests (jnapiorkowski) 0.59 2008-10-14 - Moose - Add abridged documentation for builder/default/initializer/ predicate, and link to more details sections in Class::MOP::Attribute. (t0m) - Moose::Util::TypeConstraints - removed prototypes from all but the &-based stuff (mst) - Moose::Util::TypeConstraints - Creating a anonymous subtype with both a constraint and a message failed with a very unhelpful error, but should just work. Reported by t0m. (Dave Rolsky) - Tests - Some tests that used Test::Warn if it was available failed with older versions of Test::Warn. Reported by Fayland. (Dave Rolsky) - Test firing behavior of triggers in relation to builder/default/ lazy_build. (t0m) - Test behavior of equals/is_a_type_of/is_a_subtype_of for all kinds of supported type. (t0m) - Moose::Meta::Class - In create(), do not pass "roles" option to the superclass - added related test that creates an anon metaclass with a required attribute - Moose::Meta::TypeConstraint::Class - Moose::Meta::TypeConstraint::Role - Unify behavior of equals/is_a_type_of/is_a_subtype_of with other types (as per change in 0.55_02). (t0m) - Moose::Meta::TypeConstraint::Registry - Fix warning when dealing with unknown type names (t0m) - Moose::Util::TypeConstraints - Reverted changes from 0.58 related to handle parameterized types. This caused random failures on BSD and Win32 systems, apparently related to the regex engine. This means that Moose can no longer parse structured type constraints like ArrayRef[Int,Int] or HashRef[name=>Str]. This will be supported in a slightly different way via MooseX::Types some time in the future. (Dave Rolsky) 0.58 2008-09-20 !! This release has an incompatible change regarding !! !! how roles add methods to a class !! - Roles and role application ! Roles now add methods by calling add_method, not alias_method. They make sure to always provide a method object, which will be cloned internally. This means that it is now possible to track the source of a method provided by a role, and even follow its history through intermediate roles. This means that methods added by a role now show up when looking at a class's method list/map. (Dave Rolsky) - Makefile.PL - From this release on, we'll try to maintain a list of conflicting modules, and warn you if you have one installed. For example, this release conflicts with ... - MooseX::Singleton <= 0.11 - MooseX::Params::Validate <= 0.05 - Fey::ORM <= 0.10 In general, we try to not break backwards compatibility for most Moose users, but MooseX modules and other code which extends Moose's metaclasses is often affected by very small changes in the Moose internals. - Moose::Meta::Method::Delegation - Moose::Meta::Attribute - Delegation methods now have their own method class. (Dave Rolsky) - Moose::Meta::TypeConstraint::Parameterizable - Added a new method 'parameterize' which is basically a factory for the containing constraint. This makes it easier to create new types of parameterized constraints. (jnapiorkowski) - Moose::Meta::TypeConstraint::Union - Changed the way Union types canonicalize their names to follow the normalized TC naming rules, which means we strip all whitespace. (jnapiorkowski) - Moose::Util::TypeConstraints - Parameter and Union args are now sorted, this makes Int|Str the same constraint as Str|Int. (jnapiorkowski) - Changes to the way Union types are parsed to more correctly stringify their names. (jnapiorkowski) - When creating a parameterized type, we now use the new parameterize method. (jnapiorkowski) - Incoming type constraint strings are now normalized to remove all whitespace differences. (jnapiorkowski) - Changed the way we parse type constraint strings so that we now match TC[Int,Int,...] and TC[name=>Str] as parameterized type constraints. This lays the foundation for more flexible type constraint implementations. - Tests and docs for all the above. (jnapiorkowski) - Moose::Exporter - Moose - Moose::Exporter will no longer remove a subroutine that the exporting package re-exports. Moose re-exports the Carp::confess function, among others. The reasoning is that we cannot know whether you have also explicitly imported those functions for your own use, so we err on the safe side and always keep them. (Dave Rolsky) - added tests for this (rafl) - Moose::Meta::Class - Changes to how we fix metaclass compatibility that are much too complicated to go into. The summary is that Moose is much less likely to complain about metaclass incompatibility now. In particular, if two metaclasses differ because Moose::Util::MetaRole was used on the two corresponding classes, then the difference in roles is reconciled for the subclass's metaclass. (Dave Rolsky) - Squashed an warning in _process_attribute (thepler) - Moose::Meta::Role - throw exceptions (sooner) for invalid attribute names (thepler) - added tests for this (thepler) - Moose::Util::MetaRole - If you explicitly set a constructor or destructor class for a metaclass object, and then applied roles to the metaclass, that explicitly set class would be lost and replaced with the default. - Moose::Meta::Class - Moose::Meta::Attribute - Moose::Meta::Method - Moose - Moose::Object - Moose::Error::Default - Moose::Error::Croak - Moose::Error::Confess - All instances of confess() changed to use overridable C method. This method ultimately calls a class constructor, and you can change the class being called. In addition, errors now pass more information than just a string. The default C behaves like C, so the behavior is not visibly different for end users. 0.57 2008-09-03 - Moose::Intro - A new bit of doc intended to introduce folks familiar with "standard" Perl 5 OO to Moose concepts. (Dave Rolsky) - Moose::Unsweetened - Shows examples of two classes, each done first with and then without Moose. This makes a nice parallel to Moose::Intro. (Dave Rolsky) - Moose::Util::TypeConstraints - Fixed a bug in find_or_parse_type_constraint so that it accepts a Moose::Meta::TypeConstraint object as the parent type, not just a name (jnapiorkowski) - added tests (jnapiorkowski) - Moose::Exporter - If Sub::Name was not present, unimporting failed to actually remove some sugar subs, causing test failures (Dave Rolsky) 0.56 2008-09-01 For those not following the series of dev releases, there are several major changes in this release of Moose. ! Moose::init_meta should now be called as a method. See the docs for details. - Major performance improvements by nothingmuch. - New modules for extension writers, Moose::Exporter and Moose::Util::MetaRole by Dave Rolsky. - Lots of doc improvements and additions, especially in the cookbook sections. - Various bug fixes. - Removed all references to the experimental-but-no-longer-needed Moose::Meta::Role::Application::ToMetaclassInstance. - Require Class::MOP 0.65. 0.55_04 2008-08-30 - Moose::Util::MetaRole - Moose::Cookbook::Extending::Recipe2 - This simplifies the application of roles to any meta class, as well as the base object class. Reimplemented metaclass traits using this module. (Dave Rolsky) - Moose::Cookbook::Extending::Recipe1 - This a new recipe, an overview of various ways to write Moose extensions (Dave Rolsky) - Moose::Cookbook::Extending::Recipe3 - Moose::Cookbook::Extending::Recipe4 - These used to be Extending::Recipe1 and Extending::Recipe2, respectively. 0.55_03 2008-08-29 - No changes from 0.55_02 except increasing the Class::MOP dependency to 0.64_07. 0.55_02 2008-08-29 - Makefile.PL and Moose.pm - explicitly require Perl 5.8.0+ (Dave Rolsky) - Moose::Util::TypeConstraints - Fix warnings from find_type_constraint if the type is not found (t0m). - Moose::Meta::TypeConstraint - Predicate methods (equals/is_a_type_of/is_subtype_of) now return false if the type you specify cannot be found in the type registry, rather than throwing an unhelpful and coincidental exception. (t0m). - added docs & test for this (t0m) - Moose::Meta::TypeConstraint::Registry - add_type_constraint now throws an exception if a parameter is not supplied (t0m). - added docs & test for this (t0m) - Moose::Cookbook::FAQ - Added a faq entry on the difference between "role" and "trait" (t0m) - Moose::Meta::Role - Fixed a bug that caused role composition to not see a required method when that method was provided by another role being composed at the same time. (Dave Rolsky) - test and bug finding (tokuhirom) 0.55_01 2008-08-20 !! Calling Moose::init_meta as a function is now !! !! deprecated. Please see the Moose.pm docs for details. !! - Moose::Meta::Method::Constructor - Fix inlined constructor so that values produced by default or builder methods are coerced as required. (t0m) - added test for this (t0m) - Moose::Meta::Attribute - A lazy attribute with a default or builder did not attempt to coerce the default value. The immutable code _did_ coerce. (t0m) - added test for this (t0m) - Moose::Exporter - This is a new helper module for writing "Moose-alike" modules. This should make the lives of MooseX module authors much easier. (Dave Rolsky) - Moose - Moose::Cookbook::Meta::Recipe5 - Implemented metaclass traits (and wrote a recipe for it): use Moose -traits => 'Foo' This should make writing small Moose extensions a little easier (Dave Rolsky) - Moose::Cookbook::Basics::Recipe1 - Removed any examples of direct hashref access, and applied an editorial axe to reduce verbosity. (Dave Rolsky) - Moose::Cookbook::Basics::Recipe1 - Also applied an editorial axe here. (Dave Rolsky) - Moose - Moose::Cookbook::Extending::Recipe1 - Moose::Cookbook::Extending::Recipe2 - Rewrote extending and embedding moose documentation and recipes to use Moose::Exporter (Dave Rolsky) - Moose - Moose::Role - These two modules now warn when you load them from the main package "main" package, because we will not export sugar to main. Previously it just did nothing. (Dave Rolsky) - Moose::Role - Now provide an init_meta method just like Moose.pm, and you can call this to provide an alternate role metaclass. (Dave Rolsky and nothingmuch) - get_method_map now respects the package cache flag (nothingmuch) - Moose::Meta::Role - Two new methods - add_method and wrap_method_body (nothingmuch) - many modules - Optimizations including allowing constructors to accept hash refs, making many more classes immutable, and making constructors immutable. (nothingmuch) 0.55 2008-08-03 - Moose::Meta::Attribute - breaking down the way 'handles' methods are created so that the process can be more easily overridden by subclasses (stevan) - Moose::Meta::TypeConstraint - fixing what is passed into a ->message with the type constraints (RT #37569) - added tests for this (Charles Alderman) - Moose::Util::TypeConstraints - fix coerce to accept anon types like subtype can (mst) - Moose::Cookbook - reorganized the recipes into sections - Basics, Roles, Meta, Extending - and wrote abstracts for each section (Dave Rolsky) - Moose::Cookbook::Basics::Recipe10 - A new recipe that demonstrates operator overloading in combination with Moose. (bluefeet) - Moose::Cookbook::Meta::Recipe1 - an introduction to what meta is and why you'd want to make your own metaclass extensions (Dave Rolsky) - Moose::Cookbook::Meta::Recipe4 - a very simple metaclass example (Dave Rolsky) - Moose::Cookbook::Extending::Recipe1 - how to write a Moose-alike module to use your own object base class (Dave Rolsky) - Moose::Cookbook::Extending::Recipe2 - how to write modules with an API just like C (Dave Rolsky) - all documentation - Tons of fixes, both syntactical and grammatical (Dave Rolsky, Paul Fenwick) 0.54 2008-07-03 ... this is not my day today ... - Moose::Meta::Attribute - fixed legal_options_for_inheritance such that clone_and_inherit options still works for Class::MOP::Attribute objects and therefore does not break MooseX::AttributeHelpers (stevan) 0.53 2008-07-03 - Whoops, I guess I should run 'make manifest' before actually releasing the module. No actual changes in this release, except the fact that it includes the changes that I didn't include in the last release. (stevan--) 0.52 2008-07-03 - Moose - added "FEATURE REQUESTS" section to the Moose docs to properly direct people (stevan) (RT #34333) - making 'extends' croak if it is passed a Role since this is not ever something you want to do (fixed by stevan, found by obra) - added tests for this (stevan) - Moose::Object - adding support for DOES (as in UNIVERSAL::DOES) (nothingmuch) - added test for this - Moose::Meta::Attribute - added legal_options_for_inheritance (wreis) - added tests for this (wreis) - Moose::Cookbook::Snacks::* - removed some of the unfinished snacks that should not have been released yet. Added some more examples to the 'Keywords' snack. (stevan) - Moose::Cookbook::Style - added general Moose "style guide" of sorts to the cookbook (nothingmuch) (RT #34335) - t/ - added more BUILDARGS tests (stevan) 0.51 2008-06-26 - Moose::Role - add unimport so "no Moose::Role" actually does something (sartak) - Moose::Meta::Role::Application::ToRole - when RoleA did RoleB, and RoleA aliased a method from RoleB in order to provide its own implementation, that method still got added to the list of required methods for consumers of RoleB. Now an aliased method is only added to the list of required methods if the role doing the aliasing does not provide its own implementation. See Recipe 11 for an example of all this. (Dave Rolsky) - added tests for this - Moose::Meta::Method::Constructor - when a single argument that wasn't a hashref was provided to an immutabilized constructor, the error message was very unhelpful, as opposed to the non-immutable error. Reported by dew. (Dave Rolsky) - added test for this (Dave Rolsky) - Moose::Meta::Attribute - added support for meta_attr->does("ShortAlias") (sartak) - added tests for this (sartak) - moved the bulk of the `handles` handling to the new install_delegation method (Stevan) - Moose::Object - Added BUILDARGS, a new step in new() - Moose::Meta::Role::Application::RoleSummation - fix typos no one ever sees (sartak) - Moose::Util::TypeConstraints - Moose::Meta::TypeConstraint - Moose::Meta::TypeCoercion - Attempt to work around the ??{ } vs. threads issue (not yet fixed) - Some null_constraint optimizations 0.50 2008-06-12 - Fixed a version number issue by bumping all modules to 0.50. 0.49 2008-06-12 !! This version now approx. 20-25% !! !! faster with new Class::MOP 0.59 !! - Moose::Meta::Attribute - fixed how the is => (ro|rw) works with custom defined reader, writer and accessor options. - added docs for this (TODO). - added tests for this (Thanks to Penfold) - added the custom attribute alias for regular Moose attributes which is "Moose" - fix builder and default both being used (groditi) - Moose Moose::Meta::Class Moose::Meta::Attribute Moose::Meta::Role Moose::Meta::Role::Composite Moose::Util::TypeConstraints - switched usage of reftype to ref because it is much faster - Moose::Meta::Role - changing add_package_symbol to use the new HASH ref form - Moose::Object - fixed how DEMOLISHALL is called so that it can be overrided in subclasses (thanks to Sartak) - added test for this (thanks to Sartak) - Moose::Util::TypeConstraints - move the ClassName type check code to Class::MOP::is_class_loaded (thanks to Sartak) - Moose::Cookbook::Recipe11 - add tests for this (thanks to tokuhirom) 0.48 2008-05-29 (early morning release engineering)-- - fixing the version in Moose::Meta::Method::Destructor which was causing the indexer to choke 0.47 2008-05-29 (late night release engineering)-- - fixing the version is META.yml, no functional changes in this release 0.46 2008-05-28 !! This version now approx. 20-25% !! !! faster with new Class::MOP 0.57 !! - Moose::Meta::Class - some optimizations of the &initialize method since it is called so often by &meta - Moose::Meta::Class Moose::Meta::Role - now use the get_all_package_symbols from the updated Class::MOP, test suite is now 10 seconds faster - Moose::Meta::Method::Destructor - is_needed can now also be called as a class method for immutablization to check if the destructor object even needs to be created at all - Moose::Meta::Method::Destructor Moose::Meta::Method::Constructor - added more descriptive error message to help keep people from wasting time tracking an error that is easily fixed by upgrading. 0.45 2008-05-24 - Moose - Because of work in Class::MOP 0.57, all XS based functionality is now optional and a Pure Perl version is supplied - the CLASS_MOP_NO_XS environment variable can now be used to force non-XS versions to always be used - several of the packages have been tweaked to take care of this, mostly we added support for the package_name and name variables in all the Method metaclasses - before/around/after method modifiers now support regexp matching of names (thanks to Takatoshi Kitano) - tests added for this - NOTE: this only works for classes, it is currently not supported in roles, but, ... patches welcome - All usage of Carp::confess have been replaced by Carp::croak in the "keyword" functions since the stack trace is usually not helpful - Moose::Role - All usage of Carp::confess have been replaced by Carp::croak in the "keyword" functions since the stack trace is usually not helpful - The 'has' keyword for roles now accepts the same array ref form that Moose.pm does (has [qw/foo bar/] => (is => 'rw', ...)) - added test for this - Moose::Meta::Attribute - trigger on a ro-attribute is no longer an error, as it's useful to trigger off of the constructor - Moose::Meta::Class - added same 'add_package_symbol' fix as in Class::MOP 0.57 - Moose::Util - does_role now handles non-Moose classes more gracefully - added tests for this - added the 'add_method_modifier' function (thanks to Takatoshi Kitano) - Moose::Util::TypeConstraints - subtypes of parameterizable types now are themselves parameterizable types - Moose::Meta::Method::Constructor - fixed bug where trigger was not being called by the inlined immutable constructors - added test for this (thanks to Caelum) - Moose::Meta::Role::Application::ToInstance - now uses the metaclass of the instance (if possible) to create the anon-class (thanks Jonathan Rockway) - Moose::Cookbook::Recipe22 - added the meta-attribute trait recipe (thanks to Sartak) - t/ - fixed hash-ordering test bug that was causing occasional cpantester failures - renamed the t/000_recipe/*.t tests to be more descriptive (thanks to Sartak) 0.44 2008-05-10 - Moose - made make_immutable warning cluck to show where the error is (thanks mst) - Moose::Object - BUILDALL and DEMOLISHALL now call ->body when looping through the methods, to avoid the overloaded method call. - fixed issue where DEMOLISHALL was eating the $@ values, and so not working correctly, it still kind of eats them, but so does vanilla perl - added tests for this - Moose::Cookbook::Recipe7 - added new recipe for immutable functionality (thanks Dave Rolsky) - Moose::Cookbook::Recipe9 - added new recipe for builder and lazy_build (thanks Dave Rolsky) - Moose::Cookbook::Recipe11 - added new recipe for method aliasing and exclusion with Roles (thanks Dave Rolsky) - t/ - fixed Win32 test failure (thanks spicyjack) ~ removed Build.PL and Module::Build compat since Module::Install has done that. 0.43 2008-04-30 - NOTE TO SELF: drink more coffee before doing release engineering - whoops, forgot to do the smolder tests, and we broke some of the custom meta-attr modules. This fixes that. 0.42 2008-04-28 - some bad tests slipped by, nothing else changed in this release (cpantesters++) - upped the Class::MOP dependency to 0.55 since we have tests which need the C3 support 0.41 2008-04-28 ~~ numerous documentation updates ~~ - Changed all usage of die to Carp::croak for better error reporting (initial patch by Tod Hagan) ** IMPORTANT NOTE ** - the make_immutable keyword is now deprecated, don't use it in any new code and please fix your old code as well. There will be 2 releases, and then it will be removed. - Moose Moose::Role Moose::Meta::Class - refactored the way inner and super work to avoid any method/@ISA cache penalty (nothingmuch) - Moose::Meta::Class - fixing &new_object to make sure trigger gets the coerced value (spotted by Charles Alderman on the mailing list) - added test for this - Moose::Meta::Method::Constructor - immutable classes which had non-lazy attributes were calling the default generating sub twice in the constructor. (bug found by Jesse Luehrs, fixed by Dave Rolsky) - added tests for this (Dave Rolsky) - fix typo in initialize_body method (nothingmuch) - Moose::Meta::Method::Destructor - fix typo in initialize_body method (nothingmuch) - Moose::Meta::Method::Overriden Moose::Meta::Method::Augmented - moved the logic for these into their own classes (nothingmuch) - Moose::Meta::Attribute - inherited attributes may now be extended without restriction on the type ('isa', 'does') (Sartak) - added tests for this (Sartak) - when an attribute property is malformed (such as lazy without a default), give the name of the attribute in the error message (Sartak) - added the &applied_traits and &has_applied_traits methods to allow introspection of traits - added tests for this - moved 'trait' and 'metaclass' argument handling to here from Moose::Meta::Class - clone_and_inherit_options now handles 'trait' and 'metaclass' (has '+foo' syntax) (nothingmuch) - added tests for this (t0m) - Moose::Object - localize $@ inside DEMOLISHALL to avoid it eating $@ (found by Ernesto) - added test for this (thanks to Ernesto) - Moose::Util::TypeConstraints - &find_type_constraint now DWIMs when given an type constraint object or name (nothingmuch) - &find_or_create_type_constraint superseded with a number of more specific functions: - find_or_create_{isa,does}_type_constraint - find_or_parse_type_constraint - Moose::Meta::TypeConstraint Moose::Meta::TypeConstraint::Class Moose::Meta::TypeConstraint::Role Moose::Meta::TypeConstraint::Enum Moose::Meta::TypeConstraint::Union Moose::Meta::TypeConstraint::Parameterized - added the &equals method for comparing two type constraints (nothingmuch) - added tests for this (nothingmuch) - Moose::Meta::TypeConstraint - add the &parents method, which is just an alias to &parent. Useful for polymorphism with TC::{Class,Role,Union} (nothingmuch) - Moose::Meta::TypeConstraint::Class - added the class attribute for introspection purposes (nothingmuch) - added tests for this - Moose::Meta::TypeConstraint::Enum Moose::Meta::TypeConstraint::Role - broke these out into their own classes (nothingmuch) - Moose::Cookbook::Recipe* - fixed references to test file locations in the POD and updated up some text for new Moose features (Sartak) - Moose::Util - Added &resolve_metaclass_alias, a helper function for finding an actual class for a short name (e.g. in the traits list) 0.40 2008-03-14 - I hate Pod::Coverage 0.39 2008-03-14 - Moose - documenting the use of '+name' with attributes that come from recently composed roles. It makes sense, people are using it, and so why not just officially support it. - fixing the 'extends' keyword so that it will not trigger Ovid's bug (http://use.perl.org/~Ovid/journal/35763) - oose - added the perl -Moose=+Class::Name feature to allow monkeypatching of classes in one liners - Moose::Util - fixing the 'apply_all_roles' keyword so that it will not trigger Ovid's bug (http://use.perl.org/~Ovid/journal/35763) - Moose::Meta::Class - added ->create method which now supports roles (thanks to jrockway) - added tests for this - added ->create_anon_class which now supports roles and caching of the results (thanks to jrockway) - added tests for this - made ->does_role a little more forgiving when it is checking a Class::MOP era metaclasses. - Moose::Meta::Role::Application::ToInstance - it is now possible to pass extra params to be used when a role is applied to an the instance (rebless_params) - added tests for this - Moose::Util::TypeConstraints - class_type now accepts an optional second argument for a custom message. POD anotated accordingly (groditi) - added tests for this - it is now possible to make anon-enums by passing 'enum' an ARRAY ref instead of the $name => @values. Everything else works as before. - added tests for this - t/ - making test for using '+name' on attributes consumed from a role, it works and makes sense too. - Moose::Meta::Attribute - fix handles so that it doesn't return nothing when the method cannot be found, not sure why it ever did this originally, this means we now have slightly better support for AUTOLOADed objects - added more delegation tests - adding ->does method to this so as to better support traits and their introspection. - added tests for this - Moose::Object - localizing the Data::Dumper configurations so that it does not pollute others (RT #33509) - made ->does a little more forgiving when it is passed Class::MOP era metaclasses. 0.38 2008-02-15 - Moose::Meta::Attribute - fixed initializer to correctly do type checking and coercion in the callback - added tests for this - t/ - fixed some finicky tests (thanks to konobi) 0.37 2008-02-14 - Moose - fixed some details in Moose::init_meta and its superclass handling (thanks thepler) - added tests for this (thanks thepler) - 'has' now dies if you don't pass in name value pairs - added the 'make_immutable' keyword as a shortcut to make_immutable - Moose::Meta::Class Moose::Meta::Method::Constructor Moose::Meta::Attribute - making (init_arg => undef) work here too (thanks to nothingmuch) - Moose::Meta::Attribute Moose::Meta::Method::Constructor Moose::Meta::Method::Accessor - make lazy attributes respect attr initializers (rjbs) - added tests for this - Moose::Util::TypeConstraints Moose::Util::TypeConstraints::OptimizedConstraints Moose::Meta::TypeConstraints Moose::Meta::Attribute Moose::Meta::Method::Constructor Moose::Meta::Method::Accessor - making type errors use the assigned message (thanks to Sartak) - added tests for this - Moose::Meta::Method::Destructor - making sure DESTROY gets inlined properly with successive DEMOLISH calls (thanks to manito) - Moose::Meta::Attribute Moose::Meta::Method::Accessor - fixed handling of undef with type constraints (thanks to Ernesto) - added tests for this - Moose::Util - added &get_all_init_args and &get_all_attribute_values (thanks to Sartak and nothingmuch) 0.36 2008-01-26 - Moose::Role Moose::Meta::Attribute - role type tests now support when roles are applied to non-Moose classes (found by ash) - added tests for this (thanks to ash) - couple extra tests to boost code coverage - Moose::Meta::Method::Constructor - improved fix for handling Class::MOP attributes - added test for this - Moose::Meta::Class - handled the add_attribute($attribute_meta_object) case correctly - added test for this 0.35 2008-01-22 - Moose::Meta::Method::Constructor - fix to make sure even Class::MOP attributes are handled correctly (Thanks to Dave Rolsky) - added test for this (also Dave Rolsky) - Moose::Meta::Class - improved error message on _apply_all_roles, you should now use Moose::Util::apply_all_roles and you shouldnt have been using a _ prefixed method in the first place ;) 0.34 2008-01-21 ~~~ more misc. doc. fixes ~~~ ~~ updated copyright dates ~~ Moose is now a postmodern object system :) - (see the POD for details) - <> - this release contains a major reworking and cleanup of the role system - 100% backwards compat. - Role application now restructured into seperate classes based on type of applicants - Role summation (combining of more than one role) is much cleaner and anon-classes are no longer used in this process - new Composite role metaclass - runtime application of roles to instances is now more efficient and re-uses generated classes when applicable - <> - methods can now be excluded from a given role during composition - methods can now be aliased to another name (and still retain the original as well) - Moose::Util::TypeConstraints::OptimizedConstraints - added this module (see above) - Moose::Meta::Class - fixed the &_process_attribute method to be called by &add_attribute, so that the API is now correct - Moose::Meta::Method::Accessor - fixed bug when passing a list of values to an accessor would get (incorrectly) ignored. Thanks to Sartak for finding this ;) - added tests for this (Sartak again) - Moose::Meta::Method::Accessor Moose::Meta::Method::Constructor Moose::Meta::Attribute Moose::Meta::TypeConstraint Moose::Meta::TypeCoercion - lots of cleanup of such things as: - generated methods - type constraint handling - error handling/messages (thanks to nothingmuch) - Moose::Meta::TypeConstraint::Parameterizable - added this module to support the refactor in Moose::Meta::TypeConstraint::Parameterized - Moose::Meta::TypeConstraint::Parameterized - refactored how these types are handled so they are more generic and not confined to ArrayRef and HashRef only - t/ - shortened some file names for better VMS support (RT #32381) 0.33 2007-12-14 !! Moose now loads 2 x faster !! !! with new Class::MOP 0.49 !! ++ new oose.pm module to make command line Moose-ness easier (see POD docs for more) - Moose::Meta::Class - Moose::Meta::Role - several tweaks to take advantage of the new method map caching in Class::MOP - Moose::Meta::TypeConstraint::Parameterized - allow subtypes of ArrayRef and HashRef to be used as a container (sartak) - added tests for this - basic support for coercion to ArrayRef and HashRef for containers (sartak) - added tests for this - Moose::Meta::TypeCoercion - coercions will now create subtypes as needed so you can now add coercions to parameterized types without having to explictly define them - added tests for this - Moose::Meta::Method::Accessor - allow subclasses to decide whether we need to copy the value into a new variable (sartak) 0.32 2007-12-04 - Moose::Util::TypeConstraints - fixing how subtype aliases of unions work they should inherit the parent's coercion - added tests for this - you can now define multiple coercions on a single type at different times instead of having to do it all in one place - added tests for this - Moose::Meta::TypeConstraint - there is now a default constraint of sub { 1 } instead of Moose::Util::TypeConstraints setting this for us - Moose::Meta::TypeCoercion - Moose::Meta::TypeCoercion::Union - added the &has_coercion_for_type and &add_type_coercions methods to support the new features above (although you cannot add more type coercions for Union types) 0.31 2007-11-26 - Moose::Meta::Attribute - made the +attr syntax handle extending types with parameters. So "has '+foo' => (isa => 'ArrayRef[Int]')" now works if the original foo is an ArrayRef. - added tests for this. - delegation now works even if the attribute does not have a reader method using the get_read_method_ref method from Class::MOP::Attribute. - added tests for this - added docs for this - Moose::Util::TypeConstraints - passing no "additional attribute info" to &find_or_create_type_constraint will no longer attempt to create an __ANON__ type for you, instead it will just return undef. - added docs for this 0.30 2007-11-23 - Moose::Meta::Method::Constructor -builder related bug in inlined constructor. (groditi) - Moose::Meta::Method::Accessor - genereate unnecessary calls to predicates and refactor code generation for runtime speed (groditi) - Moose::Util::TypeConstraints - fix ClassName constraint to introspect symbol table (mst) - added more tests for this (mst) - fixed it so that subtype 'Foo' => as 'HashRef[Int]' ... with work correctly. - added tests for this - Moose::Cookbook - adding the link to Recipie 11 (written by Sartak) - adding test for SYNOPSIS code - t/ - New tests for builder bug. Upon instantiation, if an attribute had a builder, no value and was not lazy the builder default was not getting run, oops. (groditi) 0.29 2007-11-13 - Moose::Meta::Attribute - Fix error message on missing builder method (groditi) - Moose::Meta::Method::Accessor - Fix error message on missing builder method (groditi) - t/ - Add test to check for the correct error message when builder method is missing (groditi) 0.28 2007-11-13 - 0.27 packaged incorrectly (groditi) 0.27 2007-11-13 - Moose::Meta::Attribute - Added support for the new builder option (groditi) - Added support for lazy_build option (groditi) - Changed slot initialization for predicate changes (groditi) - Moose::Meta::Method::Accessor - Added support for lazy_build option (groditi) - Fix inline methods to work with corrected predicate behavior (groditi) - Moose::Meta::Method::Constructor - Added support for lazy_build option (groditi) - t/ - tests for builder and lazy_build (groditi) - fixing some misc. bits in the docs that got mentioned on CPAN Forum & perlmonks - Moose::Meta::Role - fixed how required methods are handled when they encounter overriden or modified methods from a class (thanks to confound). - added tests for this - Moose::Util::TypeConstraint - fixed the type notation parser so that the | always creates a union and so is no longer a valid type char (thanks to konobi, mugwump and #moose for working this one out.) - added more tests for this 0.26 2007-09-27 == New Features == - Parameterized Types We now support parameterized collection types, such as: ArrayRef[Int] # array or integers HashRef[Object] # a hash with object values They can also be nested: ArrayRef[HashRef[RegexpRef]] # an array of hashes with regex values And work with the type unions as well: ArrayRef[Int | Str] # array of integers of strings - Better Framework Extendability Moose.pm is now "extendable" such that it is now much easier to extend the framework and add your own keywords and customizations. See the "EXTENDING AND EMBEDDING MOOSE" section of the Moose.pm docs. - Moose Snacks! In an effort to begin documenting some of the various details of Moose as well as some common idioms, we have created Moose::Cookbook::Snacks as a place to find small (easily digestable) nuggets of Moose code. ==== ~ Several doc updates/cleanup thanks to castaway ~ - converted build system to use Module::Install instead of Module::Build (thanks to jrockway) - Moose - added all the meta classes to the immutable list and set it to inline the accessors - fix import to allow Sub::Exporter like { into => } and { into_level => } (perigrin) - exposed and documented init_meta() to allow better embedding and extending of Moose (perigrin) - t/ - complete re-organization of the test suite - added some new tests as well - finally re-enabled the Moose::POOP test since the new version of DBM::Deep now works again (thanks rob) - Moose::Meta::Class - fixed very odd and very nasty recursion bug with inner/augment (mst) - added tests for this (eilara) - Moose::Meta::Attribute Moose::Meta::Method::Constructor Moose::Meta::Method::Accessor - fixed issue with overload::Overloaded getting called on non-blessed items. (RT #29269) - added tests for this - Moose::Meta::Method::Accessor - fixed issue with generated accessor code making assumptions about hash based classes (thanks to dexter) - Moose::Coookbook::Snacks - these are bits of documentation, not quite as big as Recipes but which have no clear place in the module docs. So they are Snacks! (horray for castaway++) - Moose::Cookbook::Recipe4 - updated it to use the new ArrayRef[MyType] construct - updated the accompanying test as well +++ Major Refactor of the Type Constraint system +++ +++ with new features added as well +++ - Moose::Util::TypeConstraint - no longer uses package variable to keep track of the type constraints, now uses the an instance of Moose::Meta::TypeConstraint::Registry to do it - added more sophisticated type notation parsing (thanks to mugwump) - added tests for this - Moose::Meta::TypeConstraint - some minor adjustments to make subclassing easier - added the package_defined_in attribute so that we can track where the type constraints are created - Moose::Meta::TypeConstraint::Union - this is now been refactored to be a subclass of Moose::Meta::TypeConstraint - Moose::Meta::TypeCoercion::Union - this has been added to service the newly refactored Moose::Meta::TypeConstraint::Union and is itself a subclass of Moose::Meta::TypeCoercion - Moose::Meta::TypeConstraint::Parameterized - added this module (taken from MooseX::AttributeHelpers) to help construct nested collection types - added tests for this - Moose::Meta::TypeConstraint::Registry - added this class to keep track of type constraints 0.25 2007-08-13 - Moose - Documentation update to reference Moose::Util::TypeConstraints under 'isa' in 'has' for how to define a new type (thanks to shlomif). - Moose::Meta::Attribute - required attributes now will no longer accept undef from the constructor, even if there is a default and lazy - added tests for this - default subroutines must return a value which passes the type constraint - added tests for this - Moose::Meta::Attribute - Moose::Meta::Method::Constructor - Moose::Meta::Method::Accessor - type-constraint tests now handle overloaded objects correctly in the error message - added tests for this (thanks to EvanCarroll) - Moose::Meta::TypeConstraint::Union - added (has_)hand_optimized_constraint to this class so that it behaves as the regular Moose::Meta::TypeConstraint does. - Moose::Meta::Role - large refactoring of this code - added several more tests - tests for subtle conflict resolition issues added, but not currently running (thanks to kolibre) - Moose::Cookbook::Recipe7 - added new recipe for augment/inner functionality (still in progress) - added test for this - Moose::Spec::Role - a formal definition of roles (still in progress) - Moose::Util - utilities for easier working with Moose classes - added tests for these - Test::Moose - This contains Moose specific test functions - added tests for these 0.24 2007-07-03 ~ Some doc updates/cleanup ~ - Moose::Meta::Attribute - added support for roles to be given as parameters to the 'handles' option. - added tests and docs for this - the has '+foo' attribute form now accepts changes to the lazy option, and the addition of a handles option (but not changing the handles option) - added tests and docs for this - Moose::Meta::Role - required methods are now fetched using find_method_by_name so that required methods can come from superclasses - adjusted tests for this 0.23 2007-06-18 - Moose::Meta::Method::Constructor - fix inlined constructor for hierarchy with multiple BUILD methods (mst) - Moose::Meta::Class - Modify make_immutable to work with the new Class::MOP immutable mechanism + POD + very basic test (groditi) - Moose::Meta::Attribute - Fix handles to use goto() so that caller() comes out properly on the other side (perigrin) 0.22 2007-05-31 - Moose::Util::TypeConstraints - fix for prototype undeclared issue when Moose::Util::TypeConstraints loaded before consumers (e.g. Moose::Meta::Attribute) by predeclaring prototypes for functions - added the ClassName type constraint, this checks for strings which will respond true to ->isa(UNIVERSAL). - added tests and docs for this - subtyping just in name now works correctly by making the default for where be { 1 } - added test for this - Moose::Meta::Method::Accessor - coerce and lazy now work together correctly, thanks to merlyn for finding this bug - tests added for this - fix reader presedence bug in Moose::Meta::Attribute + tests - Moose::Object - Foo->new(undef) now gets ignored, it is assumed you meant to pass a HASH-ref and missed. This produces better error messages then having it die cause undef is not a HASH. - added tests for this 0.21 2007-05-03 - Moose - added SUPER_SLOT and INNER_SLOT class hashes to support unimport - modified unimport to remove super and inner along with the rest - altered unimport tests to handle this - Moose::Role - altered super export to populate SUPER_SLOT - Moose::Meta::Class - altered augment and override modifier application to use *_SLOT - modified tests for these to unimport one test class each to test - Moose::Meta::Role - fixed issue where custom attribute metaclasses where not handled correctly in roles - added tests for this - Moose::Meta::Class - fixed issue where extending metaclasses with roles would blow up. Thanks to Aankhen`` for finding this insidious error, and it's solution. ~~ lots of spelling and grammer fixes in the docs, many many thanks to rlb3 and Aankhen for these :) 0.20 2007-04-06 >> I messed up the SKIP logic in one test so this release is just to fix that. - Moose - 'has' now also accepts an ARRAY ref to create multiple attrs (see docs) (thanks to konobi for this) - added tests and docs 0.19 2007-04-05 ~~ More documentation updates ~~ - Moose::Util::TypeConstraints - 'type' now supports messages as well thanks to phaylon for finding this - added tests for this - added &list_all_type_constraints and &list_all_builtin_type_constraints functions to facilitate introspection. - Moose::Meta::Attribute - fixed regexp 'handles' declarations to build the list of delegated methods correctly (and not override important things like &new) thanks to ashleyb for finding this - added tests and docs for this - added the 'documentation' attributes so that you can actually document your attributes and inspect them through the meta-object. - added tests and docs for this - Moose::Meta::Class - when loading custom attribute metaclasses it will first look in for the class in the Moose::Meta::Attribute::Custom::$name, and then default to just loading $name. - added tests and docs for this - Moose::Meta::TypeConstraint - type constraints now stringify to their names. - added test for this - misc. - added tests to assure we work with Module::Refresh - added stricter test skip logic in the Moose POOP test, ask Rob Kinyon why. - *cough* DBM::Deep 1.0 backwards compatibility sucks *cough* ;) 0.18 2007-03-10 ~~ Many, many documentation updates ~~ - misc. - We now use Class::MOP::load_class to load all classes. - added tests to show types and subtypes working with Declare::Constraints::Simple and Test::Deep as constraint engines. 0.18_001 2006-11-26 !! You must have Class::MOP 0.37_001 !! !! for this developer release to work !! This release was primarily adding the immutable feature to Moose. An immutable class is one which you promise not to alter. When you set the class as immutable it will perform various bits of memoization and inline certain part of the code (constructors, destructors and accessors). This minimizes (and in some cases totally eliminates) one of Moose's biggest performance hits. This feature is not on by default, and is 100% optional. It has several configurable bits as well, so you can pick and choose to your specific needs. The changes involved in this were fairly wide and highly specific, but 100% backwards compatible, so I am not going to enumerate them here. If you are truely interested in what was changed, please do a diff :) 0.17 2006-11-14 - Moose::Meta::Method::Accessor - bugfix for read-only accessors which are have a type constraint and lazy. Thanks to chansen for finding it. 0.16 2006-11-14 ++ NOTE ++ There are some speed improvements in this release, but they are only the begining, so stay tuned. - Moose::Object - BUILDALL and DEMOLISHALL no longer get called unless they actually need to be. This gave us a signifigant speed boost for the cases when there is no BUILD or DEMOLISH method present. - Moose::Util::TypeConstraints - Moose::Meta::TypeConstraint - added an 'optimize_as' option to the type constraint, which allows for a hand optimized version of the type constraint to be used when possible. - Any internally created type constraints now provide an optimized version as well. 0.15 2006-11-05 ++ NOTE ++ This version of Moose *must* have Class::MOP 0.36 in order to work correctly. A number of small internal tweaks have been made in order to be compatible with that release. - Moose::Util::TypeConstraints - added &unimport so that you can clean out your class namespace of these exported keywords - Moose::Meta::Class - fixed minor issue which occasionally comes up during global destruction (thanks omega) - moved Moose::Meta::Method::Overriden into its own file. - Moose::Meta::Role - moved Moose::Meta::Role::Method into its own file. - Moose::Meta::Attribute - changed how we do type checks so that we reduce the overall cost, but still retain correctness. *** API CHANGE *** - moved accessor generation methods to Moose::Meta::Method::Accessor to conform to the API changes from Class::MOP 0.36 - Moose::Meta::TypeConstraint - changed how constraints are compiled so that we do less recursion and more iteration. This makes the type check faster :) - moved Moose::Meta::TypeConstraint::Union into its own file - Moose::Meta::Method::Accessor - created this from methods formerly found in Moose::Meta::Attribute - Moose::Meta::Role::Method - moved this from Moose::Meta::Role - Moose::Meta::Method::Overriden - moved this from Moose::Meta::Class - Moose::Meta::TypeConstraint::Union - moved this from Moose::Meta::TypeConstraint 0.14 2006-10-09 - Moose::Meta::Attribute - fixed lazy attributes which were not getting checked with the type constraint (thanks ashley) - added tests for this - removed the over-enthusiastic DWIMery of the automatic ArrayRef and HashRef defaults, it broke predicates in an ugly way. - removed tests for this 0.13 2006-09-30 ++ NOTE ++ This version of Moose *must* have Class::MOP 0.35 in order to work correctly. A number of small internal tweaks have been made in order to be compatible with that release. - Moose - Removed the use of UNIVERSAL::require to be a better symbol table citizen and remove a dependency (thanks Adam Kennedy) **~~ removed experimental & undocumented feature ~~** - commented out the 'method' and 'self' keywords, see the comments for more info. - Moose::Cookbook - added a FAQ and WTF files to document frequently asked questions and common problems - Moose::Util::TypeConstraints - added GlobRef and FileHandle type constraint - added tests for this - Moose::Meta::Attribute - if your attribute 'isa' ArrayRef of HashRef, and you have not explicitly set a default, then make the default DWIM. This will also work for subtypes of ArrayRef and HashRef as well. - you can now auto-deref subtypes of ArrayRef or HashRef too. - new test added for this (thanks to ashley) - Moose::Meta::Role - added basic support for runtime role composition but this is still *highly experimental*, so feedback is much appreciated :) - added tests for this - Moose::Meta::TypeConstraint - the type constraint now handles the coercion process through delegation, this is to support the coercion of unions - Moose::Meta::TypeConstraint::Union - it is now possible for coercions to be performed on a type union - added tests for this (thanks to konobi) - Moose::Meta::TypeCoercion - properly capturing error when type constraint is not found - Build.PL - Scalar::Util 1.18 is bad on Win32, so temporarily only require version 1.17 for Win32 and cygwin. (thanks Adam Kennedy) 0.12 2006-09-01 - Moose::Cookbook - Recipe5 (subtypes & coercion) has been written - Moose - fixed "bad meta" error message to be more descriptive - fixed &unimport to not remove the &inner and &super keywords because we need to localize them. - fixed number of spelling/grammer issues, thanks Theory :) **~~ experimental & undocumented feature ~~** - added the method and self keywords, they are basically just sugar, and they may not stay around. - Moose::Object - added &dump method to easily Data::Dumper an object - Moose::Meta::TypeConstraint - added the &is_a_type_of method to check both the current and the subtype of a method (similar to &isa with classes) - Moose::Meta::Role - this is now a subclass of Class::MOP::Module, and no longer creates the _role_meta ugliness of before. - fixed tests to reflect this change 0.11 2006-07-12 - Moose - added an &unimport method to remove all the keywords that Moose will import, simply add 'no Moose' to the bottom of your class file. - t/ - fixed some test failures caused by a forgotten test dependency. 0.10 2006-07-06 - Moose - improved error message when loading modules so it is less confusing when you load a role. - added &calculate_all_roles method to Moose::Meta::Class and Moose::Meta::Role NOTE: This module has been tested against Class::MOP 0.30 but it does not yet utilize the optimizations it makes available. Stay tuned for that ;) 0.09_03 2006-06-23 ++ DEVELOPER RELEASE ++ - Moose - 'use strict' and 'use warnings' are no longer needed in Moose classes, Moose itself will turn them on for you. - added tests for this - moved code from exported subs to private methods in Moose::Meta::Class - Moose::Role - as with Moose, strict and warnings are automatically turned on for you. - added tests for this - Moose::Meta::Role - now handles an edge case for override errors - added tests for this - added some more edge case tests 0.09_02 2006-05-16 ++ DEVELOPER RELEASE ++ - Moose - added prototypes to the exported subs - updated docs - Moose::Role - added prototypes to the exported subs - updated docs - Moose::Util::TypeConstraints - cleaned up prototypes for the subs - updated docs 0.09_01 2006-05-12 ++ DEVELOPER RELEASE ++ - This release works in combination with Class::MOP 0.29_01, it is a developer release because it uses the a new instance sub-protocol and a fairly complete Role implementation. It has not yet been optimized, so it slower the the previous CPAN version. This release also lacks good updated docs, the official release will have updated docs. - Moose - refactored the keyword exports - 'with' now checks Role validaity and accepts more than one Role at a time - 'extends' makes metaclass adjustments as needed to ensure metaclass compatibility - Moose::Role - refactored the keyword exports - 'with' now checks Role validaity and accepts more than one Role at a time - Moose::Util::TypeConstraints - added the 'enum' keyword for simple string enumerations which can be used as type constraints - see example of usage in t/202_example.t - Moose::Object - more careful checking of params to new() - Moose::Meta::Role - much work done on the role composition - many new tests for conflict detection and composition edge cases - not enough documentation, I suggest looking at the tests - Moose::Meta::Instance - added new Instance metaclass to support the new Class::MOP instance protocol - Moose::Meta::Class - some small changes to support the new instance protocol - some small additions to support Roles - Moose::Meta::Attribute - some improvements to the accessor generation code by nothingmuch - some small changes to support the new instance protocol - (still somewhat) experimental delegation support with the 'handles' option - added several tests for this - no docs for this yet 0.05 2006-04-27 - Moose - keywords are now exported with Sub::Exporter thanks to chansen for this commit - has keyword now takes a 'metaclass' option to support custom attribute meta-classes on a per-attribute basis - added tests for this - the 'has' keyword not accepts inherited slot specifications (has '+foo'). This is still an experimental feature and probably not finished see t/038_attribute_inherited_slot_specs.t for more details, or ask about it on #moose - added tests for this - Moose::Role - keywords are now exported with Sub::Exporter - Moose::Utils::TypeConstraints - reorganized the type constraint hierarchy, thanks to nothingmuch and chansen for his help and advice on this - added some tests for this - keywords are now exported with Sub::Exporter thanks to chansen for this commit - Moose::Meta::Class - due to changes in Class::MOP, we had to change construct_instance (for the better) - Moose::Meta::Attribute - due to changes in Class::MOP, we had to add the initialize_instance_slot method (it's a good thing) - Moose::Meta::TypeConstraint - added type constraint unions - added tests for this - added the is_subtype_of predicate method - added tests for this 0.04 2006-04-16 - Moose::Role - Roles can now consume other roles - added tests for this - Roles can specify required methods now with the requires() keyword - added tests for this - Moose::Meta::Role - ripped out much of it's guts ,.. much cleaner now - added required methods and correct handling of them in apply() for both classes and roles - added tests for this - no longer adds a does() method to consuming classes it relys on the one in Moose::Object - added roles attribute and some methods to support roles consuming roles - Moose::Meta::Attribute - added support for triggers on attributes - added tests for this - added support for does option on an attribute - added tests for this - Moose::Meta::Class - added support for attribute triggers in the object construction - added tests for this - Moose - Moose no longer creates a subtype for your class if a subtype of the same name already exists, this should DWIM in 99.9999% of all cases - Moose::Util::TypeConstraints - fixed bug where incorrect subtype conflicts were being reported - added test for this - Moose::Object - this class can now be extended with 'use base' if you need it, it properly loads the metaclass class now - added test for this 0.03_02 2006-04-12 - Moose - you must now explictly use Moose::Util::TypeConstraints it no longer gets exported for you automatically - Moose::Object - new() now accepts hash-refs as well as key/value lists - added does() method to check for Roles - added tests for this - Moose::Meta::Class - added roles attribute along with the add_role() and does_role() methods - added tests for this - Moose::Meta::Role - now adds a does() method to consuming classes which tests the class's hierarchy for roles - added tests for this 0.03_01 2006-04-10 - Moose::Cookbook - added new Role recipe (no content yet, only code) - Moose - added 'with' keyword for Role support - added test and docs for this - fixed subtype quoting bug - added test for this - Moose::Role - Roles for Moose - added test and docs - Moose::Util::TypeConstraints - added the message keyword to add custom error messages to type constraints - Moose::Meta::Role - the meta role to support Moose::Role - added tests and docs - Moose::Meta::Class - moved a number of things from Moose.pm to here, they should have been here in the first place - Moose::Meta::Attribute - moved the attribute option macros here instead of putting them in Moose.pm - Moose::Meta::TypeConstraint - added the message attributes and the validate method - added tests and docs for this 0.03 2006-03-30 - Moose::Cookbook - added the Moose::Cookbook with 5 recipes, describing all the stuff Moose can do. - Moose - fixed an issue with &extends super class loading it now captures errors and deals with inline packages correctly (bug found by mst, solution stolen from alias) - added super/override & inner/augment features - added tests and docs for these - Moose::Object - BUILDALL now takes a reference of the %params that are passed to &new, and passes that to each BUILD as well. - Moose::Util::TypeConstraints - Type constraints now survive runtime reloading - added test for this - Moose::Meta::Class - fixed the way attribute defaults are handled during instance construction (bug found by chansen) - Moose::Meta::Attribute - read-only attributes now actually enforce their read-only-ness (this corrected in Class::MOP as well) 0.02 2006-03-21 - Moose - many more tests, fixing some bugs and edge cases - &extends now loads the base module with UNIVERSAL::require - added UNIVERSAL::require to the dependencies list ** API CHANGES ** - each new Moose class will also create and register a subtype of Object which correspond to the new Moose class. - the 'isa' option in &has now only accepts strings, and will DWIM in almost all cases - Moose::Util::TypeConstraints - added type coercion features - added tests for this - added support for this in attributes and instance construction ** API CHANGES ** - type construction no longer creates a function, it registers the type instead. - added several functions to get the registered types - Moose::Object - BUILDALL and DEMOLISHALL were broken because of a mis-named hash key, Whoops :) - Moose::Meta::Attribute - adding support for coercion in the autogenerated accessors - Moose::Meta::Class - adding support for coercion in the instance construction - Moose::Meta::TypeConstraint - Moose::Meta::TypeCoercion - type constraints and coercions are now full fledges meta-objects 0.01 2006-03-15 - Moooooooooooooooooose!!! Moose-2.1604/Changes.Class-MOP000644 000766 000024 00000173102 12617452415 016146 0ustar00etherstaff000000 000000 After 1.12, Class::MOP was merged into the Moose distribution, and is no longer released separately. 1.12 Mon, Jan 3, 2011 * Remove usage of undocumented Package::Stash APIs from the tests. This prevents the tests from failing on Package::Stash >= 0.18. 1.11 Sun, Oct 31, 2010 [ENHANCEMENTS] * Replace use of Test::Exception with Test::Fatal. (Karen Etheridge and Dave Rolsky) 1.10 Mon, Oct 18, 2010 [BUG FIXES] * Lots of fixes for edge cases with anon classes. (doy) 1.09 Tue, Oct 5, 2010 [ENHANCEMENTS] * It's now possible to tell Class::MOP::Class->create and the metaclass pragma to not install a 'meta' method into classes they manipulate, or to install one under a different name. (doy) * Reinitializing a metaclass no longer removes the existing method and attribute objects (it instead fixes them so they are correct for the reinitialized metaclass). (doy) * All 'meta' methods created by Class::MOP are now of the class Class::MOP::Method::Meta. This is overridable at the metaclass layer. (doy) [OTHER] * Use get_or_add_package_symbol when we intend for it to autovivify, in preparation for changes in Package::Stash. (doy) * We now use Module::Install::AuthorRequires to force authors to run all tests, just like we do for Moose. (sartak) 1.08 Mon, Sep 13, 2010 [BUG FIXES] * The get_method_list and _get_local_methods methods blew up in the face of subroutine stubs. (Goro Fuji) 1.07 Tue, Aug 25, 2010 [BUG FIXES] * Fix a mysterious error reported by Piers Cawley. The error showed up as "Can't use an undefined value as a symbol reference at /usr/local/lib/perl/5.10.1/Class/MOP/Mixin/HasMethods.pm line 167." (Dave Rolsky) 1.06 Sun, Aug 23, 2010 [BUG FIXES] * Version 1.05 no longer reported constants as methods, except with Perl 5.8.x, and doing so in 5.8.x caused test failures. Constants are now _expected_ to be reported as methods, and we explicitly test this. (Dave Rolsky) 1.05 Sun, Aug 22, 2010 [ENHANCEMENTS] * Refactorings and improvements to how defaults are handled, particularly for inlined code (doy). * Optimizations that should help speed up compilation time (Dave Rolsky). 1.04 Tue, Jul 25, 2010 [ENHANCEMENTS] * Class::MOP::Deprecated now uses Package::DeprecationManager internally. Deprecation warnings are now only issued once for each calling package, which cuts down on noise. When importing Class::MOP::Deprecated, the request API version should now be passed in the "-api_version" flag. However, the old "-compatible" flag will continue to work. (Dave Rolsky) 1.03 Sat, Jun 5, 2010 [ENHANCEMENTS] * Make CMOP::Package a thin wrapper around Package::Stash (doy). 1.02 Thu, May 20, 2010 [API CHANGES] * Packages and modules no longer have methods - this functionality was moved back up into Class::MOP::Class (doy). [ENHANCEMENTS] * Metaclass incompatibility checking now checks all metaclass types. (doy) * Class::MOP can now do simple metaclass incompatibility fixing: if your class's metaclass is a subclass of your parent class's metaclass, it will just use the parent class's metaclass directly. (doy) 1.01 Thu, May 6, 2010 [NEW FEATURES] * is_class_loaded, load_class and load_first_existing_class now allow specifying a minimum required version (Florian Ragwitz). [BUG FIXES] * The __INSTANCE__ parameter to Class::MOP::Class::new_object now enforces that the passed in reference is blessed into the correct class (by dying if it's not) (doy, jhallock). 1.00 Thu, Mar 25, 2010 [GRRR< FUCKING STEVAN@] * Re-release 0.99 as 1.00. 0.99 Thu, Mar 25, 2010 [DOCUMENTATION] * Fix typo in Class::MOP::Attribute (Franck Cuny). 0.98 Mon, Jan 18, 2010 [ENHANCEMENTS] * Added Class::MOP::Class->rebless_instance_back, which does the inverse of rebless_instance (doy, rafl). 0.97_01 Mon, Jan 4, 2010 [ENHANCEMENTS] * Internal refactorings to move shared behavior into new "mixin" classes. This made adding some new features to Moose much easier. (Dave Rolsky) 0.97 Fri, Dec 18, 2009 * No code changes, just packaging fixes to make this distro installable. 0.96 Fri, Dec 18, 2009 * tests - Fixed t/082_get_code_info.t so it passes with bleadperl. (Dave Rolsky) - Add XS & C files to no tabs check (Dave Rolsky) - Convert all tests to done_testing. (Florian Ragwitz) 0.95 Wed, Nov 19, 2009 * Class::MOP - Make is_class_loaded without any arguments fail loudly (Florian Ragwitz). - Make load_class throw more standard error messages when loading single modules (nothingmuch). * Class::MOP::Package - Stop add_method from behaving differently under the debugger (Florian Ragwitz). * Class::MOP::Class * Class::MOP::Package - Any method which takes a method name as an argument now allows names which are false (like "0"), but the name must be defined and not be an empty string. (Dave Rolsky) * Class::MOP::Class - Deprecated get_attribute_map as a public method. You can use a combination of get_attribute_list and get_attribute instead. (Dave Rolsky) 0.94 Tue, Sep 22, 2009 * Class::MOP::Attribute - Introduce set_raw_value and get_raw_value, side effect free variants of {get,set}_value. These don't do anything useful in Class::MOP but have different behavior that set_value and get_value for Moose attributes. (nothingmuch) 0.93 Tue, Sep 15, 2009 * Class::MOP - The load_class function just returns true, since it's return value was confusing (either a metaclass object or a class name). It either loads a class or dies trying. In the future, this may change to not return anything, since there's no point in checking its return value. Addresses RT #45883. (Dave Rolsky) * Class::MOP::Class::Trait::Immutable - When throwing an error because of an immutable method, include that method's name. Addresses RT #49680. (Shawn M Moore) * Class::MOP::Package - Adding the same sub reference to multiple packages failed to update the method map properly. RT #48985. Reported by Paul Mooney. (Dave Rolsky) - The get_method_map method is now private (and called as _full_method_map or _method_map). The public version is available as a deprecated method. (Dave Rolsky) 0.92_01 Thu, Sep 10, 2009 * Class::MOP::Package - Backwards compatibility tweaks to XS for 5.8.1. (Goro Fuji) * Class::MOP - Make sure XS code handles magical scalars correctly. (Goro Fuji) * Class::MOP::Class - Documented the immutable_options method, which is useful if you need to make a class mutable temporarily, and then nede to restore immutability. (Dave Rolsky) * Many modules - Deprecated features have been moved to their own module, Class::MOP::Deprecated, for easier deprecation management. (Goro Fuji) 0.92 Thu Aug 13, 2009 * Class::MOP::Class * Class::MOP::Package - Move get_method_map and its various scaffolding into Package. (hdp) * Class::MOP::Method - Allow Class::MOP::Method->wrap to take a Class::MOP::Method object as the first argument, rather than just a coderef. (doy) * Class::MOP::Attribute * Class::MOP::Class - Allow attribute names to be false (while still requiring them to be defined). (rafl) 0.91 Wed Jul 29, 2009 * Class::MOP::Method::Wrapped - Fixing variable usage issues with the patch from previous version, not properly using lexicals in the for loops. (stevan) 0.90 Tue Jul 21, 2009 Japan Perl Association has sponsored Goro Fuji to improve startup performance of Class::MOP and Moose. These enhancements may break backwards compatibility if you're doing (or using) complex metaprogramming, so, as always, test your code! http://blog.perlassociation.org/2009/07/jpa-sponsors-moose-class-mop-work.html * Class::MOP::Class * XS - Anonymous classes were not completely destroyed when they went out of scope, leading to a memory leak. RT #47480. (Goro Fuji). * Class::MOP::Class - The get_method, has_method, and add_method methods no longer use get_method_map. Method objects are instantiated lazily. This significantly improves Class::MOP's load time. (Goro Fuji) * All classes - Inline fewer metaclass-level constructors since the ones we have are perfectly fine. This reduces the number of string evals. (Goro Fuji) * Class::MOP::Method::Wrapped - If a method modifier set $_, this caused the modifier to blow up, because of some weird internals. (Jeremy Stashewsky) 0.89 Fri Jul 3, 2009 * Class::MOP::Class * Class::MOP::Class::Immutable::Trait - Made the Trait act like a role with a bunch of "around" modifiers, rather than sticking it in the inheritance hierarchy. This fixes various problems that caused with metaclass compatibility, which broke Fey::ORM. * Class::MOP::Method - Allow a blessed code reference as the method body. Fixes a problem interaction with MooseX::Types. (ash) * Class::MOP::Instance - add inline version of rebless_instance_structure. (doy) - change inline_slot_access to use single quotes (gphat) 0.88 Tue, Jun 23, 2009 * Class::MOP::Class - Moved the __INSTANCE__ parameter to _construct_instance from Moose to here. (doy) - Fixed some issues involving metaclasses of metaclasses and immutability. (doy) 0.87 Sun, Jun 21, 2009 * Various - Made sure to always local-ize $@ and $SIG{__DIE__} before calling an eval. Fixes RT #45973. * Class::MOP::Class - Synced docs about immutability with the current reality (which changed back in 0.82_01) - Removed the immutable_transformer method, which had been returning undef since 0.82_01 anyway. * Tests - Got rid of tests which needed Moose and improved testing of constructor/destructor inlining warnings. Fixes RT #47119. 0.86 Tue, Jun 16, 2009 * Class::MOP::Class - If you redefined a subroutine at runtime and then wrapped it with a method modifier, the modifier could in some cases wrap the original version of the subroutine. Fixes RT #46957. * Class::MOP::Class - make_immutable issues a warning instead of overriding an existing DESTROY method (Dylan William Hardison). Fixes RT #46854. 0.85 Sat, Jun 6, 2009 * Class::MOP::Attribute - Allow default values to be Class::MOP::Methods. (Florian Ragwitz) - Test the above. (Rhesa Rozendaal) - Tweak original commit so the intent matches the accepted behavior (Nicholas Perez) * Class::MOP - Localize $SIG{__DIE__} inside _try_load_one_class (Sartak) * Class::MOP::Class - Add direct_subclasses method (Sartak) - Tests for subclasses and direct_subclasses (Sartak) - subname is no longer used unconditionally in add_method, but only if the code reference's name is '__ANON__' (nothingmuch) - Add a hook for _superclasses_updated (Sartak) * Class::MOP::Method - Remove long, old warning about possibly outdated modules (Sartak) 0.84 Tue, May 12, 2009 * Makefile.PL - Depend on Text::Exception 0.27 to avoid failing tests ond old versions (rafl) * Class::MOP - Made is_class_loaded a little stricter. It was reporting that a class was loaded if it merely had an @ISA variable in its stash. Now it checks that the @ISA var has elements in it. - Deprecate in_global_destruction and subname re-exporting (perigrin & Sartak) * Class::MOP::Class - Explicitly use Devel::GlobalDestruction and Sub::Name (perigrin) * Class::MOP::Package - Disable prototype mismatch warnings for add_package_symbol. (Florian Ragwitz) * Tests - Add test for finding methods from $meta->name->meta before immutable, (t0m) 0.83 Mon, April 27, 2009 * Class::MOP::Class - Fix segfault when calling get_method_map on a metaclass for an empty package (doy) 0.82_02 Fri, April 24, 2009 * Class::MOP::Method::Inlined - Don't inline if the expected method is not defined at all (happens with e.g. Moose::Object::_new is the expected method due to an overridden name) * Tests - Some tests were trying to load Class::MOP::Immutable, which was removed in 0.82_01. 0.82_01 Thu, April 23, 2009 * Class::MOP::Immutable (and others) - Refactor the immutability system to use a pre-defined class for the immutable metaclass of Class::MOP::Class::Immutable::$class - Rather than generating methods into this class every time, use a Trait (basic mixin) to supply the cached methods - Remove the hack that returns the mutable metaclass for metacircularity in order to provide consistent meta-metaclasses for the Moose compatibility handling code (mst broke it, nothingmuch fixed it) 0.82 Mon, April 20, 2009 * Various - The deprecation wrappers for some renamed methods were not passing arguments to the new method. (nothingmuch) * Class::MOP::Immutable - Warn during immutablization if the local class provides its own constructor, to parallel the warning in Moose when a superclass provides its own constructor (doy) 0.81 Tue, April 7, 2009 * Class::MOP * Class::MOP::Class * Class::MOP::Instance * Class::MOP::Attribute * Class::MOP::Method::Accessor * Class::MOP::Method::Constructor - Include stack traces in the deprecation warnings introduced in 0.80_01. (Florian Ragwitz) * MOP.xs - Avoid c compiler warnings by declaring some unused function arguments. (Florian Ragwitz) 0.80_01 Sun, April 5, 2009 * Makefile.PL - Make sure to preserve any compiler flags already defined in Config.pm. Patch by Vincent Pit. RT #44739. * Many methods have been renamed with a leading underscore, and a few have been deprecated entirely. The methods with a leading underscore are considered "internals only". People writing subclasses or extensions to Class::MOP should feel free to override them, but they are not for "public" use. - Class::MOP::Class - construct_class_instance => _construct_class_instance (use new_object) - construct_instance => _construct_instance (use new_object) - check_metaclass_compatibility => _check_metaclass_compatibility - create_meta_instance => _create_meta_instance (use get_meta_instance) - clone_instance => _clone_instance (use clone_object) - compute_all_applicable_methods is deprecated, use get_all_methods - compute_all_applicable_attributes is deprecated, use get_all_attributes - Class::MOP::Instance - bless_instance_structure is deprecated and will be removed in a future release - Class::MOP::Module - create has been renamed to _instantiate_module. This method does not construct an object, it evals some code that creates the relevant package in Perl's symbol table. - Class::MOP::Method::Accessor - initialize_body => _initialize_body (this is always called when an object is constructed) - /(generate_.*_method(?:_inline)?)/ => '_' . $1 - Class::MOP::Method::Constructor - initialize_body => _initialize_body (this is always called when an object is constructed) - /(generate_constructor_method(?:_inline)?)/ => '_' . $1 - attributes => _attributes - meta_instance => _meta_instance 0.80 Wed, April 1, 2009 * Class::MOP::* - Call user_class->meta in fewer places, with the eventual goal of allowing the user to rename or exclude ->meta altogether. Instead uses Class::MOP::class_of. (Sartak) * Class::MOP - New class_of function that should be used to retrieve a metaclass. This is unlike get_metaclass_by_name in that it accepts instances, not just class names. (Sartak) * Class::MOP - load_first_existing_class didn't actually load the first existing class; instead, it loaded the first existing and compiling class. It now throws an error if a class exists (in @INC) but fails to compile. (hdp) * Class::MOP * Class::MOP::Class - we had some semi-buggy code that purported to provide a HAS_ISAREV based on whether mro had get_isarev (due to an oversight, it always returned 1). Since mro and MRO::Compat have always had get_isarev, HAS_ISAREV was pointless. This insight simplified the subclasses method by deleting the pure-perl fallback. HAS_ISAREV is now deprecated. (Sartak) 0.79 Fri, March 29, 2009 * No changes from 0.78_02. 0.78_02 Thu, March 26, 2009 * Class::MOP::Class * Class::MOP::Immutable - A big backwards-incompatible refactoring of the Immutable API, and the make_immutable/make_mutable pieces of the Class API. The core __PACKAGE__->meta->make_immutable API remains the same, however, so this should only affect the most guts-digging code. * XS code - The XS code used a macro, XSPROTO, that's only in 5.10.x. This has been fixed to be backwards compatible with 5.8.x. * Class::MOP::Class - Add a hook for rebless_instance_away (Sartak) - Use blessed instead of ref to get an instance's class name in rebless_instance. (Sartak) 0.78_01 Wed, March 18, 2009 * Class::MOP::* - Revised and reorganized all of the API documentation. All classes now have (more or less) complete API documentation. * Class::MOP::Class * Class::MOP::Instance - Reblessing into a package that supports overloading wasn't properly adding overload magic to the object due to a bug in (at least) 5.8.8. We now use $_[1] directly which seems to set the magic properly. (Sartak) * Class::MOP::Attribute - The process_accessors method is now private. A public alias exists (and will stick around for a few releases), but it warns that calling the public method is deprecated. * Class::MOP::Method::Generated - Removed the new and _new methods, since this is an abstract base class, and all existing subclasses implement their own constructors. * MOP.xs - Stop is_class_loaded from thinking a class is loaded if it only has an empty GV (Florian Ragwitz). - Add a test for this (Yappo). - Refactor get_all_package_symbols to allow short-circuiting (Florian Ragwitz). - Use this in is_class_loaded (Florian Ragwitz). - Stop segfaulting when trying to get the name from a sub that's still being compiled (Florian Ragwitz). - Add tests for this (Florian Ragwitz). - Prefix all public symbols with "mop_" (Florian Ragwitz). - Clean up and simplify prehashing of hash keys (Florian Ragwitz). - Simplify creating simple xs reader methods (Florian Ragwitz). - Make everything compile with c++ compilers (Florian Ragwitz). - Upgrade ppport.h from 3.14 to 3.17 (Florian Ragwitz). * Tests - Remove optional test plans for tests depending on Sub::Name as we have a hard dependency on Sub::Name anyway (Florian Ragwitz). * Makefile.PL - Rebuild all c code if mop.h has changed (Florian Ragwitz) 0.78 Mon, February 23, 2009 * No changes from 0.77_01 0.77_01 Sun, February 22, 2009 * Everything - This package now requires its XS components. Not using Sub::Name lead to different behavior and bugginess in the pure Perl version of the code. A Moose test would fail when run against the pure Perl version of this code. * Class::MOP::Instance - The inline_* methods now quote attribute names themselves, and don't expect to receive a quoted value. 0.77 Sat, February 14, 2009 * MOP.xs - Avoid assertion errors on debugging perls in is_class_loaded (Florian Ragwitz) * Class::MOP - Fixed various corner cases where is_class_loaded incorrectly returned true for a class that wasn't really loaded. (Dave Rolsky) * Class::MOP::Class - Add get_all_method_names (Sartak) - Add a wrapped_method_metaclass attribute (Florian Ragwitz) * Class::MOP::Package - Disable deprecated get_all_package_symbols in list context. (Florian Ragwitz) * Makefile.PL - Make sure we generate a BSD-compatible Makefile (Florian Ragwitz) * Class::MOP::Class - The misspelled "check_metaclass_compatability" method we've kept around for backwards compat_i_bility will be removed in a near future release. You've been warned. 0.76 Thu, January 22, 2009 * Class::MOP::Method::Generated - Added new private methods to support code generation, which are being used by Moose and can be used by MooseX authors. (mst) - Generated methods are now generated with a #line directive reflecting the source of the generated method. (nothingmuch) * Class::MOP::Class - Clarified documentation of methods that return Class::MOP::Method objects. (doy) * Class::MOP - Clarified documentation of the metaclass cache methods. (Sartak) * Tests - Add test showing how the xs Class::MOP::is_class_loaded can be made to operate differently to the pure perl version (t0m) 0.75 Wed, December 31, 2008 * Class::MOP::Class - A class that was made immutable and then mutable could end up sharing an immutable transformer object (Class::MOP::Immutable) with other classes, leading to all sorts of odd bugs. Reported by t0m. (Dave Rolsky) 0.74 Tue, December 25, 2008 * MOP.xs - Add an xs implementation of Class::MOP::is_class_loaded (closes RT#41862). Based on a patch by Goro Fuji. (Florian Ragwitz) - Changed internals to make prehashing of hash keys easier and less error-prone. (Florian Ragwitz) * Class::MOP::Class - Fix documentation to show that around modifiers happen on both sides of the modified method. (Dave Rolsky) 0.73 Tue, December 16, 2008 * MOP.xs - Don't use Perl_mro_meta_init. It's not part of the public perl api. Fixes failures to build on Win32 (RT #41750). (Florian Ragwitz) * t/082_get_code_info.t - Add $^P &= ~0x200; (per Ovid's suggestion) in order to not munger anonymous subs when under -d and so making the tests succeed in that case. 0.72 Mon, December 8, 2008 * Class::MOP::Package - Pass options to _new, so subclass' attributes can be initialized (Sartak) * Class::MOP::Method - In the docs, indicate that package_name and name are required when calling ->wrap (Stefan O'Rear) 0.71_02 Fri, December 5, 2008 * Class::MOP::Immutable - Added a new attribute, inlined_constructor, which is true if the constructor was inlined. * Class::MOP::Package - Make get_all_package_symbols return a hash ref in scalar context and deprecate calling it in list context with a warning. (Florian Ragwitz) * MOP.xs - Various improvements and refactoring, making things more robust and easier to maintain. (Florian Ragwitz) 0.71_01 Wed, December 3, 2008 * Class::MOP::Method - Add an "execute" method to invoke the body so we can avoid using the coderef overload (Sartak) * Class::MOP::Immutable - When we memoize methods, get their results lazily to remove some compile-time cost (Sartak) - Small speedup from eliminating several method calls (Sartak) * Class::MOP::Class - Some small internal tweaks to try to reduce the number of times we call get_method_map when bootstrapping the MOP. This might make loading Class::MOP (and Moose) a little faster. (Dave Rolsky) - Implemented an optional XS version of get_method_map. Mostly taken from a patch by Goro Fuji (rt.cpan.org #41080), with help form Florian Ragwitz. (Dave Rolsky) - Make the behaviour of of get_all_package_symbols (and therefore get_method_map) consistent for stub methods. Report and test by Goro Fuji (rt.cpan.org #41255). (Florian Ragwitz) 0.71 Wed November 26, 2008 * Class::MOP::Class * Class::MOP::Module - Actual package creation has moved upward from Class to Module so that Moose roles can share the code (Sartak) 0.70_01 Mon, November 19, 2008 * Class::MOP - Fixes for failures with blead (Florian Ragwitz) - Silenced compiler warnings (Florian Ragwitz) 0.70 Fri, November 14, 2008 * Class::MOP - Fixed an odd corner case where the XS version of get_all_package_symbols could cause a segfault. This only happened with inlined constants in Perl 5.10.0 (Florian Ragwitz) 0.69 Fri, November 7, 2008 * Class::MOP::Method::Wrapped - Added introspection methods for method modifiers (Dave Rolsky) 0.68 Fri October 24, 2008 * Class::MOP - Make load_class require by file name instead of module name. This stops confusing error messages when loading '__PACKAGE__'. (Florian Ragwitz) - Add load_one_class_of function to enable you to load one of a list of classes, rather than having to call load_class multiple times in an eval. (t0m) 0.67 Tue October 14, 2008 * Class::MOP::Class - Call a method on the class after setting the superclass list so that we can get Perl to detect cycles before MRO::Compat spirals into an infinite loop (sartak) - Reported by Schwern, [rt.cpan.org #39001] - In create(), pass unused options on to initialize() - added test for this 0.66 Sat September 20, 2008 !! This release has an incompatible change regarding !! introspection of a class's method with Class::MOP::Class !! * Tests and XS - We (us maintainers) now run all tests with XS and then without XS, which should help us catch skew between the XS/pure Perl code. (Dave Rolsky) * Class::MOP::Class ! The alias_method method has been deprecated. It now simply calls add_method instead. There is no distinction between aliased methods and "real" methods. This means that methods added via alias_method now show up as part of the class's method list/map. This is a backwards incompatible change, but seems unlikely to break any code. Famous last words. (Dave Rolsky) * Class::MOP::Class - Fixed the spelling of "compatibility", but we still have a "check_metaclass_compatability" method for backwards compatibility. 0.65 Mon September 1, 2008 For those not following the series of dev releases, the changes from 0.64 from 0.65 can mostly be summed up as a lot performance improvements by nothingmuch, including new optional XS versions of some methods. Also, Class::MOP now works _without_ any XS modules, for sad systems without a compiler. * Class::MOP::Method - Added name and package_name XS accessors, and make sure all the XS and Perl versions work the same way. (Dave Rolsky) * MOP.xs - The XS versions of various methods just returned undef when called class methods, rather than dying like the pure Perl versions. (Dave Rolsky) 0.64_07 Fri August 29, 2008 * Class::MOP - Silenced warnings that managed to break Moose tests when XS was loaded. (Dave Rolsky) - Some XS versions of methods were ignored because of typos in MOP.xs. (Dave Rolsky) 0.64_06 Mon August 25, 2008 * Class::MOP (MOP.xs) - Another MS VC++ fix, cannot declare a variable in the middle of a scope (Taro Nishino). 0.64_05 Sun August 24, 2008 * Class::MOP - None of the dev releases actually loaded the XS properly, but we silently fell back to the pure Perl version of the code. (Dave Rolsky) * Class::MOP (MOP.xs) - Replaced some code that used functions not available on Visual C++ with some Perl XS API bits (Dave Rolsky). 0.64_04 Sat August 23, 2008 * Class::MOP::Class - Workaround a bug in 5.8.1's goto sub (nothingmuch) * pod.t and pod_coveraget.t - These are no longer shipped with the tarball because of bogus failures from CPAN testers. (Dave Rolsky) 0.64_03 Thu August 21, 2008 * Class::MOP::Package - Some (legit) code was misparsed by earlier 5.8.x releases. (nothingmuch) * Class::MOP - Fix a constant in void context warning (nothingmuch) 0.64_02 Thu August 21, 2008 * Makefile.PL and Class::MOP - Explicitly require Perl 5.8.0+ (Dave Rolsky) * Makefile.PL - Add missing prereqs that got lost in the switch away from Module::Install. * Class::MOP::Instance - New method - get_all_attributes (nothingmuch) 0.64_01 Wed August 20, 2008 * Makefile.PL - We now check to see if you have a compiler. If you don't, the module installs without some XS bits, but will work the same as with XS. This should make it easier to install on platforms without a compiler (like Windows). (Dave Rolsky) * many modules - Perl 6 style attribute naming replaced with sane style ('methods', not '%!methods'). These changes should not impact any existing API uses. (nothingmuch). * many modules - Quite a number of optimizations based on profiling, including allowing constructors to take hash references instead of hashes, duplicating some frequently used code in XS, and making constructors immutable. These changes should not impact any existing API uses. (nothingmuch) * Many modules - Constructors now respect the meta attributes of their subclasses, facilitating MOP extensibility. More related changes will happen in the next several releases. (nothingmuch) * Class::MOP::Class - New method - get_all_methods, replaces the deprecated compute_all_applicable_methods. get_all_attributes provided for consistency (nothingmuch) - New method - wrap_method was refactored out of get_method_map (nothingmuch) - New API for meta instance invalidation - invalidate_meta_instance, invalidate_meta_instances, add_dependent_meta_instance, remove_dependent_meta_instance, called automatically when attribute definitions change and allows notification of dependent subclasses. (nothingmuch) 0.64 Sun August 3, 2008 * Class::MOP::Immutable - fixing subtle edge case in immutable when you call ->meta (stevan) - clean up option processing (nothingmuch) * Class::MOP::Instance - inlined initialize slot didn't match non-inlined (nothingmuch) 0.63 Mon July 7, 2008 * Class::MOP - load_class will initialize a metaclass even if the class is already loaded (sartak) - load_class now returns the metaclass instance instead of just 1 (sartak) * elsewhere - better error messages (sartak and Dave Rolsky) 0.62 Wed June 18, 2008 - in is_class_loaded, recognize scalar references (as opposed to globs) in the symbol table as methods (these are optimized constant subs) 0.61 Fri. June 13, 2008 - Okay, lets give this another try and see if PAUSE recognizes it correct this time. 0.60 Thurs. Jun 12, 2008 - Fixed a version number issue by bumping all modules to 0.60. 0.59 Thurs. Jun 12, 2008 !! Several fixes resulting in yet another 25-30% speedup !! * Class::MOP::Class - now stores the instance of the instance metaclass to avoid needless recomputation and deletes it when the cache is blown - introduce methods to query Class::MOP::Class for the options used to make it immutable as well as the proper immutable transformer. (groditi) * Class::MOP::Package - {add, has, get, remove}_package_symbol all now accept a HASH ref argument as well as the string. All internal usages now use the HASH ref version. * Class::MOP - MOP.xs does sanity checks on the coderef to avoid a segfault - is_class_loaded check now uses code that was improved in Moose's ClassName type check (Sartak) - nonsensical (undef, empty, reference) class names now throw a more direct error in load_class (Sartak) - tests for this and other aspects of load_class (Sartak) * Class::MOP Class::MOP::Class Class::MOP::Method Class::MOP::Method::Wrapped Class::MOP::Attribute - switched usage of reftype to ref because it is much faster 0.58 Thurs. May 29, 2008 (late night release engineering)-- - fixing the version is META.yml, no functional changes in this release 0.57 Wed. May 28, 2008 !! Several speedups resulting in 20-25% speedups !! || (thanks to konobi, groditi, mst & CataMoose) !! * Class::MOP::Class - made get_method_map use list_all_package_symbols instead of manually grabbing each symbol - streamlining &initialize somewhat, since it gets called so much * Class::MOP::Package - made {get, has}_package_symbol not call &namespace so much - inlining a few calls to &name with direct HASH access key access - added get_all_package_symbols to fetch a HASH of items based on a type filter similar to list_all_package_symbols - added tests for this * Class::MOP::Method Class::MOP::Method::Constructor Class::MOP::Method::Generated Class::MOP::Method::Accessor - added more descriptive error message to help keep people from wasting time tracking an error that is easily fixed by upgrading. * Class::MOP::Immutable - Don't inline a destructor unless the user actually needs one - added tests for this 0.56 Saturday, May 24, 2008 * Class::MOP - we now get the &check_package_cache_flag function from MRO::Compat - All XS based functionality now has a Pure Perl alternative - the CLASS_MOP_NO_XS environment variable can now be used to force non-XS versions to always be used * Class::MOP::Attribute - add has_read_method and has_write_method - get_{read,write}_method_ref now wraps the anon-sub ref in the method metaclass when possible - added tests for this * Class::MOP::Immutable - added the ability to "wrap" methods when making the class immutable * Class::MOP::Class - now handling the edge case of ->meta->identifier dying by wrapping add_package_symbol to specifically allow for it to work. - added tests for this * Class::MOP::Attribute Class::MOP::Class Class::MOP::Immutable - any time a method meta object is constructed we make sure to pass the correct package and method name information * Class::MOP::Method Class::MOP::Method::Wrapped Class::MOP::Method::Generated Class::MOP::Method::Accessor Class::MOP::Method::Consructor - the &wrap constructor method now requires that a 'package_name' and 'name' attribute are passed. This is to help support the no-XS version, and will throw an error if these are not supplied. - all these classes are now bootstrapped properly and now store the package_name and name attributes correctly as well ~ Build.PL has been removed since the Module::Install support has been removed 0.55 Mon. April 28, 2008 - All classes now have proper C3 MRO support - added MRO::Compat as a dependency to allow for the C3 MRO support to Just Work in all perl versions * Class::MOP::Class - rebless_instance now returns the instance it has just blessed, this is mostly to facilitate chaining - set the attr correctly in rebless_instance when it has no init_arg - tweaked &linear_isa and &class_precedence_list to support c3 classes. 0.54 Fri. March, 14, 2008 * Class::MOP metaclass.pm - making sure that load_class never gets passed a value from @_ or $_ to squash Ovid's bug (http://use.perl.org/~Ovid/journal/35763) * Class::MOP::Class - make_{immutable,mutable} now return 1 (cause Sartak asked) - improved error handling in ->create method - rebless_instance now takes extra params which will be used to populate values - added tests for this * Class::MOP::Object - localizing the Data::Dumper configurations so that it does not pollute others (RT #33509) * Class::MOP::Class Class::MOP::Package Class::MOP::Module Class::MOP::Method Class::MOP::Attribute - these classes no longer define their own ->meta, but instead just inherit from Class::MOP::Object * Class::MOP::Instance Class::MOP::Immutable - these classes now inherit from Class::MOP::Object * t/ - fixed the filename length on several test files so we install on VMS better (RT #32295) - fixed incorrect use of catdir when it should be catfile (RT #32385) 0.53 Thurs. Feb. 14, 1008 ~~ several doc. fixes and updates ~~ * Class::MOP::Class Class::MOP::Method::Constructor Class::MOP::Attribute - making init_arg accept an undefined value to indicate that no constructor args can be passed (thanks to nothingmuch) - added tests for this - added attribute initializer attribute (rjbs) * Class::MOP. - making this use the new init_arg => undef feature instead of the silly hack from before (thanks to nothingmuch) 0.52 Tues. Jan. 22, 2008 * Class::MOP::Class - fixed bug in rebless_instance (discovered by ash) * Class::MOP::Method::Constructor - removed assumptions about the existence of a &meta method 0.51 Mon. Jan. 14, 2008 ~~~ some misc. doc. fixes ~~~ ~~ updated copyright dates ~~ * Class::MOP - now sets the IS_RUNNING_ON_5_10 constant so that we can take advantage of some of the nice bits of 5.10 * Class::MOP::Class - uses the IS_RUNNING_ON_5_10 flag to optimize the &linearized_isa method and avoid the hack/check for circular inheritence in &class_precedence_list - added rebless_instance method (Sartak) - added tests for this * Class::MOP::Immutable - the immutable class now keeps track of the transformer which immutablized it * Class::MOP::Instance - added rebless_instance_structure method (Sartak) - added tests for this 0.50 Fri. Dec. 21, 2007 * Class::MOP::Class - fixed bug in immutable to make sure that transformation arguments are saved correctly (mst) - added tests for this * Class::MOP::Immutable - fixed a bug (see above) * Class::MOP::Attribute - some doc updates 0.49 Fri. Dec. 14, 2007 !! Class::MOP now loads 2 x faster !! !! with XS speedups (thanks konobi) !! * Class::MOP - removed the dependency on B - added two XS functions (thanks konobi) - get_code_info($code) which replaces all the B fiddling we were doing with faster/leaner XS level fiddling - check_package_cache_flag($pkg_name) which returns the PL_sub_generation variable to be used to help manage method caching. NOTE: In 5.10 or greater this will actually use the mro::get_pkg_gen instead to give even more accurate caching information. blblack++ for that stuff :) * Class::MOP::Class - added the &subclasses method (thanks rlb) - added the update_package_cache_flag and reset_package_cache_flag which help keep track of when we need to re-fetch the method map. - Several small improvements to take advantage of the new method map caching features 0.48 Mon. Nov. 26, 2007 * Class::MOP::Attribute - fixed get_read/write_method to handle the HASH ref case, which makes the get_read/write_method_ref handle it too. - added more tests for this 0.47 Sat. Nov. 24, 2007 * Class::MOP::Attribute - fixed misspelling in get_write_method_ref - added more tests for this 0.46 Fri. Nov. 23, 2007 * Class::MOP::Class - added the linearized_isa method instead of constantly pruning duplicate classes (this will be even more useful in the 5.10-compat version coming soon) * Class::MOP::Attribute - added the get_read_method_ref and get_write_method_ref methods which allow you to retrieve a CODE ref which can always be used to read or write an attribute. 0.45 Thurs. Nov. 13, 2007 * Class::MOP::Attribute - Fix error message on confess (groditi) 0.44 Thurs. Nov. 13, 2007 - Apparently I didn't make dist correctly (groditi) 0.43 Thurs. Nov. 13, 2007 * Class::MOP - Add support for the 'builder' attribute (groditi) * Class::MOP::Class - optimise metaclass-already-exists check in construct_class_instance (groditi) - duplicate check into initialize to save a call through (groditi) * Class::MOP::Attribute - Add support for the 'builder' attribute (groditi) - Make predicates check for the existence of a value, not whether it is defined (groditi) * Class::MOP::Instance - Make predicates check for the existence of a value, not whether it is defined (groditi) * Class::MOP::Method::Accessor - made this a subclass of Class::MOP::Method::Generated - removed the relevant attributes * Class::MOP::Method::Constructor - fixed the cached values we had to be more sane - made this a subclass of Class::MOP::Method::Generated - fixed generated constructor so it properly handles subclasses now. - added tests for this - added the option to allow for both inlined and non-inlined constructors. - Update inlined methods for builder and predicate changes (groditi) * Class::MOP::Method::Generated - added this class as an abstract base for the Class::MOP::Method::{Constructor,Accessor} classes - added tests for this *t/ - Alter tests (005, 014 020, 021) for new builder addition (groditi) - Tests for new predicate behavior (and corrections to old tests) (groditi) *examples/ - Update ArrayRef based class example to work with predicate changes 0.42 Mon. July 16, 2007 !!! Horray for mst, he fixed it !!! * Class::MOP::Package - alter symbol table handling to deal with 5.8.x and 5.9.x * t/ - Get rid of the crappy workaround from 0.40/41 0.41 Sun. July 15, 2007 * t/ Arghh!!! My TODO test didn't work, so I handle it manually now so that people can use this with 5.9.5/bleadperl without issue. 0.40 Tues, July 3, 2007 * t/ ~ marked a test in 003_methods.t as TODO for perl 5.9.5 (this test is irrelvant to the module functioning on 5.9.5 for the most part anyway) 0.39 Mon. June 18, 2007 * Class::MOP::Immutable - added make_metaclass_mutable + docs (groditi) - removed unused variable - added create_immutable_transformer necessary for sane overloading of immutable behavior - tests for this (groditi) * Class::MOP::Class - Immutability can now be undone, added make_mutable + tests + docs (groditi) - Massive changes to the way Immutable is done for details see comments next to make_immutable This fixes a bug where custom metaclasses broke when made immutable. We are now keeping one immutable metaclass instance per metaclass instead of just one to prevent isa hierarchy corruption. Memory use will go up, but I suspect it will be neglible. - New tests added for this behavior. (groditi) 0.38 Thurs. May 31, 2007 ~~ More documentation updates ~~ * Class::MOP::Package - we now deal with stub methods properly - added tests for this - fixed some tests failing on 5.9.5 (thanks blblack) * Class::MOP::Attribute - added get_read_method and get_write_method thanks to groditi for this code, tests and docs. - added tests and POD for this * Class::MOP::Class - fixed RT issue #27329, clone object now handles undef values correctly. - added tests for this - Corrected anon-class handling so that they will not get reaped when instances still exist which need to reference them. This is the correct behavior, hopefully this is an obscure enough feature that there are not too many work arounds out in the wild. - added tests for this by groditi - updated docs to explain this * metaclass - load custom metaclasses automatically (thanks groditi) - added tests for this behavior 0.37 Sat. March 10, 2007 ~~ Many, many documentation updates ~~ * Class::MOP - added &load_class and &is_class_loaded - added tests and docs for these * Class::MOP::Attribute - default now checks the instance with defined to avoid setting off bool-overloads (found by Carl Franks) 0.37_002 * /t - bad name in a test, causing meaningless failuress. No other changes. 0.37_001 ~~ GLOBAL CHANGES ~~ - All attribute names are now consistent and follow Perl 6 style (prefixed with the sigil, and ! as the twigil for private attrs). This should not affect any code, unless you broke encapsulation, in which case, it is your problem anyway. !! Class::MOP::Class::Immutable has been removed * Class::MOP::Method::Constructor - this has been moved out of Class::MOP::Class::Immutable and is a proper subclass of Class::MOP::Method now. * Class::MOP::Class - this module now uses Class::MOP::Immutable for the immutable transformation instead of Class::MOP::Class::Immutable. + Class::MOP::Immutable - this module now controls the transformation from a mutable to an immutable version of the class. Docs for this will be coming eventually. 0.36 Sun. Nov. 5, 2006 * Class::MOP::Class - added a few 'no warnings' lines to keep annoying (and meaningless) warnings from chirping during global destruction. * Class::MOP - some more bootstrapping is now done on the new classes * Class::MOP::Class::Immutable *** API CHANGE *** - constructor generation is now handled by the Class::MOP::Method::Constructor class * Class::MOP::Method::Constructor - created this to handle constructor generation in Class::MOP::Class::Immutable * Class::MOP::Attribute *** API CHANGE *** - attributes now delegate to the Class::MOP::Method::Accessor to generate accessors * Class::MOP::Method::Accessor - all accessor generation functions from Class::MOP::Attribute have been moved here 0.35 Sat. Sept. 30, 2006 * scripts/class_browser.pl - initial prototype of a class browser, more on this to come. Comments and patches are very much welcome. * Class::MOP - All Class::MOP::* accessors are no longer re-generated in the bootstrap, instead they are aliased from the originals - fixed tests to reflect - added Class::MOP::Method (and its subclasses) to the bootstrap - adjusted tests for this - added the Class::MOP::Instance attributes to the bootstrap * Class::MOP::Method *** API CHANGE *** - methods are no longer blessed CODE refs but are actual objects which can be CODE-ified - adjusted tests to compensate - adjusted docs for this * Class::MOP::Class - changed how methods are dealt with to encapsulate most of the work into the &get_method_map method - made several adjustments for the change in Class::MOP::Method - &add_attribute now checks if you are adding a duplicate name, and properly removes the old one before installing the new one - added tests for this - adjusted docs for this * Class::MOP::Class::Immutable - added caching of &get_method_map - fixed issue with &get_package_symbol - cleaned up the methods that die (patch by David Wheeler) * Class::MOP::Package - added filtering capabilities to &list_all_package_symbols 0.34 Sat. Aug. 26, 2006 * Class::MOP::Class - added the %:methods attribute, which like the $:version and such just actually goes to the symbol table to get it's stuff. However, it makes the MOP more complete. ** API CHANGE ** - The &create method now requires that all but the package name now is passed in as named parameters. See docs for more info. - updated docs and tests for this * Class::MOP::Object - added &dump method to easily Data::Dumper an object * Class::MOP - cleaned up the initialization of attributes which do not store things in the instance - added the %:methods attribute definition to the bootstrap ~ lots of misc. test cleanup 0.33 Sat. Aug. 19, 2006 * Class::MOP::Class - moved the metaclass cache out of here and it is now in Class::MOP itself. * Class::MOP - moved all the metaclass cache stuff here - fixed all tests for this * Class::MOP::Attribute - reference values (other than CODE refs) are no longer allowed for defaults - added tests for this * Class::MOP::Package - fixed an issue with perl 5.8.1 and how it deals with symbol tables. The namespace hash is now always reloaded from the symbol table. ~ lots of misc. documentation cleanup 0.32 Sat. Aug. 12, 2006 + added Class::MOP::Object so that the metamodel is more complete (and closer to what Perl 6 will probably be). * Class::MOP::Package - refactored entire class, this is now the primary gateway between the metaclass and the Perl 5 symbol table - added many tests for this - this class is now a subclass of Class::MOP::Object - added some tests to reflect this * Class::MOP::Class - refactored all symbol table access to use Class::MOP::Package methods instead * Class::MOP::Module - adding the $:version attribute in the bootstrap so that Module has a version as an attribute - see comment in Class::MOP for details - added the $:authority attribute to this module as well as an &identifier method, to bring us ever closer to Perl 6 goodness - I have added $AUTHORITY to all the modules - added tests for this * Class::MOP::Instance - added &deinitialize_slot for removing slots from an instance - added tests for this * Class::MOP::Attribute - added support for &deinitialize_slot for removing slots from an instance - added tests for this 0.31 Sat. July 15, 2006 * Class::MOP::Class - added &find_method_by_name to locate a method anywhere within the class hierarchy * Class::MOP::Attribute - added &set_value and &get_value for getting the value of the attribute for a particular instance. 0.30 Wed. July 5, 2006 --------------------------------------- This is the first version of Class::MOP to introduce the immutable features which will be used for optimizating the MOP. This support should still be considered experimental, but moving towards stability. --------------------------------------- * Created Class::MOP::Class::Immutable * Created the Class::MOP::Package and Class::MOP::Module classes to more closely conform to Perl 6's meta-model * Class::MOP::Class - now inherits from Class::MOP::Module - several methods moved to ::Module and ::Package and now inherited - added tests for this * Class::MOP::Instance - added an is_inlinable method to allow other classes to check before they attempt to optimize. - added an inline_create_instance to inline instance creation (of course) ** API CHANGE ** - the Class::MOP::Class::*_package_variable methods are all now methods of Class::MOP::Package and called *_package_symbol instead. This is because they are now more general purpose symbol table manipulation methods. 0.29_02 Thurs. June 22, 2006 ++ DEVELOPER RELEASE ++ * Class::MOP::Class - small change in &create so that it behaves properly when inherited - small fix to &clone_instance 0.29_01 Fri. May 12, 2006 ++ DEVELOPER RELEASE ++ - This release works in combination with Moose 0.09_01, it is a developer release because it introduces a new instance sub-protocol and has not yet been optimized. * Class::MOP::Class - anon-classes are now properly garbage collected - added tests for this - improved method modifier wrapping * Class::MOP::Instance - added new instance protocol - added tests for this - changed all relevant modules and examples - Class::MOP::Class - Class::MOP::Attribute - examples/* * metaclass - you no longer need to specify the metaclass itself, if it is not there, Class::MOP::Class is just assumed - updated tests for this * examples/ - added ArrayBasedStorage example to show instance storage using ARRAY refs instead of HASH refs. - added tests for this - InsideOutClass is totally revised using the new instance protocol - added more tests for this 0.26 Mon. April 24, 2006 * Class::MOP::Class - added find_attribute_by_name method - added tests and docs for this - some small optimizations * Class::MOP::Attribute - some small optimizations 0.25 Thurs. April 20, 2006 * Class::MOP::Class - added create_anon_class for creating anonymous classes - added tests for this - added get_all_metaclasses, get_all_metaclass_names and get_all_metaclass_instances method to allow access to all the cached metaclass objects. - attribute slot initialization is now the responsibility of the attribute itself, and construct_instance now delegates appropriately * Class::MOP::Attribute - attribute slot initialization is now the responsibility of the attribute itself, so we added a method for it called initialize_instance_slot * examples/ - adjusted all the examples to use the new attribute initialize_instance_slot method 0.24 Tues. April 11, 2006 * Class::MOP::Class - cleaned up how the before/after/around method modifiers get named with Sub::Name 0.23 Thurs. March 30, 2006 * Class::MOP::Class - fixed the way attribute defaults are handled during instance construction (bug found by chansen) * Class::MOP::Attribute - read-only accessors ('reader') will now die if passed more than one argument (attempting to write to them basically) - added tests for this - adjusted all /example files to comply 0.22 Mon. March 20, 2006 * Class::MOP::Class - localized $@ in the *_package_variable functions because otherwise, it does ugly things in Moose. - added test case for this 0.21 Wed. March 15, 2006 * Class::MOP::Class - fixed issue where metaclasses are reaped from our cache in global destruction, and so are not available in DESTORY calls 0.20 Thurs. March 2, 2006 - removed the dependency for Clone since we no longer to deep-cloning by default. * Class::MOP::Method - added &package_name, &name and &fully_qualified_name methods, some of which were formerly private subs in Class::MOP::Class * Class::MOP::Method::Wrapped - allows for a method to be wrapped with before, after and around modifiers - added tests and docs for this feature * Class::MOP::Class - improved &get_package_symbol - &version and &superclasses now use it - methods are now blessed into Class::MOP::Method whenever possible - added methods to install CLOS-style method modifiers - &add_before_method_modifier - &add_after_method_modifier - &add_around_method_modifier - added tests and docs for these - added &find_next_method_by_name which finds the equivalent of SUPER::method_name 0.12 Thurs. Feb 23, 2006 - reduced the dependency on B, no need to always have the latest * examples/ - added docs to the C3 method dispatch order test - fixed missing Algorithm::C3 dependency by making the test skip if it is not installed 0.11 Mon Feb. 20, 2006 * examples/ - added example of changing method dispatch order to C3 * Class::MOP::Class - changed how clone_instance behaves, it now only does a shallow clone (see docs for more details) - added docs and tests 0.10 Tues Feb. 14, 2006 ** This release was mostly about writing more tests and cleaning out old and dusty code, the MOP should now be considered "ready to use". - adding more tests to get coverage up a little higher, mostly testing errors and edge cases. - test coverage is now at 99% * Class::MOP - no longer optionally exports to UNIVERSAL::meta or creates a custom metaclass generator, use the metaclass pragma instead. * Class::MOP::Class - fixed a number of minor issues which came up in the error/edge-case tests * Class::MOP::Attribute - fixed a number of minor issues which came up in the error/edge-case tests * examples/ - fixing the AttributesWithHistory example, it was broken. 0.06 Thurs Feb. 9, 2006 * metaclass - adding new metaclass pragma to make setting up the metaclass a little more straightforward * Class::MOP - clean up bootstrapping to include more complete attribute definitions for Class::MOP::Class and Class::MOP::Attribute (accessors, readers, writers, etc.) ... it is redundant, but is useful meta-info to have around. * Class::MOP::Class - fixing minor meta-circularity issue with &meta, it is now more useful for subclasses - added &get_attribute_map as an accessor for the hash of attribute meta objects - &compute_all_applicable_attributes now just returns the attribute meta-object, rather than the HASH ref since all the same info can be gotten from the attribute meta-object itself - updated docs & tests to reflect - added &clone_instance method which does a deep clone of the instance structure created by &construct_instance - added docs & tests for this - added Clone as a dependency - added &new_object and &clone_object convience methods to return blessed new or cloned instances - they handle Class::MOP::Class singletons correctly too - added docs & tests for this - cleaned up the &constuct_class_instance so that it behaves more like &construct_instance (and managed the singletons too) - added the &check_metaclass_compatibility method to make sure that metaclasses are upward and downward compatible. - added tests and docs for this * examples/ - adjusting code to use the &Class::MOP::Class::meta fix detailed above - adjusting code to use the metaclass pragma 0.05 Sat Feb. 4, 2006 * Class::MOP::Class - added the &attribute_metaclass and &method_metaclass attributes which contain a metaclass name to use for attributes/methods respectively * Class::MOP - bootstrap additional attributes for Class::MOP::Class * examples/ - adjusted the example code and tests to use the new &attribute_metaclass feature of Class::MOP::Class - added new example: - LazyClass 0.04 Fri Feb. 3, 2006 * Class::MOP::Class - some documentation suggestions from #perl6 * Class::MOP::Attribute - improved error messages * examples/ - added new examples: - AttributesWithHistory - ClassEncapsultedAttributes 0.03 Fri Feb. 3, 2006 - converted to Module::Build instead of EU::MM * Class::MOP::Attribute - refactored method generation code - attributes are now associated with class directly * examples/ - refactored the InsideOut example to take advantage of the Class::MOP::Attribute refactoring - changed example files to .pod files and hide thier package names from PAUSE (I don't want to own these namespaces really, they are just examples) 0.02 Thurs Feb. 2, 2006 - moving examples from t/lib/* to examples/* - adding POD documentation to the examples 0.01 Thurs Feb. 2, 2006 - Initial release Moose-2.1604/dist.ini000600 000766 000024 00000033460 12617452415 014614 0ustar00etherstaff000000 000000 name = Moose author = Stevan Little author = Dave Rolsky author = Jesse Luehrs author = Shawn M Moore author = יובל קוג'מן (Yuval Kogman) author = Karen Etheridge author = Florian Ragwitz author = Hans Dieter Pearcey author = Chris Prather author = Matt S Trout license = Perl_5 copyright_holder = Infinity Interactive, Inc. copyright_year = 2006 ; $VERSION will be extracted from lib/Moose.pm, ; or override it with $ENV{V} [EnsurePrereqsInstalled] :version = 0.003 build_phase = release ; be nice to travis type = requires type = recommends [Git::GatherDir] exclude_match = ^t/recipes/(?!basics_genome_overloadingsubtypesandcoercion) exclude_filename = Makefile.PL exclude_filename = LICENSE exclude_filename = CONTRIBUTING.pod [MetaYAML] [MetaJSON] [License] [ExecDir] ; bin/moose-outdated ; authordep Dist::Zilla::Plugin::MakeMaker::Awesome [=inc::MakeMaker] default_jobs = 9 [Manifest] [MetaConfig] [=inc::SimpleAuthority] [MetaResources] bugtracker.web = https://rt.cpan.org/Dist/Display.html?Name=Moose bugtracker.mailto = bug-Moose@rt.cpan.org homepage = http://moose.perl.org/ repository.url = git://github.com/moose/Moose.git repository.web = https://github.com/moose/Moose repository.type = git x_IRC = irc://irc.perl.org/#moose x_MailingList = http://lists.perl.org/list/moose.html [FileFinder::ByName / PodModules] dir = lib file = *.pod [FileFinder::Filter / ModulesSansPod] finder = :InstallModules skip = \.pod$ [FileFinder::Filter / VersionedModules] finder = :InstallModules skip = \.pod$ skip = ^lib/Moose/Conflicts.pm$ [=inc::SimpleProvides] finder = PodModules [MetaProvides::Package] meta_noindex = 1 :version = 1.15000002 finder = ModulesSansPod ; to avoid "No namespaces detected in file..." spewage [MetaNoIndex] package = Class::MOP::Class::Immutable::Trait package = Class::MOP::Deprecated package = Class::MOP::MiniTrait package = Class::MOP::Mixin namespace = Class::MOP::Mixin package = Moose::Deprecated package = Moose::Meta::Attribute::Native::Trait package = Moose::Meta::Class::Immutable::Trait package = Moose::Meta::Method::Accessor::Native namespace = Moose::Meta::Method::Accessor::Native namespace = Moose::Meta::Mixin package = Moose::Meta::Object::Trait package = Moose::Util::TypeConstraints::Builtins directory = author directory = benchmarks directory = doc directory = inc [Git::Contributors] [SurgicalPodWeaver] :version = 0.0023 replacer = replace_with_comment post_code_replacer = replace_with_nothing [RewriteVersion] finder = VersionedModules [Git::Describe] :version = 0.004 on_package_line = 1 ; authordep Test::Inline ; authordep File::Find::Rule ; authordep Test::Inline::Extract [=inc::ExtractInlineTests] [PromptIfStale] phase = release check_all_prereqs = 1 check_all_plugins = 1 [Test::EOL] :version = 0.14 [PodSyntaxTests] [Test::NoTabs] [MetaTests] [Test::Kwalitee] skiptest = use_strict ; temporary, until RT#94468 is fixed [MojibakeTests] [RunExtraTests] default_jobs = 9 [Test::ReportPrereqs] include = Algorithm::C3 include = DBM::Deep include = DateTime include = DateTime::Calendar::Mayan include = DateTime::Format::MySQL include = Declare::Constraints::Simple include = Dist::CheckConflicts include = HTTP::Headers include = IO::File include = IO::String include = Locale::US include = Module::Refresh include = MooseX::NonMoose include = Params::Coerce include = Regexp::Common include = SUPER include = Test::Deep include = Test::DependentModules include = Test::LeakTrace include = Test::Output include = URI [Test::CPAN::Changes] [Test::Compile] :version = 2.037 phase = develop filename = xt/release/00-compile.t bail_out_on_fail = 1 ; this serves as a TODO list for getting all modules to load independently -- ; see RT#89536 skip = ^Class::MOP::Attribute$ skip = ^Class::MOP::Class$ skip = ^Class::MOP::Method::Accessor$ skip = ^Class::MOP::Method::Constructor$ skip = ^Class::MOP::Method::Inlined$ skip = ^Class::MOP::Method::Wrapped$ skip = ^Class::MOP::Mixin::HasAttributes$ skip = ^Class::MOP::Module$ skip = ^Class::MOP::Package$ skip = ^Moose::Meta::Attribute$ skip = ^Moose::Meta::Attribute::Native$ skip = ^Moose::Meta::Mixin::AttributeCore$ skip = ^Moose::Meta::Role::Attribute$ skip = ^Moose::Meta::TypeConstraint::Class$ skip = ^Moose::Meta::TypeConstraint::DuckType$ skip = ^Moose::Meta::TypeConstraint::Enum$ skip = ^Moose::Meta::TypeConstraint::Parameterizable$ skip = ^Moose::Meta::TypeConstraint::Parameterized$ skip = ^Moose::Meta::TypeConstraint::Role$ skip = ^Moose::Meta::TypeConstraint::Union$ [=inc::CheckReleaseType] [CheckVersionIncrement] ; we would like to have this, but currently there are false negatives: ; https://rt.cpan.org/Ticket/Display.html?id=87883 ; https://rt.cpan.org/Ticket/Display.html?id=87884 ;[Test::MinimumVersion] ;:version = 2.000003 ;max_target_perl = 5.008003 [CheckChangesHasContent] ;[CheckPrereqsIndexed] ; all runtime deps must be author deps [Prereqs] Carp = 1.22 ;authordep Carp = 1.22 Class::Load = 0.09 ;authordep Class::Load = 0.09 Class::Load::XS = 0.01 ;authordep Class::Load::XS = 0.01 Data::OptList = 0.107 ;authordep Data::OptList = 0.107 Devel::GlobalDestruction = 0 ;authordep Devel::GlobalDestruction = 0 Devel::OverloadInfo = 0.004 ;authordep Devel::OverloadInfo = 0.004 Devel::StackTrace = 1.33 ;authordep Devel::StackTrace = 1.33 Eval::Closure = 0.04 ;authordep Eval::Closure = 0.04 List::MoreUtils = 0.28 ;authordep List::MoreUtils = 0.28 List::Util = 1.35 ;authordep List::Util = 1.35 MRO::Compat = 0.05 ;authordep MRO::Compat = 0.05 Module::Runtime = 0.014 ;authordep Module::Runtime = 0.014 Module::Runtime::Conflicts = 0.002 ;authordep Module::Runtime::Conflicts = 0.002 Package::DeprecationManager = 0.11 ;authordep Package::DeprecationManager = 0.11 Package::Stash = 0.32 ;authordep Package::Stash = 0.32 Package::Stash::XS = 0.24 ;authordep Package::Stash::XS = 0.24 Params::Util = 1.00 ;authordep Params::Util = 1.00 Scalar::Util = 1.19 ;authordep Scalar::Util = 1.19 Sub::Exporter = 0.980 ;authordep Sub::Exporter = 0.980 Sub::Identify = 0 ;authordep Sub::Identify = 0 Sub::Name = 0.05 ;authordep Sub::Name = 0.05 Task::Weaken = 0 ;authordep Task::Weaken = 0 Try::Tiny = 0.17 ;authordep Try::Tiny = 0.17 parent = 0.223 ;authordep parent = 0.223 perl = 5.008003 ;authordep perl = 5.008003 strict = 1.03 ;authordep strict = 1.03 warnings = 1.03 ;authordep warnings = 1.03 [Prereqs / TestRequires] Test::CleanNamespaces = 0.13 Test::Fatal = 0.001 Test::More = 0.88 Test::Requires = 0.05 Test::Warnings = 0.016 ; all configure deps must be author deps [Prereqs / ConfigureRequires] perl = 5.008003 ExtUtils::CBuilder = 0.27 ;authordep ExtUtils::CBuilder = 0.27 File::Spec = 0 ;authordep File::Spec = 0 ;Config = 0 ; not actually in 02packages.details.txt!!! [Prereqs::AuthorDeps] relation = suggests exclude = inc::CheckAuthorDeps exclude = inc::CheckDelta exclude = inc::CheckReleaseType exclude = inc::Clean exclude = inc::ExtractInlineTests exclude = inc::GenerateDocs exclude = inc::GitUpToDate exclude = inc::MMHelper exclude = inc::MakeMaker exclude = inc::MyInline exclude = inc::SimpleAuthority exclude = inc::SimpleProvides exclude = inc::TestRelease ; mostly, these are things needed by xt tests [Prereqs / DevelopRequires] Algorithm::C3 = 0 Class::Load = 0.07 DBM::Deep = 1.003 Data::Visitor = 0.26 DateTime = 0 DateTime::Calendar::Mayan = 0 DateTime::Format::MySQL = 0 Declare::Constraints::Simple = 0 ExtUtils::MakeMaker::Dist::Zilla::Develop = 0 File::Find::Rule = 0 HTTP::Headers = 0 IO::File = 0 IO::String = 0 Locale::US = 0 Module::CPANTS::Analyse = 0.92 Module::Refresh = 0 MooseX::MarkAsMethods = 0 MooseX::NonMoose = 0 PadWalker = 0 Params::Coerce = 0 Regexp::Common = 0 SUPER = 1.10 Specio = 0.10 Test::Deep = 0 ;Test::DependentModules = 0.13 ; bad dep chain, used by a disabled test. Test::Inline = 0 Test::Kwalitee = 1.15 Test::LeakTrace = 0 Test::Memory::Cycle = 0 Test::Output = 0 Test::Pod::Coverage = 1.04 Test::Spelling = 0 URI = 0 blib = 0 [Prereqs / RuntimeSuggests] ; this needs to be installed *after*, since it deps on Moose ; remove this if this is an issue Devel::PartialDump = 0.14 [Conflicts] :version = 0.16 -script = bin/moose-outdated Catalyst = 5.90049999 Config::MVP = 2.200004 Devel::REPL = 1.003020 Dist::Zilla::Plugin::Git = 2.016 Fey = 0.36 Fey::ORM = 0.42 File::ChangeNotify = 0.15 HTTP::Throwable = 0.017 KiokuDB = 0.51 Markdent = 0.16 Mason = 2.18 MooseX::ABC = 0.05 MooseX::Aliases = 0.08 MooseX::AlwaysCoerce = 0.13 MooseX::App = 1.22 MooseX::Attribute::Deflator = 2.1.7 MooseX::Attribute::Dependent = 1.1.0 MooseX::Attribute::Prototype = 0.10 MooseX::AttributeHelpers = 0.22 MooseX::AttributeIndexes = 1.0.0 MooseX::AttributeInflate = 0.02 MooseX::CascadeClearing = 0.03 MooseX::ClassAttribute = 0.26 MooseX::Constructor::AllErrors = 0.021 MooseX::Declare = 0.35 MooseX::FollowPBP = 0.02 MooseX::Getopt = 0.56 MooseX::InstanceTracking = 0.04 MooseX::LazyRequire = 0.06 MooseX::Meta::Attribute::Index = 0.04 MooseX::Meta::Attribute::Lvalue = 0.05 MooseX::Method::Signatures = 0.44 MooseX::MethodAttributes = 0.22 MooseX::NonMoose = 0.24 MooseX::Object::Pluggable = 0.0011 MooseX::POE = 0.214 MooseX::Params::Validate = 0.05 MooseX::PrivateSetters = 0.03 MooseX::Role::Cmd = 0.06 MooseX::Role::Parameterized = 1.00 MooseX::Role::WithOverloading = 0.14 MooseX::Runnable = 0.03 MooseX::Scaffold = 0.05 MooseX::SemiAffordanceAccessor = 0.05 MooseX::SetOnce = 0.100473 MooseX::Singleton = 0.25 MooseX::SlurpyConstructor = 1.1 MooseX::Storage = 0.42 MooseX::StrictConstructor = 0.12 MooseX::Traits = 0.11 MooseX::Types = 0.19 MooseX::Types::Parameterizable = 0.05 MooseX::Types::Set::Object = 0.03 MooseX::Types::Signal = 1.101930 MooseX::UndefTolerant = 0.11 PRANG = 0.14 Pod::Elemental = 0.093280 Pod::Weaver = 3.101638 Reaction = 0.002003 Test::Able = 0.10 Test::CleanNamespaces = 0.03 Test::Moose::More = 0.022 Test::TempDir = 0.05 Throwable = 0.102080 namespace::autoclean = 0.08 [Test::CheckBreaks] conflicts_module = Moose::Conflicts ; authordep Dist::Zilla::Util::AuthorDeps = 5.021 ; authordep CPAN::Meta::Requirements ; authordep Test::Deep [=inc::CheckAuthorDeps] [=inc::CheckDelta] [=inc::GitUpToDate] [Git::Remote::Check] branch = stable/2.16 remote_branch = stable/2.16 [Git::CheckFor::CorrectBranch] release_branch = stable/2.16 [Git::Check] allow_dirty = [TestRelease] [UploadToCPAN] [CopyFilesFromRelease] filename = Changes filename = LICENSE [ReadmeAnyFromPod] :version = 0.142180 phase = release type = pod location = root source_filename = lib/Moose/Manual/Contributing.pod filename = CONTRIBUTING.pod [Git::Commit / release snapshot] allow_dirty = Changes allow_dirty = LICENSE allow_dirty = CONTRIBUTING.pod commit_msg = %N-%v%t%n%n%c [Git::Tag] tag_format = %v tag_message = %v%t [BumpVersionAfterRelease] finder = VersionedModules [NextRelease] :version = 5.033 time_zone = UTC format = %-7v %{yyyy-MM-dd}d%{ (TRIAL RELEASE)}T [Git::Commit / increment version] allow_dirty = Changes allow_dirty_match = ^lib/.*\.pm$ commit_msg = increment version after release [Git::Push] ; note: this is going to die if releasing from an older release branch (the ; merge won't go in cleanly) [Run::AfterRelease] run = git checkout master run = git merge --ff-only stable/2.16 run = git push ; authordep IPC::System::Simple ; authordep File::pushd ; authordep Path::Tiny ; authordep autodie ; authordep Module::Runtime [=inc::GenerateDocs] [=inc::Clean] ; last, so all before-release checks can occur first before prompting [ConfirmRelease] Moose-2.1604/doc/000700 000766 000024 00000000000 12617452415 013705 5ustar00etherstaff000000 000000 Moose-2.1604/inc/000700 000766 000024 00000000000 12617452415 013711 5ustar00etherstaff000000 000000 Moose-2.1604/lib/000700 000766 000024 00000000000 12617452415 013706 5ustar00etherstaff000000 000000 Moose-2.1604/LICENSE000644 000766 000024 00000043727 12617452415 014174 0ustar00etherstaff000000 000000 This software is copyright (c) 2006 by Infinity Interactive, Inc.. This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. Terms of the Perl programming language system itself a) the GNU General Public License as published by the Free Software Foundation; either version 1, or (at your option) any later version, or b) the "Artistic License" --- The GNU General Public License, Version 1, February 1989 --- This software is Copyright (c) 2006 by Infinity Interactive, Inc.. This is free software, licensed under: The GNU General Public License, Version 1, February 1989 GNU GENERAL PUBLIC LICENSE Version 1, February 1989 Copyright (C) 1989 Free Software Foundation, Inc. 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The license agreements of most software companies try to keep users at the mercy of those companies. By contrast, our General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. The General Public License applies to the Free Software Foundation's software and to any other program whose authors commit to using it. You can use it for your programs, too. When we speak of free software, we are referring to freedom, not price. Specifically, the General Public License is designed to make sure that you have the freedom to give away or sell copies of free software, that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things. To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it. For example, if you distribute copies of a such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must tell them their rights. We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software. Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations. The precise terms and conditions for copying, distribution and modification follow. GNU GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License Agreement applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any work containing the Program or a portion of it, either verbatim or with modifications. Each licensee is addressed as "you". 1. You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this General Public License and to the absence of any warranty; and give any other recipients of the Program a copy of this General Public License along with the Program. You may charge a fee for the physical act of transferring a copy. 2. You may modify your copy or copies of the Program or any portion of it, and copy and distribute such modifications under the terms of Paragraph 1 above, provided that you also do the following: a) cause the modified files to carry prominent notices stating that you changed the files and the date of any change; and b) cause the whole of any work that you distribute or publish, that in whole or in part contains the Program or any part thereof, either with or without modifications, to be licensed at no charge to all third parties under the terms of this General Public License (except that you may choose to grant warranty protection to some or all third parties, at your option). c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the simplest and most usual way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this General Public License. d) You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. Mere aggregation of another independent work with the Program (or its derivative) on a volume of a storage or distribution medium does not bring the other work under the scope of these terms. 3. You may copy and distribute the Program (or a portion or derivative of it, under Paragraph 2) in object code or executable form under the terms of Paragraphs 1 and 2 above provided that you also do one of the following: a) accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Paragraphs 1 and 2 above; or, b) accompany it with a written offer, valid for at least three years, to give any third party free (except for a nominal charge for the cost of distribution) a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Paragraphs 1 and 2 above; or, c) accompany it with the information you received as to where the corresponding source code may be obtained. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form alone.) Source code for a work means the preferred form of the work for making modifications to it. For an executable file, complete source code means all the source code for all modules it contains; but, as a special exception, it need not include source code for modules which are standard libraries that accompany the operating system on which the executable file runs, or for standard header files or definitions files that accompany that operating system. 4. You may not copy, modify, sublicense, distribute or transfer the Program except as expressly provided under this General Public License. Any attempt otherwise to copy, modify, sublicense, distribute or transfer the Program is void, and will automatically terminate your rights to use the Program under this License. However, parties who have received copies, or rights to use copies, from you under this General Public License will not have their licenses terminated so long as such parties remain in full compliance. 5. By copying, distributing or modifying the Program (or any work based on the Program) you indicate your acceptance of this license to do so, and all its terms and conditions. 6. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. 7. The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies a version number of the license which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of the license, you may choose any version ever published by the Free Software Foundation. 8. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY 9. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 10. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS Appendix: How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to humanity, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) 19yy This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 1, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA Also add information on how to contact you by electronic and paper mail. If the program is interactive, make it output a short notice like this when it starts in an interactive mode: Gnomovision version 69, Copyright (C) 19xx name of author Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, the commands you use may be called something other than `show w' and `show c'; they could even be mouse-clicks or menu items--whatever suits your program. You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the program, if necessary. Here a sample; alter the names: Yoyodyne, Inc., hereby disclaims all copyright interest in the program `Gnomovision' (a program to direct compilers to make passes at assemblers) written by James Hacker. , 1 April 1989 Ty Coon, President of Vice That's all there is to it! --- The Artistic License 1.0 --- This software is Copyright (c) 2006 by Infinity Interactive, Inc.. This is free software, licensed under: The Artistic License 1.0 The Artistic License Preamble The intent of this document is to state the conditions under which a Package may be copied, such that the Copyright Holder maintains some semblance of artistic control over the development of the package, while giving the users of the package the right to use and distribute the Package in a more-or-less customary fashion, plus the right to make reasonable modifications. Definitions: - "Package" refers to the collection of files distributed by the Copyright Holder, and derivatives of that collection of files created through textual modification. - "Standard Version" refers to such a Package if it has not been modified, or has been modified in accordance with the wishes of the Copyright Holder. - "Copyright Holder" is whoever is named in the copyright or copyrights for the package. - "You" is you, if you're thinking about copying or distributing this Package. - "Reasonable copying fee" is whatever you can justify on the basis of media cost, duplication charges, time of people involved, and so on. (You will not be required to justify it to the Copyright Holder, but only to the computing community at large as a market that must bear the fee.) - "Freely Available" means that no fee is charged for the item itself, though there may be fees involved in handling the item. It also means that recipients of the item may redistribute it under the same conditions they received it. 1. You may make and give away verbatim copies of the source form of the Standard Version of this Package without restriction, provided that you duplicate all of the original copyright notices and associated disclaimers. 2. You may apply bug fixes, portability fixes and other modifications derived from the Public Domain or from the Copyright Holder. A Package modified in such a way shall still be considered the Standard Version. 3. You may otherwise modify your copy of this Package in any way, provided that you insert a prominent notice in each changed file stating how and when you changed that file, and provided that you do at least ONE of the following: a) place your modifications in the Public Domain or otherwise make them Freely Available, such as by posting said modifications to Usenet or an equivalent medium, or placing the modifications on a major archive site such as ftp.uu.net, or by allowing the Copyright Holder to include your modifications in the Standard Version of the Package. b) use the modified Package only within your corporation or organization. c) rename any non-standard executables so the names do not conflict with standard executables, which must also be provided, and provide a separate manual page for each non-standard executable that clearly documents how it differs from the Standard Version. d) make other distribution arrangements with the Copyright Holder. 4. You may distribute the programs of this Package in object code or executable form, provided that you do at least ONE of the following: a) distribute a Standard Version of the executables and library files, together with instructions (in the manual page or equivalent) on where to get the Standard Version. b) accompany the distribution with the machine-readable source of the Package with your modifications. c) accompany any non-standard executables with their corresponding Standard Version executables, giving the non-standard executables non-standard names, and clearly documenting the differences in manual pages (or equivalent), together with instructions on where to get the Standard Version. d) make other distribution arrangements with the Copyright Holder. 5. You may charge a reasonable copying fee for any distribution of this Package. You may charge any fee you choose for support of this Package. You may not charge a fee for this Package itself. However, you may distribute this Package in aggregate with other (possibly commercial) programs as part of a larger (possibly commercial) software distribution provided that you do not advertise this Package as a product of your own. 6. The scripts and library files supplied as input to or produced as output from the programs of this Package do not automatically fall under the copyright of this Package, but belong to whomever generated them, and may be sold commercially, and may be aggregated with this Package. 7. C or perl subroutines supplied by you and linked into this Package shall not be considered part of this Package. 8. The name of the Copyright Holder may not be used to endorse or promote products derived from this software without specific prior written permission. 9. THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. The End Moose-2.1604/Makefile.PL000644 000766 000024 00000017211 12617452415 015126 0ustar00etherstaff000000 000000 # This Makefile.PL for Moose was generated by # inc::MakeMaker # and Dist::Zilla::Plugin::MakeMaker::Awesome 0.35. # Don't edit it but the dist.ini and plugins used to construct it. use strict; use warnings; # Secondary compile testing via ExtUtils::CBuilder sub can_xs { # Do we have the configure_requires checker? unless (eval 'require ExtUtils::CBuilder; ExtUtils::CBuilder->VERSION(0.27); 1') { # They don't obey configure_requires, so it is # someone old and delicate. Try to avoid hurting # them by falling back to an older simpler test. return can_cc(); } return ExtUtils::CBuilder->new( quiet => 1 )->have_compiler; } # can we locate a (the) C compiler sub can_cc { my @chunks = split(/ /, $Config::Config{cc}) or return; # $Config{cc} may contain args; try to find out the program part while (@chunks) { return can_run("@chunks") || (pop(@chunks), next); } return; } # check if we can run some command sub can_run { my ($cmd) = @_; return $cmd if -x $cmd; if (my $found_cmd = MM->maybe_command($cmd)) { return $found_cmd; } for my $dir ((split /$Config::Config{path_sep}/, $ENV{PATH}), '.') { next if $dir eq ''; my $abs = File::Spec->catfile($dir, $cmd); return $abs if (-x $abs or $abs = MM->maybe_command($abs)); } return; } die 'This distribution requires a working compiler' unless can_xs(); use ExtUtils::MakeMaker; check_conflicts(); my %WriteMakefileArgs = ( "ABSTRACT" => "A postmodern object system for Perl 5", "AUTHOR" => "Stevan Little , Dave Rolsky , Jesse Luehrs , Shawn M Moore , \x{5d9}\x{5d5}\x{5d1}\x{5dc} \x{5e7}\x{5d5}\x{5d2}'\x{5de}\x{5df} (Yuval Kogman) , Karen Etheridge , Florian Ragwitz , Hans Dieter Pearcey , Chris Prather , Matt S Trout ", "CONFIGURE_REQUIRES" => { "Dist::CheckConflicts" => "0.02", "ExtUtils::CBuilder" => "0.27", "ExtUtils::MakeMaker" => 0, "File::Spec" => 0 }, "DISTNAME" => "Moose", "EXE_FILES" => [ "bin/moose-outdated" ], "LICENSE" => "perl", "NAME" => "Moose", "OBJECT" => "xs/Attribute\$(OBJ_EXT) xs/AttributeCore\$(OBJ_EXT) xs/Class\$(OBJ_EXT) xs/Generated\$(OBJ_EXT) xs/HasAttributes\$(OBJ_EXT) xs/HasMethods\$(OBJ_EXT) xs/Inlined\$(OBJ_EXT) xs/Instance\$(OBJ_EXT) xs/Method\$(OBJ_EXT) xs/Moose\$(OBJ_EXT) xs/MOP\$(OBJ_EXT) xs/Package\$(OBJ_EXT) xs/ToInstance\$(OBJ_EXT) mop\$(OBJ_EXT)", "PREREQ_PM" => { "Carp" => "1.22", "Class::Load" => "0.09", "Class::Load::XS" => "0.01", "Data::OptList" => "0.107", "Devel::GlobalDestruction" => 0, "Devel::OverloadInfo" => "0.004", "Devel::StackTrace" => "1.33", "Dist::CheckConflicts" => "0.02", "Eval::Closure" => "0.04", "List::MoreUtils" => "0.28", "List::Util" => "1.35", "MRO::Compat" => "0.05", "Module::Runtime" => "0.014", "Module::Runtime::Conflicts" => "0.002", "Package::DeprecationManager" => "0.11", "Package::Stash" => "0.32", "Package::Stash::XS" => "0.24", "Params::Util" => "1.00", "Scalar::Util" => "1.19", "Sub::Exporter" => "0.980", "Sub::Identify" => 0, "Sub::Name" => "0.05", "Task::Weaken" => 0, "Try::Tiny" => "0.17", "parent" => "0.223", "strict" => "1.03", "warnings" => "1.03" }, "TEST_REQUIRES" => { "CPAN::Meta::Check" => "0.011", "CPAN::Meta::Requirements" => 0, "ExtUtils::MakeMaker" => 0, "File::Spec" => 0, "Test::CleanNamespaces" => "0.13", "Test::Fatal" => "0.001", "Test::More" => "0.88", "Test::Requires" => "0.05", "Test::Warnings" => "0.016" }, "VERSION" => "2.1604", "XS" => { "xs/Attribute.xs" => "xs/Attribute.c", "xs/AttributeCore.xs" => "xs/AttributeCore.c", "xs/Class.xs" => "xs/Class.c", "xs/Generated.xs" => "xs/Generated.c", "xs/HasAttributes.xs" => "xs/HasAttributes.c", "xs/HasMethods.xs" => "xs/HasMethods.c", "xs/Inlined.xs" => "xs/Inlined.c", "xs/Instance.xs" => "xs/Instance.c", "xs/MOP.xs" => "xs/MOP.c", "xs/Method.xs" => "xs/Method.c", "xs/Moose.xs" => "xs/Moose.c", "xs/Package.xs" => "xs/Package.c", "xs/ToInstance.xs" => "xs/ToInstance.c" }, "clean" => { "FILES" => "xs/Attribute\$(OBJ_EXT) xs/AttributeCore\$(OBJ_EXT) xs/Class\$(OBJ_EXT) xs/Generated\$(OBJ_EXT) xs/HasAttributes\$(OBJ_EXT) xs/HasMethods\$(OBJ_EXT) xs/Inlined\$(OBJ_EXT) xs/Instance\$(OBJ_EXT) xs/Method\$(OBJ_EXT) xs/Moose\$(OBJ_EXT) xs/MOP\$(OBJ_EXT) xs/Package\$(OBJ_EXT) xs/ToInstance\$(OBJ_EXT) mop\$(OBJ_EXT)" }, "test" => { "TESTS" => "t/*.t t/attributes/*.t t/basics/*.t t/bugs/*.t t/cmop/*.t t/compat/*.t t/examples/*.t t/exceptions/*.t t/immutable/*.t t/metaclasses/*.t t/moose_util/*.t t/native_traits/*.t t/recipes/*.t t/roles/*.t t/test_moose/*.t t/todo_tests/*.t t/type_constraints/*.t" } ); my %FallbackPrereqs = ( "CPAN::Meta::Check" => "0.011", "CPAN::Meta::Requirements" => 0, "Carp" => "1.22", "Class::Load" => "0.09", "Class::Load::XS" => "0.01", "Data::OptList" => "0.107", "Devel::GlobalDestruction" => 0, "Devel::OverloadInfo" => "0.004", "Devel::StackTrace" => "1.33", "Dist::CheckConflicts" => "0.02", "Eval::Closure" => "0.04", "ExtUtils::MakeMaker" => 0, "File::Spec" => 0, "List::MoreUtils" => "0.28", "List::Util" => "1.35", "MRO::Compat" => "0.05", "Module::Runtime" => "0.014", "Module::Runtime::Conflicts" => "0.002", "Package::DeprecationManager" => "0.11", "Package::Stash" => "0.32", "Package::Stash::XS" => "0.24", "Params::Util" => "1.00", "Scalar::Util" => "1.19", "Sub::Exporter" => "0.980", "Sub::Identify" => 0, "Sub::Name" => "0.05", "Task::Weaken" => 0, "Test::CleanNamespaces" => "0.13", "Test::Fatal" => "0.001", "Test::More" => "0.88", "Test::Requires" => "0.05", "Test::Warnings" => "0.016", "Try::Tiny" => "0.17", "parent" => "0.223", "strict" => "1.03", "warnings" => "1.03" ); 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) }; $WriteMakefileArgs{CCFLAGS} = ( $Config::Config{ccflags} || '' ) . ' -I.'; WriteMakefile(%WriteMakefileArgs); { package MY; use Config; sub const_cccmd { my $ret = shift->SUPER::const_cccmd(@_); return q{} unless $ret; if ($Config{cc} =~ /^cl\b/i) { warn 'you are using MSVC... we may not have gotten some options quite right.'; $ret .= ' /Fo$@'; } else { $ret .= ' -o $@'; } return $ret; } sub postamble { return <<'EOF'; $(OBJECT) : mop.h EOF } } sub check_conflicts { if ( eval { require 'lib/Moose/Conflicts.pm'; 1; } ) { if ( eval { Moose::Conflicts->check_conflicts; 1 } ) { return; } else { my $err = $@; $err =~ s/^/ /mg; warn "***\n$err***\n"; } } else { print <<'EOF'; *** Your toolchain doesn't support configure_requires, so Dist::CheckConflicts hasn't been installed yet. You should check for conflicting modules manually using the 'moose-outdated' script that is installed with this distribution once the installation finishes. *** EOF } return if $ENV{AUTOMATED_TESTING} || $ENV{NONINTERACTIVE_TESTING}; # More or less copied from Module::Build return if $ENV{PERL_MM_USE_DEFAULT}; return unless -t STDIN && ( -t STDOUT || !( -f STDOUT || -c STDOUT ) ); sleep 4; } Moose-2.1604/MANIFEST000644 000766 000024 00000117574 12617452415 014322 0ustar00etherstaff000000 000000 # This file was automatically generated by Dist::Zilla::Plugin::Manifest v5.041. Changes Changes.Class-MOP LICENSE MANIFEST META.json META.yml Makefile.PL README.md TODO author/doc-generator author/extract-inline-tests author/find-dupe-test-numbers benchmarks/caf_vs_moose.pl benchmarks/cmop/all.yml benchmarks/cmop/foo.pl benchmarks/cmop/lib/Bench/Accessor.pm benchmarks/cmop/lib/Bench/Construct.pm benchmarks/cmop/lib/Bench/Run.pm benchmarks/cmop/lib/MOP/Immutable/Point.pm benchmarks/cmop/lib/MOP/Immutable/Point3D.pm benchmarks/cmop/lib/MOP/Installed/Point.pm benchmarks/cmop/lib/MOP/Installed/Point3D.pm benchmarks/cmop/lib/MOP/Point.pm benchmarks/cmop/lib/MOP/Point3D.pm benchmarks/cmop/lib/Plain/Point.pm benchmarks/cmop/lib/Plain/Point3D.pm benchmarks/cmop/loading-benchmark.pl benchmarks/cmop/profile.pl benchmarks/cmop/run_yml.pl benchmarks/immutable.pl benchmarks/lotsa-classes.pl benchmarks/method_modifiers.pl benchmarks/moose_bench.pl benchmarks/simple_class.pl benchmarks/simple_compile.pl benchmarks/simple_constructor.pl benchmarks/type_constraints.pl benchmarks/type_constraints2.pl bin/moose-outdated dist.ini doc/moosex-compile inc/CheckAuthorDeps.pm inc/CheckDelta.pm inc/CheckReleaseType.pm inc/Clean.pm inc/ExtractInlineTests.pm inc/GenerateDocs.pm inc/GitUpToDate.pm inc/MMHelper.pm inc/MakeMaker.pm inc/MyInline.pm inc/SimpleAuthority.pm inc/SimpleProvides.pm inc/TestRelease.pm lib/Class/MOP.pm lib/Class/MOP/Attribute.pm lib/Class/MOP/Class.pm lib/Class/MOP/Class/Immutable/Trait.pm lib/Class/MOP/Deprecated.pm lib/Class/MOP/Instance.pm lib/Class/MOP/Method.pm lib/Class/MOP/Method/Accessor.pm lib/Class/MOP/Method/Constructor.pm lib/Class/MOP/Method/Generated.pm lib/Class/MOP/Method/Inlined.pm lib/Class/MOP/Method/Meta.pm lib/Class/MOP/Method/Wrapped.pm lib/Class/MOP/MiniTrait.pm lib/Class/MOP/Mixin.pm lib/Class/MOP/Mixin/AttributeCore.pm lib/Class/MOP/Mixin/HasAttributes.pm lib/Class/MOP/Mixin/HasMethods.pm lib/Class/MOP/Mixin/HasOverloads.pm lib/Class/MOP/Module.pm lib/Class/MOP/Object.pm lib/Class/MOP/Overload.pm lib/Class/MOP/Package.pm lib/Moose.pm lib/Moose/Conflicts.pm lib/Moose/Cookbook.pod lib/Moose/Cookbook/Basics/BankAccount_MethodModifiersAndSubclassing.pod lib/Moose/Cookbook/Basics/BinaryTree_AttributeFeatures.pod lib/Moose/Cookbook/Basics/BinaryTree_BuilderAndLazyBuild.pod lib/Moose/Cookbook/Basics/Company_Subtypes.pod lib/Moose/Cookbook/Basics/DateTime_ExtendingNonMooseParent.pod lib/Moose/Cookbook/Basics/Document_AugmentAndInner.pod lib/Moose/Cookbook/Basics/Genome_OverloadingSubtypesAndCoercion.pod lib/Moose/Cookbook/Basics/HTTP_SubtypesAndCoercion.pod lib/Moose/Cookbook/Basics/Immutable.pod lib/Moose/Cookbook/Basics/Person_BUILDARGSAndBUILD.pod lib/Moose/Cookbook/Basics/Point_AttributesAndSubclassing.pod lib/Moose/Cookbook/Extending/Debugging_BaseClassRole.pod lib/Moose/Cookbook/Extending/ExtensionOverview.pod lib/Moose/Cookbook/Extending/Mooseish_MooseSugar.pod lib/Moose/Cookbook/Legacy/Debugging_BaseClassReplacement.pod lib/Moose/Cookbook/Legacy/Labeled_AttributeMetaclass.pod lib/Moose/Cookbook/Legacy/Table_ClassMetaclass.pod lib/Moose/Cookbook/Meta/GlobRef_InstanceMetaclass.pod lib/Moose/Cookbook/Meta/Labeled_AttributeTrait.pod lib/Moose/Cookbook/Meta/PrivateOrPublic_MethodMetaclass.pod lib/Moose/Cookbook/Meta/Table_MetaclassTrait.pod lib/Moose/Cookbook/Meta/WhyMeta.pod lib/Moose/Cookbook/Roles/ApplicationToInstance.pod lib/Moose/Cookbook/Roles/Comparable_CodeReuse.pod lib/Moose/Cookbook/Roles/Restartable_AdvancedComposition.pod lib/Moose/Cookbook/Snack/Keywords.pod lib/Moose/Cookbook/Snack/Types.pod lib/Moose/Cookbook/Style.pod lib/Moose/Deprecated.pm lib/Moose/Exception.pm lib/Moose/Exception/AccessorMustReadWrite.pm lib/Moose/Exception/AddParameterizableTypeTakesParameterizableType.pm lib/Moose/Exception/AddRoleTakesAMooseMetaRoleInstance.pm lib/Moose/Exception/AddRoleToARoleTakesAMooseMetaRole.pm lib/Moose/Exception/ApplyTakesABlessedInstance.pm lib/Moose/Exception/AttachToClassNeedsAClassMOPClassInstanceOrASubclass.pm lib/Moose/Exception/AttributeConflictInRoles.pm lib/Moose/Exception/AttributeConflictInSummation.pm lib/Moose/Exception/AttributeExtensionIsNotSupportedInRoles.pm lib/Moose/Exception/AttributeIsRequired.pm lib/Moose/Exception/AttributeMustBeAnClassMOPMixinAttributeCoreOrSubclass.pm lib/Moose/Exception/AttributeNamesDoNotMatch.pm lib/Moose/Exception/AttributeValueIsNotAnObject.pm lib/Moose/Exception/AttributeValueIsNotDefined.pm lib/Moose/Exception/AutoDeRefNeedsArrayRefOrHashRef.pm lib/Moose/Exception/BadOptionFormat.pm lib/Moose/Exception/BothBuilderAndDefaultAreNotAllowed.pm lib/Moose/Exception/BuilderDoesNotExist.pm lib/Moose/Exception/BuilderMethodNotSupportedForAttribute.pm lib/Moose/Exception/BuilderMethodNotSupportedForInlineAttribute.pm lib/Moose/Exception/BuilderMustBeAMethodName.pm lib/Moose/Exception/CallingMethodOnAnImmutableInstance.pm lib/Moose/Exception/CallingReadOnlyMethodOnAnImmutableInstance.pm lib/Moose/Exception/CanExtendOnlyClasses.pm lib/Moose/Exception/CanOnlyConsumeRole.pm lib/Moose/Exception/CanOnlyWrapBlessedCode.pm lib/Moose/Exception/CanReblessOnlyIntoASubclass.pm lib/Moose/Exception/CanReblessOnlyIntoASuperclass.pm lib/Moose/Exception/CannotAddAdditionalTypeCoercionsToUnion.pm lib/Moose/Exception/CannotAddAsAnAttributeToARole.pm lib/Moose/Exception/CannotApplyBaseClassRolesToRole.pm lib/Moose/Exception/CannotAssignValueToReadOnlyAccessor.pm lib/Moose/Exception/CannotAugmentIfLocalMethodPresent.pm lib/Moose/Exception/CannotAugmentNoSuperMethod.pm lib/Moose/Exception/CannotAutoDerefWithoutIsa.pm lib/Moose/Exception/CannotAutoDereferenceTypeConstraint.pm lib/Moose/Exception/CannotCalculateNativeType.pm lib/Moose/Exception/CannotCallAnAbstractBaseMethod.pm lib/Moose/Exception/CannotCallAnAbstractMethod.pm lib/Moose/Exception/CannotCoerceAWeakRef.pm lib/Moose/Exception/CannotCoerceAttributeWhichHasNoCoercion.pm lib/Moose/Exception/CannotCreateHigherOrderTypeWithoutATypeParameter.pm lib/Moose/Exception/CannotCreateMethodAliasLocalMethodIsPresent.pm lib/Moose/Exception/CannotCreateMethodAliasLocalMethodIsPresentInClass.pm lib/Moose/Exception/CannotDelegateLocalMethodIsPresent.pm lib/Moose/Exception/CannotDelegateWithoutIsa.pm lib/Moose/Exception/CannotFindDelegateMetaclass.pm lib/Moose/Exception/CannotFindType.pm lib/Moose/Exception/CannotFindTypeGivenToMatchOnType.pm lib/Moose/Exception/CannotFixMetaclassCompatibility.pm lib/Moose/Exception/CannotGenerateInlineConstraint.pm lib/Moose/Exception/CannotInitializeMooseMetaRoleComposite.pm lib/Moose/Exception/CannotInlineTypeConstraintCheck.pm lib/Moose/Exception/CannotLocatePackageInINC.pm lib/Moose/Exception/CannotMakeMetaclassCompatible.pm lib/Moose/Exception/CannotOverrideALocalMethod.pm lib/Moose/Exception/CannotOverrideBodyOfMetaMethods.pm lib/Moose/Exception/CannotOverrideLocalMethodIsPresent.pm lib/Moose/Exception/CannotOverrideNoSuperMethod.pm lib/Moose/Exception/CannotRegisterUnnamedTypeConstraint.pm lib/Moose/Exception/CannotUseLazyBuildAndDefaultSimultaneously.pm lib/Moose/Exception/CircularReferenceInAlso.pm lib/Moose/Exception/ClassDoesNotHaveInitMeta.pm lib/Moose/Exception/ClassDoesTheExcludedRole.pm lib/Moose/Exception/ClassNamesDoNotMatch.pm lib/Moose/Exception/CloneObjectExpectsAnInstanceOfMetaclass.pm lib/Moose/Exception/CodeBlockMustBeACodeRef.pm lib/Moose/Exception/CoercingWithoutCoercions.pm lib/Moose/Exception/CoercionAlreadyExists.pm lib/Moose/Exception/CoercionNeedsTypeConstraint.pm lib/Moose/Exception/ConflictDetectedInCheckRoleExclusions.pm lib/Moose/Exception/ConflictDetectedInCheckRoleExclusionsInToClass.pm lib/Moose/Exception/ConstructClassInstanceTakesPackageName.pm lib/Moose/Exception/CouldNotCreateMethod.pm lib/Moose/Exception/CouldNotCreateWriter.pm lib/Moose/Exception/CouldNotEvalConstructor.pm lib/Moose/Exception/CouldNotEvalDestructor.pm lib/Moose/Exception/CouldNotFindTypeConstraintToCoerceFrom.pm lib/Moose/Exception/CouldNotGenerateInlineAttributeMethod.pm lib/Moose/Exception/CouldNotLocateTypeConstraintForUnion.pm lib/Moose/Exception/CouldNotParseType.pm lib/Moose/Exception/CreateMOPClassTakesArrayRefOfAttributes.pm lib/Moose/Exception/CreateMOPClassTakesArrayRefOfSuperclasses.pm lib/Moose/Exception/CreateMOPClassTakesHashRefOfMethods.pm lib/Moose/Exception/CreateTakesArrayRefOfRoles.pm lib/Moose/Exception/CreateTakesHashRefOfAttributes.pm lib/Moose/Exception/CreateTakesHashRefOfMethods.pm lib/Moose/Exception/DefaultToMatchOnTypeMustBeCodeRef.pm lib/Moose/Exception/DelegationToAClassWhichIsNotLoaded.pm lib/Moose/Exception/DelegationToARoleWhichIsNotLoaded.pm lib/Moose/Exception/DelegationToATypeWhichIsNotAClass.pm lib/Moose/Exception/DoesRequiresRoleName.pm lib/Moose/Exception/EnumCalledWithAnArrayRefAndAdditionalArgs.pm lib/Moose/Exception/EnumValuesMustBeString.pm lib/Moose/Exception/ExtendsMissingArgs.pm lib/Moose/Exception/HandlesMustBeAHashRef.pm lib/Moose/Exception/IllegalInheritedOptions.pm lib/Moose/Exception/IllegalMethodTypeToAddMethodModifier.pm lib/Moose/Exception/IncompatibleMetaclassOfSuperclass.pm lib/Moose/Exception/InitMetaRequiresClass.pm lib/Moose/Exception/InitializeTakesUnBlessedPackageName.pm lib/Moose/Exception/InstanceBlessedIntoWrongClass.pm lib/Moose/Exception/InstanceMustBeABlessedReference.pm lib/Moose/Exception/InvalidArgPassedToMooseUtilMetaRole.pm lib/Moose/Exception/InvalidArgumentToMethod.pm lib/Moose/Exception/InvalidArgumentsToTraitAliases.pm lib/Moose/Exception/InvalidBaseTypeGivenToCreateParameterizedTypeConstraint.pm lib/Moose/Exception/InvalidHandleValue.pm lib/Moose/Exception/InvalidHasProvidedInARole.pm lib/Moose/Exception/InvalidNameForType.pm lib/Moose/Exception/InvalidOverloadOperator.pm lib/Moose/Exception/InvalidRoleApplication.pm lib/Moose/Exception/InvalidTypeConstraint.pm lib/Moose/Exception/InvalidTypeGivenToCreateParameterizedTypeConstraint.pm lib/Moose/Exception/InvalidValueForIs.pm lib/Moose/Exception/IsaDoesNotDoTheRole.pm lib/Moose/Exception/IsaLacksDoesMethod.pm lib/Moose/Exception/LazyAttributeNeedsADefault.pm lib/Moose/Exception/Legacy.pm lib/Moose/Exception/MOPAttributeNewNeedsAttributeName.pm lib/Moose/Exception/MatchActionMustBeACodeRef.pm lib/Moose/Exception/MessageParameterMustBeCodeRef.pm lib/Moose/Exception/MetaclassIsAClassNotASubclassOfGivenMetaclass.pm lib/Moose/Exception/MetaclassIsARoleNotASubclassOfGivenMetaclass.pm lib/Moose/Exception/MetaclassIsNotASubclassOfGivenMetaclass.pm lib/Moose/Exception/MetaclassMustBeASubclassOfMooseMetaClass.pm lib/Moose/Exception/MetaclassMustBeASubclassOfMooseMetaRole.pm lib/Moose/Exception/MetaclassMustBeDerivedFromClassMOPClass.pm lib/Moose/Exception/MetaclassNotLoaded.pm lib/Moose/Exception/MetaclassTypeIncompatible.pm lib/Moose/Exception/MethodExpectedAMetaclassObject.pm lib/Moose/Exception/MethodExpectsFewerArgs.pm lib/Moose/Exception/MethodExpectsMoreArgs.pm lib/Moose/Exception/MethodModifierNeedsMethodName.pm lib/Moose/Exception/MethodNameConflictInRoles.pm lib/Moose/Exception/MethodNameNotFoundInInheritanceHierarchy.pm lib/Moose/Exception/MethodNameNotGiven.pm lib/Moose/Exception/MustDefineAMethodName.pm lib/Moose/Exception/MustDefineAnAttributeName.pm lib/Moose/Exception/MustDefineAnOverloadOperator.pm lib/Moose/Exception/MustHaveAtLeastOneValueToEnumerate.pm lib/Moose/Exception/MustPassAHashOfOptions.pm lib/Moose/Exception/MustPassAMooseMetaRoleInstanceOrSubclass.pm lib/Moose/Exception/MustPassAPackageNameOrAnExistingClassMOPPackageInstance.pm lib/Moose/Exception/MustPassEvenNumberOfArguments.pm lib/Moose/Exception/MustPassEvenNumberOfAttributeOptions.pm lib/Moose/Exception/MustProvideANameForTheAttribute.pm lib/Moose/Exception/MustSpecifyAtleastOneMethod.pm lib/Moose/Exception/MustSpecifyAtleastOneRole.pm lib/Moose/Exception/MustSpecifyAtleastOneRoleToApplicant.pm lib/Moose/Exception/MustSupplyAClassMOPAttributeInstance.pm lib/Moose/Exception/MustSupplyADelegateToMethod.pm lib/Moose/Exception/MustSupplyAMetaclass.pm lib/Moose/Exception/MustSupplyAMooseMetaAttributeInstance.pm lib/Moose/Exception/MustSupplyAnAccessorTypeToConstructWith.pm lib/Moose/Exception/MustSupplyAnAttributeToConstructWith.pm lib/Moose/Exception/MustSupplyArrayRefAsCurriedArguments.pm lib/Moose/Exception/MustSupplyPackageNameAndName.pm lib/Moose/Exception/NeedsTypeConstraintUnionForTypeCoercionUnion.pm lib/Moose/Exception/NeitherAttributeNorAttributeNameIsGiven.pm lib/Moose/Exception/NeitherClassNorClassNameIsGiven.pm lib/Moose/Exception/NeitherRoleNorRoleNameIsGiven.pm lib/Moose/Exception/NeitherTypeNorTypeNameIsGiven.pm lib/Moose/Exception/NoAttributeFoundInSuperClass.pm lib/Moose/Exception/NoBodyToInitializeInAnAbstractBaseClass.pm lib/Moose/Exception/NoCasesMatched.pm lib/Moose/Exception/NoConstraintCheckForTypeConstraint.pm lib/Moose/Exception/NoDestructorClassSpecified.pm lib/Moose/Exception/NoImmutableTraitSpecifiedForClass.pm lib/Moose/Exception/NoParentGivenToSubtype.pm lib/Moose/Exception/OnlyInstancesCanBeCloned.pm lib/Moose/Exception/OperatorIsRequired.pm lib/Moose/Exception/OverloadConflictInSummation.pm lib/Moose/Exception/OverloadRequiresAMetaClass.pm lib/Moose/Exception/OverloadRequiresAMetaMethod.pm lib/Moose/Exception/OverloadRequiresAMetaOverload.pm lib/Moose/Exception/OverloadRequiresAMethodNameOrCoderef.pm lib/Moose/Exception/OverloadRequiresAnOperator.pm lib/Moose/Exception/OverloadRequiresNamesForCoderef.pm lib/Moose/Exception/OverrideConflictInComposition.pm lib/Moose/Exception/OverrideConflictInSummation.pm lib/Moose/Exception/PackageDoesNotUseMooseExporter.pm lib/Moose/Exception/PackageNameAndNameParamsNotGivenToWrap.pm lib/Moose/Exception/PackagesAndModulesAreNotCachable.pm lib/Moose/Exception/ParameterIsNotSubtypeOfParent.pm lib/Moose/Exception/ReferencesAreNotAllowedAsDefault.pm lib/Moose/Exception/RequiredAttributeLacksInitialization.pm lib/Moose/Exception/RequiredAttributeNeedsADefault.pm lib/Moose/Exception/RequiredMethodsImportedByClass.pm lib/Moose/Exception/RequiredMethodsNotImplementedByClass.pm lib/Moose/Exception/Role/Attribute.pm lib/Moose/Exception/Role/AttributeName.pm lib/Moose/Exception/Role/Class.pm lib/Moose/Exception/Role/EitherAttributeOrAttributeName.pm lib/Moose/Exception/Role/Instance.pm lib/Moose/Exception/Role/InstanceClass.pm lib/Moose/Exception/Role/InvalidAttributeOptions.pm lib/Moose/Exception/Role/Method.pm lib/Moose/Exception/Role/ParamsHash.pm lib/Moose/Exception/Role/Role.pm lib/Moose/Exception/Role/RoleForCreate.pm lib/Moose/Exception/Role/RoleForCreateMOPClass.pm lib/Moose/Exception/Role/TypeConstraint.pm lib/Moose/Exception/RoleDoesTheExcludedRole.pm lib/Moose/Exception/RoleExclusionConflict.pm lib/Moose/Exception/RoleNameRequired.pm lib/Moose/Exception/RoleNameRequiredForMooseMetaRole.pm lib/Moose/Exception/RolesDoNotSupportAugment.pm lib/Moose/Exception/RolesDoNotSupportExtends.pm lib/Moose/Exception/RolesDoNotSupportInner.pm lib/Moose/Exception/RolesDoNotSupportRegexReferencesForMethodModifiers.pm lib/Moose/Exception/RolesInCreateTakesAnArrayRef.pm lib/Moose/Exception/RolesListMustBeInstancesOfMooseMetaRole.pm lib/Moose/Exception/SingleParamsToNewMustBeHashRef.pm lib/Moose/Exception/TriggerMustBeACodeRef.pm lib/Moose/Exception/TypeConstraintCannotBeUsedForAParameterizableType.pm lib/Moose/Exception/TypeConstraintIsAlreadyCreated.pm lib/Moose/Exception/TypeParameterMustBeMooseMetaType.pm lib/Moose/Exception/UnableToCanonicalizeHandles.pm lib/Moose/Exception/UnableToCanonicalizeNonRolePackage.pm lib/Moose/Exception/UnableToRecognizeDelegateMetaclass.pm lib/Moose/Exception/UndefinedHashKeysPassedToMethod.pm lib/Moose/Exception/UnionCalledWithAnArrayRefAndAdditionalArgs.pm lib/Moose/Exception/UnionTakesAtleastTwoTypeNames.pm lib/Moose/Exception/ValidationFailedForInlineTypeConstraint.pm lib/Moose/Exception/ValidationFailedForTypeConstraint.pm lib/Moose/Exception/WrapTakesACodeRefToBless.pm lib/Moose/Exception/WrongTypeConstraintGiven.pm lib/Moose/Exporter.pm lib/Moose/Intro.pod lib/Moose/Manual.pod lib/Moose/Manual/Attributes.pod lib/Moose/Manual/BestPractices.pod lib/Moose/Manual/Classes.pod lib/Moose/Manual/Concepts.pod lib/Moose/Manual/Construction.pod lib/Moose/Manual/Contributing.pod lib/Moose/Manual/Delegation.pod lib/Moose/Manual/Delta.pod lib/Moose/Manual/Exceptions.pod lib/Moose/Manual/Exceptions/Manifest.pod lib/Moose/Manual/FAQ.pod lib/Moose/Manual/MOP.pod lib/Moose/Manual/MethodModifiers.pod lib/Moose/Manual/MooseX.pod lib/Moose/Manual/Resources.pod lib/Moose/Manual/Roles.pod lib/Moose/Manual/Support.pod lib/Moose/Manual/Types.pod lib/Moose/Manual/Unsweetened.pod lib/Moose/Meta/Attribute.pm lib/Moose/Meta/Attribute/Native.pm lib/Moose/Meta/Attribute/Native/Trait.pm lib/Moose/Meta/Attribute/Native/Trait/Array.pm lib/Moose/Meta/Attribute/Native/Trait/Bool.pm lib/Moose/Meta/Attribute/Native/Trait/Code.pm lib/Moose/Meta/Attribute/Native/Trait/Counter.pm lib/Moose/Meta/Attribute/Native/Trait/Hash.pm lib/Moose/Meta/Attribute/Native/Trait/Number.pm lib/Moose/Meta/Attribute/Native/Trait/String.pm lib/Moose/Meta/Class.pm lib/Moose/Meta/Class/Immutable/Trait.pm lib/Moose/Meta/Instance.pm lib/Moose/Meta/Method.pm lib/Moose/Meta/Method/Accessor.pm lib/Moose/Meta/Method/Accessor/Native.pm lib/Moose/Meta/Method/Accessor/Native/Array.pm lib/Moose/Meta/Method/Accessor/Native/Array/Writer.pm lib/Moose/Meta/Method/Accessor/Native/Array/accessor.pm lib/Moose/Meta/Method/Accessor/Native/Array/clear.pm lib/Moose/Meta/Method/Accessor/Native/Array/count.pm lib/Moose/Meta/Method/Accessor/Native/Array/delete.pm lib/Moose/Meta/Method/Accessor/Native/Array/elements.pm lib/Moose/Meta/Method/Accessor/Native/Array/first.pm lib/Moose/Meta/Method/Accessor/Native/Array/first_index.pm lib/Moose/Meta/Method/Accessor/Native/Array/get.pm lib/Moose/Meta/Method/Accessor/Native/Array/grep.pm lib/Moose/Meta/Method/Accessor/Native/Array/insert.pm lib/Moose/Meta/Method/Accessor/Native/Array/is_empty.pm lib/Moose/Meta/Method/Accessor/Native/Array/join.pm lib/Moose/Meta/Method/Accessor/Native/Array/map.pm lib/Moose/Meta/Method/Accessor/Native/Array/natatime.pm lib/Moose/Meta/Method/Accessor/Native/Array/pop.pm lib/Moose/Meta/Method/Accessor/Native/Array/push.pm lib/Moose/Meta/Method/Accessor/Native/Array/reduce.pm lib/Moose/Meta/Method/Accessor/Native/Array/set.pm lib/Moose/Meta/Method/Accessor/Native/Array/shallow_clone.pm lib/Moose/Meta/Method/Accessor/Native/Array/shift.pm lib/Moose/Meta/Method/Accessor/Native/Array/shuffle.pm lib/Moose/Meta/Method/Accessor/Native/Array/sort.pm lib/Moose/Meta/Method/Accessor/Native/Array/sort_in_place.pm lib/Moose/Meta/Method/Accessor/Native/Array/splice.pm lib/Moose/Meta/Method/Accessor/Native/Array/uniq.pm lib/Moose/Meta/Method/Accessor/Native/Array/unshift.pm lib/Moose/Meta/Method/Accessor/Native/Bool/not.pm lib/Moose/Meta/Method/Accessor/Native/Bool/set.pm lib/Moose/Meta/Method/Accessor/Native/Bool/toggle.pm lib/Moose/Meta/Method/Accessor/Native/Bool/unset.pm lib/Moose/Meta/Method/Accessor/Native/Code/execute.pm lib/Moose/Meta/Method/Accessor/Native/Code/execute_method.pm lib/Moose/Meta/Method/Accessor/Native/Collection.pm lib/Moose/Meta/Method/Accessor/Native/Counter/Writer.pm lib/Moose/Meta/Method/Accessor/Native/Counter/dec.pm lib/Moose/Meta/Method/Accessor/Native/Counter/inc.pm lib/Moose/Meta/Method/Accessor/Native/Counter/reset.pm lib/Moose/Meta/Method/Accessor/Native/Counter/set.pm lib/Moose/Meta/Method/Accessor/Native/Hash.pm lib/Moose/Meta/Method/Accessor/Native/Hash/Writer.pm lib/Moose/Meta/Method/Accessor/Native/Hash/accessor.pm lib/Moose/Meta/Method/Accessor/Native/Hash/clear.pm lib/Moose/Meta/Method/Accessor/Native/Hash/count.pm lib/Moose/Meta/Method/Accessor/Native/Hash/defined.pm lib/Moose/Meta/Method/Accessor/Native/Hash/delete.pm lib/Moose/Meta/Method/Accessor/Native/Hash/elements.pm lib/Moose/Meta/Method/Accessor/Native/Hash/exists.pm lib/Moose/Meta/Method/Accessor/Native/Hash/get.pm lib/Moose/Meta/Method/Accessor/Native/Hash/is_empty.pm lib/Moose/Meta/Method/Accessor/Native/Hash/keys.pm lib/Moose/Meta/Method/Accessor/Native/Hash/kv.pm lib/Moose/Meta/Method/Accessor/Native/Hash/set.pm lib/Moose/Meta/Method/Accessor/Native/Hash/shallow_clone.pm lib/Moose/Meta/Method/Accessor/Native/Hash/values.pm lib/Moose/Meta/Method/Accessor/Native/Number/abs.pm lib/Moose/Meta/Method/Accessor/Native/Number/add.pm lib/Moose/Meta/Method/Accessor/Native/Number/div.pm lib/Moose/Meta/Method/Accessor/Native/Number/mod.pm lib/Moose/Meta/Method/Accessor/Native/Number/mul.pm lib/Moose/Meta/Method/Accessor/Native/Number/set.pm lib/Moose/Meta/Method/Accessor/Native/Number/sub.pm lib/Moose/Meta/Method/Accessor/Native/Reader.pm lib/Moose/Meta/Method/Accessor/Native/String/append.pm lib/Moose/Meta/Method/Accessor/Native/String/chomp.pm lib/Moose/Meta/Method/Accessor/Native/String/chop.pm lib/Moose/Meta/Method/Accessor/Native/String/clear.pm lib/Moose/Meta/Method/Accessor/Native/String/inc.pm lib/Moose/Meta/Method/Accessor/Native/String/length.pm lib/Moose/Meta/Method/Accessor/Native/String/match.pm lib/Moose/Meta/Method/Accessor/Native/String/prepend.pm lib/Moose/Meta/Method/Accessor/Native/String/replace.pm lib/Moose/Meta/Method/Accessor/Native/String/substr.pm lib/Moose/Meta/Method/Accessor/Native/Writer.pm lib/Moose/Meta/Method/Augmented.pm lib/Moose/Meta/Method/Constructor.pm lib/Moose/Meta/Method/Delegation.pm lib/Moose/Meta/Method/Destructor.pm lib/Moose/Meta/Method/Meta.pm lib/Moose/Meta/Method/Overridden.pm lib/Moose/Meta/Mixin/AttributeCore.pm lib/Moose/Meta/Object/Trait.pm lib/Moose/Meta/Role.pm lib/Moose/Meta/Role/Application.pm lib/Moose/Meta/Role/Application/RoleSummation.pm lib/Moose/Meta/Role/Application/ToClass.pm lib/Moose/Meta/Role/Application/ToInstance.pm lib/Moose/Meta/Role/Application/ToRole.pm lib/Moose/Meta/Role/Attribute.pm lib/Moose/Meta/Role/Composite.pm lib/Moose/Meta/Role/Method.pm lib/Moose/Meta/Role/Method/Conflicting.pm lib/Moose/Meta/Role/Method/Required.pm lib/Moose/Meta/TypeCoercion.pm lib/Moose/Meta/TypeCoercion/Union.pm lib/Moose/Meta/TypeConstraint.pm lib/Moose/Meta/TypeConstraint/Class.pm lib/Moose/Meta/TypeConstraint/DuckType.pm lib/Moose/Meta/TypeConstraint/Enum.pm lib/Moose/Meta/TypeConstraint/Parameterizable.pm lib/Moose/Meta/TypeConstraint/Parameterized.pm lib/Moose/Meta/TypeConstraint/Registry.pm lib/Moose/Meta/TypeConstraint/Role.pm lib/Moose/Meta/TypeConstraint/Union.pm lib/Moose/Object.pm lib/Moose/Role.pm lib/Moose/Spec/Role.pod lib/Moose/Unsweetened.pod lib/Moose/Util.pm lib/Moose/Util/MetaRole.pm lib/Moose/Util/TypeConstraints.pm lib/Moose/Util/TypeConstraints/Builtins.pm lib/Test/Moose.pm lib/metaclass.pm lib/oose.pm mop.c mop.h perltidyrc ppport.h t/00-report-prereqs.dd t/00-report-prereqs.t t/000_load.t t/attributes/accessor_context.t t/attributes/accessor_inlining.t t/attributes/accessor_override_method.t t/attributes/accessor_overwrite_warning.t t/attributes/attr_dereference_test.t t/attributes/attribute_accessor_generation.t t/attributes/attribute_custom_metaclass.t t/attributes/attribute_delegation.t t/attributes/attribute_does.t t/attributes/attribute_inherited_slot_specs.t t/attributes/attribute_lazy_initializer.t t/attributes/attribute_names.t t/attributes/attribute_reader_generation.t t/attributes/attribute_required.t t/attributes/attribute_traits.t t/attributes/attribute_traits_n_meta.t t/attributes/attribute_traits_parameterized.t t/attributes/attribute_traits_registered.t t/attributes/attribute_triggers.t t/attributes/attribute_type_unions.t t/attributes/attribute_without_any_methods.t t/attributes/attribute_writer_generation.t t/attributes/bad_coerce.t t/attributes/chained_coercion.t t/attributes/clone_weak.t t/attributes/default_class_role_types.t t/attributes/default_undef.t t/attributes/delegation_and_modifiers.t t/attributes/delegation_arg_aliasing.t t/attributes/delegation_target_not_loaded.t t/attributes/illegal_options_for_inheritance.t t/attributes/inherit_lazy_build.t t/attributes/lazy_no_default.t t/attributes/method_generation_rules.t t/attributes/misc_attribute_coerce_lazy.t t/attributes/misc_attribute_tests.t t/attributes/more_attr_delegation.t t/attributes/no_init_arg.t t/attributes/no_slot_access.t t/attributes/non_alpha_attr_names.t t/attributes/numeric_defaults.t t/attributes/trigger_and_coerce.t t/attributes/type_constraint.t t/basics/always_strict_warnings.t t/basics/basic_class_setup.t t/basics/buildargs.t t/basics/buildargs_warning.t t/basics/create.t t/basics/create_anon.t t/basics/deprecations.t t/basics/destruction.t t/basics/error_handling.t t/basics/global-destruction-helper.pl t/basics/global_destruction.t t/basics/import_unimport.t t/basics/inner_and_augment.t t/basics/load_into_main.t t/basics/method_modifier_with_regexp.t t/basics/methods.t t/basics/moose_object_does.t t/basics/moose_respects_type_constraints.t t/basics/override_and_foreign_classes.t t/basics/override_augment_inner_super.t t/basics/rebless.t t/basics/require_superclasses.t t/basics/super_and_override.t t/basics/super_warns_on_args.t t/basics/universal_methods_wrappable.t t/basics/wrapped_method_cxt_propagation.t t/bugs/DEMOLISHALL.t t/bugs/DEMOLISHALL_shortcutted.t t/bugs/DEMOLISH_eats_exceptions.t t/bugs/DEMOLISH_eats_mini.t t/bugs/DEMOLISH_fails_without_metaclass.t t/bugs/Moose_Object_error.t t/bugs/anon_method_metaclass.t t/bugs/application_metarole_compat.t t/bugs/apply_role_to_one_instance_only.t t/bugs/attribute_trait_parameters.t t/bugs/augment_recursion_bug.t t/bugs/coerce_without_coercion.t t/bugs/constructor_object_overload.t t/bugs/create_anon_recursion.t t/bugs/create_anon_role_pass.t t/bugs/delete_sub_stash.t t/bugs/handles_foreign_class_bug.t t/bugs/immutable_metaclass_does_role.t t/bugs/immutable_n_default_x2.t t/bugs/inheriting_from_roles.t t/bugs/inline_reader_bug.t t/bugs/instance_application_role_args.t t/bugs/lazybuild_required_undef.t t/bugs/mark_as_methods_overloading_breakage.t t/bugs/moose_exporter_false_circular_reference_rt_63818.t t/bugs/moose_octal_defaults.t t/bugs/native_trait_handles_bad_value.t t/bugs/overloading_edge_cases.t t/bugs/reader_precedence_bug.t t/bugs/role_caller.t t/bugs/subclass_use_base_bug.t t/bugs/subtype_conflict_bug.t t/bugs/subtype_quote_bug.t t/bugs/super_recursion.t t/bugs/traits_with_exporter.t t/bugs/type_constraint_messages.t t/cmop/ArrayBasedStorage_test.t t/cmop/AttributesWithHistory_test.t t/cmop/BinaryTree_test.t t/cmop/C3MethodDispatchOrder_test.t t/cmop/ClassEncapsulatedAttributes_test.t t/cmop/Class_C3_compatibility.t t/cmop/InsideOutClass_test.t t/cmop/InstanceCountingClass_test.t t/cmop/LazyClass_test.t t/cmop/Perl6Attribute_test.t t/cmop/RT_27329_fix.t t/cmop/RT_39001_fix.t t/cmop/RT_41255.t t/cmop/add_attribute_alternate.t t/cmop/add_method_debugmode.t t/cmop/add_method_modifier.t t/cmop/advanced_methods.t t/cmop/anon_class.t t/cmop/anon_class_create_init.t t/cmop/anon_class_keep_alive.t t/cmop/anon_class_leak.t t/cmop/anon_class_removal.t t/cmop/anon_packages.t t/cmop/attribute.t t/cmop/attribute_duplication.t t/cmop/attribute_errors_and_edge_cases.t t/cmop/attribute_get_read_write.t t/cmop/attribute_initializer.t t/cmop/attribute_introspection.t t/cmop/attribute_non_alpha_name.t t/cmop/attributes.t t/cmop/basic.t t/cmop/before_after_dollar_under.t t/cmop/class_errors_and_edge_cases.t t/cmop/class_is_pristine.t t/cmop/class_precedence_list.t t/cmop/constant_codeinfo.t t/cmop/create_class.t t/cmop/custom_instance.t t/cmop/deprecated.t t/cmop/get_code_info.t t/cmop/immutable_custom_trait.t t/cmop/immutable_metaclass.t t/cmop/immutable_w_constructors.t t/cmop/immutable_w_custom_metaclass.t t/cmop/inline_and_dollar_at.t t/cmop/inline_structor.t t/cmop/insertion_order.t t/cmop/instance.t t/cmop/instance_inline.t t/cmop/instance_metaclass_incompat.t t/cmop/instance_metaclass_incompat_dyn.t t/cmop/lib/ArrayBasedStorage.pm t/cmop/lib/AttributesWithHistory.pm t/cmop/lib/BinaryTree.pm t/cmop/lib/C3MethodDispatchOrder.pm t/cmop/lib/ClassEncapsulatedAttributes.pm t/cmop/lib/InsideOutClass.pm t/cmop/lib/InstanceCountingClass.pm t/cmop/lib/LazyClass.pm t/cmop/lib/MyMetaClass.pm t/cmop/lib/MyMetaClass/Attribute.pm t/cmop/lib/MyMetaClass/Instance.pm t/cmop/lib/MyMetaClass/Method.pm t/cmop/lib/MyMetaClass/Random.pm t/cmop/lib/Perl6Attribute.pm t/cmop/lib/SyntaxError.pm t/cmop/load.t t/cmop/magic.t t/cmop/make_mutable.t t/cmop/meta_method.t t/cmop/meta_package.t t/cmop/meta_package_extension.t t/cmop/metaclass.t t/cmop/metaclass_incompatibility.t t/cmop/metaclass_incompatibility_dyn.t t/cmop/metaclass_inheritance.t t/cmop/metaclass_loads_classes.t t/cmop/metaclass_reinitialize.t t/cmop/method.t t/cmop/method_modifiers.t t/cmop/methods.t t/cmop/modify_parent_method.t t/cmop/new_and_clone_metaclasses.t t/cmop/null_stash.t t/cmop/numeric_defaults.t t/cmop/package_variables.t t/cmop/random_eval_bug.t t/cmop/rebless_instance.t t/cmop/rebless_instance_away.t t/cmop/rebless_overload.t t/cmop/rebless_with_extra_params.t t/cmop/scala_style_mixin_composition.t t/cmop/self_introspection.t t/cmop/subclasses.t t/cmop/subname.t t/cmop/universal_methods.t t/compat/composite_metaroles.t t/compat/extends_nonmoose_that_isa_moose_with_metarole.t t/compat/foreign_inheritence.t t/compat/inc_hash.t t/compat/module_refresh_compat.t t/compat/moose_respects_base.t t/examples/Child_Parent_attr_inherit.t t/examples/example1.t t/examples/example2.t t/examples/example_Moose_POOP.t t/examples/example_Protomoose.t t/examples/example_w_DCS.t t/examples/example_w_TestDeep.t t/examples/record_set_iterator.t t/exceptions/attribute.t t/exceptions/class-mop-attribute.t t/exceptions/class-mop-class-immutable-trait.t t/exceptions/class-mop-class.t t/exceptions/class-mop-method-accessor.t t/exceptions/class-mop-method-constructor.t t/exceptions/class-mop-method-generated.t t/exceptions/class-mop-method-meta.t t/exceptions/class-mop-method-wrapped.t t/exceptions/class-mop-method.t t/exceptions/class-mop-mixin-hasattributes.t t/exceptions/class-mop-mixin-hasmethods.t t/exceptions/class-mop-module.t t/exceptions/class-mop-object.t t/exceptions/class-mop-package.t t/exceptions/class.t t/exceptions/cmop.t t/exceptions/exception-lazyattributeneedsadefault.t t/exceptions/frame-leak.t t/exceptions/meta-role.t t/exceptions/metaclass.t t/exceptions/moose-exporter.t t/exceptions/moose-meta-attribute-native-traits.t t/exceptions/moose-meta-class-immutable-trait.t t/exceptions/moose-meta-method-accessor-native-array.t t/exceptions/moose-meta-method-accessor-native-collection.t t/exceptions/moose-meta-method-accessor-native-grep.t t/exceptions/moose-meta-method-accessor-native-hash-set.t t/exceptions/moose-meta-method-accessor-native-hash.t t/exceptions/moose-meta-method-accessor-native-string-match.t t/exceptions/moose-meta-method-accessor-native-string-replace.t t/exceptions/moose-meta-method-accessor-native-string-substr.t t/exceptions/moose-meta-method-accessor-native.t t/exceptions/moose-meta-method-accessor.t t/exceptions/moose-meta-method-augmented.t t/exceptions/moose-meta-method-constructor.t t/exceptions/moose-meta-method-delegation.t t/exceptions/moose-meta-method-destructor.t t/exceptions/moose-meta-method-overridden.t t/exceptions/moose-meta-role-application-rolesummation.t t/exceptions/moose-meta-role-application-toclass.t t/exceptions/moose-meta-role-application-torole.t t/exceptions/moose-meta-role-application.t t/exceptions/moose-meta-role-attribute.t t/exceptions/moose-meta-role-composite.t t/exceptions/moose-meta-typecoercion-union.t t/exceptions/moose-meta-typecoercion.t t/exceptions/moose-meta-typeconstraint-enum.t t/exceptions/moose-meta-typeconstraint-parameterizable.t t/exceptions/moose-meta-typeconstraint-parameterized.t t/exceptions/moose-meta-typeconstraint-registry.t t/exceptions/moose-meta-typeconstraint.t t/exceptions/moose-role.t t/exceptions/moose-util-metarole.t t/exceptions/moose-util-typeconstraints.t t/exceptions/moose.t t/exceptions/object.t t/exceptions/overload.t t/exceptions/rt-92818.t t/exceptions/rt-94795.t t/exceptions/stringify.t t/exceptions/traits.t t/exceptions/typeconstraints.t t/exceptions/util.t t/immutable/apply_roles_to_immutable.t t/immutable/buildargs.t t/immutable/constructor_is_not_moose.t t/immutable/constructor_is_wrapped.t t/immutable/default_values.t t/immutable/definition_context.t t/immutable/immutable_constructor_error.t t/immutable/immutable_destroy.t t/immutable/immutable_meta_class.t t/immutable/immutable_metaclass_with_traits.t t/immutable/immutable_moose.t t/immutable/immutable_roundtrip.t t/immutable/immutable_trigger_from_constructor.t t/immutable/inline_close_over.t t/immutable/inline_fallbacks.t t/immutable/inlined_constructors_n_types.t t/immutable/multiple_demolish_inline.t t/lib/Bar.pm t/lib/Bar7/Meta/Trait.pm t/lib/Bar7/Meta/Trait2.pm t/lib/Foo.pm t/lib/Moose/Meta/Attribute/Custom/Bar.pm t/lib/Moose/Meta/Attribute/Custom/Foo.pm t/lib/Moose/Meta/Attribute/Custom/Trait/Bar.pm t/lib/Moose/Meta/Attribute/Custom/Trait/Foo.pm t/lib/MyExporter.pm t/lib/MyMetaclassRole.pm t/lib/MyMooseA.pm t/lib/MyMooseB.pm t/lib/MyMooseObject.pm t/lib/NoInlineAttribute.pm t/lib/Overloading/ClassConsumesRoleConsumesOverloads.pm t/lib/Overloading/ClassWithCombiningRole.pm t/lib/Overloading/ClassWithOneRole.pm t/lib/Overloading/CombiningClass.pm t/lib/Overloading/CombiningRole.pm t/lib/Overloading/RoleConsumesOverloads.pm t/lib/Overloading/RoleWithOverloads.pm t/lib/Overloading/RoleWithoutOverloads.pm t/lib/OverloadingTests.pm t/lib/Real/Package.pm t/lib/Role/BreakOnLoad.pm t/lib/Role/Child.pm t/lib/Role/Interface.pm t/lib/Role/Parent.pm t/metaclasses/create_anon_with_required_attr.t t/metaclasses/custom_attr_meta_as_role.t t/metaclasses/custom_attr_meta_with_roles.t t/metaclasses/easy_init_meta.t t/metaclasses/export_with_prototype.t t/metaclasses/exporter_also_with_trait.t t/metaclasses/exporter_meta_lookup.t t/metaclasses/exporter_sub_names.t t/metaclasses/goto_moose_import.t t/metaclasses/immutable_metaclass_compat_bug.t t/metaclasses/meta_name.t t/metaclasses/metaclass_compat.t t/metaclasses/metaclass_compat_no_fixing_bug.t t/metaclasses/metaclass_compat_role_conflicts.t t/metaclasses/metaclass_parameterized_traits.t t/metaclasses/metaclass_traits.t t/metaclasses/metarole.t t/metaclasses/metarole_combination.t t/metaclasses/metarole_on_anon.t t/metaclasses/metarole_w_metaclass_pm.t t/metaclasses/metaroles_of_metaroles.t t/metaclasses/moose_exporter.t t/metaclasses/moose_exporter_trait_aliases.t t/metaclasses/moose_for_meta.t t/metaclasses/moose_nonmoose_metatrait_init_order.t t/metaclasses/moose_nonmoose_moose_chain_init_meta.t t/metaclasses/moose_w_metaclass.t t/metaclasses/new_metaclass.t t/metaclasses/new_object_BUILD.t t/metaclasses/overloading.t t/metaclasses/reinitialize.t t/metaclasses/use_base_of_moose.t t/moose_util/apply_roles.t t/moose_util/create_alias.t t/moose_util/ensure_all_roles.t t/moose_util/method_mod_args.t t/moose_util/moose_util.t t/moose_util/moose_util_does_role.t t/moose_util/moose_util_search_class_by_role.t t/moose_util/resolve_alias.t t/moose_util/with_traits.t t/native_traits/array_coerce.t t/native_traits/array_from_role.t t/native_traits/array_subtypes.t t/native_traits/array_trigger.t t/native_traits/collection_with_roles.t t/native_traits/custom_instance.t t/native_traits/hash_coerce.t t/native_traits/hash_subtypes.t t/native_traits/hash_trigger.t t/native_traits/remove_attribute.t t/native_traits/shallow_clone.t t/native_traits/trait_array.t t/native_traits/trait_bool.t t/native_traits/trait_code.t t/native_traits/trait_counter.t t/native_traits/trait_hash.t t/native_traits/trait_number.t t/native_traits/trait_string.t t/recipes/basics_bankaccount_methodmodifiersandsubclassing.t t/recipes/basics_binarytree_attributefeatures.t t/recipes/basics_company_subtypes.t t/recipes/basics_datetime_extendingnonmooseparent.t t/recipes/basics_document_augmentandinner.t t/recipes/basics_genome_overloadingsubtypesandcoercion.t t/recipes/basics_http_subtypesandcoercion.t t/recipes/basics_point_attributesandsubclassing.t t/recipes/extending_debugging_baseclassrole.t t/recipes/extending_mooseish_moosesugar.t t/recipes/legacy_debugging_baseclassreplacement.t t/recipes/legacy_labeled_attributemetaclass.t t/recipes/meta_globref_instancemetaclass.t t/recipes/meta_labeled_attributetrait.t t/recipes/meta_privateorpublic_methodmetaclass.t t/recipes/meta_table_metaclasstrait.t t/recipes/roles_applicationtoinstance.t t/recipes/roles_comparable_codereuse.t t/recipes/roles_restartable_advancedcomposition.t t/roles/anonymous_roles.t t/roles/application_toclass.t t/roles/apply_role.t t/roles/build.t t/roles/conflict_many_methods.t t/roles/create_role.t t/roles/create_role_subclass.t t/roles/empty_method_modifiers_meta_bug.t t/roles/extending_role_attrs.t t/roles/free_anonymous_roles.t t/roles/imported_required_method.t t/roles/meta_role.t t/roles/method_aliasing_in_composition.t t/roles/method_exclusion_in_composition.t t/roles/method_modifiers.t t/roles/methods.t t/roles/more_alias_and_exclude.t t/roles/more_role_edge_cases.t t/roles/new_meta_role.t t/roles/overloading_combine_to_class.t t/roles/overloading_combine_to_instance.t t/roles/overloading_combine_to_role.t t/roles/overloading_composition_errors.t t/roles/overloading_remove_attributes_bug.t t/roles/overloading_to_class.t t/roles/overloading_to_instance.t t/roles/overloading_to_role.t t/roles/overriding.t t/roles/reinitialize_anon_role.t t/roles/role.t t/roles/role_attr_application.t t/roles/role_attribute_conflict.t t/roles/role_attrs.t t/roles/role_compose_requires.t t/roles/role_composite.t t/roles/role_composite_exclusion.t t/roles/role_composition_attributes.t t/roles/role_composition_conflict_detection.t t/roles/role_composition_errors.t t/roles/role_composition_method_mods.t t/roles/role_composition_methods.t t/roles/role_composition_override.t t/roles/role_composition_req_methods.t t/roles/role_conflict_detection.t t/roles/role_conflict_edge_cases.t t/roles/role_consumers.t t/roles/role_exclusion.t t/roles/role_exclusion_and_alias_bug.t t/roles/role_for_combination.t t/roles/roles_and_method_cloning.t t/roles/roles_and_req_method_edge_cases.t t/roles/roles_applied_in_create.t t/roles/run_time_role_composition.t t/roles/runtime_roles_and_attrs.t t/roles/runtime_roles_and_nonmoose.t t/roles/runtime_roles_w_params.t t/roles/use_base_does.t t/test_moose/test_moose.t t/test_moose/test_moose_does_ok.t t/test_moose/test_moose_has_attribute_ok.t t/test_moose/test_moose_meta_ok.t t/test_moose/with_immutable.t t/todo_tests/exception_reflects_failed_constraint.t t/todo_tests/immutable_n_around.t t/todo_tests/moose_and_threads.t t/todo_tests/replacing_super_methods.t t/todo_tests/required_role_accessors.t t/todo_tests/role_attr_methods_original_package.t t/todo_tests/role_insertion_order.t t/todo_tests/various_role_features.t t/todo_tests/wrong-inner.t t/type_constraints/advanced_type_creation.t t/type_constraints/class_subtypes.t t/type_constraints/class_type_constraint.t t/type_constraints/coerced_parameterized_types.t t/type_constraints/container_type_coercion.t t/type_constraints/container_type_constraint.t t/type_constraints/custom_parameterized_types.t t/type_constraints/custom_type_errors.t t/type_constraints/define_type_twice_throws.t t/type_constraints/duck_type_handles.t t/type_constraints/duck_types.t t/type_constraints/enum.t t/type_constraints/inlining.t t/type_constraints/match_type_operator.t t/type_constraints/maybe_type_constraint.t t/type_constraints/misc_type_tests.t t/type_constraints/name_conflicts.t t/type_constraints/normalize_type_name.t t/type_constraints/parameterize_from.t t/type_constraints/role_type_constraint.t t/type_constraints/subtype_auto_vivify_parent.t t/type_constraints/subtyping_parameterized_types.t t/type_constraints/subtyping_union_types.t t/type_constraints/throw_error.t t/type_constraints/type_coersion_on_lazy_attributes.t t/type_constraints/type_names.t t/type_constraints/type_notation_parser.t t/type_constraints/types_and_undef.t t/type_constraints/union_is_a_type_of.t t/type_constraints/union_types.t t/type_constraints/union_types_and_coercions.t t/type_constraints/util_find_type_constraint.t t/type_constraints/util_more_type_coercion.t t/type_constraints/util_std_type_constraints.t t/type_constraints/util_type_coercion.t t/type_constraints/util_type_constraints.t t/type_constraints/util_type_constraints_export.t t/type_constraints/util_type_reloading.t t/type_constraints/with-specio.t t/zzz-check-breaks.t xs/Attribute.xs xs/AttributeCore.xs xs/Class.xs xs/Generated.xs xs/HasAttributes.xs xs/HasMethods.xs xs/Inlined.xs xs/Instance.xs xs/MOP.xs xs/Method.xs xs/Moose.xs xs/Package.xs xs/ToInstance.xs xs/typemap xt/author/authority.t xt/author/debugger-duck_type.t xt/author/eol.t xt/author/memory_leaks.t xt/author/mojibake.t xt/author/no-tabs.t xt/author/pod-coverage.t xt/author/pod-spell.t xt/author/pod-syntax.t xt/author/test-my-dependents.t xt/release/00-compile.t xt/release/cpan-changes.t xt/release/distmeta.t xt/release/kwalitee.t Moose-2.1604/META.json000644 000766 000024 00000304452 12617452415 014603 0ustar00etherstaff000000 000000 { "abstract" : "A postmodern object system for Perl 5", "author" : [ "Stevan Little ", "Dave Rolsky ", "Jesse Luehrs ", "Shawn M Moore ", "יובל קוג'מן (Yuval Kogman) ", "Karen Etheridge ", "Florian Ragwitz ", "Hans Dieter Pearcey ", "Chris Prather ", "Matt S Trout " ], "dynamic_config" : 0, "generated_by" : "Dist::Zilla version 5.041, CPAN::Meta::Converter version 2.150005", "license" : [ "perl_5" ], "meta-spec" : { "url" : "http://search.cpan.org/perldoc?CPAN::Meta::Spec", "version" : 2 }, "name" : "Moose", "no_index" : { "directory" : [ "author", "benchmarks", "doc", "inc" ], "namespace" : [ "Class::MOP::Mixin", "Moose::Meta::Method::Accessor::Native", "Moose::Meta::Mixin" ], "package" : [ "Class::MOP::Class::Immutable::Trait", "Class::MOP::Deprecated", "Class::MOP::MiniTrait", "Class::MOP::Mixin", "Moose::Deprecated", "Moose::Meta::Attribute::Native::Trait", "Moose::Meta::Class::Immutable::Trait", "Moose::Meta::Method::Accessor::Native", "Moose::Meta::Object::Trait", "Moose::Util::TypeConstraints::Builtins" ] }, "prereqs" : { "configure" : { "requires" : { "Dist::CheckConflicts" : "0.02", "ExtUtils::CBuilder" : "0.27", "ExtUtils::MakeMaker" : "0", "File::Spec" : "0", "perl" : "5.008003" } }, "develop" : { "requires" : { "Algorithm::C3" : "0", "Class::Load" : "0.07", "DBM::Deep" : "1.003", "Data::Visitor" : "0.26", "DateTime" : "0", "DateTime::Calendar::Mayan" : "0", "DateTime::Format::MySQL" : "0", "Declare::Constraints::Simple" : "0", "ExtUtils::MakeMaker::Dist::Zilla::Develop" : "0", "File::Find::Rule" : "0", "File::Spec" : "0", "HTTP::Headers" : "0", "IO::File" : "0", "IO::Handle" : "0", "IO::String" : "0", "IPC::Open3" : "0", "Locale::US" : "0", "Module::CPANTS::Analyse" : "0.92", "Module::Refresh" : "0", "MooseX::MarkAsMethods" : "0", "MooseX::NonMoose" : "0", "PadWalker" : "0", "Params::Coerce" : "0", "Regexp::Common" : "0", "SUPER" : "1.10", "Specio" : "0.10", "Test::CPAN::Changes" : "0.19", "Test::CPAN::Meta" : "0", "Test::Deep" : "0", "Test::EOL" : "0", "Test::Inline" : "0", "Test::Kwalitee" : "1.21", "Test::LeakTrace" : "0", "Test::Memory::Cycle" : "0", "Test::Mojibake" : "0", "Test::More" : "0.94", "Test::NoTabs" : "0", "Test::Output" : "0", "Test::Pod" : "1.41", "Test::Pod::Coverage" : "1.04", "Test::Spelling" : "0", "URI" : "0", "blib" : "0" }, "suggests" : { "CPAN::Meta::Requirements" : "0", "Carp" : "1.22", "Class::Load" : "0.09", "Class::Load::XS" : "0.01", "Data::OptList" : "0.107", "Devel::GlobalDestruction" : "0", "Devel::OverloadInfo" : "0.004", "Devel::StackTrace" : "1.33", "Dist::Zilla" : "5", "Dist::Zilla::Plugin::BumpVersionAfterRelease" : "0", "Dist::Zilla::Plugin::CheckChangesHasContent" : "0", "Dist::Zilla::Plugin::CheckVersionIncrement" : "0", "Dist::Zilla::Plugin::ConfirmRelease" : "0", "Dist::Zilla::Plugin::Conflicts" : "0.16", "Dist::Zilla::Plugin::CopyFilesFromRelease" : "0", "Dist::Zilla::Plugin::EnsurePrereqsInstalled" : "0.003", "Dist::Zilla::Plugin::ExecDir" : "0", "Dist::Zilla::Plugin::FileFinder::ByName" : "0", "Dist::Zilla::Plugin::FileFinder::Filter" : "0", "Dist::Zilla::Plugin::Git::Check" : "0", "Dist::Zilla::Plugin::Git::CheckFor::CorrectBranch" : "0", "Dist::Zilla::Plugin::Git::Commit" : "0", "Dist::Zilla::Plugin::Git::Contributors" : "0", "Dist::Zilla::Plugin::Git::Describe" : "0.004", "Dist::Zilla::Plugin::Git::GatherDir" : "0", "Dist::Zilla::Plugin::Git::Push" : "0", "Dist::Zilla::Plugin::Git::Remote::Check" : "0", "Dist::Zilla::Plugin::Git::Tag" : "0", "Dist::Zilla::Plugin::License" : "0", "Dist::Zilla::Plugin::MakeMaker::Awesome" : "0", "Dist::Zilla::Plugin::Manifest" : "0", "Dist::Zilla::Plugin::MetaConfig" : "0", "Dist::Zilla::Plugin::MetaJSON" : "0", "Dist::Zilla::Plugin::MetaNoIndex" : "0", "Dist::Zilla::Plugin::MetaProvides::Package" : "1.15000002", "Dist::Zilla::Plugin::MetaResources" : "0", "Dist::Zilla::Plugin::MetaTests" : "0", "Dist::Zilla::Plugin::MetaYAML" : "0", "Dist::Zilla::Plugin::MojibakeTests" : "0", "Dist::Zilla::Plugin::NextRelease" : "5.033", "Dist::Zilla::Plugin::PodSyntaxTests" : "0", "Dist::Zilla::Plugin::Prereqs" : "0", "Dist::Zilla::Plugin::Prereqs::AuthorDeps" : "0", "Dist::Zilla::Plugin::PromptIfStale" : "0", "Dist::Zilla::Plugin::ReadmeAnyFromPod" : "0.142180", "Dist::Zilla::Plugin::RewriteVersion" : "0", "Dist::Zilla::Plugin::Run::AfterRelease" : "0", "Dist::Zilla::Plugin::RunExtraTests" : "0", "Dist::Zilla::Plugin::SurgicalPodWeaver" : "0.0023", "Dist::Zilla::Plugin::Test::CPAN::Changes" : "0", "Dist::Zilla::Plugin::Test::CheckBreaks" : "0", "Dist::Zilla::Plugin::Test::Compile" : "2.037", "Dist::Zilla::Plugin::Test::EOL" : "0.14", "Dist::Zilla::Plugin::Test::Kwalitee" : "0", "Dist::Zilla::Plugin::Test::NoTabs" : "0", "Dist::Zilla::Plugin::Test::ReportPrereqs" : "0", "Dist::Zilla::Plugin::TestRelease" : "0", "Dist::Zilla::Plugin::UploadToCPAN" : "0", "Dist::Zilla::Util::AuthorDeps" : "5.021", "Eval::Closure" : "0.04", "ExtUtils::CBuilder" : "0.27", "File::Find::Rule" : "0", "File::Spec" : "0", "File::pushd" : "0", "IPC::System::Simple" : "0", "List::MoreUtils" : "0.28", "List::Util" : "1.35", "MRO::Compat" : "0.05", "Module::Runtime" : "0.014", "Module::Runtime::Conflicts" : "0.002", "Package::DeprecationManager" : "0.11", "Package::Stash" : "0.32", "Package::Stash::XS" : "0.24", "Params::Util" : "1.00", "Path::Tiny" : "0", "Scalar::Util" : "1.19", "Software::License::Perl_5" : "0", "Sub::Exporter" : "0.980", "Sub::Identify" : "0", "Sub::Name" : "0.05", "Task::Weaken" : "0", "Test::Deep" : "0", "Test::Inline" : "0", "Test::Inline::Extract" : "0", "Try::Tiny" : "0.17", "autodie" : "0", "parent" : "0.223", "perl" : "5.008003", "strict" : "1.03", "warnings" : "1.03" } }, "runtime" : { "requires" : { "Carp" : "1.22", "Class::Load" : "0.09", "Class::Load::XS" : "0.01", "Data::OptList" : "0.107", "Devel::GlobalDestruction" : "0", "Devel::OverloadInfo" : "0.004", "Devel::StackTrace" : "1.33", "Dist::CheckConflicts" : "0.02", "Eval::Closure" : "0.04", "List::MoreUtils" : "0.28", "List::Util" : "1.35", "MRO::Compat" : "0.05", "Module::Runtime" : "0.014", "Module::Runtime::Conflicts" : "0.002", "Package::DeprecationManager" : "0.11", "Package::Stash" : "0.32", "Package::Stash::XS" : "0.24", "Params::Util" : "1.00", "Scalar::Util" : "1.19", "Sub::Exporter" : "0.980", "Sub::Identify" : "0", "Sub::Name" : "0.05", "Task::Weaken" : "0", "Try::Tiny" : "0.17", "parent" : "0.223", "perl" : "5.008003", "strict" : "1.03", "warnings" : "1.03" }, "suggests" : { "Devel::PartialDump" : "0.14" } }, "test" : { "recommends" : { "CPAN::Meta" : "2.120900" }, "requires" : { "CPAN::Meta::Check" : "0.011", "CPAN::Meta::Requirements" : "0", "ExtUtils::MakeMaker" : "0", "File::Spec" : "0", "Test::CleanNamespaces" : "0.13", "Test::Fatal" : "0.001", "Test::More" : "0.88", "Test::Requires" : "0.05", "Test::Warnings" : "0.016" } } }, "provides" : { "Class::MOP" : { "file" : "lib/Class/MOP.pm", "version" : "2.1604" }, "Class::MOP::Attribute" : { "file" : "lib/Class/MOP/Attribute.pm", "version" : "2.1604" }, "Class::MOP::Class" : { "file" : "lib/Class/MOP/Class.pm", "version" : "2.1604" }, "Class::MOP::Instance" : { "file" : "lib/Class/MOP/Instance.pm", "version" : "2.1604" }, "Class::MOP::Method" : { "file" : "lib/Class/MOP/Method.pm", "version" : "2.1604" }, "Class::MOP::Method::Accessor" : { "file" : "lib/Class/MOP/Method/Accessor.pm", "version" : "2.1604" }, "Class::MOP::Method::Constructor" : { "file" : "lib/Class/MOP/Method/Constructor.pm", "version" : "2.1604" }, "Class::MOP::Method::Generated" : { "file" : "lib/Class/MOP/Method/Generated.pm", "version" : "2.1604" }, "Class::MOP::Method::Inlined" : { "file" : "lib/Class/MOP/Method/Inlined.pm", "version" : "2.1604" }, "Class::MOP::Method::Meta" : { "file" : "lib/Class/MOP/Method/Meta.pm", "version" : "2.1604" }, "Class::MOP::Method::Wrapped" : { "file" : "lib/Class/MOP/Method/Wrapped.pm", "version" : "2.1604" }, "Class::MOP::Module" : { "file" : "lib/Class/MOP/Module.pm", "version" : "2.1604" }, "Class::MOP::Object" : { "file" : "lib/Class/MOP/Object.pm", "version" : "2.1604" }, "Class::MOP::Overload" : { "file" : "lib/Class/MOP/Overload.pm", "version" : "2.1604" }, "Class::MOP::Package" : { "file" : "lib/Class/MOP/Package.pm", "version" : "2.1604" }, "Moose" : { "file" : "lib/Moose.pm", "version" : "2.1604" }, "Moose::Cookbook" : { "file" : "lib/Moose/Cookbook.pod", "version" : "2.1604" }, "Moose::Cookbook::Basics::BankAccount_MethodModifiersAndSubclassing" : { "file" : "lib/Moose/Cookbook/Basics/BankAccount_MethodModifiersAndSubclassing.pod", "version" : "2.1604" }, "Moose::Cookbook::Basics::BinaryTree_AttributeFeatures" : { "file" : "lib/Moose/Cookbook/Basics/BinaryTree_AttributeFeatures.pod", "version" : "2.1604" }, "Moose::Cookbook::Basics::BinaryTree_BuilderAndLazyBuild" : { "file" : "lib/Moose/Cookbook/Basics/BinaryTree_BuilderAndLazyBuild.pod", "version" : "2.1604" }, "Moose::Cookbook::Basics::Company_Subtypes" : { "file" : "lib/Moose/Cookbook/Basics/Company_Subtypes.pod", "version" : "2.1604" }, "Moose::Cookbook::Basics::DateTime_ExtendingNonMooseParent" : { "file" : "lib/Moose/Cookbook/Basics/DateTime_ExtendingNonMooseParent.pod", "version" : "2.1604" }, "Moose::Cookbook::Basics::Document_AugmentAndInner" : { "file" : "lib/Moose/Cookbook/Basics/Document_AugmentAndInner.pod", "version" : "2.1604" }, "Moose::Cookbook::Basics::Genome_OverloadingSubtypesAndCoercion" : { "file" : "lib/Moose/Cookbook/Basics/Genome_OverloadingSubtypesAndCoercion.pod", "version" : "2.1604" }, "Moose::Cookbook::Basics::HTTP_SubtypesAndCoercion" : { "file" : "lib/Moose/Cookbook/Basics/HTTP_SubtypesAndCoercion.pod", "version" : "2.1604" }, "Moose::Cookbook::Basics::Immutable" : { "file" : "lib/Moose/Cookbook/Basics/Immutable.pod", "version" : "2.1604" }, "Moose::Cookbook::Basics::Person_BUILDARGSAndBUILD" : { "file" : "lib/Moose/Cookbook/Basics/Person_BUILDARGSAndBUILD.pod", "version" : "2.1604" }, "Moose::Cookbook::Basics::Point_AttributesAndSubclassing" : { "file" : "lib/Moose/Cookbook/Basics/Point_AttributesAndSubclassing.pod", "version" : "2.1604" }, "Moose::Cookbook::Extending::Debugging_BaseClassRole" : { "file" : "lib/Moose/Cookbook/Extending/Debugging_BaseClassRole.pod", "version" : "2.1604" }, "Moose::Cookbook::Extending::ExtensionOverview" : { "file" : "lib/Moose/Cookbook/Extending/ExtensionOverview.pod", "version" : "2.1604" }, "Moose::Cookbook::Extending::Mooseish_MooseSugar" : { "file" : "lib/Moose/Cookbook/Extending/Mooseish_MooseSugar.pod", "version" : "2.1604" }, "Moose::Cookbook::Legacy::Debugging_BaseClassReplacement" : { "file" : "lib/Moose/Cookbook/Legacy/Debugging_BaseClassReplacement.pod", "version" : "2.1604" }, "Moose::Cookbook::Legacy::Labeled_AttributeMetaclass" : { "file" : "lib/Moose/Cookbook/Legacy/Labeled_AttributeMetaclass.pod", "version" : "2.1604" }, "Moose::Cookbook::Legacy::Table_ClassMetaclass" : { "file" : "lib/Moose/Cookbook/Legacy/Table_ClassMetaclass.pod", "version" : "2.1604" }, "Moose::Cookbook::Meta::GlobRef_InstanceMetaclass" : { "file" : "lib/Moose/Cookbook/Meta/GlobRef_InstanceMetaclass.pod", "version" : "2.1604" }, "Moose::Cookbook::Meta::Labeled_AttributeTrait" : { "file" : "lib/Moose/Cookbook/Meta/Labeled_AttributeTrait.pod", "version" : "2.1604" }, "Moose::Cookbook::Meta::PrivateOrPublic_MethodMetaclass" : { "file" : "lib/Moose/Cookbook/Meta/PrivateOrPublic_MethodMetaclass.pod", "version" : "2.1604" }, "Moose::Cookbook::Meta::Table_MetaclassTrait" : { "file" : "lib/Moose/Cookbook/Meta/Table_MetaclassTrait.pod", "version" : "2.1604" }, "Moose::Cookbook::Meta::WhyMeta" : { "file" : "lib/Moose/Cookbook/Meta/WhyMeta.pod", "version" : "2.1604" }, "Moose::Cookbook::Roles::ApplicationToInstance" : { "file" : "lib/Moose/Cookbook/Roles/ApplicationToInstance.pod", "version" : "2.1604" }, "Moose::Cookbook::Roles::Comparable_CodeReuse" : { "file" : "lib/Moose/Cookbook/Roles/Comparable_CodeReuse.pod", "version" : "2.1604" }, "Moose::Cookbook::Roles::Restartable_AdvancedComposition" : { "file" : "lib/Moose/Cookbook/Roles/Restartable_AdvancedComposition.pod", "version" : "2.1604" }, "Moose::Cookbook::Snack::Keywords" : { "file" : "lib/Moose/Cookbook/Snack/Keywords.pod", "version" : "2.1604" }, "Moose::Cookbook::Snack::Types" : { "file" : "lib/Moose/Cookbook/Snack/Types.pod", "version" : "2.1604" }, "Moose::Cookbook::Style" : { "file" : "lib/Moose/Cookbook/Style.pod", "version" : "2.1604" }, "Moose::Exception" : { "file" : "lib/Moose/Exception.pm", "version" : "2.1604" }, "Moose::Exception::AccessorMustReadWrite" : { "file" : "lib/Moose/Exception/AccessorMustReadWrite.pm", "version" : "2.1604" }, "Moose::Exception::AddParameterizableTypeTakesParameterizableType" : { "file" : "lib/Moose/Exception/AddParameterizableTypeTakesParameterizableType.pm", "version" : "2.1604" }, "Moose::Exception::AddRoleTakesAMooseMetaRoleInstance" : { "file" : "lib/Moose/Exception/AddRoleTakesAMooseMetaRoleInstance.pm", "version" : "2.1604" }, "Moose::Exception::AddRoleToARoleTakesAMooseMetaRole" : { "file" : "lib/Moose/Exception/AddRoleToARoleTakesAMooseMetaRole.pm", "version" : "2.1604" }, "Moose::Exception::ApplyTakesABlessedInstance" : { "file" : "lib/Moose/Exception/ApplyTakesABlessedInstance.pm", "version" : "2.1604" }, "Moose::Exception::AttachToClassNeedsAClassMOPClassInstanceOrASubclass" : { "file" : "lib/Moose/Exception/AttachToClassNeedsAClassMOPClassInstanceOrASubclass.pm", "version" : "2.1604" }, "Moose::Exception::AttributeConflictInRoles" : { "file" : "lib/Moose/Exception/AttributeConflictInRoles.pm", "version" : "2.1604" }, "Moose::Exception::AttributeConflictInSummation" : { "file" : "lib/Moose/Exception/AttributeConflictInSummation.pm", "version" : "2.1604" }, "Moose::Exception::AttributeExtensionIsNotSupportedInRoles" : { "file" : "lib/Moose/Exception/AttributeExtensionIsNotSupportedInRoles.pm", "version" : "2.1604" }, "Moose::Exception::AttributeIsRequired" : { "file" : "lib/Moose/Exception/AttributeIsRequired.pm", "version" : "2.1604" }, "Moose::Exception::AttributeMustBeAnClassMOPMixinAttributeCoreOrSubclass" : { "file" : "lib/Moose/Exception/AttributeMustBeAnClassMOPMixinAttributeCoreOrSubclass.pm", "version" : "2.1604" }, "Moose::Exception::AttributeNamesDoNotMatch" : { "file" : "lib/Moose/Exception/AttributeNamesDoNotMatch.pm", "version" : "2.1604" }, "Moose::Exception::AttributeValueIsNotAnObject" : { "file" : "lib/Moose/Exception/AttributeValueIsNotAnObject.pm", "version" : "2.1604" }, "Moose::Exception::AttributeValueIsNotDefined" : { "file" : "lib/Moose/Exception/AttributeValueIsNotDefined.pm", "version" : "2.1604" }, "Moose::Exception::AutoDeRefNeedsArrayRefOrHashRef" : { "file" : "lib/Moose/Exception/AutoDeRefNeedsArrayRefOrHashRef.pm", "version" : "2.1604" }, "Moose::Exception::BadOptionFormat" : { "file" : "lib/Moose/Exception/BadOptionFormat.pm", "version" : "2.1604" }, "Moose::Exception::BothBuilderAndDefaultAreNotAllowed" : { "file" : "lib/Moose/Exception/BothBuilderAndDefaultAreNotAllowed.pm", "version" : "2.1604" }, "Moose::Exception::BuilderDoesNotExist" : { "file" : "lib/Moose/Exception/BuilderDoesNotExist.pm", "version" : "2.1604" }, "Moose::Exception::BuilderMethodNotSupportedForAttribute" : { "file" : "lib/Moose/Exception/BuilderMethodNotSupportedForAttribute.pm", "version" : "2.1604" }, "Moose::Exception::BuilderMethodNotSupportedForInlineAttribute" : { "file" : "lib/Moose/Exception/BuilderMethodNotSupportedForInlineAttribute.pm", "version" : "2.1604" }, "Moose::Exception::BuilderMustBeAMethodName" : { "file" : "lib/Moose/Exception/BuilderMustBeAMethodName.pm", "version" : "2.1604" }, "Moose::Exception::CallingMethodOnAnImmutableInstance" : { "file" : "lib/Moose/Exception/CallingMethodOnAnImmutableInstance.pm", "version" : "2.1604" }, "Moose::Exception::CallingReadOnlyMethodOnAnImmutableInstance" : { "file" : "lib/Moose/Exception/CallingReadOnlyMethodOnAnImmutableInstance.pm", "version" : "2.1604" }, "Moose::Exception::CanExtendOnlyClasses" : { "file" : "lib/Moose/Exception/CanExtendOnlyClasses.pm", "version" : "2.1604" }, "Moose::Exception::CanOnlyConsumeRole" : { "file" : "lib/Moose/Exception/CanOnlyConsumeRole.pm", "version" : "2.1604" }, "Moose::Exception::CanOnlyWrapBlessedCode" : { "file" : "lib/Moose/Exception/CanOnlyWrapBlessedCode.pm", "version" : "2.1604" }, "Moose::Exception::CanReblessOnlyIntoASubclass" : { "file" : "lib/Moose/Exception/CanReblessOnlyIntoASubclass.pm", "version" : "2.1604" }, "Moose::Exception::CanReblessOnlyIntoASuperclass" : { "file" : "lib/Moose/Exception/CanReblessOnlyIntoASuperclass.pm", "version" : "2.1604" }, "Moose::Exception::CannotAddAdditionalTypeCoercionsToUnion" : { "file" : "lib/Moose/Exception/CannotAddAdditionalTypeCoercionsToUnion.pm", "version" : "2.1604" }, "Moose::Exception::CannotAddAsAnAttributeToARole" : { "file" : "lib/Moose/Exception/CannotAddAsAnAttributeToARole.pm", "version" : "2.1604" }, "Moose::Exception::CannotApplyBaseClassRolesToRole" : { "file" : "lib/Moose/Exception/CannotApplyBaseClassRolesToRole.pm", "version" : "2.1604" }, "Moose::Exception::CannotAssignValueToReadOnlyAccessor" : { "file" : "lib/Moose/Exception/CannotAssignValueToReadOnlyAccessor.pm", "version" : "2.1604" }, "Moose::Exception::CannotAugmentIfLocalMethodPresent" : { "file" : "lib/Moose/Exception/CannotAugmentIfLocalMethodPresent.pm", "version" : "2.1604" }, "Moose::Exception::CannotAugmentNoSuperMethod" : { "file" : "lib/Moose/Exception/CannotAugmentNoSuperMethod.pm", "version" : "2.1604" }, "Moose::Exception::CannotAutoDerefWithoutIsa" : { "file" : "lib/Moose/Exception/CannotAutoDerefWithoutIsa.pm", "version" : "2.1604" }, "Moose::Exception::CannotAutoDereferenceTypeConstraint" : { "file" : "lib/Moose/Exception/CannotAutoDereferenceTypeConstraint.pm", "version" : "2.1604" }, "Moose::Exception::CannotCalculateNativeType" : { "file" : "lib/Moose/Exception/CannotCalculateNativeType.pm", "version" : "2.1604" }, "Moose::Exception::CannotCallAnAbstractBaseMethod" : { "file" : "lib/Moose/Exception/CannotCallAnAbstractBaseMethod.pm", "version" : "2.1604" }, "Moose::Exception::CannotCallAnAbstractMethod" : { "file" : "lib/Moose/Exception/CannotCallAnAbstractMethod.pm", "version" : "2.1604" }, "Moose::Exception::CannotCoerceAWeakRef" : { "file" : "lib/Moose/Exception/CannotCoerceAWeakRef.pm", "version" : "2.1604" }, "Moose::Exception::CannotCoerceAttributeWhichHasNoCoercion" : { "file" : "lib/Moose/Exception/CannotCoerceAttributeWhichHasNoCoercion.pm", "version" : "2.1604" }, "Moose::Exception::CannotCreateHigherOrderTypeWithoutATypeParameter" : { "file" : "lib/Moose/Exception/CannotCreateHigherOrderTypeWithoutATypeParameter.pm", "version" : "2.1604" }, "Moose::Exception::CannotCreateMethodAliasLocalMethodIsPresent" : { "file" : "lib/Moose/Exception/CannotCreateMethodAliasLocalMethodIsPresent.pm", "version" : "2.1604" }, "Moose::Exception::CannotCreateMethodAliasLocalMethodIsPresentInClass" : { "file" : "lib/Moose/Exception/CannotCreateMethodAliasLocalMethodIsPresentInClass.pm", "version" : "2.1604" }, "Moose::Exception::CannotDelegateLocalMethodIsPresent" : { "file" : "lib/Moose/Exception/CannotDelegateLocalMethodIsPresent.pm", "version" : "2.1604" }, "Moose::Exception::CannotDelegateWithoutIsa" : { "file" : "lib/Moose/Exception/CannotDelegateWithoutIsa.pm", "version" : "2.1604" }, "Moose::Exception::CannotFindDelegateMetaclass" : { "file" : "lib/Moose/Exception/CannotFindDelegateMetaclass.pm", "version" : "2.1604" }, "Moose::Exception::CannotFindType" : { "file" : "lib/Moose/Exception/CannotFindType.pm", "version" : "2.1604" }, "Moose::Exception::CannotFindTypeGivenToMatchOnType" : { "file" : "lib/Moose/Exception/CannotFindTypeGivenToMatchOnType.pm", "version" : "2.1604" }, "Moose::Exception::CannotFixMetaclassCompatibility" : { "file" : "lib/Moose/Exception/CannotFixMetaclassCompatibility.pm", "version" : "2.1604" }, "Moose::Exception::CannotGenerateInlineConstraint" : { "file" : "lib/Moose/Exception/CannotGenerateInlineConstraint.pm", "version" : "2.1604" }, "Moose::Exception::CannotInitializeMooseMetaRoleComposite" : { "file" : "lib/Moose/Exception/CannotInitializeMooseMetaRoleComposite.pm", "version" : "2.1604" }, "Moose::Exception::CannotInlineTypeConstraintCheck" : { "file" : "lib/Moose/Exception/CannotInlineTypeConstraintCheck.pm", "version" : "2.1604" }, "Moose::Exception::CannotLocatePackageInINC" : { "file" : "lib/Moose/Exception/CannotLocatePackageInINC.pm", "version" : "2.1604" }, "Moose::Exception::CannotMakeMetaclassCompatible" : { "file" : "lib/Moose/Exception/CannotMakeMetaclassCompatible.pm", "version" : "2.1604" }, "Moose::Exception::CannotOverrideALocalMethod" : { "file" : "lib/Moose/Exception/CannotOverrideALocalMethod.pm", "version" : "2.1604" }, "Moose::Exception::CannotOverrideBodyOfMetaMethods" : { "file" : "lib/Moose/Exception/CannotOverrideBodyOfMetaMethods.pm", "version" : "2.1604" }, "Moose::Exception::CannotOverrideLocalMethodIsPresent" : { "file" : "lib/Moose/Exception/CannotOverrideLocalMethodIsPresent.pm", "version" : "2.1604" }, "Moose::Exception::CannotOverrideNoSuperMethod" : { "file" : "lib/Moose/Exception/CannotOverrideNoSuperMethod.pm", "version" : "2.1604" }, "Moose::Exception::CannotRegisterUnnamedTypeConstraint" : { "file" : "lib/Moose/Exception/CannotRegisterUnnamedTypeConstraint.pm", "version" : "2.1604" }, "Moose::Exception::CannotUseLazyBuildAndDefaultSimultaneously" : { "file" : "lib/Moose/Exception/CannotUseLazyBuildAndDefaultSimultaneously.pm", "version" : "2.1604" }, "Moose::Exception::CircularReferenceInAlso" : { "file" : "lib/Moose/Exception/CircularReferenceInAlso.pm", "version" : "2.1604" }, "Moose::Exception::ClassDoesNotHaveInitMeta" : { "file" : "lib/Moose/Exception/ClassDoesNotHaveInitMeta.pm", "version" : "2.1604" }, "Moose::Exception::ClassDoesTheExcludedRole" : { "file" : "lib/Moose/Exception/ClassDoesTheExcludedRole.pm", "version" : "2.1604" }, "Moose::Exception::ClassNamesDoNotMatch" : { "file" : "lib/Moose/Exception/ClassNamesDoNotMatch.pm", "version" : "2.1604" }, "Moose::Exception::CloneObjectExpectsAnInstanceOfMetaclass" : { "file" : "lib/Moose/Exception/CloneObjectExpectsAnInstanceOfMetaclass.pm", "version" : "2.1604" }, "Moose::Exception::CodeBlockMustBeACodeRef" : { "file" : "lib/Moose/Exception/CodeBlockMustBeACodeRef.pm", "version" : "2.1604" }, "Moose::Exception::CoercingWithoutCoercions" : { "file" : "lib/Moose/Exception/CoercingWithoutCoercions.pm", "version" : "2.1604" }, "Moose::Exception::CoercionAlreadyExists" : { "file" : "lib/Moose/Exception/CoercionAlreadyExists.pm", "version" : "2.1604" }, "Moose::Exception::CoercionNeedsTypeConstraint" : { "file" : "lib/Moose/Exception/CoercionNeedsTypeConstraint.pm", "version" : "2.1604" }, "Moose::Exception::ConflictDetectedInCheckRoleExclusions" : { "file" : "lib/Moose/Exception/ConflictDetectedInCheckRoleExclusions.pm", "version" : "2.1604" }, "Moose::Exception::ConflictDetectedInCheckRoleExclusionsInToClass" : { "file" : "lib/Moose/Exception/ConflictDetectedInCheckRoleExclusionsInToClass.pm", "version" : "2.1604" }, "Moose::Exception::ConstructClassInstanceTakesPackageName" : { "file" : "lib/Moose/Exception/ConstructClassInstanceTakesPackageName.pm", "version" : "2.1604" }, "Moose::Exception::CouldNotCreateMethod" : { "file" : "lib/Moose/Exception/CouldNotCreateMethod.pm", "version" : "2.1604" }, "Moose::Exception::CouldNotCreateWriter" : { "file" : "lib/Moose/Exception/CouldNotCreateWriter.pm", "version" : "2.1604" }, "Moose::Exception::CouldNotEvalConstructor" : { "file" : "lib/Moose/Exception/CouldNotEvalConstructor.pm", "version" : "2.1604" }, "Moose::Exception::CouldNotEvalDestructor" : { "file" : "lib/Moose/Exception/CouldNotEvalDestructor.pm", "version" : "2.1604" }, "Moose::Exception::CouldNotFindTypeConstraintToCoerceFrom" : { "file" : "lib/Moose/Exception/CouldNotFindTypeConstraintToCoerceFrom.pm", "version" : "2.1604" }, "Moose::Exception::CouldNotGenerateInlineAttributeMethod" : { "file" : "lib/Moose/Exception/CouldNotGenerateInlineAttributeMethod.pm", "version" : "2.1604" }, "Moose::Exception::CouldNotLocateTypeConstraintForUnion" : { "file" : "lib/Moose/Exception/CouldNotLocateTypeConstraintForUnion.pm", "version" : "2.1604" }, "Moose::Exception::CouldNotParseType" : { "file" : "lib/Moose/Exception/CouldNotParseType.pm", "version" : "2.1604" }, "Moose::Exception::CreateMOPClassTakesArrayRefOfAttributes" : { "file" : "lib/Moose/Exception/CreateMOPClassTakesArrayRefOfAttributes.pm", "version" : "2.1604" }, "Moose::Exception::CreateMOPClassTakesArrayRefOfSuperclasses" : { "file" : "lib/Moose/Exception/CreateMOPClassTakesArrayRefOfSuperclasses.pm", "version" : "2.1604" }, "Moose::Exception::CreateMOPClassTakesHashRefOfMethods" : { "file" : "lib/Moose/Exception/CreateMOPClassTakesHashRefOfMethods.pm", "version" : "2.1604" }, "Moose::Exception::CreateTakesArrayRefOfRoles" : { "file" : "lib/Moose/Exception/CreateTakesArrayRefOfRoles.pm", "version" : "2.1604" }, "Moose::Exception::CreateTakesHashRefOfAttributes" : { "file" : "lib/Moose/Exception/CreateTakesHashRefOfAttributes.pm", "version" : "2.1604" }, "Moose::Exception::CreateTakesHashRefOfMethods" : { "file" : "lib/Moose/Exception/CreateTakesHashRefOfMethods.pm", "version" : "2.1604" }, "Moose::Exception::DefaultToMatchOnTypeMustBeCodeRef" : { "file" : "lib/Moose/Exception/DefaultToMatchOnTypeMustBeCodeRef.pm", "version" : "2.1604" }, "Moose::Exception::DelegationToAClassWhichIsNotLoaded" : { "file" : "lib/Moose/Exception/DelegationToAClassWhichIsNotLoaded.pm", "version" : "2.1604" }, "Moose::Exception::DelegationToARoleWhichIsNotLoaded" : { "file" : "lib/Moose/Exception/DelegationToARoleWhichIsNotLoaded.pm", "version" : "2.1604" }, "Moose::Exception::DelegationToATypeWhichIsNotAClass" : { "file" : "lib/Moose/Exception/DelegationToATypeWhichIsNotAClass.pm", "version" : "2.1604" }, "Moose::Exception::DoesRequiresRoleName" : { "file" : "lib/Moose/Exception/DoesRequiresRoleName.pm", "version" : "2.1604" }, "Moose::Exception::EnumCalledWithAnArrayRefAndAdditionalArgs" : { "file" : "lib/Moose/Exception/EnumCalledWithAnArrayRefAndAdditionalArgs.pm", "version" : "2.1604" }, "Moose::Exception::EnumValuesMustBeString" : { "file" : "lib/Moose/Exception/EnumValuesMustBeString.pm", "version" : "2.1604" }, "Moose::Exception::ExtendsMissingArgs" : { "file" : "lib/Moose/Exception/ExtendsMissingArgs.pm", "version" : "2.1604" }, "Moose::Exception::HandlesMustBeAHashRef" : { "file" : "lib/Moose/Exception/HandlesMustBeAHashRef.pm", "version" : "2.1604" }, "Moose::Exception::IllegalInheritedOptions" : { "file" : "lib/Moose/Exception/IllegalInheritedOptions.pm", "version" : "2.1604" }, "Moose::Exception::IllegalMethodTypeToAddMethodModifier" : { "file" : "lib/Moose/Exception/IllegalMethodTypeToAddMethodModifier.pm", "version" : "2.1604" }, "Moose::Exception::IncompatibleMetaclassOfSuperclass" : { "file" : "lib/Moose/Exception/IncompatibleMetaclassOfSuperclass.pm", "version" : "2.1604" }, "Moose::Exception::InitMetaRequiresClass" : { "file" : "lib/Moose/Exception/InitMetaRequiresClass.pm", "version" : "2.1604" }, "Moose::Exception::InitializeTakesUnBlessedPackageName" : { "file" : "lib/Moose/Exception/InitializeTakesUnBlessedPackageName.pm", "version" : "2.1604" }, "Moose::Exception::InstanceBlessedIntoWrongClass" : { "file" : "lib/Moose/Exception/InstanceBlessedIntoWrongClass.pm", "version" : "2.1604" }, "Moose::Exception::InstanceMustBeABlessedReference" : { "file" : "lib/Moose/Exception/InstanceMustBeABlessedReference.pm", "version" : "2.1604" }, "Moose::Exception::InvalidArgPassedToMooseUtilMetaRole" : { "file" : "lib/Moose/Exception/InvalidArgPassedToMooseUtilMetaRole.pm", "version" : "2.1604" }, "Moose::Exception::InvalidArgumentToMethod" : { "file" : "lib/Moose/Exception/InvalidArgumentToMethod.pm", "version" : "2.1604" }, "Moose::Exception::InvalidArgumentsToTraitAliases" : { "file" : "lib/Moose/Exception/InvalidArgumentsToTraitAliases.pm", "version" : "2.1604" }, "Moose::Exception::InvalidBaseTypeGivenToCreateParameterizedTypeConstraint" : { "file" : "lib/Moose/Exception/InvalidBaseTypeGivenToCreateParameterizedTypeConstraint.pm", "version" : "2.1604" }, "Moose::Exception::InvalidHandleValue" : { "file" : "lib/Moose/Exception/InvalidHandleValue.pm", "version" : "2.1604" }, "Moose::Exception::InvalidHasProvidedInARole" : { "file" : "lib/Moose/Exception/InvalidHasProvidedInARole.pm", "version" : "2.1604" }, "Moose::Exception::InvalidNameForType" : { "file" : "lib/Moose/Exception/InvalidNameForType.pm", "version" : "2.1604" }, "Moose::Exception::InvalidOverloadOperator" : { "file" : "lib/Moose/Exception/InvalidOverloadOperator.pm", "version" : "2.1604" }, "Moose::Exception::InvalidRoleApplication" : { "file" : "lib/Moose/Exception/InvalidRoleApplication.pm", "version" : "2.1604" }, "Moose::Exception::InvalidTypeConstraint" : { "file" : "lib/Moose/Exception/InvalidTypeConstraint.pm", "version" : "2.1604" }, "Moose::Exception::InvalidTypeGivenToCreateParameterizedTypeConstraint" : { "file" : "lib/Moose/Exception/InvalidTypeGivenToCreateParameterizedTypeConstraint.pm", "version" : "2.1604" }, "Moose::Exception::InvalidValueForIs" : { "file" : "lib/Moose/Exception/InvalidValueForIs.pm", "version" : "2.1604" }, "Moose::Exception::IsaDoesNotDoTheRole" : { "file" : "lib/Moose/Exception/IsaDoesNotDoTheRole.pm", "version" : "2.1604" }, "Moose::Exception::IsaLacksDoesMethod" : { "file" : "lib/Moose/Exception/IsaLacksDoesMethod.pm", "version" : "2.1604" }, "Moose::Exception::LazyAttributeNeedsADefault" : { "file" : "lib/Moose/Exception/LazyAttributeNeedsADefault.pm", "version" : "2.1604" }, "Moose::Exception::Legacy" : { "file" : "lib/Moose/Exception/Legacy.pm", "version" : "2.1604" }, "Moose::Exception::MOPAttributeNewNeedsAttributeName" : { "file" : "lib/Moose/Exception/MOPAttributeNewNeedsAttributeName.pm", "version" : "2.1604" }, "Moose::Exception::MatchActionMustBeACodeRef" : { "file" : "lib/Moose/Exception/MatchActionMustBeACodeRef.pm", "version" : "2.1604" }, "Moose::Exception::MessageParameterMustBeCodeRef" : { "file" : "lib/Moose/Exception/MessageParameterMustBeCodeRef.pm", "version" : "2.1604" }, "Moose::Exception::MetaclassIsAClassNotASubclassOfGivenMetaclass" : { "file" : "lib/Moose/Exception/MetaclassIsAClassNotASubclassOfGivenMetaclass.pm", "version" : "2.1604" }, "Moose::Exception::MetaclassIsARoleNotASubclassOfGivenMetaclass" : { "file" : "lib/Moose/Exception/MetaclassIsARoleNotASubclassOfGivenMetaclass.pm", "version" : "2.1604" }, "Moose::Exception::MetaclassIsNotASubclassOfGivenMetaclass" : { "file" : "lib/Moose/Exception/MetaclassIsNotASubclassOfGivenMetaclass.pm", "version" : "2.1604" }, "Moose::Exception::MetaclassMustBeASubclassOfMooseMetaClass" : { "file" : "lib/Moose/Exception/MetaclassMustBeASubclassOfMooseMetaClass.pm", "version" : "2.1604" }, "Moose::Exception::MetaclassMustBeASubclassOfMooseMetaRole" : { "file" : "lib/Moose/Exception/MetaclassMustBeASubclassOfMooseMetaRole.pm", "version" : "2.1604" }, "Moose::Exception::MetaclassMustBeDerivedFromClassMOPClass" : { "file" : "lib/Moose/Exception/MetaclassMustBeDerivedFromClassMOPClass.pm", "version" : "2.1604" }, "Moose::Exception::MetaclassNotLoaded" : { "file" : "lib/Moose/Exception/MetaclassNotLoaded.pm", "version" : "2.1604" }, "Moose::Exception::MetaclassTypeIncompatible" : { "file" : "lib/Moose/Exception/MetaclassTypeIncompatible.pm", "version" : "2.1604" }, "Moose::Exception::MethodExpectedAMetaclassObject" : { "file" : "lib/Moose/Exception/MethodExpectedAMetaclassObject.pm", "version" : "2.1604" }, "Moose::Exception::MethodExpectsFewerArgs" : { "file" : "lib/Moose/Exception/MethodExpectsFewerArgs.pm", "version" : "2.1604" }, "Moose::Exception::MethodExpectsMoreArgs" : { "file" : "lib/Moose/Exception/MethodExpectsMoreArgs.pm", "version" : "2.1604" }, "Moose::Exception::MethodModifierNeedsMethodName" : { "file" : "lib/Moose/Exception/MethodModifierNeedsMethodName.pm", "version" : "2.1604" }, "Moose::Exception::MethodNameConflictInRoles" : { "file" : "lib/Moose/Exception/MethodNameConflictInRoles.pm", "version" : "2.1604" }, "Moose::Exception::MethodNameNotFoundInInheritanceHierarchy" : { "file" : "lib/Moose/Exception/MethodNameNotFoundInInheritanceHierarchy.pm", "version" : "2.1604" }, "Moose::Exception::MethodNameNotGiven" : { "file" : "lib/Moose/Exception/MethodNameNotGiven.pm", "version" : "2.1604" }, "Moose::Exception::MustDefineAMethodName" : { "file" : "lib/Moose/Exception/MustDefineAMethodName.pm", "version" : "2.1604" }, "Moose::Exception::MustDefineAnAttributeName" : { "file" : "lib/Moose/Exception/MustDefineAnAttributeName.pm", "version" : "2.1604" }, "Moose::Exception::MustDefineAnOverloadOperator" : { "file" : "lib/Moose/Exception/MustDefineAnOverloadOperator.pm", "version" : "2.1604" }, "Moose::Exception::MustHaveAtLeastOneValueToEnumerate" : { "file" : "lib/Moose/Exception/MustHaveAtLeastOneValueToEnumerate.pm", "version" : "2.1604" }, "Moose::Exception::MustPassAHashOfOptions" : { "file" : "lib/Moose/Exception/MustPassAHashOfOptions.pm", "version" : "2.1604" }, "Moose::Exception::MustPassAMooseMetaRoleInstanceOrSubclass" : { "file" : "lib/Moose/Exception/MustPassAMooseMetaRoleInstanceOrSubclass.pm", "version" : "2.1604" }, "Moose::Exception::MustPassAPackageNameOrAnExistingClassMOPPackageInstance" : { "file" : "lib/Moose/Exception/MustPassAPackageNameOrAnExistingClassMOPPackageInstance.pm", "version" : "2.1604" }, "Moose::Exception::MustPassEvenNumberOfArguments" : { "file" : "lib/Moose/Exception/MustPassEvenNumberOfArguments.pm", "version" : "2.1604" }, "Moose::Exception::MustPassEvenNumberOfAttributeOptions" : { "file" : "lib/Moose/Exception/MustPassEvenNumberOfAttributeOptions.pm", "version" : "2.1604" }, "Moose::Exception::MustProvideANameForTheAttribute" : { "file" : "lib/Moose/Exception/MustProvideANameForTheAttribute.pm", "version" : "2.1604" }, "Moose::Exception::MustSpecifyAtleastOneMethod" : { "file" : "lib/Moose/Exception/MustSpecifyAtleastOneMethod.pm", "version" : "2.1604" }, "Moose::Exception::MustSpecifyAtleastOneRole" : { "file" : "lib/Moose/Exception/MustSpecifyAtleastOneRole.pm", "version" : "2.1604" }, "Moose::Exception::MustSpecifyAtleastOneRoleToApplicant" : { "file" : "lib/Moose/Exception/MustSpecifyAtleastOneRoleToApplicant.pm", "version" : "2.1604" }, "Moose::Exception::MustSupplyAClassMOPAttributeInstance" : { "file" : "lib/Moose/Exception/MustSupplyAClassMOPAttributeInstance.pm", "version" : "2.1604" }, "Moose::Exception::MustSupplyADelegateToMethod" : { "file" : "lib/Moose/Exception/MustSupplyADelegateToMethod.pm", "version" : "2.1604" }, "Moose::Exception::MustSupplyAMetaclass" : { "file" : "lib/Moose/Exception/MustSupplyAMetaclass.pm", "version" : "2.1604" }, "Moose::Exception::MustSupplyAMooseMetaAttributeInstance" : { "file" : "lib/Moose/Exception/MustSupplyAMooseMetaAttributeInstance.pm", "version" : "2.1604" }, "Moose::Exception::MustSupplyAnAccessorTypeToConstructWith" : { "file" : "lib/Moose/Exception/MustSupplyAnAccessorTypeToConstructWith.pm", "version" : "2.1604" }, "Moose::Exception::MustSupplyAnAttributeToConstructWith" : { "file" : "lib/Moose/Exception/MustSupplyAnAttributeToConstructWith.pm", "version" : "2.1604" }, "Moose::Exception::MustSupplyArrayRefAsCurriedArguments" : { "file" : "lib/Moose/Exception/MustSupplyArrayRefAsCurriedArguments.pm", "version" : "2.1604" }, "Moose::Exception::MustSupplyPackageNameAndName" : { "file" : "lib/Moose/Exception/MustSupplyPackageNameAndName.pm", "version" : "2.1604" }, "Moose::Exception::NeedsTypeConstraintUnionForTypeCoercionUnion" : { "file" : "lib/Moose/Exception/NeedsTypeConstraintUnionForTypeCoercionUnion.pm", "version" : "2.1604" }, "Moose::Exception::NeitherAttributeNorAttributeNameIsGiven" : { "file" : "lib/Moose/Exception/NeitherAttributeNorAttributeNameIsGiven.pm", "version" : "2.1604" }, "Moose::Exception::NeitherClassNorClassNameIsGiven" : { "file" : "lib/Moose/Exception/NeitherClassNorClassNameIsGiven.pm", "version" : "2.1604" }, "Moose::Exception::NeitherRoleNorRoleNameIsGiven" : { "file" : "lib/Moose/Exception/NeitherRoleNorRoleNameIsGiven.pm", "version" : "2.1604" }, "Moose::Exception::NeitherTypeNorTypeNameIsGiven" : { "file" : "lib/Moose/Exception/NeitherTypeNorTypeNameIsGiven.pm", "version" : "2.1604" }, "Moose::Exception::NoAttributeFoundInSuperClass" : { "file" : "lib/Moose/Exception/NoAttributeFoundInSuperClass.pm", "version" : "2.1604" }, "Moose::Exception::NoBodyToInitializeInAnAbstractBaseClass" : { "file" : "lib/Moose/Exception/NoBodyToInitializeInAnAbstractBaseClass.pm", "version" : "2.1604" }, "Moose::Exception::NoCasesMatched" : { "file" : "lib/Moose/Exception/NoCasesMatched.pm", "version" : "2.1604" }, "Moose::Exception::NoConstraintCheckForTypeConstraint" : { "file" : "lib/Moose/Exception/NoConstraintCheckForTypeConstraint.pm", "version" : "2.1604" }, "Moose::Exception::NoDestructorClassSpecified" : { "file" : "lib/Moose/Exception/NoDestructorClassSpecified.pm", "version" : "2.1604" }, "Moose::Exception::NoImmutableTraitSpecifiedForClass" : { "file" : "lib/Moose/Exception/NoImmutableTraitSpecifiedForClass.pm", "version" : "2.1604" }, "Moose::Exception::NoParentGivenToSubtype" : { "file" : "lib/Moose/Exception/NoParentGivenToSubtype.pm", "version" : "2.1604" }, "Moose::Exception::OnlyInstancesCanBeCloned" : { "file" : "lib/Moose/Exception/OnlyInstancesCanBeCloned.pm", "version" : "2.1604" }, "Moose::Exception::OperatorIsRequired" : { "file" : "lib/Moose/Exception/OperatorIsRequired.pm", "version" : "2.1604" }, "Moose::Exception::OverloadConflictInSummation" : { "file" : "lib/Moose/Exception/OverloadConflictInSummation.pm", "version" : "2.1604" }, "Moose::Exception::OverloadRequiresAMetaClass" : { "file" : "lib/Moose/Exception/OverloadRequiresAMetaClass.pm", "version" : "2.1604" }, "Moose::Exception::OverloadRequiresAMetaMethod" : { "file" : "lib/Moose/Exception/OverloadRequiresAMetaMethod.pm", "version" : "2.1604" }, "Moose::Exception::OverloadRequiresAMetaOverload" : { "file" : "lib/Moose/Exception/OverloadRequiresAMetaOverload.pm", "version" : "2.1604" }, "Moose::Exception::OverloadRequiresAMethodNameOrCoderef" : { "file" : "lib/Moose/Exception/OverloadRequiresAMethodNameOrCoderef.pm", "version" : "2.1604" }, "Moose::Exception::OverloadRequiresAnOperator" : { "file" : "lib/Moose/Exception/OverloadRequiresAnOperator.pm", "version" : "2.1604" }, "Moose::Exception::OverloadRequiresNamesForCoderef" : { "file" : "lib/Moose/Exception/OverloadRequiresNamesForCoderef.pm", "version" : "2.1604" }, "Moose::Exception::OverrideConflictInComposition" : { "file" : "lib/Moose/Exception/OverrideConflictInComposition.pm", "version" : "2.1604" }, "Moose::Exception::OverrideConflictInSummation" : { "file" : "lib/Moose/Exception/OverrideConflictInSummation.pm", "version" : "2.1604" }, "Moose::Exception::PackageDoesNotUseMooseExporter" : { "file" : "lib/Moose/Exception/PackageDoesNotUseMooseExporter.pm", "version" : "2.1604" }, "Moose::Exception::PackageNameAndNameParamsNotGivenToWrap" : { "file" : "lib/Moose/Exception/PackageNameAndNameParamsNotGivenToWrap.pm", "version" : "2.1604" }, "Moose::Exception::PackagesAndModulesAreNotCachable" : { "file" : "lib/Moose/Exception/PackagesAndModulesAreNotCachable.pm", "version" : "2.1604" }, "Moose::Exception::ParameterIsNotSubtypeOfParent" : { "file" : "lib/Moose/Exception/ParameterIsNotSubtypeOfParent.pm", "version" : "2.1604" }, "Moose::Exception::ReferencesAreNotAllowedAsDefault" : { "file" : "lib/Moose/Exception/ReferencesAreNotAllowedAsDefault.pm", "version" : "2.1604" }, "Moose::Exception::RequiredAttributeLacksInitialization" : { "file" : "lib/Moose/Exception/RequiredAttributeLacksInitialization.pm", "version" : "2.1604" }, "Moose::Exception::RequiredAttributeNeedsADefault" : { "file" : "lib/Moose/Exception/RequiredAttributeNeedsADefault.pm", "version" : "2.1604" }, "Moose::Exception::RequiredMethodsImportedByClass" : { "file" : "lib/Moose/Exception/RequiredMethodsImportedByClass.pm", "version" : "2.1604" }, "Moose::Exception::RequiredMethodsNotImplementedByClass" : { "file" : "lib/Moose/Exception/RequiredMethodsNotImplementedByClass.pm", "version" : "2.1604" }, "Moose::Exception::Role::Attribute" : { "file" : "lib/Moose/Exception/Role/Attribute.pm", "version" : "2.1604" }, "Moose::Exception::Role::AttributeName" : { "file" : "lib/Moose/Exception/Role/AttributeName.pm", "version" : "2.1604" }, "Moose::Exception::Role::Class" : { "file" : "lib/Moose/Exception/Role/Class.pm", "version" : "2.1604" }, "Moose::Exception::Role::EitherAttributeOrAttributeName" : { "file" : "lib/Moose/Exception/Role/EitherAttributeOrAttributeName.pm", "version" : "2.1604" }, "Moose::Exception::Role::Instance" : { "file" : "lib/Moose/Exception/Role/Instance.pm", "version" : "2.1604" }, "Moose::Exception::Role::InstanceClass" : { "file" : "lib/Moose/Exception/Role/InstanceClass.pm", "version" : "2.1604" }, "Moose::Exception::Role::InvalidAttributeOptions" : { "file" : "lib/Moose/Exception/Role/InvalidAttributeOptions.pm", "version" : "2.1604" }, "Moose::Exception::Role::Method" : { "file" : "lib/Moose/Exception/Role/Method.pm", "version" : "2.1604" }, "Moose::Exception::Role::ParamsHash" : { "file" : "lib/Moose/Exception/Role/ParamsHash.pm", "version" : "2.1604" }, "Moose::Exception::Role::Role" : { "file" : "lib/Moose/Exception/Role/Role.pm", "version" : "2.1604" }, "Moose::Exception::Role::RoleForCreate" : { "file" : "lib/Moose/Exception/Role/RoleForCreate.pm", "version" : "2.1604" }, "Moose::Exception::Role::RoleForCreateMOPClass" : { "file" : "lib/Moose/Exception/Role/RoleForCreateMOPClass.pm", "version" : "2.1604" }, "Moose::Exception::Role::TypeConstraint" : { "file" : "lib/Moose/Exception/Role/TypeConstraint.pm", "version" : "2.1604" }, "Moose::Exception::RoleDoesTheExcludedRole" : { "file" : "lib/Moose/Exception/RoleDoesTheExcludedRole.pm", "version" : "2.1604" }, "Moose::Exception::RoleExclusionConflict" : { "file" : "lib/Moose/Exception/RoleExclusionConflict.pm", "version" : "2.1604" }, "Moose::Exception::RoleNameRequired" : { "file" : "lib/Moose/Exception/RoleNameRequired.pm", "version" : "2.1604" }, "Moose::Exception::RoleNameRequiredForMooseMetaRole" : { "file" : "lib/Moose/Exception/RoleNameRequiredForMooseMetaRole.pm", "version" : "2.1604" }, "Moose::Exception::RolesDoNotSupportAugment" : { "file" : "lib/Moose/Exception/RolesDoNotSupportAugment.pm", "version" : "2.1604" }, "Moose::Exception::RolesDoNotSupportExtends" : { "file" : "lib/Moose/Exception/RolesDoNotSupportExtends.pm", "version" : "2.1604" }, "Moose::Exception::RolesDoNotSupportInner" : { "file" : "lib/Moose/Exception/RolesDoNotSupportInner.pm", "version" : "2.1604" }, "Moose::Exception::RolesDoNotSupportRegexReferencesForMethodModifiers" : { "file" : "lib/Moose/Exception/RolesDoNotSupportRegexReferencesForMethodModifiers.pm", "version" : "2.1604" }, "Moose::Exception::RolesInCreateTakesAnArrayRef" : { "file" : "lib/Moose/Exception/RolesInCreateTakesAnArrayRef.pm", "version" : "2.1604" }, "Moose::Exception::RolesListMustBeInstancesOfMooseMetaRole" : { "file" : "lib/Moose/Exception/RolesListMustBeInstancesOfMooseMetaRole.pm", "version" : "2.1604" }, "Moose::Exception::SingleParamsToNewMustBeHashRef" : { "file" : "lib/Moose/Exception/SingleParamsToNewMustBeHashRef.pm", "version" : "2.1604" }, "Moose::Exception::TriggerMustBeACodeRef" : { "file" : "lib/Moose/Exception/TriggerMustBeACodeRef.pm", "version" : "2.1604" }, "Moose::Exception::TypeConstraintCannotBeUsedForAParameterizableType" : { "file" : "lib/Moose/Exception/TypeConstraintCannotBeUsedForAParameterizableType.pm", "version" : "2.1604" }, "Moose::Exception::TypeConstraintIsAlreadyCreated" : { "file" : "lib/Moose/Exception/TypeConstraintIsAlreadyCreated.pm", "version" : "2.1604" }, "Moose::Exception::TypeParameterMustBeMooseMetaType" : { "file" : "lib/Moose/Exception/TypeParameterMustBeMooseMetaType.pm", "version" : "2.1604" }, "Moose::Exception::UnableToCanonicalizeHandles" : { "file" : "lib/Moose/Exception/UnableToCanonicalizeHandles.pm", "version" : "2.1604" }, "Moose::Exception::UnableToCanonicalizeNonRolePackage" : { "file" : "lib/Moose/Exception/UnableToCanonicalizeNonRolePackage.pm", "version" : "2.1604" }, "Moose::Exception::UnableToRecognizeDelegateMetaclass" : { "file" : "lib/Moose/Exception/UnableToRecognizeDelegateMetaclass.pm", "version" : "2.1604" }, "Moose::Exception::UndefinedHashKeysPassedToMethod" : { "file" : "lib/Moose/Exception/UndefinedHashKeysPassedToMethod.pm", "version" : "2.1604" }, "Moose::Exception::UnionCalledWithAnArrayRefAndAdditionalArgs" : { "file" : "lib/Moose/Exception/UnionCalledWithAnArrayRefAndAdditionalArgs.pm", "version" : "2.1604" }, "Moose::Exception::UnionTakesAtleastTwoTypeNames" : { "file" : "lib/Moose/Exception/UnionTakesAtleastTwoTypeNames.pm", "version" : "2.1604" }, "Moose::Exception::ValidationFailedForInlineTypeConstraint" : { "file" : "lib/Moose/Exception/ValidationFailedForInlineTypeConstraint.pm", "version" : "2.1604" }, "Moose::Exception::ValidationFailedForTypeConstraint" : { "file" : "lib/Moose/Exception/ValidationFailedForTypeConstraint.pm", "version" : "2.1604" }, "Moose::Exception::WrapTakesACodeRefToBless" : { "file" : "lib/Moose/Exception/WrapTakesACodeRefToBless.pm", "version" : "2.1604" }, "Moose::Exception::WrongTypeConstraintGiven" : { "file" : "lib/Moose/Exception/WrongTypeConstraintGiven.pm", "version" : "2.1604" }, "Moose::Exporter" : { "file" : "lib/Moose/Exporter.pm", "version" : "2.1604" }, "Moose::Intro" : { "file" : "lib/Moose/Intro.pod", "version" : "2.1604" }, "Moose::Manual" : { "file" : "lib/Moose/Manual.pod", "version" : "2.1604" }, "Moose::Manual::Attributes" : { "file" : "lib/Moose/Manual/Attributes.pod", "version" : "2.1604" }, "Moose::Manual::BestPractices" : { "file" : "lib/Moose/Manual/BestPractices.pod", "version" : "2.1604" }, "Moose::Manual::Classes" : { "file" : "lib/Moose/Manual/Classes.pod", "version" : "2.1604" }, "Moose::Manual::Concepts" : { "file" : "lib/Moose/Manual/Concepts.pod", "version" : "2.1604" }, "Moose::Manual::Construction" : { "file" : "lib/Moose/Manual/Construction.pod", "version" : "2.1604" }, "Moose::Manual::Contributing" : { "file" : "lib/Moose/Manual/Contributing.pod", "version" : "2.1604" }, "Moose::Manual::Delegation" : { "file" : "lib/Moose/Manual/Delegation.pod", "version" : "2.1604" }, "Moose::Manual::Delta" : { "file" : "lib/Moose/Manual/Delta.pod", "version" : "2.1604" }, "Moose::Manual::Exceptions" : { "file" : "lib/Moose/Manual/Exceptions.pod", "version" : "2.1604" }, "Moose::Manual::Exceptions::Manifest" : { "file" : "lib/Moose/Manual/Exceptions/Manifest.pod", "version" : "2.1604" }, "Moose::Manual::FAQ" : { "file" : "lib/Moose/Manual/FAQ.pod", "version" : "2.1604" }, "Moose::Manual::MOP" : { "file" : "lib/Moose/Manual/MOP.pod", "version" : "2.1604" }, "Moose::Manual::MethodModifiers" : { "file" : "lib/Moose/Manual/MethodModifiers.pod", "version" : "2.1604" }, "Moose::Manual::MooseX" : { "file" : "lib/Moose/Manual/MooseX.pod", "version" : "2.1604" }, "Moose::Manual::Resources" : { "file" : "lib/Moose/Manual/Resources.pod", "version" : "2.1604" }, "Moose::Manual::Roles" : { "file" : "lib/Moose/Manual/Roles.pod", "version" : "2.1604" }, "Moose::Manual::Support" : { "file" : "lib/Moose/Manual/Support.pod", "version" : "2.1604" }, "Moose::Manual::Types" : { "file" : "lib/Moose/Manual/Types.pod", "version" : "2.1604" }, "Moose::Manual::Unsweetened" : { "file" : "lib/Moose/Manual/Unsweetened.pod", "version" : "2.1604" }, "Moose::Meta::Attribute" : { "file" : "lib/Moose/Meta/Attribute.pm", "version" : "2.1604" }, "Moose::Meta::Attribute::Custom::Moose" : { "file" : "lib/Moose/Meta/Attribute.pm", "version" : "2.1604" }, "Moose::Meta::Attribute::Native" : { "file" : "lib/Moose/Meta/Attribute/Native.pm", "version" : "2.1604" }, "Moose::Meta::Attribute::Native::Trait::Array" : { "file" : "lib/Moose/Meta/Attribute/Native/Trait/Array.pm", "version" : "2.1604" }, "Moose::Meta::Attribute::Native::Trait::Bool" : { "file" : "lib/Moose/Meta/Attribute/Native/Trait/Bool.pm", "version" : "2.1604" }, "Moose::Meta::Attribute::Native::Trait::Code" : { "file" : "lib/Moose/Meta/Attribute/Native/Trait/Code.pm", "version" : "2.1604" }, "Moose::Meta::Attribute::Native::Trait::Counter" : { "file" : "lib/Moose/Meta/Attribute/Native/Trait/Counter.pm", "version" : "2.1604" }, "Moose::Meta::Attribute::Native::Trait::Hash" : { "file" : "lib/Moose/Meta/Attribute/Native/Trait/Hash.pm", "version" : "2.1604" }, "Moose::Meta::Attribute::Native::Trait::Number" : { "file" : "lib/Moose/Meta/Attribute/Native/Trait/Number.pm", "version" : "2.1604" }, "Moose::Meta::Attribute::Native::Trait::String" : { "file" : "lib/Moose/Meta/Attribute/Native/Trait/String.pm", "version" : "2.1604" }, "Moose::Meta::Class" : { "file" : "lib/Moose/Meta/Class.pm", "version" : "2.1604" }, "Moose::Meta::Instance" : { "file" : "lib/Moose/Meta/Instance.pm", "version" : "2.1604" }, "Moose::Meta::Method" : { "file" : "lib/Moose/Meta/Method.pm", "version" : "2.1604" }, "Moose::Meta::Method::Accessor" : { "file" : "lib/Moose/Meta/Method/Accessor.pm", "version" : "2.1604" }, "Moose::Meta::Method::Augmented" : { "file" : "lib/Moose/Meta/Method/Augmented.pm", "version" : "2.1604" }, "Moose::Meta::Method::Constructor" : { "file" : "lib/Moose/Meta/Method/Constructor.pm", "version" : "2.1604" }, "Moose::Meta::Method::Delegation" : { "file" : "lib/Moose/Meta/Method/Delegation.pm", "version" : "2.1604" }, "Moose::Meta::Method::Destructor" : { "file" : "lib/Moose/Meta/Method/Destructor.pm", "version" : "2.1604" }, "Moose::Meta::Method::Meta" : { "file" : "lib/Moose/Meta/Method/Meta.pm", "version" : "2.1604" }, "Moose::Meta::Method::Overridden" : { "file" : "lib/Moose/Meta/Method/Overridden.pm", "version" : "2.1604" }, "Moose::Meta::Role" : { "file" : "lib/Moose/Meta/Role.pm", "version" : "2.1604" }, "Moose::Meta::Role::Application" : { "file" : "lib/Moose/Meta/Role/Application.pm", "version" : "2.1604" }, "Moose::Meta::Role::Application::RoleSummation" : { "file" : "lib/Moose/Meta/Role/Application/RoleSummation.pm", "version" : "2.1604" }, "Moose::Meta::Role::Application::ToClass" : { "file" : "lib/Moose/Meta/Role/Application/ToClass.pm", "version" : "2.1604" }, "Moose::Meta::Role::Application::ToInstance" : { "file" : "lib/Moose/Meta/Role/Application/ToInstance.pm", "version" : "2.1604" }, "Moose::Meta::Role::Application::ToRole" : { "file" : "lib/Moose/Meta/Role/Application/ToRole.pm", "version" : "2.1604" }, "Moose::Meta::Role::Attribute" : { "file" : "lib/Moose/Meta/Role/Attribute.pm", "version" : "2.1604" }, "Moose::Meta::Role::Composite" : { "file" : "lib/Moose/Meta/Role/Composite.pm", "version" : "2.1604" }, "Moose::Meta::Role::Method" : { "file" : "lib/Moose/Meta/Role/Method.pm", "version" : "2.1604" }, "Moose::Meta::Role::Method::Conflicting" : { "file" : "lib/Moose/Meta/Role/Method/Conflicting.pm", "version" : "2.1604" }, "Moose::Meta::Role::Method::Required" : { "file" : "lib/Moose/Meta/Role/Method/Required.pm", "version" : "2.1604" }, "Moose::Meta::TypeCoercion" : { "file" : "lib/Moose/Meta/TypeCoercion.pm", "version" : "2.1604" }, "Moose::Meta::TypeCoercion::Union" : { "file" : "lib/Moose/Meta/TypeCoercion/Union.pm", "version" : "2.1604" }, "Moose::Meta::TypeConstraint" : { "file" : "lib/Moose/Meta/TypeConstraint.pm", "version" : "2.1604" }, "Moose::Meta::TypeConstraint::Class" : { "file" : "lib/Moose/Meta/TypeConstraint/Class.pm", "version" : "2.1604" }, "Moose::Meta::TypeConstraint::DuckType" : { "file" : "lib/Moose/Meta/TypeConstraint/DuckType.pm", "version" : "2.1604" }, "Moose::Meta::TypeConstraint::Enum" : { "file" : "lib/Moose/Meta/TypeConstraint/Enum.pm", "version" : "2.1604" }, "Moose::Meta::TypeConstraint::Parameterizable" : { "file" : "lib/Moose/Meta/TypeConstraint/Parameterizable.pm", "version" : "2.1604" }, "Moose::Meta::TypeConstraint::Parameterized" : { "file" : "lib/Moose/Meta/TypeConstraint/Parameterized.pm", "version" : "2.1604" }, "Moose::Meta::TypeConstraint::Registry" : { "file" : "lib/Moose/Meta/TypeConstraint/Registry.pm", "version" : "2.1604" }, "Moose::Meta::TypeConstraint::Role" : { "file" : "lib/Moose/Meta/TypeConstraint/Role.pm", "version" : "2.1604" }, "Moose::Meta::TypeConstraint::Union" : { "file" : "lib/Moose/Meta/TypeConstraint/Union.pm", "version" : "2.1604" }, "Moose::Object" : { "file" : "lib/Moose/Object.pm", "version" : "2.1604" }, "Moose::Role" : { "file" : "lib/Moose/Role.pm", "version" : "2.1604" }, "Moose::Spec::Role" : { "file" : "lib/Moose/Spec/Role.pod", "version" : "2.1604" }, "Moose::Unsweetened" : { "file" : "lib/Moose/Unsweetened.pod", "version" : "2.1604" }, "Moose::Util" : { "file" : "lib/Moose/Util.pm", "version" : "2.1604" }, "Moose::Util::MetaRole" : { "file" : "lib/Moose/Util/MetaRole.pm", "version" : "2.1604" }, "Moose::Util::TypeConstraints" : { "file" : "lib/Moose/Util/TypeConstraints.pm", "version" : "2.1604" }, "Test::Moose" : { "file" : "lib/Test/Moose.pm", "version" : "2.1604" }, "metaclass" : { "file" : "lib/metaclass.pm", "version" : "2.1604" }, "oose" : { "file" : "lib/oose.pm", "version" : "2.1604" } }, "release_status" : "stable", "resources" : { "bugtracker" : { "mailto" : "bug-Moose@rt.cpan.org", "web" : "https://rt.cpan.org/Dist/Display.html?Name=Moose" }, "homepage" : "http://moose.perl.org/", "repository" : { "type" : "git", "url" : "git://github.com/moose/Moose.git", "web" : "https://github.com/moose/Moose" }, "x_IRC" : "irc://irc.perl.org/#moose", "x_MailingList" : "http://lists.perl.org/list/moose.html" }, "version" : "2.1604", "x_Dist_Zilla" : { "perl" : { "version" : "5.023004" }, "plugins" : [ { "class" : "Dist::Zilla::Plugin::EnsurePrereqsInstalled", "name" : "EnsurePrereqsInstalled", "version" : "0.008" }, { "class" : "Dist::Zilla::Plugin::Git::GatherDir", "config" : { "Dist::Zilla::Plugin::GatherDir" : { "exclude_filename" : [ "CONTRIBUTING.pod", "LICENSE", "Makefile.PL" ], "exclude_match" : [ "^t/recipes/(?!basics_genome_overloadingsubtypesandcoercion)" ], "follow_symlinks" : 0, "include_dotfiles" : 0, "prefix" : "", "prune_directory" : [], "root" : "." }, "Dist::Zilla::Plugin::Git::GatherDir" : { "include_untracked" : 0 } }, "name" : "Git::GatherDir", "version" : "2.036" }, { "class" : "Dist::Zilla::Plugin::MetaYAML", "name" : "MetaYAML", "version" : "5.041" }, { "class" : "Dist::Zilla::Plugin::MetaJSON", "name" : "MetaJSON", "version" : "5.041" }, { "class" : "Dist::Zilla::Plugin::License", "name" : "License", "version" : "5.041" }, { "class" : "Dist::Zilla::Plugin::ExecDir", "name" : "ExecDir", "version" : "5.041" }, { "class" : "inc::MakeMaker", "config" : { "Dist::Zilla::Plugin::MakeMaker::Awesome" : { "version" : "0.35" }, "Dist::Zilla::Role::TestRunner" : { "default_jobs" : "9" } }, "name" : "=inc::MakeMaker", "version" : null }, { "class" : "Dist::Zilla::Plugin::Manifest", "name" : "Manifest", "version" : "5.041" }, { "class" : "Dist::Zilla::Plugin::MetaConfig", "name" : "MetaConfig", "version" : "5.041" }, { "class" : "inc::SimpleAuthority", "name" : "=inc::SimpleAuthority", "version" : null }, { "class" : "Dist::Zilla::Plugin::MetaResources", "name" : "MetaResources", "version" : "5.041" }, { "class" : "Dist::Zilla::Plugin::FileFinder::ByName", "name" : "PodModules", "version" : "5.041" }, { "class" : "Dist::Zilla::Plugin::FileFinder::Filter", "name" : "ModulesSansPod", "version" : "5.041" }, { "class" : "Dist::Zilla::Plugin::FileFinder::Filter", "name" : "VersionedModules", "version" : "5.041" }, { "class" : "inc::SimpleProvides", "name" : "=inc::SimpleProvides", "version" : null }, { "class" : "Dist::Zilla::Plugin::MetaProvides::Package", "config" : { "Dist::Zilla::Plugin::MetaProvides::Package" : { "finder" : [ "ModulesSansPod" ], "finder_objects" : [ { "class" : "Dist::Zilla::Plugin::FileFinder::Filter", "name" : "ModulesSansPod", "version" : "5.041" } ] }, "Dist::Zilla::Role::MetaProvider::Provider" : { "Dist::Zilla::Role::MetaProvider::Provider::VERSION" : "2.001010", "inherit_missing" : "1", "inherit_version" : "1", "meta_noindex" : "1" } }, "name" : "MetaProvides::Package", "version" : "2.003001" }, { "class" : "Dist::Zilla::Plugin::MetaNoIndex", "name" : "MetaNoIndex", "version" : "5.041" }, { "class" : "Dist::Zilla::Plugin::Git::Contributors", "config" : { "Dist::Zilla::Plugin::Git::Contributors" : { "include_authors" : 0, "include_releaser" : 1, "order_by" : "name", "paths" : [ "." ] } }, "name" : "Git::Contributors", "version" : "0.015" }, { "class" : "Dist::Zilla::Plugin::SurgicalPodWeaver", "config" : { "Dist::Zilla::Plugin::PodWeaver" : { "finder" : [ ":InstallModules", ":ExecFiles" ], "plugins" : [ { "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::Plugin::SingleEncoding", "name" : "@Default/SingleEncoding", "version" : "4.012" }, { "class" : "Pod::Weaver::Section::Name", "name" : "@Default/Name", "version" : "4.012" }, { "class" : "Pod::Weaver::Section::Version", "name" : "@Default/Version", "version" : "4.012" }, { "class" : "Pod::Weaver::Section::Region", "name" : "@Default/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" : "ATTRIBUTES", "version" : "4.012" }, { "class" : "Pod::Weaver::Section::Collect", "name" : "METHODS", "version" : "4.012" }, { "class" : "Pod::Weaver::Section::Collect", "name" : "FUNCTIONS", "version" : "4.012" }, { "class" : "Pod::Weaver::Section::Leftovers", "name" : "@Default/Leftovers", "version" : "4.012" }, { "class" : "Pod::Weaver::Section::Region", "name" : "@Default/postlude", "version" : "4.012" }, { "class" : "Pod::Weaver::Section::Authors", "name" : "@Default/Authors", "version" : "4.012" }, { "class" : "Pod::Weaver::Section::Legal", "name" : "@Default/Legal", "version" : "4.012" } ] } }, "name" : "SurgicalPodWeaver", "version" : "0.0023" }, { "class" : "Dist::Zilla::Plugin::RewriteVersion", "config" : { "Dist::Zilla::Plugin::RewriteVersion" : { "add_tarball_name" : 0, "finders" : [ "VersionedModules" ], "global" : 0, "skip_version_provider" : 0 } }, "name" : "RewriteVersion", "version" : "0.012" }, { "class" : "Dist::Zilla::Plugin::Git::Describe", "name" : "Git::Describe", "version" : "0.006" }, { "class" : "inc::ExtractInlineTests", "name" : "=inc::ExtractInlineTests", "version" : null }, { "class" : "Dist::Zilla::Plugin::PromptIfStale", "config" : { "Dist::Zilla::Plugin::PromptIfStale" : { "check_all_plugins" : 1, "check_all_prereqs" : 1, "modules" : [], "phase" : "release", "skip" : [] } }, "name" : "PromptIfStale", "version" : "0.047" }, { "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" : "Test::EOL", "version" : "0.18" }, { "class" : "Dist::Zilla::Plugin::PodSyntaxTests", "name" : "PodSyntaxTests", "version" : "5.041" }, { "class" : "Dist::Zilla::Plugin::Test::NoTabs", "config" : { "Dist::Zilla::Plugin::Test::NoTabs" : { "filename" : "xt/author/no-tabs.t", "finder" : [ ":InstallModules", ":ExecFiles", ":TestFiles" ] } }, "name" : "Test::NoTabs", "version" : "0.15" }, { "class" : "Dist::Zilla::Plugin::MetaTests", "name" : "MetaTests", "version" : "5.041" }, { "class" : "Dist::Zilla::Plugin::Test::Kwalitee", "config" : { "Dist::Zilla::Plugin::Test::Kwalitee" : { "filename" : "xt/release/kwalitee.t", "skiptest" : [ "use_strict" ] } }, "name" : "Test::Kwalitee", "version" : "2.12" }, { "class" : "Dist::Zilla::Plugin::MojibakeTests", "name" : "MojibakeTests", "version" : "0.8" }, { "class" : "Dist::Zilla::Plugin::RunExtraTests", "config" : { "Dist::Zilla::Role::TestRunner" : { "default_jobs" : "9" } }, "name" : "RunExtraTests", "version" : "0.028" }, { "class" : "Dist::Zilla::Plugin::Test::ReportPrereqs", "name" : "Test::ReportPrereqs", "version" : "0.021" }, { "class" : "Dist::Zilla::Plugin::Test::CPAN::Changes", "name" : "Test::CPAN::Changes", "version" : "0.009" }, { "class" : "Dist::Zilla::Plugin::Test::Compile", "config" : { "Dist::Zilla::Plugin::Test::Compile" : { "bail_out_on_fail" : "1", "fail_on_warning" : "author", "fake_home" : 0, "filename" : "xt/release/00-compile.t", "module_finder" : [ ":InstallModules" ], "needs_display" : 0, "phase" : "develop", "script_finder" : [ ":PerlExecFiles" ], "skips" : [ "^Class::MOP::Attribute$", "^Class::MOP::Class$", "^Class::MOP::Method::Accessor$", "^Class::MOP::Method::Constructor$", "^Class::MOP::Method::Inlined$", "^Class::MOP::Method::Wrapped$", "^Class::MOP::Mixin::HasAttributes$", "^Class::MOP::Module$", "^Class::MOP::Package$", "^Moose::Meta::Attribute$", "^Moose::Meta::Attribute::Native$", "^Moose::Meta::Mixin::AttributeCore$", "^Moose::Meta::Role::Attribute$", "^Moose::Meta::TypeConstraint::Class$", "^Moose::Meta::TypeConstraint::DuckType$", "^Moose::Meta::TypeConstraint::Enum$", "^Moose::Meta::TypeConstraint::Parameterizable$", "^Moose::Meta::TypeConstraint::Parameterized$", "^Moose::Meta::TypeConstraint::Role$", "^Moose::Meta::TypeConstraint::Union$" ] } }, "name" : "Test::Compile", "version" : "2.054" }, { "class" : "inc::CheckReleaseType", "name" : "=inc::CheckReleaseType", "version" : null }, { "class" : "Dist::Zilla::Plugin::CheckVersionIncrement", "name" : "CheckVersionIncrement", "version" : "0.121750" }, { "class" : "Dist::Zilla::Plugin::CheckChangesHasContent", "name" : "CheckChangesHasContent", "version" : "0.008" }, { "class" : "Dist::Zilla::Plugin::Prereqs", "config" : { "Dist::Zilla::Plugin::Prereqs" : { "phase" : "runtime", "type" : "requires" } }, "name" : "Prereqs", "version" : "5.041" }, { "class" : "Dist::Zilla::Plugin::Prereqs", "config" : { "Dist::Zilla::Plugin::Prereqs" : { "phase" : "test", "type" : "requires" } }, "name" : "TestRequires", "version" : "5.041" }, { "class" : "Dist::Zilla::Plugin::Prereqs", "config" : { "Dist::Zilla::Plugin::Prereqs" : { "phase" : "configure", "type" : "requires" } }, "name" : "ConfigureRequires", "version" : "5.041" }, { "class" : "Dist::Zilla::Plugin::Prereqs::AuthorDeps", "name" : "Prereqs::AuthorDeps", "version" : "0.005" }, { "class" : "Dist::Zilla::Plugin::Prereqs", "config" : { "Dist::Zilla::Plugin::Prereqs" : { "phase" : "develop", "type" : "requires" } }, "name" : "DevelopRequires", "version" : "5.041" }, { "class" : "Dist::Zilla::Plugin::Prereqs", "config" : { "Dist::Zilla::Plugin::Prereqs" : { "phase" : "runtime", "type" : "suggests" } }, "name" : "RuntimeSuggests", "version" : "5.041" }, { "class" : "Dist::Zilla::Plugin::Conflicts", "name" : "Conflicts", "version" : "0.17" }, { "class" : "Dist::Zilla::Plugin::Test::CheckBreaks", "config" : { "Dist::Zilla::Plugin::Test::CheckBreaks" : { "conflicts_module" : "Moose::Conflicts" }, "Dist::Zilla::Role::ModuleMetadata" : { "Module::Metadata" : "1.000029", "version" : "0.003" } }, "name" : "Test::CheckBreaks", "version" : "0.013" }, { "class" : "inc::CheckAuthorDeps", "name" : "=inc::CheckAuthorDeps", "version" : null }, { "class" : "inc::CheckDelta", "name" : "=inc::CheckDelta", "version" : null }, { "class" : "inc::GitUpToDate", "name" : "=inc::GitUpToDate", "version" : null }, { "class" : "Dist::Zilla::Plugin::Git::Remote::Check", "name" : "Git::Remote::Check", "version" : "0.2.0" }, { "class" : "Dist::Zilla::Plugin::Git::CheckFor::CorrectBranch", "config" : { "Dist::Zilla::Role::Git::Repo" : { "repo_root" : "." } }, "name" : "Git::CheckFor::CorrectBranch", "version" : "0.013" }, { "class" : "Dist::Zilla::Plugin::Git::Check", "config" : { "Dist::Zilla::Plugin::Git::Check" : { "untracked_files" : "die" }, "Dist::Zilla::Role::Git::DirtyFiles" : { "allow_dirty" : [], "allow_dirty_match" : [], "changelog" : "Changes" }, "Dist::Zilla::Role::Git::Repo" : { "repo_root" : "." } }, "name" : "Git::Check", "version" : "2.036" }, { "class" : "Dist::Zilla::Plugin::TestRelease", "name" : "TestRelease", "version" : "5.041" }, { "class" : "Dist::Zilla::Plugin::UploadToCPAN", "name" : "UploadToCPAN", "version" : "5.041" }, { "class" : "Dist::Zilla::Plugin::CopyFilesFromRelease", "config" : { "Dist::Zilla::Plugin::CopyFilesFromRelease" : { "filename" : [ "Changes", "LICENSE" ], "match" : [] } }, "name" : "CopyFilesFromRelease", "version" : "0.006" }, { "class" : "Dist::Zilla::Plugin::ReadmeAnyFromPod", "config" : { "Dist::Zilla::Role::FileWatcher" : { "version" : "0.006" } }, "name" : "ReadmeAnyFromPod", "version" : "0.150250" }, { "class" : "Dist::Zilla::Plugin::Git::Commit", "config" : { "Dist::Zilla::Plugin::Git::Commit" : { "add_files_in" : [], "commit_msg" : "%N-%v%t%n%n%c" }, "Dist::Zilla::Role::Git::DirtyFiles" : { "allow_dirty" : [ "CONTRIBUTING.pod", "Changes", "LICENSE" ], "allow_dirty_match" : [], "changelog" : "Changes" }, "Dist::Zilla::Role::Git::Repo" : { "repo_root" : "." }, "Dist::Zilla::Role::Git::StringFormatter" : { "time_zone" : "local" } }, "name" : "release snapshot", "version" : "2.036" }, { "class" : "Dist::Zilla::Plugin::Git::Tag", "config" : { "Dist::Zilla::Plugin::Git::Tag" : { "branch" : null, "changelog" : "Changes", "signed" : 0, "tag" : "2.1604", "tag_format" : "%v", "tag_message" : "%v%t" }, "Dist::Zilla::Role::Git::Repo" : { "repo_root" : "." }, "Dist::Zilla::Role::Git::StringFormatter" : { "time_zone" : "local" } }, "name" : "Git::Tag", "version" : "2.036" }, { "class" : "Dist::Zilla::Plugin::BumpVersionAfterRelease", "config" : { "Dist::Zilla::Plugin::BumpVersionAfterRelease" : { "finders" : [ "VersionedModules" ], "global" : 0, "munge_makefile_pl" : 1 } }, "name" : "BumpVersionAfterRelease", "version" : "0.012" }, { "class" : "Dist::Zilla::Plugin::NextRelease", "name" : "NextRelease", "version" : "5.041" }, { "class" : "Dist::Zilla::Plugin::Git::Commit", "config" : { "Dist::Zilla::Plugin::Git::Commit" : { "add_files_in" : [], "commit_msg" : "increment version after release" }, "Dist::Zilla::Role::Git::DirtyFiles" : { "allow_dirty" : [ "Changes" ], "allow_dirty_match" : [ "(?^u:^lib/.*\\.pm$)" ], "changelog" : "Changes" }, "Dist::Zilla::Role::Git::Repo" : { "repo_root" : "." }, "Dist::Zilla::Role::Git::StringFormatter" : { "time_zone" : "local" } }, "name" : "increment version", "version" : "2.036" }, { "class" : "Dist::Zilla::Plugin::Git::Push", "config" : { "Dist::Zilla::Plugin::Git::Push" : { "push_to" : [ "origin" ], "remotes_must_exist" : 1 }, "Dist::Zilla::Role::Git::Repo" : { "repo_root" : "." } }, "name" : "Git::Push", "version" : "2.036" }, { "class" : "Dist::Zilla::Plugin::Run::AfterRelease", "config" : { "Dist::Zilla::Plugin::Run::Role::Runner" : { "fatal_errors" : 1, "quiet" : 0, "run" : [ "git checkout master", "git merge --ff-only stable/2.16", "git push" ] } }, "name" : "Run::AfterRelease", "version" : "0.042" }, { "class" : "inc::GenerateDocs", "name" : "=inc::GenerateDocs", "version" : null }, { "class" : "inc::Clean", "name" : "=inc::Clean", "version" : null }, { "class" : "Dist::Zilla::Plugin::ConfirmRelease", "name" : "ConfirmRelease", "version" : "5.041" }, { "class" : "Dist::Zilla::Plugin::FinderCode", "name" : ":InstallModules", "version" : "5.041" }, { "class" : "Dist::Zilla::Plugin::FinderCode", "name" : ":IncModules", "version" : "5.041" }, { "class" : "Dist::Zilla::Plugin::FinderCode", "name" : ":TestFiles", "version" : "5.041" }, { "class" : "Dist::Zilla::Plugin::FinderCode", "name" : ":ExtraTestFiles", "version" : "5.041" }, { "class" : "Dist::Zilla::Plugin::FinderCode", "name" : ":ExecFiles", "version" : "5.041" }, { "class" : "Dist::Zilla::Plugin::FinderCode", "name" : ":PerlExecFiles", "version" : "5.041" }, { "class" : "Dist::Zilla::Plugin::FinderCode", "name" : ":ShareFiles", "version" : "5.041" }, { "class" : "Dist::Zilla::Plugin::FinderCode", "name" : ":MainModule", "version" : "5.041" }, { "class" : "Dist::Zilla::Plugin::FinderCode", "name" : ":AllFiles", "version" : "5.041" }, { "class" : "Dist::Zilla::Plugin::FinderCode", "name" : ":NoFiles", "version" : "5.041" } ], "zilla" : { "class" : "Dist::Zilla::Dist::Builder", "config" : { "is_trial" : "0" }, "version" : "5.041" } }, "x_authority" : "cpan:STEVAN", "x_breaks" : { "Catalyst" : "<= 5.90049999", "Config::MVP" : "<= 2.200004", "Devel::REPL" : "<= 1.003020", "Dist::Zilla::Plugin::Git" : "<= 2.016", "Fey" : "<= 0.36", "Fey::ORM" : "<= 0.42", "File::ChangeNotify" : "<= 0.15", "HTTP::Throwable" : "<= 0.017", "KiokuDB" : "<= 0.51", "Markdent" : "<= 0.16", "Mason" : "<= 2.18", "MooseX::ABC" : "<= 0.05", "MooseX::Aliases" : "<= 0.08", "MooseX::AlwaysCoerce" : "<= 0.13", "MooseX::App" : "<= 1.22", "MooseX::Attribute::Deflator" : "<= 2.1.7", "MooseX::Attribute::Dependent" : "<= 1.1.0", "MooseX::Attribute::Prototype" : "<= 0.10", "MooseX::AttributeHelpers" : "<= 0.22", "MooseX::AttributeIndexes" : "<= 1.0.0", "MooseX::AttributeInflate" : "<= 0.02", "MooseX::CascadeClearing" : "<= 0.03", "MooseX::ClassAttribute" : "<= 0.26", "MooseX::Constructor::AllErrors" : "<= 0.021", "MooseX::Declare" : "<= 0.35", "MooseX::FollowPBP" : "<= 0.02", "MooseX::Getopt" : "<= 0.56", "MooseX::InstanceTracking" : "<= 0.04", "MooseX::LazyRequire" : "<= 0.06", "MooseX::Meta::Attribute::Index" : "<= 0.04", "MooseX::Meta::Attribute::Lvalue" : "<= 0.05", "MooseX::Method::Signatures" : "<= 0.44", "MooseX::MethodAttributes" : "<= 0.22", "MooseX::NonMoose" : "<= 0.24", "MooseX::Object::Pluggable" : "<= 0.0011", "MooseX::POE" : "<= 0.214", "MooseX::Params::Validate" : "<= 0.05", "MooseX::PrivateSetters" : "<= 0.03", "MooseX::Role::Cmd" : "<= 0.06", "MooseX::Role::Parameterized" : "<= 1.00", "MooseX::Role::WithOverloading" : "<= 0.14", "MooseX::Runnable" : "<= 0.03", "MooseX::Scaffold" : "<= 0.05", "MooseX::SemiAffordanceAccessor" : "<= 0.05", "MooseX::SetOnce" : "<= 0.100473", "MooseX::Singleton" : "<= 0.25", "MooseX::SlurpyConstructor" : "<= 1.1", "MooseX::Storage" : "<= 0.42", "MooseX::StrictConstructor" : "<= 0.12", "MooseX::Traits" : "<= 0.11", "MooseX::Types" : "<= 0.19", "MooseX::Types::Parameterizable" : "<= 0.05", "MooseX::Types::Set::Object" : "<= 0.03", "MooseX::Types::Signal" : "<= 1.101930", "MooseX::UndefTolerant" : "<= 0.11", "PRANG" : "<= 0.14", "Pod::Elemental" : "<= 0.093280", "Pod::Weaver" : "<= 3.101638", "Reaction" : "<= 0.002003", "Test::Able" : "<= 0.10", "Test::CleanNamespaces" : "<= 0.03", "Test::Moose::More" : "<= 0.022", "Test::TempDir" : "<= 0.05", "Throwable" : "<= 0.102080", "namespace::autoclean" : "<= 0.08" }, "x_contributors" : [ "Aankhen ", "Adam J. Foxson ", "Adam Kennedy ", "Ævar Arnfjörð Bjarmason ", "Anders Nor Berle ", "Andy Jack ", "Ansgar Burchardt ", "Aran Clary Deltac ", "Ash Berlin ", "A. Sinan Unur ", "Ben Hutton ", "Brad Bowman ", "Brendan Byrd ", "Brian Manning ", "Chad Granum ", "Chankey Pathak ", "Chia-liang Kao ", "Chip ", "Christian Hansen ", "Christopher J. Madsen ", "Chris Weyl ", "chromatic ", "Cory Watson ", "Curtis Jewell ", "Dagfinn Ilmari Mannsåker ", "Daisuke Maki (lestrrat) ", "Dan Dascalescu ", "Dann ", "Dave Romano ", "David Leadbeater ", "David Steinbrunner ", "Dylan William Hardison ", "Eric Wilhelm ", "Evan Carroll ", "franck cuny ", "Frew Schmidt ", "Gerda Shank ", "gfx ", "Graham Knop ", "gregor herrmann ", "Guillermo Roditi ", "hakim ", "Henry Van Styn ", "James Marca ", "Jason May ", "Jay Allen ", "Jay Hannah ", "Jay Kuri ", "Jeff Bisbee ", "Jesse Vincent ", "Jess Robinson ", "joel ", "John Douglas Porter ", "John Goulah ", "John Napiorkowski ", "Jonathan Rockway ", "Justin DeVuyst ", "Justin Hunter ", "Kent Fredric ", "Lars Dɪᴇᴄᴋᴏᴡ 迪拉斯 ", "Leon Brocard ", "Marcel Grünauer ", "Marc Mims ", "Marcus Ramberg ", "Mark Allen ", "Mark A. Stratman ", "Mark Fowler ", "Mateu X Hunter ", "Matthew Horsfall ", "matthof ", "Matt Kraai ", "Michael LaGrasta ", "Michael Rykov ", "Michael Schout ", "Mike Whitaker ", "Moritz Onken ", "Nathan Gray ", "Nelo Onyiah ", "Nick Perez ", "Olaf Alders ", "Olivier Mengué ", "Olof Johansson ", "Patrick Donelan ", "Paul Driver ", "Paul Jamieson Fenwick ", "Paweł Murias ", "Pedro Melo ", "Perlover ", "Peter Shangov ", "Philippe Bruhat (BooK) ", "Philipp Gortan ", "Phillip Smith ", "Piotr Roszatycki ", "pktm ", "Rafael Kitover ", "Ricardo Signes ", "Robert Boone ", "Robert Buels ", "Robert 'phaylon' Sedlacek ", "Robin V ", "rodrigolive ", "Sam Vilain ", "Scott McWhirter ", "shelling ", "Shlomi Fish ", "Stefan O'Rear ", "Thomas Sibley ", "Todd Hepler ", "Tokuhiro Matsuno ", "Tomas Doran ", "Tuomas Jormola ", "Upasana Shukla ", "Wallace Reis ", "wickline ", "Zachary Lome ", "Zoffix Znet " ] } Moose-2.1604/META.yml000644 000766 000024 00000210604 12617452415 014426 0ustar00etherstaff000000 000000 --- abstract: 'A postmodern object system for Perl 5' author: - 'Stevan Little ' - 'Dave Rolsky ' - 'Jesse Luehrs ' - 'Shawn M Moore ' - "יובל קוג'מן (Yuval Kogman) " - 'Karen Etheridge ' - 'Florian Ragwitz ' - 'Hans Dieter Pearcey ' - 'Chris Prather ' - 'Matt S Trout ' build_requires: CPAN::Meta::Check: '0.011' CPAN::Meta::Requirements: '0' ExtUtils::MakeMaker: '0' File::Spec: '0' Test::CleanNamespaces: '0.13' Test::Fatal: '0.001' Test::More: '0.88' Test::Requires: '0.05' Test::Warnings: '0.016' configure_requires: Dist::CheckConflicts: '0.02' ExtUtils::CBuilder: '0.27' ExtUtils::MakeMaker: '0' File::Spec: '0' perl: '5.008003' dynamic_config: 0 generated_by: 'Dist::Zilla version 5.041, CPAN::Meta::Converter version 2.150005' license: perl meta-spec: url: http://module-build.sourceforge.net/META-spec-v1.4.html version: '1.4' name: Moose no_index: directory: - author - benchmarks - doc - inc namespace: - Class::MOP::Mixin - Moose::Meta::Method::Accessor::Native - Moose::Meta::Mixin package: - Class::MOP::Class::Immutable::Trait - Class::MOP::Deprecated - Class::MOP::MiniTrait - Class::MOP::Mixin - Moose::Deprecated - Moose::Meta::Attribute::Native::Trait - Moose::Meta::Class::Immutable::Trait - Moose::Meta::Method::Accessor::Native - Moose::Meta::Object::Trait - Moose::Util::TypeConstraints::Builtins provides: Class::MOP: file: lib/Class/MOP.pm version: '2.1604' Class::MOP::Attribute: file: lib/Class/MOP/Attribute.pm version: '2.1604' Class::MOP::Class: file: lib/Class/MOP/Class.pm version: '2.1604' Class::MOP::Instance: file: lib/Class/MOP/Instance.pm version: '2.1604' Class::MOP::Method: file: lib/Class/MOP/Method.pm version: '2.1604' Class::MOP::Method::Accessor: file: lib/Class/MOP/Method/Accessor.pm version: '2.1604' Class::MOP::Method::Constructor: file: lib/Class/MOP/Method/Constructor.pm version: '2.1604' Class::MOP::Method::Generated: file: lib/Class/MOP/Method/Generated.pm version: '2.1604' Class::MOP::Method::Inlined: file: lib/Class/MOP/Method/Inlined.pm version: '2.1604' Class::MOP::Method::Meta: file: lib/Class/MOP/Method/Meta.pm version: '2.1604' Class::MOP::Method::Wrapped: file: lib/Class/MOP/Method/Wrapped.pm version: '2.1604' Class::MOP::Module: file: lib/Class/MOP/Module.pm version: '2.1604' Class::MOP::Object: file: lib/Class/MOP/Object.pm version: '2.1604' Class::MOP::Overload: file: lib/Class/MOP/Overload.pm version: '2.1604' Class::MOP::Package: file: lib/Class/MOP/Package.pm version: '2.1604' Moose: file: lib/Moose.pm version: '2.1604' Moose::Cookbook: file: lib/Moose/Cookbook.pod version: '2.1604' Moose::Cookbook::Basics::BankAccount_MethodModifiersAndSubclassing: file: lib/Moose/Cookbook/Basics/BankAccount_MethodModifiersAndSubclassing.pod version: '2.1604' Moose::Cookbook::Basics::BinaryTree_AttributeFeatures: file: lib/Moose/Cookbook/Basics/BinaryTree_AttributeFeatures.pod version: '2.1604' Moose::Cookbook::Basics::BinaryTree_BuilderAndLazyBuild: file: lib/Moose/Cookbook/Basics/BinaryTree_BuilderAndLazyBuild.pod version: '2.1604' Moose::Cookbook::Basics::Company_Subtypes: file: lib/Moose/Cookbook/Basics/Company_Subtypes.pod version: '2.1604' Moose::Cookbook::Basics::DateTime_ExtendingNonMooseParent: file: lib/Moose/Cookbook/Basics/DateTime_ExtendingNonMooseParent.pod version: '2.1604' Moose::Cookbook::Basics::Document_AugmentAndInner: file: lib/Moose/Cookbook/Basics/Document_AugmentAndInner.pod version: '2.1604' Moose::Cookbook::Basics::Genome_OverloadingSubtypesAndCoercion: file: lib/Moose/Cookbook/Basics/Genome_OverloadingSubtypesAndCoercion.pod version: '2.1604' Moose::Cookbook::Basics::HTTP_SubtypesAndCoercion: file: lib/Moose/Cookbook/Basics/HTTP_SubtypesAndCoercion.pod version: '2.1604' Moose::Cookbook::Basics::Immutable: file: lib/Moose/Cookbook/Basics/Immutable.pod version: '2.1604' Moose::Cookbook::Basics::Person_BUILDARGSAndBUILD: file: lib/Moose/Cookbook/Basics/Person_BUILDARGSAndBUILD.pod version: '2.1604' Moose::Cookbook::Basics::Point_AttributesAndSubclassing: file: lib/Moose/Cookbook/Basics/Point_AttributesAndSubclassing.pod version: '2.1604' Moose::Cookbook::Extending::Debugging_BaseClassRole: file: lib/Moose/Cookbook/Extending/Debugging_BaseClassRole.pod version: '2.1604' Moose::Cookbook::Extending::ExtensionOverview: file: lib/Moose/Cookbook/Extending/ExtensionOverview.pod version: '2.1604' Moose::Cookbook::Extending::Mooseish_MooseSugar: file: lib/Moose/Cookbook/Extending/Mooseish_MooseSugar.pod version: '2.1604' Moose::Cookbook::Legacy::Debugging_BaseClassReplacement: file: lib/Moose/Cookbook/Legacy/Debugging_BaseClassReplacement.pod version: '2.1604' Moose::Cookbook::Legacy::Labeled_AttributeMetaclass: file: lib/Moose/Cookbook/Legacy/Labeled_AttributeMetaclass.pod version: '2.1604' Moose::Cookbook::Legacy::Table_ClassMetaclass: file: lib/Moose/Cookbook/Legacy/Table_ClassMetaclass.pod version: '2.1604' Moose::Cookbook::Meta::GlobRef_InstanceMetaclass: file: lib/Moose/Cookbook/Meta/GlobRef_InstanceMetaclass.pod version: '2.1604' Moose::Cookbook::Meta::Labeled_AttributeTrait: file: lib/Moose/Cookbook/Meta/Labeled_AttributeTrait.pod version: '2.1604' Moose::Cookbook::Meta::PrivateOrPublic_MethodMetaclass: file: lib/Moose/Cookbook/Meta/PrivateOrPublic_MethodMetaclass.pod version: '2.1604' Moose::Cookbook::Meta::Table_MetaclassTrait: file: lib/Moose/Cookbook/Meta/Table_MetaclassTrait.pod version: '2.1604' Moose::Cookbook::Meta::WhyMeta: file: lib/Moose/Cookbook/Meta/WhyMeta.pod version: '2.1604' Moose::Cookbook::Roles::ApplicationToInstance: file: lib/Moose/Cookbook/Roles/ApplicationToInstance.pod version: '2.1604' Moose::Cookbook::Roles::Comparable_CodeReuse: file: lib/Moose/Cookbook/Roles/Comparable_CodeReuse.pod version: '2.1604' Moose::Cookbook::Roles::Restartable_AdvancedComposition: file: lib/Moose/Cookbook/Roles/Restartable_AdvancedComposition.pod version: '2.1604' Moose::Cookbook::Snack::Keywords: file: lib/Moose/Cookbook/Snack/Keywords.pod version: '2.1604' Moose::Cookbook::Snack::Types: file: lib/Moose/Cookbook/Snack/Types.pod version: '2.1604' Moose::Cookbook::Style: file: lib/Moose/Cookbook/Style.pod version: '2.1604' Moose::Exception: file: lib/Moose/Exception.pm version: '2.1604' Moose::Exception::AccessorMustReadWrite: file: lib/Moose/Exception/AccessorMustReadWrite.pm version: '2.1604' Moose::Exception::AddParameterizableTypeTakesParameterizableType: file: lib/Moose/Exception/AddParameterizableTypeTakesParameterizableType.pm version: '2.1604' Moose::Exception::AddRoleTakesAMooseMetaRoleInstance: file: lib/Moose/Exception/AddRoleTakesAMooseMetaRoleInstance.pm version: '2.1604' Moose::Exception::AddRoleToARoleTakesAMooseMetaRole: file: lib/Moose/Exception/AddRoleToARoleTakesAMooseMetaRole.pm version: '2.1604' Moose::Exception::ApplyTakesABlessedInstance: file: lib/Moose/Exception/ApplyTakesABlessedInstance.pm version: '2.1604' Moose::Exception::AttachToClassNeedsAClassMOPClassInstanceOrASubclass: file: lib/Moose/Exception/AttachToClassNeedsAClassMOPClassInstanceOrASubclass.pm version: '2.1604' Moose::Exception::AttributeConflictInRoles: file: lib/Moose/Exception/AttributeConflictInRoles.pm version: '2.1604' Moose::Exception::AttributeConflictInSummation: file: lib/Moose/Exception/AttributeConflictInSummation.pm version: '2.1604' Moose::Exception::AttributeExtensionIsNotSupportedInRoles: file: lib/Moose/Exception/AttributeExtensionIsNotSupportedInRoles.pm version: '2.1604' Moose::Exception::AttributeIsRequired: file: lib/Moose/Exception/AttributeIsRequired.pm version: '2.1604' Moose::Exception::AttributeMustBeAnClassMOPMixinAttributeCoreOrSubclass: file: lib/Moose/Exception/AttributeMustBeAnClassMOPMixinAttributeCoreOrSubclass.pm version: '2.1604' Moose::Exception::AttributeNamesDoNotMatch: file: lib/Moose/Exception/AttributeNamesDoNotMatch.pm version: '2.1604' Moose::Exception::AttributeValueIsNotAnObject: file: lib/Moose/Exception/AttributeValueIsNotAnObject.pm version: '2.1604' Moose::Exception::AttributeValueIsNotDefined: file: lib/Moose/Exception/AttributeValueIsNotDefined.pm version: '2.1604' Moose::Exception::AutoDeRefNeedsArrayRefOrHashRef: file: lib/Moose/Exception/AutoDeRefNeedsArrayRefOrHashRef.pm version: '2.1604' Moose::Exception::BadOptionFormat: file: lib/Moose/Exception/BadOptionFormat.pm version: '2.1604' Moose::Exception::BothBuilderAndDefaultAreNotAllowed: file: lib/Moose/Exception/BothBuilderAndDefaultAreNotAllowed.pm version: '2.1604' Moose::Exception::BuilderDoesNotExist: file: lib/Moose/Exception/BuilderDoesNotExist.pm version: '2.1604' Moose::Exception::BuilderMethodNotSupportedForAttribute: file: lib/Moose/Exception/BuilderMethodNotSupportedForAttribute.pm version: '2.1604' Moose::Exception::BuilderMethodNotSupportedForInlineAttribute: file: lib/Moose/Exception/BuilderMethodNotSupportedForInlineAttribute.pm version: '2.1604' Moose::Exception::BuilderMustBeAMethodName: file: lib/Moose/Exception/BuilderMustBeAMethodName.pm version: '2.1604' Moose::Exception::CallingMethodOnAnImmutableInstance: file: lib/Moose/Exception/CallingMethodOnAnImmutableInstance.pm version: '2.1604' Moose::Exception::CallingReadOnlyMethodOnAnImmutableInstance: file: lib/Moose/Exception/CallingReadOnlyMethodOnAnImmutableInstance.pm version: '2.1604' Moose::Exception::CanExtendOnlyClasses: file: lib/Moose/Exception/CanExtendOnlyClasses.pm version: '2.1604' Moose::Exception::CanOnlyConsumeRole: file: lib/Moose/Exception/CanOnlyConsumeRole.pm version: '2.1604' Moose::Exception::CanOnlyWrapBlessedCode: file: lib/Moose/Exception/CanOnlyWrapBlessedCode.pm version: '2.1604' Moose::Exception::CanReblessOnlyIntoASubclass: file: lib/Moose/Exception/CanReblessOnlyIntoASubclass.pm version: '2.1604' Moose::Exception::CanReblessOnlyIntoASuperclass: file: lib/Moose/Exception/CanReblessOnlyIntoASuperclass.pm version: '2.1604' Moose::Exception::CannotAddAdditionalTypeCoercionsToUnion: file: lib/Moose/Exception/CannotAddAdditionalTypeCoercionsToUnion.pm version: '2.1604' Moose::Exception::CannotAddAsAnAttributeToARole: file: lib/Moose/Exception/CannotAddAsAnAttributeToARole.pm version: '2.1604' Moose::Exception::CannotApplyBaseClassRolesToRole: file: lib/Moose/Exception/CannotApplyBaseClassRolesToRole.pm version: '2.1604' Moose::Exception::CannotAssignValueToReadOnlyAccessor: file: lib/Moose/Exception/CannotAssignValueToReadOnlyAccessor.pm version: '2.1604' Moose::Exception::CannotAugmentIfLocalMethodPresent: file: lib/Moose/Exception/CannotAugmentIfLocalMethodPresent.pm version: '2.1604' Moose::Exception::CannotAugmentNoSuperMethod: file: lib/Moose/Exception/CannotAugmentNoSuperMethod.pm version: '2.1604' Moose::Exception::CannotAutoDerefWithoutIsa: file: lib/Moose/Exception/CannotAutoDerefWithoutIsa.pm version: '2.1604' Moose::Exception::CannotAutoDereferenceTypeConstraint: file: lib/Moose/Exception/CannotAutoDereferenceTypeConstraint.pm version: '2.1604' Moose::Exception::CannotCalculateNativeType: file: lib/Moose/Exception/CannotCalculateNativeType.pm version: '2.1604' Moose::Exception::CannotCallAnAbstractBaseMethod: file: lib/Moose/Exception/CannotCallAnAbstractBaseMethod.pm version: '2.1604' Moose::Exception::CannotCallAnAbstractMethod: file: lib/Moose/Exception/CannotCallAnAbstractMethod.pm version: '2.1604' Moose::Exception::CannotCoerceAWeakRef: file: lib/Moose/Exception/CannotCoerceAWeakRef.pm version: '2.1604' Moose::Exception::CannotCoerceAttributeWhichHasNoCoercion: file: lib/Moose/Exception/CannotCoerceAttributeWhichHasNoCoercion.pm version: '2.1604' Moose::Exception::CannotCreateHigherOrderTypeWithoutATypeParameter: file: lib/Moose/Exception/CannotCreateHigherOrderTypeWithoutATypeParameter.pm version: '2.1604' Moose::Exception::CannotCreateMethodAliasLocalMethodIsPresent: file: lib/Moose/Exception/CannotCreateMethodAliasLocalMethodIsPresent.pm version: '2.1604' Moose::Exception::CannotCreateMethodAliasLocalMethodIsPresentInClass: file: lib/Moose/Exception/CannotCreateMethodAliasLocalMethodIsPresentInClass.pm version: '2.1604' Moose::Exception::CannotDelegateLocalMethodIsPresent: file: lib/Moose/Exception/CannotDelegateLocalMethodIsPresent.pm version: '2.1604' Moose::Exception::CannotDelegateWithoutIsa: file: lib/Moose/Exception/CannotDelegateWithoutIsa.pm version: '2.1604' Moose::Exception::CannotFindDelegateMetaclass: file: lib/Moose/Exception/CannotFindDelegateMetaclass.pm version: '2.1604' Moose::Exception::CannotFindType: file: lib/Moose/Exception/CannotFindType.pm version: '2.1604' Moose::Exception::CannotFindTypeGivenToMatchOnType: file: lib/Moose/Exception/CannotFindTypeGivenToMatchOnType.pm version: '2.1604' Moose::Exception::CannotFixMetaclassCompatibility: file: lib/Moose/Exception/CannotFixMetaclassCompatibility.pm version: '2.1604' Moose::Exception::CannotGenerateInlineConstraint: file: lib/Moose/Exception/CannotGenerateInlineConstraint.pm version: '2.1604' Moose::Exception::CannotInitializeMooseMetaRoleComposite: file: lib/Moose/Exception/CannotInitializeMooseMetaRoleComposite.pm version: '2.1604' Moose::Exception::CannotInlineTypeConstraintCheck: file: lib/Moose/Exception/CannotInlineTypeConstraintCheck.pm version: '2.1604' Moose::Exception::CannotLocatePackageInINC: file: lib/Moose/Exception/CannotLocatePackageInINC.pm version: '2.1604' Moose::Exception::CannotMakeMetaclassCompatible: file: lib/Moose/Exception/CannotMakeMetaclassCompatible.pm version: '2.1604' Moose::Exception::CannotOverrideALocalMethod: file: lib/Moose/Exception/CannotOverrideALocalMethod.pm version: '2.1604' Moose::Exception::CannotOverrideBodyOfMetaMethods: file: lib/Moose/Exception/CannotOverrideBodyOfMetaMethods.pm version: '2.1604' Moose::Exception::CannotOverrideLocalMethodIsPresent: file: lib/Moose/Exception/CannotOverrideLocalMethodIsPresent.pm version: '2.1604' Moose::Exception::CannotOverrideNoSuperMethod: file: lib/Moose/Exception/CannotOverrideNoSuperMethod.pm version: '2.1604' Moose::Exception::CannotRegisterUnnamedTypeConstraint: file: lib/Moose/Exception/CannotRegisterUnnamedTypeConstraint.pm version: '2.1604' Moose::Exception::CannotUseLazyBuildAndDefaultSimultaneously: file: lib/Moose/Exception/CannotUseLazyBuildAndDefaultSimultaneously.pm version: '2.1604' Moose::Exception::CircularReferenceInAlso: file: lib/Moose/Exception/CircularReferenceInAlso.pm version: '2.1604' Moose::Exception::ClassDoesNotHaveInitMeta: file: lib/Moose/Exception/ClassDoesNotHaveInitMeta.pm version: '2.1604' Moose::Exception::ClassDoesTheExcludedRole: file: lib/Moose/Exception/ClassDoesTheExcludedRole.pm version: '2.1604' Moose::Exception::ClassNamesDoNotMatch: file: lib/Moose/Exception/ClassNamesDoNotMatch.pm version: '2.1604' Moose::Exception::CloneObjectExpectsAnInstanceOfMetaclass: file: lib/Moose/Exception/CloneObjectExpectsAnInstanceOfMetaclass.pm version: '2.1604' Moose::Exception::CodeBlockMustBeACodeRef: file: lib/Moose/Exception/CodeBlockMustBeACodeRef.pm version: '2.1604' Moose::Exception::CoercingWithoutCoercions: file: lib/Moose/Exception/CoercingWithoutCoercions.pm version: '2.1604' Moose::Exception::CoercionAlreadyExists: file: lib/Moose/Exception/CoercionAlreadyExists.pm version: '2.1604' Moose::Exception::CoercionNeedsTypeConstraint: file: lib/Moose/Exception/CoercionNeedsTypeConstraint.pm version: '2.1604' Moose::Exception::ConflictDetectedInCheckRoleExclusions: file: lib/Moose/Exception/ConflictDetectedInCheckRoleExclusions.pm version: '2.1604' Moose::Exception::ConflictDetectedInCheckRoleExclusionsInToClass: file: lib/Moose/Exception/ConflictDetectedInCheckRoleExclusionsInToClass.pm version: '2.1604' Moose::Exception::ConstructClassInstanceTakesPackageName: file: lib/Moose/Exception/ConstructClassInstanceTakesPackageName.pm version: '2.1604' Moose::Exception::CouldNotCreateMethod: file: lib/Moose/Exception/CouldNotCreateMethod.pm version: '2.1604' Moose::Exception::CouldNotCreateWriter: file: lib/Moose/Exception/CouldNotCreateWriter.pm version: '2.1604' Moose::Exception::CouldNotEvalConstructor: file: lib/Moose/Exception/CouldNotEvalConstructor.pm version: '2.1604' Moose::Exception::CouldNotEvalDestructor: file: lib/Moose/Exception/CouldNotEvalDestructor.pm version: '2.1604' Moose::Exception::CouldNotFindTypeConstraintToCoerceFrom: file: lib/Moose/Exception/CouldNotFindTypeConstraintToCoerceFrom.pm version: '2.1604' Moose::Exception::CouldNotGenerateInlineAttributeMethod: file: lib/Moose/Exception/CouldNotGenerateInlineAttributeMethod.pm version: '2.1604' Moose::Exception::CouldNotLocateTypeConstraintForUnion: file: lib/Moose/Exception/CouldNotLocateTypeConstraintForUnion.pm version: '2.1604' Moose::Exception::CouldNotParseType: file: lib/Moose/Exception/CouldNotParseType.pm version: '2.1604' Moose::Exception::CreateMOPClassTakesArrayRefOfAttributes: file: lib/Moose/Exception/CreateMOPClassTakesArrayRefOfAttributes.pm version: '2.1604' Moose::Exception::CreateMOPClassTakesArrayRefOfSuperclasses: file: lib/Moose/Exception/CreateMOPClassTakesArrayRefOfSuperclasses.pm version: '2.1604' Moose::Exception::CreateMOPClassTakesHashRefOfMethods: file: lib/Moose/Exception/CreateMOPClassTakesHashRefOfMethods.pm version: '2.1604' Moose::Exception::CreateTakesArrayRefOfRoles: file: lib/Moose/Exception/CreateTakesArrayRefOfRoles.pm version: '2.1604' Moose::Exception::CreateTakesHashRefOfAttributes: file: lib/Moose/Exception/CreateTakesHashRefOfAttributes.pm version: '2.1604' Moose::Exception::CreateTakesHashRefOfMethods: file: lib/Moose/Exception/CreateTakesHashRefOfMethods.pm version: '2.1604' Moose::Exception::DefaultToMatchOnTypeMustBeCodeRef: file: lib/Moose/Exception/DefaultToMatchOnTypeMustBeCodeRef.pm version: '2.1604' Moose::Exception::DelegationToAClassWhichIsNotLoaded: file: lib/Moose/Exception/DelegationToAClassWhichIsNotLoaded.pm version: '2.1604' Moose::Exception::DelegationToARoleWhichIsNotLoaded: file: lib/Moose/Exception/DelegationToARoleWhichIsNotLoaded.pm version: '2.1604' Moose::Exception::DelegationToATypeWhichIsNotAClass: file: lib/Moose/Exception/DelegationToATypeWhichIsNotAClass.pm version: '2.1604' Moose::Exception::DoesRequiresRoleName: file: lib/Moose/Exception/DoesRequiresRoleName.pm version: '2.1604' Moose::Exception::EnumCalledWithAnArrayRefAndAdditionalArgs: file: lib/Moose/Exception/EnumCalledWithAnArrayRefAndAdditionalArgs.pm version: '2.1604' Moose::Exception::EnumValuesMustBeString: file: lib/Moose/Exception/EnumValuesMustBeString.pm version: '2.1604' Moose::Exception::ExtendsMissingArgs: file: lib/Moose/Exception/ExtendsMissingArgs.pm version: '2.1604' Moose::Exception::HandlesMustBeAHashRef: file: lib/Moose/Exception/HandlesMustBeAHashRef.pm version: '2.1604' Moose::Exception::IllegalInheritedOptions: file: lib/Moose/Exception/IllegalInheritedOptions.pm version: '2.1604' Moose::Exception::IllegalMethodTypeToAddMethodModifier: file: lib/Moose/Exception/IllegalMethodTypeToAddMethodModifier.pm version: '2.1604' Moose::Exception::IncompatibleMetaclassOfSuperclass: file: lib/Moose/Exception/IncompatibleMetaclassOfSuperclass.pm version: '2.1604' Moose::Exception::InitMetaRequiresClass: file: lib/Moose/Exception/InitMetaRequiresClass.pm version: '2.1604' Moose::Exception::InitializeTakesUnBlessedPackageName: file: lib/Moose/Exception/InitializeTakesUnBlessedPackageName.pm version: '2.1604' Moose::Exception::InstanceBlessedIntoWrongClass: file: lib/Moose/Exception/InstanceBlessedIntoWrongClass.pm version: '2.1604' Moose::Exception::InstanceMustBeABlessedReference: file: lib/Moose/Exception/InstanceMustBeABlessedReference.pm version: '2.1604' Moose::Exception::InvalidArgPassedToMooseUtilMetaRole: file: lib/Moose/Exception/InvalidArgPassedToMooseUtilMetaRole.pm version: '2.1604' Moose::Exception::InvalidArgumentToMethod: file: lib/Moose/Exception/InvalidArgumentToMethod.pm version: '2.1604' Moose::Exception::InvalidArgumentsToTraitAliases: file: lib/Moose/Exception/InvalidArgumentsToTraitAliases.pm version: '2.1604' Moose::Exception::InvalidBaseTypeGivenToCreateParameterizedTypeConstraint: file: lib/Moose/Exception/InvalidBaseTypeGivenToCreateParameterizedTypeConstraint.pm version: '2.1604' Moose::Exception::InvalidHandleValue: file: lib/Moose/Exception/InvalidHandleValue.pm version: '2.1604' Moose::Exception::InvalidHasProvidedInARole: file: lib/Moose/Exception/InvalidHasProvidedInARole.pm version: '2.1604' Moose::Exception::InvalidNameForType: file: lib/Moose/Exception/InvalidNameForType.pm version: '2.1604' Moose::Exception::InvalidOverloadOperator: file: lib/Moose/Exception/InvalidOverloadOperator.pm version: '2.1604' Moose::Exception::InvalidRoleApplication: file: lib/Moose/Exception/InvalidRoleApplication.pm version: '2.1604' Moose::Exception::InvalidTypeConstraint: file: lib/Moose/Exception/InvalidTypeConstraint.pm version: '2.1604' Moose::Exception::InvalidTypeGivenToCreateParameterizedTypeConstraint: file: lib/Moose/Exception/InvalidTypeGivenToCreateParameterizedTypeConstraint.pm version: '2.1604' Moose::Exception::InvalidValueForIs: file: lib/Moose/Exception/InvalidValueForIs.pm version: '2.1604' Moose::Exception::IsaDoesNotDoTheRole: file: lib/Moose/Exception/IsaDoesNotDoTheRole.pm version: '2.1604' Moose::Exception::IsaLacksDoesMethod: file: lib/Moose/Exception/IsaLacksDoesMethod.pm version: '2.1604' Moose::Exception::LazyAttributeNeedsADefault: file: lib/Moose/Exception/LazyAttributeNeedsADefault.pm version: '2.1604' Moose::Exception::Legacy: file: lib/Moose/Exception/Legacy.pm version: '2.1604' Moose::Exception::MOPAttributeNewNeedsAttributeName: file: lib/Moose/Exception/MOPAttributeNewNeedsAttributeName.pm version: '2.1604' Moose::Exception::MatchActionMustBeACodeRef: file: lib/Moose/Exception/MatchActionMustBeACodeRef.pm version: '2.1604' Moose::Exception::MessageParameterMustBeCodeRef: file: lib/Moose/Exception/MessageParameterMustBeCodeRef.pm version: '2.1604' Moose::Exception::MetaclassIsAClassNotASubclassOfGivenMetaclass: file: lib/Moose/Exception/MetaclassIsAClassNotASubclassOfGivenMetaclass.pm version: '2.1604' Moose::Exception::MetaclassIsARoleNotASubclassOfGivenMetaclass: file: lib/Moose/Exception/MetaclassIsARoleNotASubclassOfGivenMetaclass.pm version: '2.1604' Moose::Exception::MetaclassIsNotASubclassOfGivenMetaclass: file: lib/Moose/Exception/MetaclassIsNotASubclassOfGivenMetaclass.pm version: '2.1604' Moose::Exception::MetaclassMustBeASubclassOfMooseMetaClass: file: lib/Moose/Exception/MetaclassMustBeASubclassOfMooseMetaClass.pm version: '2.1604' Moose::Exception::MetaclassMustBeASubclassOfMooseMetaRole: file: lib/Moose/Exception/MetaclassMustBeASubclassOfMooseMetaRole.pm version: '2.1604' Moose::Exception::MetaclassMustBeDerivedFromClassMOPClass: file: lib/Moose/Exception/MetaclassMustBeDerivedFromClassMOPClass.pm version: '2.1604' Moose::Exception::MetaclassNotLoaded: file: lib/Moose/Exception/MetaclassNotLoaded.pm version: '2.1604' Moose::Exception::MetaclassTypeIncompatible: file: lib/Moose/Exception/MetaclassTypeIncompatible.pm version: '2.1604' Moose::Exception::MethodExpectedAMetaclassObject: file: lib/Moose/Exception/MethodExpectedAMetaclassObject.pm version: '2.1604' Moose::Exception::MethodExpectsFewerArgs: file: lib/Moose/Exception/MethodExpectsFewerArgs.pm version: '2.1604' Moose::Exception::MethodExpectsMoreArgs: file: lib/Moose/Exception/MethodExpectsMoreArgs.pm version: '2.1604' Moose::Exception::MethodModifierNeedsMethodName: file: lib/Moose/Exception/MethodModifierNeedsMethodName.pm version: '2.1604' Moose::Exception::MethodNameConflictInRoles: file: lib/Moose/Exception/MethodNameConflictInRoles.pm version: '2.1604' Moose::Exception::MethodNameNotFoundInInheritanceHierarchy: file: lib/Moose/Exception/MethodNameNotFoundInInheritanceHierarchy.pm version: '2.1604' Moose::Exception::MethodNameNotGiven: file: lib/Moose/Exception/MethodNameNotGiven.pm version: '2.1604' Moose::Exception::MustDefineAMethodName: file: lib/Moose/Exception/MustDefineAMethodName.pm version: '2.1604' Moose::Exception::MustDefineAnAttributeName: file: lib/Moose/Exception/MustDefineAnAttributeName.pm version: '2.1604' Moose::Exception::MustDefineAnOverloadOperator: file: lib/Moose/Exception/MustDefineAnOverloadOperator.pm version: '2.1604' Moose::Exception::MustHaveAtLeastOneValueToEnumerate: file: lib/Moose/Exception/MustHaveAtLeastOneValueToEnumerate.pm version: '2.1604' Moose::Exception::MustPassAHashOfOptions: file: lib/Moose/Exception/MustPassAHashOfOptions.pm version: '2.1604' Moose::Exception::MustPassAMooseMetaRoleInstanceOrSubclass: file: lib/Moose/Exception/MustPassAMooseMetaRoleInstanceOrSubclass.pm version: '2.1604' Moose::Exception::MustPassAPackageNameOrAnExistingClassMOPPackageInstance: file: lib/Moose/Exception/MustPassAPackageNameOrAnExistingClassMOPPackageInstance.pm version: '2.1604' Moose::Exception::MustPassEvenNumberOfArguments: file: lib/Moose/Exception/MustPassEvenNumberOfArguments.pm version: '2.1604' Moose::Exception::MustPassEvenNumberOfAttributeOptions: file: lib/Moose/Exception/MustPassEvenNumberOfAttributeOptions.pm version: '2.1604' Moose::Exception::MustProvideANameForTheAttribute: file: lib/Moose/Exception/MustProvideANameForTheAttribute.pm version: '2.1604' Moose::Exception::MustSpecifyAtleastOneMethod: file: lib/Moose/Exception/MustSpecifyAtleastOneMethod.pm version: '2.1604' Moose::Exception::MustSpecifyAtleastOneRole: file: lib/Moose/Exception/MustSpecifyAtleastOneRole.pm version: '2.1604' Moose::Exception::MustSpecifyAtleastOneRoleToApplicant: file: lib/Moose/Exception/MustSpecifyAtleastOneRoleToApplicant.pm version: '2.1604' Moose::Exception::MustSupplyAClassMOPAttributeInstance: file: lib/Moose/Exception/MustSupplyAClassMOPAttributeInstance.pm version: '2.1604' Moose::Exception::MustSupplyADelegateToMethod: file: lib/Moose/Exception/MustSupplyADelegateToMethod.pm version: '2.1604' Moose::Exception::MustSupplyAMetaclass: file: lib/Moose/Exception/MustSupplyAMetaclass.pm version: '2.1604' Moose::Exception::MustSupplyAMooseMetaAttributeInstance: file: lib/Moose/Exception/MustSupplyAMooseMetaAttributeInstance.pm version: '2.1604' Moose::Exception::MustSupplyAnAccessorTypeToConstructWith: file: lib/Moose/Exception/MustSupplyAnAccessorTypeToConstructWith.pm version: '2.1604' Moose::Exception::MustSupplyAnAttributeToConstructWith: file: lib/Moose/Exception/MustSupplyAnAttributeToConstructWith.pm version: '2.1604' Moose::Exception::MustSupplyArrayRefAsCurriedArguments: file: lib/Moose/Exception/MustSupplyArrayRefAsCurriedArguments.pm version: '2.1604' Moose::Exception::MustSupplyPackageNameAndName: file: lib/Moose/Exception/MustSupplyPackageNameAndName.pm version: '2.1604' Moose::Exception::NeedsTypeConstraintUnionForTypeCoercionUnion: file: lib/Moose/Exception/NeedsTypeConstraintUnionForTypeCoercionUnion.pm version: '2.1604' Moose::Exception::NeitherAttributeNorAttributeNameIsGiven: file: lib/Moose/Exception/NeitherAttributeNorAttributeNameIsGiven.pm version: '2.1604' Moose::Exception::NeitherClassNorClassNameIsGiven: file: lib/Moose/Exception/NeitherClassNorClassNameIsGiven.pm version: '2.1604' Moose::Exception::NeitherRoleNorRoleNameIsGiven: file: lib/Moose/Exception/NeitherRoleNorRoleNameIsGiven.pm version: '2.1604' Moose::Exception::NeitherTypeNorTypeNameIsGiven: file: lib/Moose/Exception/NeitherTypeNorTypeNameIsGiven.pm version: '2.1604' Moose::Exception::NoAttributeFoundInSuperClass: file: lib/Moose/Exception/NoAttributeFoundInSuperClass.pm version: '2.1604' Moose::Exception::NoBodyToInitializeInAnAbstractBaseClass: file: lib/Moose/Exception/NoBodyToInitializeInAnAbstractBaseClass.pm version: '2.1604' Moose::Exception::NoCasesMatched: file: lib/Moose/Exception/NoCasesMatched.pm version: '2.1604' Moose::Exception::NoConstraintCheckForTypeConstraint: file: lib/Moose/Exception/NoConstraintCheckForTypeConstraint.pm version: '2.1604' Moose::Exception::NoDestructorClassSpecified: file: lib/Moose/Exception/NoDestructorClassSpecified.pm version: '2.1604' Moose::Exception::NoImmutableTraitSpecifiedForClass: file: lib/Moose/Exception/NoImmutableTraitSpecifiedForClass.pm version: '2.1604' Moose::Exception::NoParentGivenToSubtype: file: lib/Moose/Exception/NoParentGivenToSubtype.pm version: '2.1604' Moose::Exception::OnlyInstancesCanBeCloned: file: lib/Moose/Exception/OnlyInstancesCanBeCloned.pm version: '2.1604' Moose::Exception::OperatorIsRequired: file: lib/Moose/Exception/OperatorIsRequired.pm version: '2.1604' Moose::Exception::OverloadConflictInSummation: file: lib/Moose/Exception/OverloadConflictInSummation.pm version: '2.1604' Moose::Exception::OverloadRequiresAMetaClass: file: lib/Moose/Exception/OverloadRequiresAMetaClass.pm version: '2.1604' Moose::Exception::OverloadRequiresAMetaMethod: file: lib/Moose/Exception/OverloadRequiresAMetaMethod.pm version: '2.1604' Moose::Exception::OverloadRequiresAMetaOverload: file: lib/Moose/Exception/OverloadRequiresAMetaOverload.pm version: '2.1604' Moose::Exception::OverloadRequiresAMethodNameOrCoderef: file: lib/Moose/Exception/OverloadRequiresAMethodNameOrCoderef.pm version: '2.1604' Moose::Exception::OverloadRequiresAnOperator: file: lib/Moose/Exception/OverloadRequiresAnOperator.pm version: '2.1604' Moose::Exception::OverloadRequiresNamesForCoderef: file: lib/Moose/Exception/OverloadRequiresNamesForCoderef.pm version: '2.1604' Moose::Exception::OverrideConflictInComposition: file: lib/Moose/Exception/OverrideConflictInComposition.pm version: '2.1604' Moose::Exception::OverrideConflictInSummation: file: lib/Moose/Exception/OverrideConflictInSummation.pm version: '2.1604' Moose::Exception::PackageDoesNotUseMooseExporter: file: lib/Moose/Exception/PackageDoesNotUseMooseExporter.pm version: '2.1604' Moose::Exception::PackageNameAndNameParamsNotGivenToWrap: file: lib/Moose/Exception/PackageNameAndNameParamsNotGivenToWrap.pm version: '2.1604' Moose::Exception::PackagesAndModulesAreNotCachable: file: lib/Moose/Exception/PackagesAndModulesAreNotCachable.pm version: '2.1604' Moose::Exception::ParameterIsNotSubtypeOfParent: file: lib/Moose/Exception/ParameterIsNotSubtypeOfParent.pm version: '2.1604' Moose::Exception::ReferencesAreNotAllowedAsDefault: file: lib/Moose/Exception/ReferencesAreNotAllowedAsDefault.pm version: '2.1604' Moose::Exception::RequiredAttributeLacksInitialization: file: lib/Moose/Exception/RequiredAttributeLacksInitialization.pm version: '2.1604' Moose::Exception::RequiredAttributeNeedsADefault: file: lib/Moose/Exception/RequiredAttributeNeedsADefault.pm version: '2.1604' Moose::Exception::RequiredMethodsImportedByClass: file: lib/Moose/Exception/RequiredMethodsImportedByClass.pm version: '2.1604' Moose::Exception::RequiredMethodsNotImplementedByClass: file: lib/Moose/Exception/RequiredMethodsNotImplementedByClass.pm version: '2.1604' Moose::Exception::Role::Attribute: file: lib/Moose/Exception/Role/Attribute.pm version: '2.1604' Moose::Exception::Role::AttributeName: file: lib/Moose/Exception/Role/AttributeName.pm version: '2.1604' Moose::Exception::Role::Class: file: lib/Moose/Exception/Role/Class.pm version: '2.1604' Moose::Exception::Role::EitherAttributeOrAttributeName: file: lib/Moose/Exception/Role/EitherAttributeOrAttributeName.pm version: '2.1604' Moose::Exception::Role::Instance: file: lib/Moose/Exception/Role/Instance.pm version: '2.1604' Moose::Exception::Role::InstanceClass: file: lib/Moose/Exception/Role/InstanceClass.pm version: '2.1604' Moose::Exception::Role::InvalidAttributeOptions: file: lib/Moose/Exception/Role/InvalidAttributeOptions.pm version: '2.1604' Moose::Exception::Role::Method: file: lib/Moose/Exception/Role/Method.pm version: '2.1604' Moose::Exception::Role::ParamsHash: file: lib/Moose/Exception/Role/ParamsHash.pm version: '2.1604' Moose::Exception::Role::Role: file: lib/Moose/Exception/Role/Role.pm version: '2.1604' Moose::Exception::Role::RoleForCreate: file: lib/Moose/Exception/Role/RoleForCreate.pm version: '2.1604' Moose::Exception::Role::RoleForCreateMOPClass: file: lib/Moose/Exception/Role/RoleForCreateMOPClass.pm version: '2.1604' Moose::Exception::Role::TypeConstraint: file: lib/Moose/Exception/Role/TypeConstraint.pm version: '2.1604' Moose::Exception::RoleDoesTheExcludedRole: file: lib/Moose/Exception/RoleDoesTheExcludedRole.pm version: '2.1604' Moose::Exception::RoleExclusionConflict: file: lib/Moose/Exception/RoleExclusionConflict.pm version: '2.1604' Moose::Exception::RoleNameRequired: file: lib/Moose/Exception/RoleNameRequired.pm version: '2.1604' Moose::Exception::RoleNameRequiredForMooseMetaRole: file: lib/Moose/Exception/RoleNameRequiredForMooseMetaRole.pm version: '2.1604' Moose::Exception::RolesDoNotSupportAugment: file: lib/Moose/Exception/RolesDoNotSupportAugment.pm version: '2.1604' Moose::Exception::RolesDoNotSupportExtends: file: lib/Moose/Exception/RolesDoNotSupportExtends.pm version: '2.1604' Moose::Exception::RolesDoNotSupportInner: file: lib/Moose/Exception/RolesDoNotSupportInner.pm version: '2.1604' Moose::Exception::RolesDoNotSupportRegexReferencesForMethodModifiers: file: lib/Moose/Exception/RolesDoNotSupportRegexReferencesForMethodModifiers.pm version: '2.1604' Moose::Exception::RolesInCreateTakesAnArrayRef: file: lib/Moose/Exception/RolesInCreateTakesAnArrayRef.pm version: '2.1604' Moose::Exception::RolesListMustBeInstancesOfMooseMetaRole: file: lib/Moose/Exception/RolesListMustBeInstancesOfMooseMetaRole.pm version: '2.1604' Moose::Exception::SingleParamsToNewMustBeHashRef: file: lib/Moose/Exception/SingleParamsToNewMustBeHashRef.pm version: '2.1604' Moose::Exception::TriggerMustBeACodeRef: file: lib/Moose/Exception/TriggerMustBeACodeRef.pm version: '2.1604' Moose::Exception::TypeConstraintCannotBeUsedForAParameterizableType: file: lib/Moose/Exception/TypeConstraintCannotBeUsedForAParameterizableType.pm version: '2.1604' Moose::Exception::TypeConstraintIsAlreadyCreated: file: lib/Moose/Exception/TypeConstraintIsAlreadyCreated.pm version: '2.1604' Moose::Exception::TypeParameterMustBeMooseMetaType: file: lib/Moose/Exception/TypeParameterMustBeMooseMetaType.pm version: '2.1604' Moose::Exception::UnableToCanonicalizeHandles: file: lib/Moose/Exception/UnableToCanonicalizeHandles.pm version: '2.1604' Moose::Exception::UnableToCanonicalizeNonRolePackage: file: lib/Moose/Exception/UnableToCanonicalizeNonRolePackage.pm version: '2.1604' Moose::Exception::UnableToRecognizeDelegateMetaclass: file: lib/Moose/Exception/UnableToRecognizeDelegateMetaclass.pm version: '2.1604' Moose::Exception::UndefinedHashKeysPassedToMethod: file: lib/Moose/Exception/UndefinedHashKeysPassedToMethod.pm version: '2.1604' Moose::Exception::UnionCalledWithAnArrayRefAndAdditionalArgs: file: lib/Moose/Exception/UnionCalledWithAnArrayRefAndAdditionalArgs.pm version: '2.1604' Moose::Exception::UnionTakesAtleastTwoTypeNames: file: lib/Moose/Exception/UnionTakesAtleastTwoTypeNames.pm version: '2.1604' Moose::Exception::ValidationFailedForInlineTypeConstraint: file: lib/Moose/Exception/ValidationFailedForInlineTypeConstraint.pm version: '2.1604' Moose::Exception::ValidationFailedForTypeConstraint: file: lib/Moose/Exception/ValidationFailedForTypeConstraint.pm version: '2.1604' Moose::Exception::WrapTakesACodeRefToBless: file: lib/Moose/Exception/WrapTakesACodeRefToBless.pm version: '2.1604' Moose::Exception::WrongTypeConstraintGiven: file: lib/Moose/Exception/WrongTypeConstraintGiven.pm version: '2.1604' Moose::Exporter: file: lib/Moose/Exporter.pm version: '2.1604' Moose::Intro: file: lib/Moose/Intro.pod version: '2.1604' Moose::Manual: file: lib/Moose/Manual.pod version: '2.1604' Moose::Manual::Attributes: file: lib/Moose/Manual/Attributes.pod version: '2.1604' Moose::Manual::BestPractices: file: lib/Moose/Manual/BestPractices.pod version: '2.1604' Moose::Manual::Classes: file: lib/Moose/Manual/Classes.pod version: '2.1604' Moose::Manual::Concepts: file: lib/Moose/Manual/Concepts.pod version: '2.1604' Moose::Manual::Construction: file: lib/Moose/Manual/Construction.pod version: '2.1604' Moose::Manual::Contributing: file: lib/Moose/Manual/Contributing.pod version: '2.1604' Moose::Manual::Delegation: file: lib/Moose/Manual/Delegation.pod version: '2.1604' Moose::Manual::Delta: file: lib/Moose/Manual/Delta.pod version: '2.1604' Moose::Manual::Exceptions: file: lib/Moose/Manual/Exceptions.pod version: '2.1604' Moose::Manual::Exceptions::Manifest: file: lib/Moose/Manual/Exceptions/Manifest.pod version: '2.1604' Moose::Manual::FAQ: file: lib/Moose/Manual/FAQ.pod version: '2.1604' Moose::Manual::MOP: file: lib/Moose/Manual/MOP.pod version: '2.1604' Moose::Manual::MethodModifiers: file: lib/Moose/Manual/MethodModifiers.pod version: '2.1604' Moose::Manual::MooseX: file: lib/Moose/Manual/MooseX.pod version: '2.1604' Moose::Manual::Resources: file: lib/Moose/Manual/Resources.pod version: '2.1604' Moose::Manual::Roles: file: lib/Moose/Manual/Roles.pod version: '2.1604' Moose::Manual::Support: file: lib/Moose/Manual/Support.pod version: '2.1604' Moose::Manual::Types: file: lib/Moose/Manual/Types.pod version: '2.1604' Moose::Manual::Unsweetened: file: lib/Moose/Manual/Unsweetened.pod version: '2.1604' Moose::Meta::Attribute: file: lib/Moose/Meta/Attribute.pm version: '2.1604' Moose::Meta::Attribute::Custom::Moose: file: lib/Moose/Meta/Attribute.pm version: '2.1604' Moose::Meta::Attribute::Native: file: lib/Moose/Meta/Attribute/Native.pm version: '2.1604' Moose::Meta::Attribute::Native::Trait::Array: file: lib/Moose/Meta/Attribute/Native/Trait/Array.pm version: '2.1604' Moose::Meta::Attribute::Native::Trait::Bool: file: lib/Moose/Meta/Attribute/Native/Trait/Bool.pm version: '2.1604' Moose::Meta::Attribute::Native::Trait::Code: file: lib/Moose/Meta/Attribute/Native/Trait/Code.pm version: '2.1604' Moose::Meta::Attribute::Native::Trait::Counter: file: lib/Moose/Meta/Attribute/Native/Trait/Counter.pm version: '2.1604' Moose::Meta::Attribute::Native::Trait::Hash: file: lib/Moose/Meta/Attribute/Native/Trait/Hash.pm version: '2.1604' Moose::Meta::Attribute::Native::Trait::Number: file: lib/Moose/Meta/Attribute/Native/Trait/Number.pm version: '2.1604' Moose::Meta::Attribute::Native::Trait::String: file: lib/Moose/Meta/Attribute/Native/Trait/String.pm version: '2.1604' Moose::Meta::Class: file: lib/Moose/Meta/Class.pm version: '2.1604' Moose::Meta::Instance: file: lib/Moose/Meta/Instance.pm version: '2.1604' Moose::Meta::Method: file: lib/Moose/Meta/Method.pm version: '2.1604' Moose::Meta::Method::Accessor: file: lib/Moose/Meta/Method/Accessor.pm version: '2.1604' Moose::Meta::Method::Augmented: file: lib/Moose/Meta/Method/Augmented.pm version: '2.1604' Moose::Meta::Method::Constructor: file: lib/Moose/Meta/Method/Constructor.pm version: '2.1604' Moose::Meta::Method::Delegation: file: lib/Moose/Meta/Method/Delegation.pm version: '2.1604' Moose::Meta::Method::Destructor: file: lib/Moose/Meta/Method/Destructor.pm version: '2.1604' Moose::Meta::Method::Meta: file: lib/Moose/Meta/Method/Meta.pm version: '2.1604' Moose::Meta::Method::Overridden: file: lib/Moose/Meta/Method/Overridden.pm version: '2.1604' Moose::Meta::Role: file: lib/Moose/Meta/Role.pm version: '2.1604' Moose::Meta::Role::Application: file: lib/Moose/Meta/Role/Application.pm version: '2.1604' Moose::Meta::Role::Application::RoleSummation: file: lib/Moose/Meta/Role/Application/RoleSummation.pm version: '2.1604' Moose::Meta::Role::Application::ToClass: file: lib/Moose/Meta/Role/Application/ToClass.pm version: '2.1604' Moose::Meta::Role::Application::ToInstance: file: lib/Moose/Meta/Role/Application/ToInstance.pm version: '2.1604' Moose::Meta::Role::Application::ToRole: file: lib/Moose/Meta/Role/Application/ToRole.pm version: '2.1604' Moose::Meta::Role::Attribute: file: lib/Moose/Meta/Role/Attribute.pm version: '2.1604' Moose::Meta::Role::Composite: file: lib/Moose/Meta/Role/Composite.pm version: '2.1604' Moose::Meta::Role::Method: file: lib/Moose/Meta/Role/Method.pm version: '2.1604' Moose::Meta::Role::Method::Conflicting: file: lib/Moose/Meta/Role/Method/Conflicting.pm version: '2.1604' Moose::Meta::Role::Method::Required: file: lib/Moose/Meta/Role/Method/Required.pm version: '2.1604' Moose::Meta::TypeCoercion: file: lib/Moose/Meta/TypeCoercion.pm version: '2.1604' Moose::Meta::TypeCoercion::Union: file: lib/Moose/Meta/TypeCoercion/Union.pm version: '2.1604' Moose::Meta::TypeConstraint: file: lib/Moose/Meta/TypeConstraint.pm version: '2.1604' Moose::Meta::TypeConstraint::Class: file: lib/Moose/Meta/TypeConstraint/Class.pm version: '2.1604' Moose::Meta::TypeConstraint::DuckType: file: lib/Moose/Meta/TypeConstraint/DuckType.pm version: '2.1604' Moose::Meta::TypeConstraint::Enum: file: lib/Moose/Meta/TypeConstraint/Enum.pm version: '2.1604' Moose::Meta::TypeConstraint::Parameterizable: file: lib/Moose/Meta/TypeConstraint/Parameterizable.pm version: '2.1604' Moose::Meta::TypeConstraint::Parameterized: file: lib/Moose/Meta/TypeConstraint/Parameterized.pm version: '2.1604' Moose::Meta::TypeConstraint::Registry: file: lib/Moose/Meta/TypeConstraint/Registry.pm version: '2.1604' Moose::Meta::TypeConstraint::Role: file: lib/Moose/Meta/TypeConstraint/Role.pm version: '2.1604' Moose::Meta::TypeConstraint::Union: file: lib/Moose/Meta/TypeConstraint/Union.pm version: '2.1604' Moose::Object: file: lib/Moose/Object.pm version: '2.1604' Moose::Role: file: lib/Moose/Role.pm version: '2.1604' Moose::Spec::Role: file: lib/Moose/Spec/Role.pod version: '2.1604' Moose::Unsweetened: file: lib/Moose/Unsweetened.pod version: '2.1604' Moose::Util: file: lib/Moose/Util.pm version: '2.1604' Moose::Util::MetaRole: file: lib/Moose/Util/MetaRole.pm version: '2.1604' Moose::Util::TypeConstraints: file: lib/Moose/Util/TypeConstraints.pm version: '2.1604' Test::Moose: file: lib/Test/Moose.pm version: '2.1604' metaclass: file: lib/metaclass.pm version: '2.1604' oose: file: lib/oose.pm version: '2.1604' requires: Carp: '1.22' Class::Load: '0.09' Class::Load::XS: '0.01' Data::OptList: '0.107' Devel::GlobalDestruction: '0' Devel::OverloadInfo: '0.004' Devel::StackTrace: '1.33' Dist::CheckConflicts: '0.02' Eval::Closure: '0.04' List::MoreUtils: '0.28' List::Util: '1.35' MRO::Compat: '0.05' Module::Runtime: '0.014' Module::Runtime::Conflicts: '0.002' Package::DeprecationManager: '0.11' Package::Stash: '0.32' Package::Stash::XS: '0.24' Params::Util: '1.00' Scalar::Util: '1.19' Sub::Exporter: '0.980' Sub::Identify: '0' Sub::Name: '0.05' Task::Weaken: '0' Try::Tiny: '0.17' parent: '0.223' perl: '5.008003' strict: '1.03' warnings: '1.03' resources: IRC: irc://irc.perl.org/#moose MailingList: http://lists.perl.org/list/moose.html bugtracker: https://rt.cpan.org/Dist/Display.html?Name=Moose homepage: http://moose.perl.org/ repository: git://github.com/moose/Moose.git version: '2.1604' x_Dist_Zilla: perl: version: '5.023004' plugins: - class: Dist::Zilla::Plugin::EnsurePrereqsInstalled name: EnsurePrereqsInstalled version: '0.008' - class: Dist::Zilla::Plugin::Git::GatherDir config: Dist::Zilla::Plugin::GatherDir: exclude_filename: - CONTRIBUTING.pod - LICENSE - Makefile.PL exclude_match: - ^t/recipes/(?!basics_genome_overloadingsubtypesandcoercion) follow_symlinks: 0 include_dotfiles: 0 prefix: '' prune_directory: [] root: . Dist::Zilla::Plugin::Git::GatherDir: include_untracked: 0 name: Git::GatherDir version: '2.036' - class: Dist::Zilla::Plugin::MetaYAML name: MetaYAML version: '5.041' - class: Dist::Zilla::Plugin::MetaJSON name: MetaJSON version: '5.041' - class: Dist::Zilla::Plugin::License name: License version: '5.041' - class: Dist::Zilla::Plugin::ExecDir name: ExecDir version: '5.041' - class: inc::MakeMaker config: Dist::Zilla::Plugin::MakeMaker::Awesome: version: '0.35' Dist::Zilla::Role::TestRunner: default_jobs: '9' name: =inc::MakeMaker version: ~ - class: Dist::Zilla::Plugin::Manifest name: Manifest version: '5.041' - class: Dist::Zilla::Plugin::MetaConfig name: MetaConfig version: '5.041' - class: inc::SimpleAuthority name: =inc::SimpleAuthority version: ~ - class: Dist::Zilla::Plugin::MetaResources name: MetaResources version: '5.041' - class: Dist::Zilla::Plugin::FileFinder::ByName name: PodModules version: '5.041' - class: Dist::Zilla::Plugin::FileFinder::Filter name: ModulesSansPod version: '5.041' - class: Dist::Zilla::Plugin::FileFinder::Filter name: VersionedModules version: '5.041' - class: inc::SimpleProvides name: =inc::SimpleProvides version: ~ - class: Dist::Zilla::Plugin::MetaProvides::Package config: Dist::Zilla::Plugin::MetaProvides::Package: finder: - ModulesSansPod finder_objects: - class: Dist::Zilla::Plugin::FileFinder::Filter name: ModulesSansPod version: '5.041' Dist::Zilla::Role::MetaProvider::Provider: Dist::Zilla::Role::MetaProvider::Provider::VERSION: '2.001010' inherit_missing: '1' inherit_version: '1' meta_noindex: '1' name: MetaProvides::Package version: '2.003001' - class: Dist::Zilla::Plugin::MetaNoIndex name: MetaNoIndex version: '5.041' - class: Dist::Zilla::Plugin::Git::Contributors config: Dist::Zilla::Plugin::Git::Contributors: include_authors: 0 include_releaser: 1 order_by: name paths: - . name: Git::Contributors version: '0.015' - class: Dist::Zilla::Plugin::SurgicalPodWeaver config: Dist::Zilla::Plugin::PodWeaver: finder: - ':InstallModules' - ':ExecFiles' plugins: - 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::Plugin::SingleEncoding name: '@Default/SingleEncoding' version: '4.012' - class: Pod::Weaver::Section::Name name: '@Default/Name' version: '4.012' - class: Pod::Weaver::Section::Version name: '@Default/Version' version: '4.012' - class: Pod::Weaver::Section::Region name: '@Default/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: ATTRIBUTES version: '4.012' - class: Pod::Weaver::Section::Collect name: METHODS version: '4.012' - class: Pod::Weaver::Section::Collect name: FUNCTIONS version: '4.012' - class: Pod::Weaver::Section::Leftovers name: '@Default/Leftovers' version: '4.012' - class: Pod::Weaver::Section::Region name: '@Default/postlude' version: '4.012' - class: Pod::Weaver::Section::Authors name: '@Default/Authors' version: '4.012' - class: Pod::Weaver::Section::Legal name: '@Default/Legal' version: '4.012' name: SurgicalPodWeaver version: '0.0023' - class: Dist::Zilla::Plugin::RewriteVersion config: Dist::Zilla::Plugin::RewriteVersion: add_tarball_name: 0 finders: - VersionedModules global: 0 skip_version_provider: 0 name: RewriteVersion version: '0.012' - class: Dist::Zilla::Plugin::Git::Describe name: Git::Describe version: '0.006' - class: inc::ExtractInlineTests name: =inc::ExtractInlineTests version: ~ - class: Dist::Zilla::Plugin::PromptIfStale config: Dist::Zilla::Plugin::PromptIfStale: check_all_plugins: 1 check_all_prereqs: 1 modules: [] phase: release skip: [] name: PromptIfStale version: '0.047' - 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: Test::EOL version: '0.18' - class: Dist::Zilla::Plugin::PodSyntaxTests name: PodSyntaxTests version: '5.041' - class: Dist::Zilla::Plugin::Test::NoTabs config: Dist::Zilla::Plugin::Test::NoTabs: filename: xt/author/no-tabs.t finder: - ':InstallModules' - ':ExecFiles' - ':TestFiles' name: Test::NoTabs version: '0.15' - class: Dist::Zilla::Plugin::MetaTests name: MetaTests version: '5.041' - class: Dist::Zilla::Plugin::Test::Kwalitee config: Dist::Zilla::Plugin::Test::Kwalitee: filename: xt/release/kwalitee.t skiptest: - use_strict name: Test::Kwalitee version: '2.12' - class: Dist::Zilla::Plugin::MojibakeTests name: MojibakeTests version: '0.8' - class: Dist::Zilla::Plugin::RunExtraTests config: Dist::Zilla::Role::TestRunner: default_jobs: '9' name: RunExtraTests version: '0.028' - class: Dist::Zilla::Plugin::Test::ReportPrereqs name: Test::ReportPrereqs version: '0.021' - class: Dist::Zilla::Plugin::Test::CPAN::Changes name: Test::CPAN::Changes version: '0.009' - class: Dist::Zilla::Plugin::Test::Compile config: Dist::Zilla::Plugin::Test::Compile: bail_out_on_fail: '1' fail_on_warning: author fake_home: 0 filename: xt/release/00-compile.t module_finder: - ':InstallModules' needs_display: 0 phase: develop script_finder: - ':PerlExecFiles' skips: - ^Class::MOP::Attribute$ - ^Class::MOP::Class$ - ^Class::MOP::Method::Accessor$ - ^Class::MOP::Method::Constructor$ - ^Class::MOP::Method::Inlined$ - ^Class::MOP::Method::Wrapped$ - ^Class::MOP::Mixin::HasAttributes$ - ^Class::MOP::Module$ - ^Class::MOP::Package$ - ^Moose::Meta::Attribute$ - ^Moose::Meta::Attribute::Native$ - ^Moose::Meta::Mixin::AttributeCore$ - ^Moose::Meta::Role::Attribute$ - ^Moose::Meta::TypeConstraint::Class$ - ^Moose::Meta::TypeConstraint::DuckType$ - ^Moose::Meta::TypeConstraint::Enum$ - ^Moose::Meta::TypeConstraint::Parameterizable$ - ^Moose::Meta::TypeConstraint::Parameterized$ - ^Moose::Meta::TypeConstraint::Role$ - ^Moose::Meta::TypeConstraint::Union$ name: Test::Compile version: '2.054' - class: inc::CheckReleaseType name: =inc::CheckReleaseType version: ~ - class: Dist::Zilla::Plugin::CheckVersionIncrement name: CheckVersionIncrement version: '0.121750' - class: Dist::Zilla::Plugin::CheckChangesHasContent name: CheckChangesHasContent version: '0.008' - class: Dist::Zilla::Plugin::Prereqs config: Dist::Zilla::Plugin::Prereqs: phase: runtime type: requires name: Prereqs version: '5.041' - class: Dist::Zilla::Plugin::Prereqs config: Dist::Zilla::Plugin::Prereqs: phase: test type: requires name: TestRequires version: '5.041' - class: Dist::Zilla::Plugin::Prereqs config: Dist::Zilla::Plugin::Prereqs: phase: configure type: requires name: ConfigureRequires version: '5.041' - class: Dist::Zilla::Plugin::Prereqs::AuthorDeps name: Prereqs::AuthorDeps version: '0.005' - class: Dist::Zilla::Plugin::Prereqs config: Dist::Zilla::Plugin::Prereqs: phase: develop type: requires name: DevelopRequires version: '5.041' - class: Dist::Zilla::Plugin::Prereqs config: Dist::Zilla::Plugin::Prereqs: phase: runtime type: suggests name: RuntimeSuggests version: '5.041' - class: Dist::Zilla::Plugin::Conflicts name: Conflicts version: '0.17' - class: Dist::Zilla::Plugin::Test::CheckBreaks config: Dist::Zilla::Plugin::Test::CheckBreaks: conflicts_module: Moose::Conflicts Dist::Zilla::Role::ModuleMetadata: Module::Metadata: '1.000029' version: '0.003' name: Test::CheckBreaks version: '0.013' - class: inc::CheckAuthorDeps name: =inc::CheckAuthorDeps version: ~ - class: inc::CheckDelta name: =inc::CheckDelta version: ~ - class: inc::GitUpToDate name: =inc::GitUpToDate version: ~ - class: Dist::Zilla::Plugin::Git::Remote::Check name: Git::Remote::Check version: 0.2.0 - class: Dist::Zilla::Plugin::Git::CheckFor::CorrectBranch config: Dist::Zilla::Role::Git::Repo: repo_root: . name: Git::CheckFor::CorrectBranch version: '0.013' - class: Dist::Zilla::Plugin::Git::Check config: Dist::Zilla::Plugin::Git::Check: untracked_files: die Dist::Zilla::Role::Git::DirtyFiles: allow_dirty: [] allow_dirty_match: [] changelog: Changes Dist::Zilla::Role::Git::Repo: repo_root: . name: Git::Check version: '2.036' - class: Dist::Zilla::Plugin::TestRelease name: TestRelease version: '5.041' - class: Dist::Zilla::Plugin::UploadToCPAN name: UploadToCPAN version: '5.041' - class: Dist::Zilla::Plugin::CopyFilesFromRelease config: Dist::Zilla::Plugin::CopyFilesFromRelease: filename: - Changes - LICENSE match: [] name: CopyFilesFromRelease version: '0.006' - class: Dist::Zilla::Plugin::ReadmeAnyFromPod config: Dist::Zilla::Role::FileWatcher: version: '0.006' name: ReadmeAnyFromPod version: '0.150250' - class: Dist::Zilla::Plugin::Git::Commit config: Dist::Zilla::Plugin::Git::Commit: add_files_in: [] commit_msg: '%N-%v%t%n%n%c' Dist::Zilla::Role::Git::DirtyFiles: allow_dirty: - CONTRIBUTING.pod - Changes - LICENSE allow_dirty_match: [] changelog: Changes Dist::Zilla::Role::Git::Repo: repo_root: . Dist::Zilla::Role::Git::StringFormatter: time_zone: local name: 'release snapshot' version: '2.036' - class: Dist::Zilla::Plugin::Git::Tag config: Dist::Zilla::Plugin::Git::Tag: branch: ~ changelog: Changes signed: 0 tag: '2.1604' tag_format: '%v' tag_message: '%v%t' Dist::Zilla::Role::Git::Repo: repo_root: . Dist::Zilla::Role::Git::StringFormatter: time_zone: local name: Git::Tag version: '2.036' - class: Dist::Zilla::Plugin::BumpVersionAfterRelease config: Dist::Zilla::Plugin::BumpVersionAfterRelease: finders: - VersionedModules global: 0 munge_makefile_pl: 1 name: BumpVersionAfterRelease version: '0.012' - class: Dist::Zilla::Plugin::NextRelease name: NextRelease version: '5.041' - class: Dist::Zilla::Plugin::Git::Commit config: Dist::Zilla::Plugin::Git::Commit: add_files_in: [] commit_msg: 'increment version after release' Dist::Zilla::Role::Git::DirtyFiles: allow_dirty: - Changes allow_dirty_match: - (?^u:^lib/.*\.pm$) changelog: Changes Dist::Zilla::Role::Git::Repo: repo_root: . Dist::Zilla::Role::Git::StringFormatter: time_zone: local name: 'increment version' version: '2.036' - class: Dist::Zilla::Plugin::Git::Push config: Dist::Zilla::Plugin::Git::Push: push_to: - origin remotes_must_exist: 1 Dist::Zilla::Role::Git::Repo: repo_root: . name: Git::Push version: '2.036' - class: Dist::Zilla::Plugin::Run::AfterRelease config: Dist::Zilla::Plugin::Run::Role::Runner: fatal_errors: 1 quiet: 0 run: - 'git checkout master' - 'git merge --ff-only stable/2.16' - 'git push' name: Run::AfterRelease version: '0.042' - class: inc::GenerateDocs name: =inc::GenerateDocs version: ~ - class: inc::Clean name: =inc::Clean version: ~ - class: Dist::Zilla::Plugin::ConfirmRelease name: ConfirmRelease version: '5.041' - class: Dist::Zilla::Plugin::FinderCode name: ':InstallModules' version: '5.041' - class: Dist::Zilla::Plugin::FinderCode name: ':IncModules' version: '5.041' - class: Dist::Zilla::Plugin::FinderCode name: ':TestFiles' version: '5.041' - class: Dist::Zilla::Plugin::FinderCode name: ':ExtraTestFiles' version: '5.041' - class: Dist::Zilla::Plugin::FinderCode name: ':ExecFiles' version: '5.041' - class: Dist::Zilla::Plugin::FinderCode name: ':PerlExecFiles' version: '5.041' - class: Dist::Zilla::Plugin::FinderCode name: ':ShareFiles' version: '5.041' - class: Dist::Zilla::Plugin::FinderCode name: ':MainModule' version: '5.041' - class: Dist::Zilla::Plugin::FinderCode name: ':AllFiles' version: '5.041' - class: Dist::Zilla::Plugin::FinderCode name: ':NoFiles' version: '5.041' zilla: class: Dist::Zilla::Dist::Builder config: is_trial: '0' version: '5.041' x_authority: cpan:STEVAN x_breaks: Catalyst: '<= 5.90049999' Config::MVP: '<= 2.200004' Devel::REPL: '<= 1.003020' Dist::Zilla::Plugin::Git: '<= 2.016' Fey: '<= 0.36' Fey::ORM: '<= 0.42' File::ChangeNotify: '<= 0.15' HTTP::Throwable: '<= 0.017' KiokuDB: '<= 0.51' Markdent: '<= 0.16' Mason: '<= 2.18' MooseX::ABC: '<= 0.05' MooseX::Aliases: '<= 0.08' MooseX::AlwaysCoerce: '<= 0.13' MooseX::App: '<= 1.22' MooseX::Attribute::Deflator: '<= 2.1.7' MooseX::Attribute::Dependent: '<= 1.1.0' MooseX::Attribute::Prototype: '<= 0.10' MooseX::AttributeHelpers: '<= 0.22' MooseX::AttributeIndexes: '<= 1.0.0' MooseX::AttributeInflate: '<= 0.02' MooseX::CascadeClearing: '<= 0.03' MooseX::ClassAttribute: '<= 0.26' MooseX::Constructor::AllErrors: '<= 0.021' MooseX::Declare: '<= 0.35' MooseX::FollowPBP: '<= 0.02' MooseX::Getopt: '<= 0.56' MooseX::InstanceTracking: '<= 0.04' MooseX::LazyRequire: '<= 0.06' MooseX::Meta::Attribute::Index: '<= 0.04' MooseX::Meta::Attribute::Lvalue: '<= 0.05' MooseX::Method::Signatures: '<= 0.44' MooseX::MethodAttributes: '<= 0.22' MooseX::NonMoose: '<= 0.24' MooseX::Object::Pluggable: '<= 0.0011' MooseX::POE: '<= 0.214' MooseX::Params::Validate: '<= 0.05' MooseX::PrivateSetters: '<= 0.03' MooseX::Role::Cmd: '<= 0.06' MooseX::Role::Parameterized: '<= 1.00' MooseX::Role::WithOverloading: '<= 0.14' MooseX::Runnable: '<= 0.03' MooseX::Scaffold: '<= 0.05' MooseX::SemiAffordanceAccessor: '<= 0.05' MooseX::SetOnce: '<= 0.100473' MooseX::Singleton: '<= 0.25' MooseX::SlurpyConstructor: '<= 1.1' MooseX::Storage: '<= 0.42' MooseX::StrictConstructor: '<= 0.12' MooseX::Traits: '<= 0.11' MooseX::Types: '<= 0.19' MooseX::Types::Parameterizable: '<= 0.05' MooseX::Types::Set::Object: '<= 0.03' MooseX::Types::Signal: '<= 1.101930' MooseX::UndefTolerant: '<= 0.11' PRANG: '<= 0.14' Pod::Elemental: '<= 0.093280' Pod::Weaver: '<= 3.101638' Reaction: '<= 0.002003' Test::Able: '<= 0.10' Test::CleanNamespaces: '<= 0.03' Test::Moose::More: '<= 0.022' Test::TempDir: '<= 0.05' Throwable: '<= 0.102080' namespace::autoclean: '<= 0.08' x_contributors: - 'Aankhen ' - 'Adam J. Foxson ' - 'Adam Kennedy ' - 'Ævar Arnfjörð Bjarmason ' - 'Anders Nor Berle ' - 'Andy Jack ' - 'Ansgar Burchardt ' - 'Aran Clary Deltac ' - 'Ash Berlin ' - 'A. Sinan Unur ' - 'Ben Hutton ' - 'Brad Bowman ' - 'Brendan Byrd ' - 'Brian Manning ' - 'Chad Granum ' - 'Chankey Pathak ' - 'Chia-liang Kao ' - 'Chip ' - 'Christian Hansen ' - 'Christopher J. Madsen ' - 'Chris Weyl ' - 'chromatic ' - 'Cory Watson ' - 'Curtis Jewell ' - 'Dagfinn Ilmari Mannsåker ' - 'Daisuke Maki (lestrrat) ' - 'Dan Dascalescu ' - 'Dann ' - 'Dave Romano ' - 'David Leadbeater ' - 'David Steinbrunner ' - 'Dylan William Hardison ' - 'Eric Wilhelm ' - 'Evan Carroll ' - 'franck cuny ' - 'Frew Schmidt ' - 'Gerda Shank ' - 'gfx ' - 'Graham Knop ' - 'gregor herrmann ' - 'Guillermo Roditi ' - 'hakim ' - 'Henry Van Styn ' - 'James Marca ' - 'Jason May ' - 'Jay Allen ' - 'Jay Hannah ' - 'Jay Kuri ' - 'Jeff Bisbee ' - 'Jesse Vincent ' - 'Jess Robinson ' - 'joel ' - 'John Douglas Porter ' - 'John Goulah ' - 'John Napiorkowski ' - 'Jonathan Rockway ' - 'Justin DeVuyst ' - 'Justin Hunter ' - 'Kent Fredric ' - 'Lars Dɪᴇᴄᴋᴏᴡ 迪拉斯 ' - 'Leon Brocard ' - 'Marcel Grünauer ' - 'Marc Mims ' - 'Marcus Ramberg ' - 'Mark Allen ' - 'Mark A. Stratman ' - 'Mark Fowler ' - 'Mateu X Hunter ' - 'Matthew Horsfall ' - 'matthof ' - 'Matt Kraai ' - 'Michael LaGrasta ' - 'Michael Rykov ' - 'Michael Schout ' - 'Mike Whitaker ' - 'Moritz Onken ' - 'Nathan Gray ' - 'Nelo Onyiah ' - 'Nick Perez ' - 'Olaf Alders ' - 'Olivier Mengué ' - 'Olof Johansson ' - 'Patrick Donelan ' - 'Paul Driver ' - 'Paul Jamieson Fenwick ' - 'Paweł Murias ' - 'Pedro Melo ' - 'Perlover ' - 'Peter Shangov ' - 'Philippe Bruhat (BooK) ' - 'Philipp Gortan ' - 'Phillip Smith ' - 'Piotr Roszatycki ' - 'pktm ' - 'Rafael Kitover ' - 'Ricardo Signes ' - 'Robert Boone ' - 'Robert Buels ' - "Robert 'phaylon' Sedlacek " - 'Robin V ' - 'rodrigolive ' - 'Sam Vilain ' - 'Scott McWhirter ' - 'shelling ' - 'Shlomi Fish ' - "Stefan O'Rear " - 'Thomas Sibley ' - 'Todd Hepler ' - 'Tokuhiro Matsuno ' - 'Tomas Doran ' - 'Tuomas Jormola ' - 'Upasana Shukla ' - 'Wallace Reis ' - 'wickline ' - 'Zachary Lome ' - 'Zoffix Znet ' Moose-2.1604/mop.c000644 000766 000024 00000016342 12617452415 014117 0ustar00etherstaff000000 000000 #include "mop.h" void mop_call_xs (pTHX_ XSPROTO(subaddr), CV *cv, SV **mark) { dSP; PUSHMARK(mark); (*subaddr)(aTHX_ cv); PUTBACK; } #if PERL_VERSION >= 10 UV mop_check_package_cache_flag (pTHX_ HV *stash) { assert(SvTYPE(stash) == SVt_PVHV); /* here we're trying to implement a c version of mro::get_pkg_gen($stash), * however the perl core doesn't make it easy for us. It doesn't provide an * api that just does what we want. * * However, we know that the information we want is, inside the core, * available using HvMROMETA(stash)->pkg_gen. Unfortunately, although the * HvMROMETA macro is public, it is implemented using Perl_mro_meta_init, * which is not public and only available inside the core, as the mro * interface as well as the structure returned by mro_meta_init isn't * considered to be stable yet. * * Perl_mro_meta_init isn't declared static, so we could just define it * ourselfs if perls headers don't do that for us, except that won't work * on platforms where symbols need to be explicitly exported when linking * shared libraries. * * So our, hopefully temporary, solution is to be even more evil and * basically reimplement HvMROMETA in a very fragile way that'll blow up * when the relevant parts of the mro implementation in core change. * * :-( * */ return HvAUX(stash)->xhv_mro_meta ? HvAUX(stash)->xhv_mro_meta->pkg_gen : 0; } #else /* pre 5.10.0 */ UV mop_check_package_cache_flag (pTHX_ HV *stash) { PERL_UNUSED_ARG(stash); assert(SvTYPE(stash) == SVt_PVHV); return PL_sub_generation; } #endif SV * mop_call0 (pTHX_ SV *const self, SV *const method) { dSP; SV *ret; PUSHMARK(SP); XPUSHs(self); PUTBACK; call_sv(method, G_SCALAR | G_METHOD); SPAGAIN; ret = POPs; PUTBACK; return ret; } int mop_get_code_info (SV *coderef, char **pkg, char **name) { if (!SvOK(coderef) || !SvROK(coderef) || SvTYPE(SvRV(coderef)) != SVt_PVCV) { return 0; } coderef = SvRV(coderef); /* sub is still being compiled */ if (!CvGV(coderef)) { return 0; } /* I think this only gets triggered with a mangled coderef, but if we hit it without the guard, we segfault. The slightly odd return value strikes me as an improvement (mst) */ if ( isGV_with_GP(CvGV(coderef)) ) { GV *gv = CvGV(coderef); HV *stash = GvSTASH(gv) ? GvSTASH(gv) : CvSTASH(coderef); *pkg = stash ? HvNAME(stash) : "__UNKNOWN__"; *name = GvNAME( CvGV(coderef) ); } else { *pkg = "__UNKNOWN__"; *name = "__ANON__"; } return 1; } /* XXX: eventually this should just use the implementation in Package::Stash */ void mop_get_package_symbols (HV *stash, type_filter_t filter, get_package_symbols_cb_t cb, void *ud) { HE *he; (void)hv_iterinit(stash); if (filter == TYPE_FILTER_NONE) { while ( (he = hv_iternext(stash)) ) { STRLEN keylen; const char *key = HePV(he, keylen); if (!cb(key, keylen, HeVAL(he), ud)) { return; } } return; } while ( (he = hv_iternext(stash)) ) { GV * const gv = (GV*)HeVAL(he); STRLEN keylen; const char * const key = HePV(he, keylen); SV *sv = NULL; if(isGV(gv)){ switch (filter) { case TYPE_FILTER_CODE: sv = (SV *)GvCVu(gv); break; case TYPE_FILTER_ARRAY: sv = (SV *)GvAV(gv); break; case TYPE_FILTER_IO: sv = (SV *)GvIO(gv); break; case TYPE_FILTER_HASH: sv = (SV *)GvHV(gv); break; case TYPE_FILTER_SCALAR: sv = (SV *)GvSV(gv); break; default: croak("Unknown type"); } } /* expand the gv into a real typeglob if it * contains stub functions or constants and we * were asked to return CODE references */ else if (filter == TYPE_FILTER_CODE) { gv_init(gv, stash, key, keylen, GV_ADDMULTI); sv = (SV *)GvCV(gv); } if (sv) { if (!cb(key, keylen, sv, ud)) { return; } } } } static bool collect_all_symbols (const char *key, STRLEN keylen, SV *val, void *ud) { HV *hash = (HV *)ud; if (!hv_store (hash, key, keylen, newRV_inc(val), 0)) { croak("failed to store symbol ref"); } return TRUE; } HV * mop_get_all_package_symbols (HV *stash, type_filter_t filter) { HV *ret = newHV (); mop_get_package_symbols (stash, filter, collect_all_symbols, ret); return ret; } #define DECLARE_KEY(name) { #name, #name, NULL, 0 } #define DECLARE_KEY_WITH_VALUE(name, value) { #name, value, NULL, 0 } /* the order of these has to match with those in mop.h */ static struct { const char *name; const char *value; SV *key; U32 hash; } prehashed_keys[key_last] = { DECLARE_KEY(_expected_method_class), DECLARE_KEY(ISA), DECLARE_KEY(VERSION), DECLARE_KEY(accessor), DECLARE_KEY(associated_class), DECLARE_KEY(associated_metaclass), DECLARE_KEY(associated_methods), DECLARE_KEY(attribute_metaclass), DECLARE_KEY(attributes), DECLARE_KEY(body), DECLARE_KEY(builder), DECLARE_KEY(clearer), DECLARE_KEY(constructor_class), DECLARE_KEY(constructor_name), DECLARE_KEY(definition_context), DECLARE_KEY(destructor_class), DECLARE_KEY(immutable_trait), DECLARE_KEY(init_arg), DECLARE_KEY(initializer), DECLARE_KEY(insertion_order), DECLARE_KEY(instance_metaclass), DECLARE_KEY(is_inline), DECLARE_KEY(method_metaclass), DECLARE_KEY(methods), DECLARE_KEY(name), DECLARE_KEY(package), DECLARE_KEY(package_name), DECLARE_KEY(predicate), DECLARE_KEY(reader), DECLARE_KEY(wrapped_method_metaclass), DECLARE_KEY(writer), DECLARE_KEY_WITH_VALUE(package_cache_flag, "_package_cache_flag"), DECLARE_KEY_WITH_VALUE(_version, "-version"), DECLARE_KEY(operator) }; SV * mop_prehashed_key_for (mop_prehashed_key_t key) { return prehashed_keys[key].key; } U32 mop_prehashed_hash_for (mop_prehashed_key_t key) { return prehashed_keys[key].hash; } void mop_prehash_keys () { int i; for (i = 0; i < key_last; i++) { const char *value = prehashed_keys[i].value; prehashed_keys[i].key = newSVpv(value, strlen(value)); PERL_HASH(prehashed_keys[i].hash, value, strlen(value)); } } XS_EXTERNAL(mop_xs_simple_reader) { #ifdef dVAR dVAR; dXSARGS; #else dXSARGS; #endif register HE *he; mop_prehashed_key_t key = (mop_prehashed_key_t)CvXSUBANY(cv).any_i32; SV *self; if (items != 1) { croak("expected exactly one argument"); } self = ST(0); if (!SvROK(self)) { croak("can't call %s as a class method", prehashed_keys[key].name); } if (SvTYPE(SvRV(self)) != SVt_PVHV) { croak("object is not a hashref"); } if ((he = hv_fetch_ent((HV *)SvRV(self), prehashed_keys[key].key, 0, prehashed_keys[key].hash))) { ST(0) = HeVAL(he); } else { ST(0) = &PL_sv_undef; } XSRETURN(1); } Moose-2.1604/mop.h000644 000766 000024 00000005545 12617452415 014127 0ustar00etherstaff000000 000000 #ifndef __MOP_H__ #define __MOP_H__ #include "EXTERN.h" #include "perl.h" #include "XSUB.h" #define NEED_newRV_noinc #define NEED_sv_2pv_flags #define NEED_sv_2pv_nolen #include "ppport.h" /* In theory, ExtUtils::ParseXS provide backcompat for this. However, the only * available version doing that right now is 3.03_02, which is a dev release. We * don't want to depend on dev releases, so we copy the code here. It should be * removed once there's a stable ExtUtils::ParseXS version newer than 3.03_02. */ #ifndef XS_EXTERNAL # define XS_EXTERNAL XS #endif #define MOP_CALL_BOOT(name) mop_call_xs(aTHX_ name, cv, mark); #ifndef XSPROTO #define XSPROTO(name) XS_EXTERNAL(name) #endif #ifndef CvISXSUB #define CvISXSUB(cv) (CvXSUB(cv) ? TRUE : FALSE) #endif void mop_call_xs (pTHX_ XSPROTO(subaddr), CV *cv, SV **mark); typedef enum { KEY__expected_method_class, KEY_ISA, KEY_VERSION, KEY_accessor, KEY_associated_class, KEY_associated_metaclass, KEY_associated_methods, KEY_attribute_metaclass, KEY_attributes, KEY_body, KEY_builder, KEY_clearer, KEY_constructor_class, KEY_constructor_name, KEY_definition_context, KEY_destructor_class, KEY_immutable_trait, KEY_init_arg, KEY_initializer, KEY_insertion_order, KEY_instance_metaclass, KEY_is_inline, KEY_method_metaclass, KEY_methods, KEY_name, KEY_package, KEY_package_name, KEY_predicate, KEY_reader, KEY_wrapped_method_metaclass, KEY_writer, KEY_package_cache_flag, KEY__version, KEY_operator, key_last, } mop_prehashed_key_t; #define KEY_FOR(name) mop_prehashed_key_for(KEY_ ##name) #define HASH_FOR(name) mop_prehashed_hash_for(KEY_ ##name) void mop_prehash_keys (void); SV *mop_prehashed_key_for (mop_prehashed_key_t key); U32 mop_prehashed_hash_for (mop_prehashed_key_t key); #define INSTALL_SIMPLE_READER(klass, name) INSTALL_SIMPLE_READER_WITH_KEY(klass, name, name) #define INSTALL_SIMPLE_READER_WITH_KEY(klass, name, key) \ { \ CV *cv = newXS("Class::MOP::" #klass "::" #name, mop_xs_simple_reader, __FILE__); \ CvXSUBANY(cv).any_i32 = KEY_ ##key; \ } XS_EXTERNAL(mop_xs_simple_reader); extern SV *mop_method_metaclass; extern SV *mop_associated_metaclass; extern SV *mop_wrap; UV mop_check_package_cache_flag(pTHX_ HV *stash); int mop_get_code_info (SV *coderef, char **pkg, char **name); SV *mop_call0(pTHX_ SV *const self, SV *const method); typedef enum { TYPE_FILTER_NONE, TYPE_FILTER_CODE, TYPE_FILTER_ARRAY, TYPE_FILTER_IO, TYPE_FILTER_HASH, TYPE_FILTER_SCALAR, } type_filter_t; typedef bool (*get_package_symbols_cb_t) (const char *, STRLEN, SV *, void *); void mop_get_package_symbols(HV *stash, type_filter_t filter, get_package_symbols_cb_t cb, void *ud); HV *mop_get_all_package_symbols (HV *stash, type_filter_t filter); #endif Moose-2.1604/perltidyrc000600 000766 000024 00000000455 12617452415 015252 0ustar00etherstaff000000 000000 -l=78 -i=4 -ci=4 -se -b -bar -boc -vt=0 -vtc=0 -cti=0 -pt=1 -bt=1 -sbt=1 -bbt=1 -nolq -npro -nsfs --blank-lines-before-packages=0 --opening-hash-brace-right --no-outdent-long-comments --iterations=2 -wbb="% + - * / x != == >= <= =~ !~ < > | & >= < = **= += *= &= <<= &&= -= /= |= >>= ||= .= %= ^= x=" Moose-2.1604/ppport.h000644 000766 000024 00000556002 12617452415 014657 0ustar00etherstaff000000 000000 #if 0 <<'SKIP'; #endif /* ---------------------------------------------------------------------- ppport.h -- Perl/Pollution/Portability Version 3.21 Automatically created by Devel::PPPort running under perl 5.018001. Do NOT edit this file directly! -- Edit PPPort_pm.PL and the includes in parts/inc/ instead. Use 'perldoc ppport.h' to view the documentation below. ---------------------------------------------------------------------- SKIP =pod =head1 NAME ppport.h - Perl/Pollution/Portability version 3.21 =head1 SYNOPSIS perl ppport.h [options] [source files] Searches current directory for files if no [source files] are given --help show short help --version show version --patch=file write one patch file with changes --copy=suffix write changed copies with suffix --diff=program use diff program and options --compat-version=version provide compatibility with Perl version --cplusplus accept C++ comments --quiet don't output anything except fatal errors --nodiag don't show diagnostics --nohints don't show hints --nochanges don't suggest changes --nofilter don't filter input files --strip strip all script and doc functionality from ppport.h --list-provided list provided API --list-unsupported list unsupported API --api-info=name show Perl API portability information =head1 COMPATIBILITY This version of F is designed to support operation with Perl installations back to 5.003, and has been tested up to 5.11.5. =head1 OPTIONS =head2 --help Display a brief usage summary. =head2 --version Display the version of F. =head2 --patch=I If this option is given, a single patch file will be created if any changes are suggested. This requires a working diff program to be installed on your system. =head2 --copy=I If this option is given, a copy of each file will be saved with the given suffix that contains the suggested changes. This does not require any external programs. Note that this does not automagially add a dot between the original filename and the suffix. If you want the dot, you have to include it in the option argument. If neither C<--patch> or C<--copy> are given, the default is to simply print the diffs for each file. This requires either C or a C program to be installed. =head2 --diff=I Manually set the diff program and options to use. The default is to use C, when installed, and output unified context diffs. =head2 --compat-version=I Tell F to check for compatibility with the given Perl version. The default is to check for compatibility with Perl version 5.003. You can use this option to reduce the output of F if you intend to be backward compatible only down to a certain Perl version. =head2 --cplusplus Usually, F will detect C++ style comments and replace them with C style comments for portability reasons. Using this option instructs F to leave C++ comments untouched. =head2 --quiet Be quiet. Don't print anything except fatal errors. =head2 --nodiag Don't output any diagnostic messages. Only portability alerts will be printed. =head2 --nohints Don't output any hints. Hints often contain useful portability notes. Warnings will still be displayed. =head2 --nochanges Don't suggest any changes. Only give diagnostic output and hints unless these are also deactivated. =head2 --nofilter Don't filter the list of input files. By default, files not looking like source code (i.e. not *.xs, *.c, *.cc, *.cpp or *.h) are skipped. =head2 --strip Strip all script and documentation functionality from F. This reduces the size of F dramatically and may be useful if you want to include F in smaller modules without increasing their distribution size too much. The stripped F will have a C<--unstrip> option that allows you to undo the stripping, but only if an appropriate C module is installed. =head2 --list-provided Lists the API elements for which compatibility is provided by F. Also lists if it must be explicitly requested, if it has dependencies, and if there are hints or warnings for it. =head2 --list-unsupported Lists the API elements that are known not to be supported by F and below which version of Perl they probably won't be available or work. =head2 --api-info=I Show portability information for API elements matching I. If I is surrounded by slashes, it is interpreted as a regular expression. =head1 DESCRIPTION In order for a Perl extension (XS) module to be as portable as possible across differing versions of Perl itself, certain steps need to be taken. =over 4 =item * Including this header is the first major one. This alone will give you access to a large part of the Perl API that hasn't been available in earlier Perl releases. Use perl ppport.h --list-provided to see which API elements are provided by ppport.h. =item * You should avoid using deprecated parts of the API. For example, using global Perl variables without the C prefix is deprecated. Also, some API functions used to have a C prefix. Using this form is also deprecated. You can safely use the supported API, as F will provide wrappers for older Perl versions. =item * If you use one of a few functions or variables that were not present in earlier versions of Perl, and that can't be provided using a macro, you have to explicitly request support for these functions by adding one or more C<#define>s in your source code before the inclusion of F. These functions or variables will be marked C in the list shown by C<--list-provided>. Depending on whether you module has a single or multiple files that use such functions or variables, you want either C or global variants. For a C function or variable (used only in a single source file), use: #define NEED_function #define NEED_variable For a global function or variable (used in multiple source files), use: #define NEED_function_GLOBAL #define NEED_variable_GLOBAL Note that you mustn't have more than one global request for the same function or variable in your project. Function / Variable Static Request Global Request ----------------------------------------------------------------------------------------- PL_parser NEED_PL_parser NEED_PL_parser_GLOBAL PL_signals NEED_PL_signals NEED_PL_signals_GLOBAL eval_pv() NEED_eval_pv NEED_eval_pv_GLOBAL grok_bin() NEED_grok_bin NEED_grok_bin_GLOBAL grok_hex() NEED_grok_hex NEED_grok_hex_GLOBAL grok_number() NEED_grok_number NEED_grok_number_GLOBAL grok_numeric_radix() NEED_grok_numeric_radix NEED_grok_numeric_radix_GLOBAL grok_oct() NEED_grok_oct NEED_grok_oct_GLOBAL load_module() NEED_load_module NEED_load_module_GLOBAL my_snprintf() NEED_my_snprintf NEED_my_snprintf_GLOBAL my_sprintf() NEED_my_sprintf NEED_my_sprintf_GLOBAL my_strlcat() NEED_my_strlcat NEED_my_strlcat_GLOBAL my_strlcpy() NEED_my_strlcpy NEED_my_strlcpy_GLOBAL newCONSTSUB() NEED_newCONSTSUB NEED_newCONSTSUB_GLOBAL newRV_noinc() NEED_newRV_noinc NEED_newRV_noinc_GLOBAL newSV_type() NEED_newSV_type NEED_newSV_type_GLOBAL newSVpvn_flags() NEED_newSVpvn_flags NEED_newSVpvn_flags_GLOBAL newSVpvn_share() NEED_newSVpvn_share NEED_newSVpvn_share_GLOBAL pv_display() NEED_pv_display NEED_pv_display_GLOBAL pv_escape() NEED_pv_escape NEED_pv_escape_GLOBAL pv_pretty() NEED_pv_pretty NEED_pv_pretty_GLOBAL sv_2pv_flags() NEED_sv_2pv_flags NEED_sv_2pv_flags_GLOBAL sv_2pvbyte() NEED_sv_2pvbyte NEED_sv_2pvbyte_GLOBAL sv_catpvf_mg() NEED_sv_catpvf_mg NEED_sv_catpvf_mg_GLOBAL sv_catpvf_mg_nocontext() NEED_sv_catpvf_mg_nocontext NEED_sv_catpvf_mg_nocontext_GLOBAL sv_pvn_force_flags() NEED_sv_pvn_force_flags NEED_sv_pvn_force_flags_GLOBAL sv_setpvf_mg() NEED_sv_setpvf_mg NEED_sv_setpvf_mg_GLOBAL sv_setpvf_mg_nocontext() NEED_sv_setpvf_mg_nocontext NEED_sv_setpvf_mg_nocontext_GLOBAL vload_module() NEED_vload_module NEED_vload_module_GLOBAL vnewSVpvf() NEED_vnewSVpvf NEED_vnewSVpvf_GLOBAL warner() NEED_warner NEED_warner_GLOBAL To avoid namespace conflicts, you can change the namespace of the explicitly exported functions / variables using the C macro. Just C<#define> the macro before including C: #define DPPP_NAMESPACE MyOwnNamespace_ #include "ppport.h" The default namespace is C. =back The good thing is that most of the above can be checked by running F on your source code. See the next section for details. =head1 EXAMPLES To verify whether F is needed for your module, whether you should make any changes to your code, and whether any special defines should be used, F can be run as a Perl script to check your source code. Simply say: perl ppport.h The result will usually be a list of patches suggesting changes that should at least be acceptable, if not necessarily the most efficient solution, or a fix for all possible problems. If you know that your XS module uses features only available in newer Perl releases, if you're aware that it uses C++ comments, and if you want all suggestions as a single patch file, you could use something like this: perl ppport.h --compat-version=5.6.0 --cplusplus --patch=test.diff If you only want your code to be scanned without any suggestions for changes, use: perl ppport.h --nochanges You can specify a different C program or options, using the C<--diff> option: perl ppport.h --diff='diff -C 10' This would output context diffs with 10 lines of context. If you want to create patched copies of your files instead, use: perl ppport.h --copy=.new To display portability information for the C function, use: perl ppport.h --api-info=newSVpvn Since the argument to C<--api-info> can be a regular expression, you can use perl ppport.h --api-info=/_nomg$/ to display portability information for all C<_nomg> functions or perl ppport.h --api-info=/./ to display information for all known API elements. =head1 BUGS If this version of F is causing failure during the compilation of this module, please check if newer versions of either this module or C are available on CPAN before sending a bug report. If F was generated using the latest version of C and is causing failure of this module, please file a bug report using the CPAN Request Tracker at L. Please include the following information: =over 4 =item 1. The complete output from running "perl -V" =item 2. This file. =item 3. The name and version of the module you were trying to build. =item 4. A full log of the build that failed. =item 5. Any other information that you think could be relevant. =back For the latest version of this code, please get the C module from CPAN. =head1 COPYRIGHT Version 3.x, Copyright (c) 2004-2013, Marcus Holland-Moritz. Version 2.x, Copyright (C) 2001, Paul Marquess. Version 1.x, Copyright (C) 1999, Kenneth Albanowski. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. =head1 SEE ALSO See L. =cut use strict; # Disable broken TRIE-optimization BEGIN { eval '${^RE_TRIE_MAXBUF} = -1' if $] >= 5.009004 && $] <= 5.009005 } my $VERSION = 3.21; my %opt = ( quiet => 0, diag => 1, hints => 1, changes => 1, cplusplus => 0, filter => 1, strip => 0, version => 0, ); my($ppport) = $0 =~ /([\w.]+)$/; my $LF = '(?:\r\n|[\r\n])'; # line feed my $HS = "[ \t]"; # horizontal whitespace # Never use C comments in this file! my $ccs = '/'.'*'; my $cce = '*'.'/'; my $rccs = quotemeta $ccs; my $rcce = quotemeta $cce; eval { require Getopt::Long; Getopt::Long::GetOptions(\%opt, qw( help quiet diag! filter! hints! changes! cplusplus strip version patch=s copy=s diff=s compat-version=s list-provided list-unsupported api-info=s )) or usage(); }; if ($@ and grep /^-/, @ARGV) { usage() if "@ARGV" =~ /^--?h(?:elp)?$/; die "Getopt::Long not found. Please don't use any options.\n"; } if ($opt{version}) { print "This is $0 $VERSION.\n"; exit 0; } usage() if $opt{help}; strip() if $opt{strip}; if (exists $opt{'compat-version'}) { my($r,$v,$s) = eval { parse_version($opt{'compat-version'}) }; if ($@) { die "Invalid version number format: '$opt{'compat-version'}'\n"; } die "Only Perl 5 is supported\n" if $r != 5; die "Invalid version number: $opt{'compat-version'}\n" if $v >= 1000 || $s >= 1000; $opt{'compat-version'} = sprintf "%d.%03d%03d", $r, $v, $s; } else { $opt{'compat-version'} = 5; } my %API = map { /^(\w+)\|([^|]*)\|([^|]*)\|(\w*)$/ ? ( $1 => { ($2 ? ( base => $2 ) : ()), ($3 ? ( todo => $3 ) : ()), (index($4, 'v') >= 0 ? ( varargs => 1 ) : ()), (index($4, 'p') >= 0 ? ( provided => 1 ) : ()), (index($4, 'n') >= 0 ? ( nothxarg => 1 ) : ()), } ) : die "invalid spec: $_" } qw( AvFILLp|5.004050||p AvFILL||| BhkDISABLE||5.019003| BhkENABLE||5.019003| BhkENTRY_set||5.019003| BhkENTRY||| BhkFLAGS||| CALL_BLOCK_HOOKS||| CLASS|||n CPERLscope|5.005000||p CX_CURPAD_SAVE||| CX_CURPAD_SV||| CopFILEAV|5.006000||p CopFILEGV_set|5.006000||p CopFILEGV|5.006000||p CopFILESV|5.006000||p CopFILE_set|5.006000||p CopFILE|5.006000||p CopSTASHPV_set|5.006000||p CopSTASHPV|5.006000||p CopSTASH_eq|5.006000||p CopSTASH_set|5.006000||p CopSTASH|5.006000||p CopyD|5.009002|5.004050|p Copy||5.004050| CvPADLIST||5.008001| CvSTASH||| CvWEAKOUTSIDE||| DEFSV_set|5.010001||p DEFSV|5.004050||p END_EXTERN_C|5.005000||p ENTER||| ERRSV|5.004050||p EXTEND||| EXTERN_C|5.005000||p F0convert|||n FREETMPS||| GIMME_V||5.004000|n GIMME|||n GROK_NUMERIC_RADIX|5.007002||p G_ARRAY||| G_DISCARD||| G_EVAL||| G_METHOD|5.006001||p G_NOARGS||| G_SCALAR||| G_VOID||5.004000| GetVars||| GvAV||| GvCV||| GvHV||| GvSVn|5.009003||p GvSV||| Gv_AMupdate||5.011000| HEf_SVKEY||5.004000| HeHASH||5.004000| HeKEY||5.004000| HeKLEN||5.004000| HePV||5.004000| HeSVKEY_force||5.004000| HeSVKEY_set||5.004000| HeSVKEY||5.004000| HeUTF8||5.010001| HeVAL||5.004000| HvENAMELEN||5.015004| HvENAMEUTF8||5.015004| HvENAME||5.013007| HvNAMELEN_get|5.009003||p HvNAMELEN||5.015004| HvNAMEUTF8||5.015004| HvNAME_get|5.009003||p HvNAME||| INT2PTR|5.006000||p IN_LOCALE_COMPILETIME|5.007002||p IN_LOCALE_RUNTIME|5.007002||p IN_LOCALE|5.007002||p IN_PERL_COMPILETIME|5.008001||p IS_NUMBER_GREATER_THAN_UV_MAX|5.007002||p IS_NUMBER_INFINITY|5.007002||p IS_NUMBER_IN_UV|5.007002||p IS_NUMBER_NAN|5.007003||p IS_NUMBER_NEG|5.007002||p IS_NUMBER_NOT_INT|5.007002||p IVSIZE|5.006000||p IVTYPE|5.006000||p IVdf|5.006000||p LEAVE||| LINKLIST||5.013006| LVRET||| MARK||| MULTICALL||5.019003| MY_CXT_CLONE|5.009002||p MY_CXT_INIT|5.007003||p MY_CXT|5.007003||p MoveD|5.009002|5.004050|p Move||5.004050| NOOP|5.005000||p NUM2PTR|5.006000||p NVTYPE|5.006000||p NVef|5.006001||p NVff|5.006001||p NVgf|5.006001||p Newxc|5.009003||p Newxz|5.009003||p Newx|5.009003||p Nullav||| Nullch||| Nullcv||| Nullhv||| Nullsv||| OP_CLASS||5.013007| OP_DESC||5.007003| OP_NAME||5.007003| ORIGMARK||| PAD_BASE_SV||| PAD_CLONE_VARS||| PAD_COMPNAME_FLAGS||| PAD_COMPNAME_GEN_set||| PAD_COMPNAME_GEN||| PAD_COMPNAME_OURSTASH||| PAD_COMPNAME_PV||| PAD_COMPNAME_TYPE||| PAD_RESTORE_LOCAL||| PAD_SAVE_LOCAL||| PAD_SAVE_SETNULLPAD||| PAD_SETSV||| PAD_SET_CUR_NOSAVE||| PAD_SET_CUR||| PAD_SVl||| PAD_SV||| PERLIO_FUNCS_CAST|5.009003||p PERLIO_FUNCS_DECL|5.009003||p PERL_ABS|5.008001||p PERL_BCDVERSION|5.019002||p PERL_GCC_BRACE_GROUPS_FORBIDDEN|5.008001||p PERL_HASH|5.004000||p PERL_INT_MAX|5.004000||p PERL_INT_MIN|5.004000||p PERL_LONG_MAX|5.004000||p PERL_LONG_MIN|5.004000||p PERL_MAGIC_arylen|5.007002||p PERL_MAGIC_backref|5.007002||p PERL_MAGIC_bm|5.007002||p PERL_MAGIC_collxfrm|5.007002||p PERL_MAGIC_dbfile|5.007002||p PERL_MAGIC_dbline|5.007002||p PERL_MAGIC_defelem|5.007002||p PERL_MAGIC_envelem|5.007002||p PERL_MAGIC_env|5.007002||p PERL_MAGIC_ext|5.007002||p PERL_MAGIC_fm|5.007002||p PERL_MAGIC_glob|5.019002||p PERL_MAGIC_isaelem|5.007002||p PERL_MAGIC_isa|5.007002||p PERL_MAGIC_mutex|5.019002||p PERL_MAGIC_nkeys|5.007002||p PERL_MAGIC_overload_elem|5.019002||p PERL_MAGIC_overload_table|5.007002||p PERL_MAGIC_overload|5.019002||p PERL_MAGIC_pos|5.007002||p PERL_MAGIC_qr|5.007002||p PERL_MAGIC_regdata|5.007002||p PERL_MAGIC_regdatum|5.007002||p PERL_MAGIC_regex_global|5.007002||p PERL_MAGIC_shared_scalar|5.007003||p PERL_MAGIC_shared|5.007003||p PERL_MAGIC_sigelem|5.007002||p PERL_MAGIC_sig|5.007002||p PERL_MAGIC_substr|5.007002||p PERL_MAGIC_sv|5.007002||p PERL_MAGIC_taint|5.007002||p PERL_MAGIC_tiedelem|5.007002||p PERL_MAGIC_tiedscalar|5.007002||p PERL_MAGIC_tied|5.007002||p PERL_MAGIC_utf8|5.008001||p PERL_MAGIC_uvar_elem|5.007003||p PERL_MAGIC_uvar|5.007002||p PERL_MAGIC_vec|5.007002||p PERL_MAGIC_vstring|5.008001||p PERL_PV_ESCAPE_ALL|5.009004||p PERL_PV_ESCAPE_FIRSTCHAR|5.009004||p PERL_PV_ESCAPE_NOBACKSLASH|5.009004||p PERL_PV_ESCAPE_NOCLEAR|5.009004||p PERL_PV_ESCAPE_QUOTE|5.009004||p PERL_PV_ESCAPE_RE|5.009005||p PERL_PV_ESCAPE_UNI_DETECT|5.009004||p PERL_PV_ESCAPE_UNI|5.009004||p PERL_PV_PRETTY_DUMP|5.009004||p PERL_PV_PRETTY_ELLIPSES|5.010000||p PERL_PV_PRETTY_LTGT|5.009004||p PERL_PV_PRETTY_NOCLEAR|5.010000||p PERL_PV_PRETTY_QUOTE|5.009004||p PERL_PV_PRETTY_REGPROP|5.009004||p PERL_QUAD_MAX|5.004000||p PERL_QUAD_MIN|5.004000||p PERL_REVISION|5.006000||p PERL_SCAN_ALLOW_UNDERSCORES|5.007003||p PERL_SCAN_DISALLOW_PREFIX|5.007003||p PERL_SCAN_GREATER_THAN_UV_MAX|5.007003||p PERL_SCAN_SILENT_ILLDIGIT|5.008001||p PERL_SHORT_MAX|5.004000||p PERL_SHORT_MIN|5.004000||p PERL_SIGNALS_UNSAFE_FLAG|5.008001||p PERL_SUBVERSION|5.006000||p PERL_SYS_INIT3||5.010000| PERL_SYS_INIT||5.010000| PERL_SYS_TERM||5.019003| PERL_UCHAR_MAX|5.004000||p PERL_UCHAR_MIN|5.004000||p PERL_UINT_MAX|5.004000||p PERL_UINT_MIN|5.004000||p PERL_ULONG_MAX|5.004000||p PERL_ULONG_MIN|5.004000||p PERL_UNUSED_ARG|5.009003||p PERL_UNUSED_CONTEXT|5.009004||p PERL_UNUSED_DECL|5.007002||p PERL_UNUSED_VAR|5.007002||p PERL_UQUAD_MAX|5.004000||p PERL_UQUAD_MIN|5.004000||p PERL_USE_GCC_BRACE_GROUPS|5.009004||p PERL_USHORT_MAX|5.004000||p PERL_USHORT_MIN|5.004000||p PERL_VERSION|5.006000||p PL_DBsignal|5.005000||p PL_DBsingle|||pn PL_DBsub|||pn PL_DBtrace|||pn PL_Sv|5.005000||p PL_bufend|5.019002||p PL_bufptr|5.019002||p PL_check||5.006000| PL_compiling|5.004050||p PL_comppad_name||5.017004| PL_comppad||5.008001| PL_copline|5.019002||p PL_curcop|5.004050||p PL_curpad||5.005000| PL_curstash|5.004050||p PL_debstash|5.004050||p PL_defgv|5.004050||p PL_diehook|5.004050||p PL_dirty|5.004050||p PL_dowarn|||pn PL_errgv|5.004050||p PL_error_count|5.019002||p PL_expect|5.019002||p PL_hexdigit|5.005000||p PL_hints|5.005000||p PL_in_my_stash|5.019002||p PL_in_my|5.019002||p PL_keyword_plugin||5.011002| PL_last_in_gv|||n PL_laststatval|5.005000||p PL_lex_state|5.019002||p PL_lex_stuff|5.019002||p PL_linestr|5.019002||p PL_modglobal||5.005000|n PL_na|5.004050||pn PL_no_modify|5.006000||p PL_ofsgv|||n PL_opfreehook||5.011000|n PL_parser|5.009005|5.009005|p PL_peepp||5.007003|n PL_perl_destruct_level|5.004050||p PL_perldb|5.004050||p PL_ppaddr|5.006000||p PL_rpeepp||5.013005|n PL_rsfp_filters|5.019002||p PL_rsfp|5.019002||p PL_rs|||n PL_signals|5.008001||p PL_stack_base|5.004050||p PL_stack_sp|5.004050||p PL_statcache|5.005000||p PL_stdingv|5.004050||p PL_sv_arenaroot|5.004050||p PL_sv_no|5.004050||pn PL_sv_undef|5.004050||pn PL_sv_yes|5.004050||pn PL_tainted|5.004050||p PL_tainting|5.004050||p PL_tokenbuf|5.019002||p POP_MULTICALL||5.019003| POPi|||n POPl|||n POPn|||n POPpbytex||5.007001|n POPpx||5.005030|n POPp|||n POPs|||n PTR2IV|5.006000||p PTR2NV|5.006000||p PTR2UV|5.006000||p PTR2nat|5.009003||p PTR2ul|5.007001||p PTRV|5.006000||p PUSHMARK||| PUSH_MULTICALL||5.019003| PUSHi||| PUSHmortal|5.009002||p PUSHn||| PUSHp||| PUSHs||| PUSHu|5.004000||p PUTBACK||| PadARRAY||5.019003| PadMAX||5.019003| PadlistARRAY||5.019003| PadlistMAX||5.019003| PadlistNAMESARRAY||5.019003| PadlistNAMESMAX||5.019003| PadlistNAMES||5.019003| PadlistREFCNT||5.017004| PadnameIsOUR||| PadnameIsSTATE||| PadnameLEN||5.019003| PadnameOURSTASH||| PadnameOUTER||| PadnamePV||5.019003| PadnameSV||5.019003| PadnameTYPE||| PadnameUTF8||5.019003| PadnamelistARRAY||5.019003| PadnamelistMAX||5.019003| PerlIO_clearerr||5.007003| PerlIO_close||5.007003| PerlIO_context_layers||5.009004| PerlIO_eof||5.007003| PerlIO_error||5.007003| PerlIO_fileno||5.007003| PerlIO_fill||5.007003| PerlIO_flush||5.007003| PerlIO_get_base||5.007003| PerlIO_get_bufsiz||5.007003| PerlIO_get_cnt||5.007003| PerlIO_get_ptr||5.007003| PerlIO_read||5.007003| PerlIO_seek||5.007003| PerlIO_set_cnt||5.007003| PerlIO_set_ptrcnt||5.007003| PerlIO_setlinebuf||5.007003| PerlIO_stderr||5.007003| PerlIO_stdin||5.007003| PerlIO_stdout||5.007003| PerlIO_tell||5.007003| PerlIO_unread||5.007003| PerlIO_write||5.007003| Perl_signbit||5.009005|n PoisonFree|5.009004||p PoisonNew|5.009004||p PoisonWith|5.009004||p Poison|5.008000||p READ_XDIGIT||5.017006| RETVAL|||n Renewc||| Renew||| SAVECLEARSV||| SAVECOMPPAD||| SAVEPADSV||| SAVETMPS||| SAVE_DEFSV|5.004050||p SPAGAIN||| SP||| START_EXTERN_C|5.005000||p START_MY_CXT|5.007003||p STMT_END|||p STMT_START|||p STR_WITH_LEN|5.009003||p ST||| SV_CONST_RETURN|5.009003||p SV_COW_DROP_PV|5.008001||p SV_COW_SHARED_HASH_KEYS|5.009005||p SV_GMAGIC|5.007002||p SV_HAS_TRAILING_NUL|5.009004||p SV_IMMEDIATE_UNREF|5.007001||p SV_MUTABLE_RETURN|5.009003||p SV_NOSTEAL|5.009002||p SV_SMAGIC|5.009003||p SV_UTF8_NO_ENCODING|5.008001||p SVfARG|5.009005||p SVf_UTF8|5.006000||p SVf|5.006000||p SVt_INVLIST||5.019002| SVt_IV||| SVt_NULL||| SVt_NV||| SVt_PVAV||| SVt_PVCV||| SVt_PVFM||| SVt_PVGV||| SVt_PVHV||| SVt_PVIO||| SVt_PVIV||| SVt_PVLV||| SVt_PVMG||| SVt_PVNV||| SVt_PV||| SVt_REGEXP||5.011000| Safefree||| Slab_Alloc||| Slab_Free||| Slab_to_ro||| Slab_to_rw||| StructCopy||| SvCUR_set||| SvCUR||| SvEND||| SvGAMAGIC||5.006001| SvGETMAGIC|5.004050||p SvGROW||| SvIOK_UV||5.006000| SvIOK_notUV||5.006000| SvIOK_off||| SvIOK_only_UV||5.006000| SvIOK_only||| SvIOK_on||| SvIOKp||| SvIOK||| SvIVX||| SvIV_nomg|5.009001||p SvIV_set||| SvIVx||| SvIV||| SvIsCOW_shared_hash||5.008003| SvIsCOW||5.008003| SvLEN_set||| SvLEN||| SvLOCK||5.007003| SvMAGIC_set|5.009003||p SvNIOK_off||| SvNIOKp||| SvNIOK||| SvNOK_off||| SvNOK_only||| SvNOK_on||| SvNOKp||| SvNOK||| SvNVX||| SvNV_nomg||5.013002| SvNV_set||| SvNVx||| SvNV||| SvOK||| SvOOK_offset||5.011000| SvOOK||| SvPOK_off||| SvPOK_only_UTF8||5.006000| SvPOK_only||| SvPOK_on||| SvPOKp||| SvPOK||| SvPVX_const|5.009003||p SvPVX_mutable|5.009003||p SvPVX||| SvPV_const|5.009003||p SvPV_flags_const_nolen|5.009003||p SvPV_flags_const|5.009003||p SvPV_flags_mutable|5.009003||p SvPV_flags|5.007002||p SvPV_force_flags_mutable|5.009003||p SvPV_force_flags_nolen|5.009003||p SvPV_force_flags|5.007002||p SvPV_force_mutable|5.009003||p SvPV_force_nolen|5.009003||p SvPV_force_nomg_nolen|5.009003||p SvPV_force_nomg|5.007002||p SvPV_force|||p SvPV_mutable|5.009003||p SvPV_nolen_const|5.009003||p SvPV_nolen|5.006000||p SvPV_nomg_const_nolen|5.009003||p SvPV_nomg_const|5.009003||p SvPV_nomg_nolen|5.013007||p SvPV_nomg|5.007002||p SvPV_renew|5.009003||p SvPV_set||| SvPVbyte_force||5.009002| SvPVbyte_nolen||5.006000| SvPVbytex_force||5.006000| SvPVbytex||5.006000| SvPVbyte|5.006000||p SvPVutf8_force||5.006000| SvPVutf8_nolen||5.006000| SvPVutf8x_force||5.006000| SvPVutf8x||5.006000| SvPVutf8||5.006000| SvPVx||| SvPV||| SvREFCNT_dec_NN||5.017007| SvREFCNT_dec||| SvREFCNT_inc_NN|5.009004||p SvREFCNT_inc_simple_NN|5.009004||p SvREFCNT_inc_simple_void_NN|5.009004||p SvREFCNT_inc_simple_void|5.009004||p SvREFCNT_inc_simple|5.009004||p SvREFCNT_inc_void_NN|5.009004||p SvREFCNT_inc_void|5.009004||p SvREFCNT_inc|||p SvREFCNT||| SvROK_off||| SvROK_on||| SvROK||| SvRV_set|5.009003||p SvRV||| SvRXOK||5.009005| SvRX||5.009005| SvSETMAGIC||| SvSHARED_HASH|5.009003||p SvSHARE||5.007003| SvSTASH_set|5.009003||p SvSTASH||| SvSetMagicSV_nosteal||5.004000| SvSetMagicSV||5.004000| SvSetSV_nosteal||5.004000| SvSetSV||| SvTAINTED_off||5.004000| SvTAINTED_on||5.004000| SvTAINTED||5.004000| SvTAINT||| SvTHINKFIRST||| SvTRUE_nomg||5.013006| SvTRUE||| SvTYPE||| SvUNLOCK||5.007003| SvUOK|5.007001|5.006000|p SvUPGRADE||| SvUTF8_off||5.006000| SvUTF8_on||5.006000| SvUTF8||5.006000| SvUVXx|5.004000||p SvUVX|5.004000||p SvUV_nomg|5.009001||p SvUV_set|5.009003||p SvUVx|5.004000||p SvUV|5.004000||p SvVOK||5.008001| SvVSTRING_mg|5.009004||p THIS|||n UNDERBAR|5.009002||p UTF8_MAXBYTES|5.009002||p UVSIZE|5.006000||p UVTYPE|5.006000||p UVXf|5.007001||p UVof|5.006000||p UVuf|5.006000||p UVxf|5.006000||p WARN_ALL|5.006000||p WARN_AMBIGUOUS|5.006000||p WARN_ASSERTIONS|5.019002||p WARN_BAREWORD|5.006000||p WARN_CLOSED|5.006000||p WARN_CLOSURE|5.006000||p WARN_DEBUGGING|5.006000||p WARN_DEPRECATED|5.006000||p WARN_DIGIT|5.006000||p WARN_EXEC|5.006000||p WARN_EXITING|5.006000||p WARN_GLOB|5.006000||p WARN_INPLACE|5.006000||p WARN_INTERNAL|5.006000||p WARN_IO|5.006000||p WARN_LAYER|5.008000||p WARN_MALLOC|5.006000||p WARN_MISC|5.006000||p WARN_NEWLINE|5.006000||p WARN_NUMERIC|5.006000||p WARN_ONCE|5.006000||p WARN_OVERFLOW|5.006000||p WARN_PACK|5.006000||p WARN_PARENTHESIS|5.006000||p WARN_PIPE|5.006000||p WARN_PORTABLE|5.006000||p WARN_PRECEDENCE|5.006000||p WARN_PRINTF|5.006000||p WARN_PROTOTYPE|5.006000||p WARN_QW|5.006000||p WARN_RECURSION|5.006000||p WARN_REDEFINE|5.006000||p WARN_REGEXP|5.006000||p WARN_RESERVED|5.006000||p WARN_SEMICOLON|5.006000||p WARN_SEVERE|5.006000||p WARN_SIGNAL|5.006000||p WARN_SUBSTR|5.006000||p WARN_SYNTAX|5.006000||p WARN_TAINT|5.006000||p WARN_THREADS|5.008000||p WARN_UNINITIALIZED|5.006000||p WARN_UNOPENED|5.006000||p WARN_UNPACK|5.006000||p WARN_UNTIE|5.006000||p WARN_UTF8|5.006000||p WARN_VOID|5.006000||p WIDEST_UTYPE|5.015004||p XCPT_CATCH|5.009002||p XCPT_RETHROW|5.009002|5.007001|p XCPT_TRY_END|5.009002|5.004000|p XCPT_TRY_START|5.009002|5.004000|p XPUSHi||| XPUSHmortal|5.009002||p XPUSHn||| XPUSHp||| XPUSHs||| XPUSHu|5.004000||p XSPROTO|5.010000||p XSRETURN_EMPTY||| XSRETURN_IV||| XSRETURN_NO||| XSRETURN_NV||| XSRETURN_PV||| XSRETURN_UNDEF||| XSRETURN_UV|5.008001||p XSRETURN_YES||| XSRETURN|||p XST_mIV||| XST_mNO||| XST_mNV||| XST_mPV||| XST_mUNDEF||| XST_mUV|5.008001||p XST_mYES||| XS_APIVERSION_BOOTCHECK||5.013004| XS_EXTERNAL||5.019003| XS_INTERNAL||5.019003| XS_VERSION_BOOTCHECK||| XS_VERSION||| XSprePUSH|5.006000||p XS||| XopDISABLE||5.019003| XopENABLE||5.019003| XopENTRY_set||5.019003| XopENTRY||5.019003| XopFLAGS||5.013007| ZeroD|5.009002||p Zero||| _aMY_CXT|5.007003||p _add_range_to_invlist||| _append_range_to_invlist||| _core_swash_init||| _get_swash_invlist||| _invlist_array_init||| _invlist_contains_cp||| _invlist_contents||| _invlist_dump||| _invlist_intersection_maybe_complement_2nd||| _invlist_intersection||| _invlist_invert_prop||| _invlist_invert||| _invlist_len||| _invlist_populate_swatch||| _invlist_search||| _invlist_subtract||| _invlist_union_maybe_complement_2nd||| _invlist_union||| _is_uni_FOO||5.017008| _is_uni_perl_idcont||5.017008| _is_uni_perl_idstart||5.017007| _is_utf8_FOO||5.017008| _is_utf8_mark||5.017008| _is_utf8_perl_idcont||5.017008| _is_utf8_perl_idstart||5.017007| _new_invlist_C_array||| _new_invlist||| _pMY_CXT|5.007003||p _swash_inversion_hash||| _swash_to_invlist||| _to_fold_latin1||| _to_uni_fold_flags||5.013011| _to_upper_title_latin1||| _to_utf8_fold_flags||5.015006| _to_utf8_lower_flags||5.015006| _to_utf8_title_flags||5.015006| _to_utf8_upper_flags||5.015006| aMY_CXT_|5.007003||p aMY_CXT|5.007003||p aTHXR_|5.019002||p aTHXR|5.019002||p aTHX_|5.006000||p aTHX|5.006000||p aassign_common_vars||| add_cp_to_invlist||| add_data|||n add_utf16_textfilter||| addmad||| adjust_size_and_find_bucket|||n adjust_stack_on_leave||| alloc_maybe_populate_EXACT||| alloccopstash||| allocmy||| amagic_call||| amagic_cmp_locale||| amagic_cmp||| amagic_deref_call||5.013007| amagic_i_ncmp||| amagic_is_enabled||| amagic_ncmp||| anonymise_cv_maybe||| any_dup||| ao||| append_madprops||| apply_attrs_my||| apply_attrs_string||5.006001| apply_attrs||| apply||| assert_uft8_cache_coherent||| atfork_lock||5.007003|n atfork_unlock||5.007003|n av_arylen_p||5.009003| av_clear||| av_create_and_push||5.009005| av_create_and_unshift_one||5.009005| av_delete||5.006000| av_exists||5.006000| av_extend_guts||| av_extend||| av_fetch||| av_fill||| av_iter_p||5.011000| av_len||| av_make||| av_pop||| av_push||| av_reify||| av_shift||| av_store||| av_tindex||5.017009| av_top_index||5.017009| av_undef||| av_unshift||| ax|||n bad_type_gv||| bad_type_pv||| bind_match||| block_end||| block_gimme||5.004000| block_start||| blockhook_register||5.013003| boolSV|5.004000||p boot_core_PerlIO||| boot_core_UNIVERSAL||| boot_core_mro||| bytes_cmp_utf8||5.013007| bytes_from_utf8||5.007001| bytes_to_uni|||n bytes_to_utf8||5.006001| call_argv|5.006000||p call_atexit||5.006000| call_list||5.004000| call_method|5.006000||p call_pv|5.006000||p call_sv|5.006000||p caller_cx||5.013005| calloc||5.007002|n cando||| cast_i32||5.006000| cast_iv||5.006000| cast_ulong||5.006000| cast_uv||5.006000| check_locale_boundary_crossing||| check_type_and_open||| check_uni||| check_utf8_print||| checkcomma||| ckWARN|5.006000||p ck_entersub_args_core||| ck_entersub_args_list||5.013006| ck_entersub_args_proto_or_list||5.013006| ck_entersub_args_proto||5.013006| ck_warner_d||5.011001|v ck_warner||5.011001|v ckwarn_common||| ckwarn_d||5.009003| ckwarn||5.009003| cl_and|||n cl_anything|||n cl_init|||n cl_is_anything|||n cl_or|||n clear_placeholders||| clone_params_del|||n clone_params_new|||n closest_cop||| compute_EXACTish||| convert||| cop_fetch_label||5.015001| cop_free||| cop_hints_2hv||5.013007| cop_hints_fetch_pvn||5.013007| cop_hints_fetch_pvs||5.013007| cop_hints_fetch_pv||5.013007| cop_hints_fetch_sv||5.013007| cop_store_label||5.015001| cophh_2hv||5.013007| cophh_copy||5.013007| cophh_delete_pvn||5.013007| cophh_delete_pvs||5.013007| cophh_delete_pv||5.013007| cophh_delete_sv||5.013007| cophh_fetch_pvn||5.013007| cophh_fetch_pvs||5.013007| cophh_fetch_pv||5.013007| cophh_fetch_sv||5.013007| cophh_free||5.013007| cophh_new_empty||5.019003| cophh_store_pvn||5.013007| cophh_store_pvs||5.013007| cophh_store_pv||5.013007| cophh_store_sv||5.013007| core_prototype||| core_regclass_swash||| coresub_op||| could_it_be_a_POSIX_class||| cr_textfilter||| create_eval_scope||| croak_memory_wrap||5.019003|n croak_no_mem|||n croak_no_modify||5.013003|n croak_nocontext|||vn croak_popstack|||n croak_sv||5.013001| croak_xs_usage||5.010001|n croak|||v csighandler||5.009003|n curmad||| current_re_engine||| curse||| custom_op_desc||5.007003| custom_op_name||5.007003| custom_op_register||5.013007| custom_op_xop||5.013007| cv_ckproto_len_flags||| cv_clone_into||| cv_clone||| cv_const_sv_or_av||| cv_const_sv||5.004000| cv_dump||| cv_forget_slab||| cv_get_call_checker||5.013006| cv_set_call_checker||5.013006| cv_undef||| cvgv_set||| cvstash_set||| cx_dump||5.005000| cx_dup||| cxinc||| dAXMARK|5.009003||p dAX|5.007002||p dITEMS|5.007002||p dMARK||| dMULTICALL||5.009003| dMY_CXT_SV|5.007003||p dMY_CXT|5.007003||p dNOOP|5.006000||p dORIGMARK||| dSP||| dTHR|5.004050||p dTHXR|5.019002||p dTHXa|5.006000||p dTHXoa|5.006000||p dTHX|5.006000||p dUNDERBAR|5.009002||p dVAR|5.009003||p dXCPT|5.009002||p dXSARGS||| dXSI32||| dXSTARG|5.006000||p deb_curcv||| deb_nocontext|||vn deb_stack_all||| deb_stack_n||| debop||5.005000| debprofdump||5.005000| debprof||| debstackptrs||5.007003| debstack||5.007003| debug_start_match||| deb||5.007003|v defelem_target||| del_sv||| delete_eval_scope||| delimcpy||5.004000|n deprecate_commaless_var_list||| despatch_signals||5.007001| destroy_matcher||| die_nocontext|||vn die_sv||5.013001| die_unwind||| die|||v dirp_dup||| div128||| djSP||| do_aexec5||| do_aexec||| do_aspawn||| do_binmode||5.004050| do_chomp||| do_close||| do_delete_local||| do_dump_pad||| do_eof||| do_exec3||| do_execfree||| do_exec||| do_gv_dump||5.006000| do_gvgv_dump||5.006000| do_hv_dump||5.006000| do_ipcctl||| do_ipcget||| do_join||| do_magic_dump||5.006000| do_msgrcv||| do_msgsnd||| do_ncmp||| do_oddball||| do_op_dump||5.006000| do_op_xmldump||| do_open9||5.006000| do_openn||5.007001| do_open||5.004000| do_pmop_dump||5.006000| do_pmop_xmldump||| do_print||| do_readline||| do_seek||| do_semop||| do_shmio||| do_smartmatch||| do_spawn_nowait||| do_spawn||| do_sprintf||| do_sv_dump||5.006000| do_sysseek||| do_tell||| do_trans_complex_utf8||| do_trans_complex||| do_trans_count_utf8||| do_trans_count||| do_trans_simple_utf8||| do_trans_simple||| do_trans||| do_vecget||| do_vecset||| do_vop||| docatch||| doeval||| dofile||| dofindlabel||| doform||| doing_taint||5.008001|n dooneliner||| doopen_pm||| doparseform||| dopoptoeval||| dopoptogiven||| dopoptolabel||| dopoptoloop||| dopoptosub_at||| dopoptowhen||| doref||5.009003| dounwind||| dowantarray||| dump_all_perl||| dump_all||5.006000| dump_eval||5.006000| dump_exec_pos||| dump_fds||| dump_form||5.006000| dump_indent||5.006000|v dump_mstats||| dump_packsubs_perl||| dump_packsubs||5.006000| dump_sub_perl||| dump_sub||5.006000| dump_sv_child||| dump_trie_interim_list||| dump_trie_interim_table||| dump_trie||| dump_vindent||5.006000| dumpuntil||| dup_attrlist||| emulate_cop_io||| eval_pv|5.006000||p eval_sv|5.006000||p exec_failed||| expect_number||| fbm_compile||5.005000| fbm_instr||5.005000| feature_is_enabled||| filter_add||| filter_del||| filter_gets||| filter_read||| finalize_optree||| finalize_op||| find_and_forget_pmops||| find_array_subscript||| find_beginning||| find_byclass||| find_hash_subscript||| find_in_my_stash||| find_lexical_cv||| find_runcv_where||| find_runcv||5.008001| find_rundefsv2||| find_rundefsvoffset||5.009002| find_rundefsv||5.013002| find_script||| find_uninit_var||| first_symbol|||n foldEQ_latin1||5.013008|n foldEQ_locale||5.013002|n foldEQ_utf8_flags||5.013010| foldEQ_utf8||5.013002| foldEQ||5.013002|n fold_constants||| forbid_setid||| force_ident_maybe_lex||| force_ident||| force_list||| force_next||| force_strict_version||| force_version||| force_word||| forget_pmop||| form_nocontext|||vn form_short_octal_warning||| form||5.004000|v fp_dup||| fprintf_nocontext|||vn free_global_struct||| free_tied_hv_pool||| free_tmps||| gen_constant_list||| get_and_check_backslash_N_name||| get_aux_mg||| get_av|5.006000||p get_context||5.006000|n get_cvn_flags|5.009005||p get_cvs|5.011000||p get_cv|5.006000||p get_db_sub||| get_debug_opts||| get_hash_seed||| get_hv|5.006000||p get_invlist_iter_addr||| get_invlist_offset_addr||| get_invlist_previous_index_addr||| get_mstats||| get_no_modify||| get_num||| get_op_descs||5.005000| get_op_names||5.005000| get_opargs||| get_ppaddr||5.006000| get_re_arg||| get_sv|5.006000||p get_vtbl||5.005030| getcwd_sv||5.007002| getenv_len||| glob_2number||| glob_assign_glob||| glob_assign_ref||| gp_dup||| gp_free||| gp_ref||| grok_bin|5.007003||p grok_bslash_N||| grok_bslash_c||| grok_bslash_o||| grok_bslash_x||| grok_hex|5.007003||p grok_number|5.007002||p grok_numeric_radix|5.007002||p grok_oct|5.007003||p group_end||| gv_AVadd||| gv_HVadd||| gv_IOadd||| gv_SVadd||| gv_add_by_type||5.011000| gv_autoload4||5.004000| gv_autoload_pvn||5.015004| gv_autoload_pv||5.015004| gv_autoload_sv||5.015004| gv_check||| gv_const_sv||5.009003| gv_dump||5.006000| gv_efullname3||5.004000| gv_efullname4||5.006001| gv_efullname||| gv_ename||| gv_fetchfile_flags||5.009005| gv_fetchfile||| gv_fetchmeth_autoload||5.007003| gv_fetchmeth_pv_autoload||5.015004| gv_fetchmeth_pvn_autoload||5.015004| gv_fetchmeth_pvn||5.015004| gv_fetchmeth_pv||5.015004| gv_fetchmeth_sv_autoload||5.015004| gv_fetchmeth_sv||5.015004| gv_fetchmethod_autoload||5.004000| gv_fetchmethod_pv_flags||5.015004| gv_fetchmethod_pvn_flags||5.015004| gv_fetchmethod_sv_flags||5.015004| gv_fetchmethod||| gv_fetchmeth||| gv_fetchpvn_flags|5.009002||p gv_fetchpvs|5.009004||p gv_fetchpv||| gv_fetchsv|5.009002||p gv_fullname3||5.004000| gv_fullname4||5.006001| gv_fullname||| gv_handler||5.007001| gv_init_pvn||5.015004| gv_init_pv||5.015004| gv_init_svtype||| gv_init_sv||5.015004| gv_init||| gv_magicalize_isa||| gv_name_set||5.009004| gv_stashpvn|5.004000||p gv_stashpvs|5.009003||p gv_stashpv||| gv_stashsv||| gv_try_downgrade||| handle_regex_sets||| he_dup||| hek_dup||| hfree_next_entry||| hfreeentries||| hsplit||| hv_assert||| hv_auxinit||| hv_backreferences_p||| hv_clear_placeholders||5.009001| hv_clear||| hv_common_key_len||5.010000| hv_common||5.010000| hv_copy_hints_hv||5.009004| hv_delayfree_ent||5.004000| hv_delete_common||| hv_delete_ent||5.004000| hv_delete||| hv_eiter_p||5.009003| hv_eiter_set||5.009003| hv_ename_add||| hv_ename_delete||| hv_exists_ent||5.004000| hv_exists||| hv_fetch_ent||5.004000| hv_fetchs|5.009003||p hv_fetch||| hv_fill||5.013002| hv_free_ent_ret||| hv_free_ent||5.004000| hv_iterinit||| hv_iterkeysv||5.004000| hv_iterkey||| hv_iternext_flags||5.008000| hv_iternextsv||| hv_iternext||| hv_iterval||| hv_kill_backrefs||| hv_ksplit||5.004000| hv_magic_check|||n hv_magic||| hv_name_set||5.009003| hv_notallowed||| hv_placeholders_get||5.009003| hv_placeholders_p||| hv_placeholders_set||5.009003| hv_rand_set||5.017011| hv_riter_p||5.009003| hv_riter_set||5.009003| hv_scalar||5.009001| hv_store_ent||5.004000| hv_store_flags||5.008000| hv_stores|5.009004||p hv_store||| hv_undef_flags||| hv_undef||| ibcmp_locale||5.004000| ibcmp_utf8||5.007003| ibcmp||| incline||| incpush_if_exists||| incpush_use_sep||| incpush||| ingroup||| init_argv_symbols||| init_constants||| init_dbargs||| init_debugger||| init_global_struct||| init_i18nl10n||5.006000| init_i18nl14n||5.006000| init_ids||| init_interp||| init_main_stash||| init_perllib||| init_postdump_symbols||| init_predump_symbols||| init_stacks||5.005000| init_tm||5.007002| inplace_aassign||| instr|||n intro_my||| intuit_method||| intuit_more||| invert||| invlist_array||| invlist_clone||| invlist_extend||| invlist_highest||| invlist_is_iterating||| invlist_iterfinish||| invlist_iterinit||| invlist_iternext||| invlist_max||| invlist_previous_index||| invlist_set_len||| invlist_set_previous_index||| invlist_trim||| invoke_exception_hook||| io_close||| isALNUMC|5.006000||p isALNUM_lazy||| isALPHANUMERIC||5.017008| isALPHA||| isASCII|5.006000|5.006000|p isBLANK|5.006001||p isCNTRL|5.006000|5.006000|p isDIGIT||| isFOO_lc||| isFOO_utf8_lc||| isGRAPH|5.006000||p isGV_with_GP|5.009004||p isIDCONT||5.017008| isIDFIRST_lazy||| isIDFIRST||| isLOWER||| isOCTAL||5.013005| isPRINT|5.004000||p isPSXSPC|5.006001||p isPUNCT|5.006000||p isSPACE||| isUPPER||| isWORDCHAR||5.013006| isXDIGIT|5.006000||p is_an_int||| is_ascii_string||5.011000|n is_cur_LC_category_utf8||| is_handle_constructor|||n is_list_assignment||| is_lvalue_sub||5.007001| is_uni_alnum_lc||5.006000| is_uni_alnumc_lc||5.017007| is_uni_alnumc||5.017007| is_uni_alnum||5.006000| is_uni_alpha_lc||5.006000| is_uni_alpha||5.006000| is_uni_ascii_lc||5.006000| is_uni_ascii||5.006000| is_uni_blank_lc||5.017002| is_uni_blank||5.017002| is_uni_cntrl_lc||5.006000| is_uni_cntrl||5.006000| is_uni_digit_lc||5.006000| is_uni_digit||5.006000| is_uni_graph_lc||5.006000| is_uni_graph||5.006000| is_uni_idfirst_lc||5.006000| is_uni_idfirst||5.006000| is_uni_lower_lc||5.006000| is_uni_lower||5.006000| is_uni_print_lc||5.006000| is_uni_print||5.006000| is_uni_punct_lc||5.006000| is_uni_punct||5.006000| is_uni_space_lc||5.006000| is_uni_space||5.006000| is_uni_upper_lc||5.006000| is_uni_upper||5.006000| is_uni_xdigit_lc||5.006000| is_uni_xdigit||5.006000| is_utf8_alnumc||5.017007| is_utf8_alnum||5.006000| is_utf8_alpha||5.006000| is_utf8_ascii||5.006000| is_utf8_blank||5.017002| is_utf8_char_buf||5.015008|n is_utf8_char_slow|||n is_utf8_char||5.006000|n is_utf8_cntrl||5.006000| is_utf8_common||| is_utf8_digit||5.006000| is_utf8_graph||5.006000| is_utf8_idcont||5.008000| is_utf8_idfirst||5.006000| is_utf8_lower||5.006000| is_utf8_mark||5.006000| is_utf8_perl_space||5.011001| is_utf8_perl_word||5.011001| is_utf8_posix_digit||5.011001| is_utf8_print||5.006000| is_utf8_punct||5.006000| is_utf8_space||5.006000| is_utf8_string_loclen||5.009003|n is_utf8_string_loc||5.008001|n is_utf8_string||5.006001|n is_utf8_upper||5.006000| is_utf8_xdigit||5.006000| is_utf8_xidcont||5.013010| is_utf8_xidfirst||5.013010| isa_lookup||| items|||n ix|||n jmaybe||| join_exact||| keyword_plugin_standard||| keyword||| leave_scope||| lex_bufutf8||5.011002| lex_discard_to||5.011002| lex_grow_linestr||5.011002| lex_next_chunk||5.011002| lex_peek_unichar||5.011002| lex_read_space||5.011002| lex_read_to||5.011002| lex_read_unichar||5.011002| lex_start||5.009005| lex_stuff_pvn||5.011002| lex_stuff_pvs||5.013005| lex_stuff_pv||5.013006| lex_stuff_sv||5.011002| lex_unstuff||5.011002| listkids||| list||| load_module_nocontext|||vn load_module|5.006000||pv localize||| looks_like_bool||| looks_like_number||| lop||| mPUSHi|5.009002||p mPUSHn|5.009002||p mPUSHp|5.009002||p mPUSHs|5.010001||p mPUSHu|5.009002||p mXPUSHi|5.009002||p mXPUSHn|5.009002||p mXPUSHp|5.009002||p mXPUSHs|5.010001||p mXPUSHu|5.009002||p mad_free||| madlex||| madparse||| magic_clear_all_env||| magic_cleararylen_p||| magic_clearenv||| magic_clearhints||| magic_clearhint||| magic_clearisa||| magic_clearpack||| magic_clearsig||| magic_copycallchecker||| magic_dump||5.006000| magic_existspack||| magic_freearylen_p||| magic_freeovrld||| magic_getarylen||| magic_getdefelem||| magic_getnkeys||| magic_getpack||| magic_getpos||| magic_getsig||| magic_getsubstr||| magic_gettaint||| magic_getuvar||| magic_getvec||| magic_get||| magic_killbackrefs||| magic_methcall1||| magic_methcall|||v magic_methpack||| magic_nextpack||| magic_regdata_cnt||| magic_regdatum_get||| magic_regdatum_set||| magic_scalarpack||| magic_set_all_env||| magic_setarylen||| magic_setcollxfrm||| magic_setdbline||| magic_setdefelem||| magic_setenv||| magic_sethint||| magic_setisa||| magic_setmglob||| magic_setnkeys||| magic_setpack||| magic_setpos||| magic_setregexp||| magic_setsig||| magic_setsubstr||| magic_settaint||| magic_setutf8||| magic_setuvar||| magic_setvec||| magic_set||| magic_sizepack||| magic_wipepack||| make_matcher||| make_trie_failtable||| make_trie||| malloc_good_size|||n malloced_size|||n malloc||5.007002|n markstack_grow||| matcher_matches_sv||| mayberelocate||| measure_struct||| memEQs|5.009005||p memEQ|5.004000||p memNEs|5.009005||p memNE|5.004000||p mem_collxfrm||| mem_log_common|||n mess_alloc||| mess_nocontext|||vn mess_sv||5.013001| mess||5.006000|v method_common||| mfree||5.007002|n mg_clear||| mg_copy||| mg_dup||| mg_find_mglob||| mg_findext||5.013008| mg_find||| mg_free_type||5.013006| mg_free||| mg_get||| mg_length||5.005000| mg_localize||| mg_magical||| mg_set||| mg_size||5.005000| mini_mktime||5.007002| minus_v||| missingterm||| mode_from_discipline||| modkids||| more_bodies||| more_sv||| moreswitches||| mro_clean_isarev||| mro_gather_and_rename||| mro_get_from_name||5.010001| mro_get_linear_isa_dfs||| mro_get_linear_isa||5.009005| mro_get_private_data||5.010001| mro_isa_changed_in||| mro_meta_dup||| mro_meta_init||| mro_method_changed_in||5.009005| mro_package_moved||| mro_register||5.010001| mro_set_mro||5.010001| mro_set_private_data||5.010001| mul128||| mulexp10|||n my_atof2||5.007002| my_atof||5.006000| my_attrs||| my_bcopy|||n my_bzero|||n my_chsize||| my_clearenv||| my_cxt_index||| my_cxt_init||| my_dirfd||5.009005| my_exit_jump||| my_exit||| my_failure_exit||5.004000| my_fflush_all||5.006000| my_fork||5.007003|n my_kid||| my_lstat_flags||| my_lstat||5.019003| my_memcmp|||n my_memset||5.004000|n my_pclose||5.004000| my_popen_list||5.007001| my_popen||5.004000| my_setenv||| my_snprintf|5.009004||pvn my_socketpair||5.007003|n my_sprintf|5.009003||pvn my_stat_flags||| my_stat||5.019003| my_strftime||5.007002| my_strlcat|5.009004||pn my_strlcpy|5.009004||pn my_unexec||| my_vsnprintf||5.009004|n need_utf8|||n newANONATTRSUB||5.006000| newANONHASH||| newANONLIST||| newANONSUB||| newASSIGNOP||| newATTRSUB_flags||| newATTRSUB||5.006000| newAVREF||| newAV||| newBINOP||| newCONDOP||| newCONSTSUB_flags||5.015006| newCONSTSUB|5.004050||p newCVREF||| newDEFSVOP||| newFORM||| newFOROP||5.013007| newGIVENOP||5.009003| newGIVWHENOP||| newGP||| newGVOP||| newGVREF||| newGVgen_flags||5.015004| newGVgen||| newHVREF||| newHVhv||5.005000| newHV||| newIO||| newLISTOP||| newLOGOP||| newLOOPEX||| newLOOPOP||| newMADPROP||| newMADsv||| newMYSUB||5.017004| newNULLLIST||| newOP||| newPADOP||| newPMOP||| newPROG||| newPVOP||| newRANGE||| newRV_inc|5.004000||p newRV_noinc|5.004000||p newRV||| newSLICEOP||| newSTATEOP||| newSTUB||| newSUB||| newSVOP||| newSVREF||| newSV_type|5.009005||p newSVhek||5.009003| newSViv||| newSVnv||| newSVpadname||5.017004| newSVpv_share||5.013006| newSVpvf_nocontext|||vn newSVpvf||5.004000|v newSVpvn_flags|5.010001||p newSVpvn_share|5.007001||p newSVpvn_utf8|5.010001||p newSVpvn|5.004050||p newSVpvs_flags|5.010001||p newSVpvs_share|5.009003||p newSVpvs|5.009003||p newSVpv||| newSVrv||| newSVsv||| newSVuv|5.006000||p newSV||| newTOKEN||| newUNOP||| newWHENOP||5.009003| newWHILEOP||5.013007| newXS_flags||5.009004| newXS_len_flags||| newXSproto||5.006000| newXS||5.006000| new_collate||5.006000| new_constant||| new_ctype||5.006000| new_he||| new_logop||| new_numeric||5.006000| new_stackinfo||5.005000| new_version||5.009000| new_warnings_bitfield||| next_symbol||| nextargv||| nextchar||| ninstr|||n no_bareword_allowed||| no_fh_allowed||| no_op||| not_a_number||| not_incrementable||| nothreadhook||5.008000| nuke_stacks||| num_overflow|||n oopsAV||| oopsHV||| op_append_elem||5.013006| op_append_list||5.013006| op_clear||| op_const_sv||| op_contextualize||5.013006| op_dump||5.006000| op_free||| op_getmad_weak||| op_getmad||| op_integerize||| op_linklist||5.013006| op_lvalue_flags||| op_lvalue||5.013007| op_null||5.007002| op_prepend_elem||5.013006| op_refcnt_dec||| op_refcnt_inc||| op_refcnt_lock||5.009002| op_refcnt_unlock||5.009002| op_scope||5.013007| op_std_init||| op_unscope||| op_xmldump||| open_script||| opslab_force_free||| opslab_free_nopad||| opslab_free||| pMY_CXT_|5.007003||p pMY_CXT|5.007003||p pTHX_|5.006000||p pTHX|5.006000||p packWARN|5.007003||p pack_cat||5.007003| pack_rec||| package_version||| package||| packlist||5.008001| pad_add_anon||5.008001| pad_add_name_pvn||5.015001| pad_add_name_pvs||5.015001| pad_add_name_pv||5.015001| pad_add_name_sv||5.015001| pad_alloc_name||| pad_alloc||| pad_block_start||| pad_check_dup||| pad_compname_type||5.009003| pad_findlex||| pad_findmy_pvn||5.015001| pad_findmy_pvs||5.015001| pad_findmy_pv||5.015001| pad_findmy_sv||5.015001| pad_fixup_inner_anons||| pad_free||| pad_leavemy||| pad_new||5.008001| pad_peg|||n pad_push||| pad_reset||| pad_setsv||| pad_sv||| pad_swipe||| pad_tidy||5.008001| padlist_dup||| padlist_store||| parse_arithexpr||5.013008| parse_barestmt||5.013007| parse_block||5.013007| parse_body||| parse_fullexpr||5.013008| parse_fullstmt||5.013005| parse_ident||| parse_label||5.013007| parse_listexpr||5.013008| parse_lparen_question_flags||| parse_stmtseq||5.013006| parse_termexpr||5.013008| parse_unicode_opts||| parser_dup||| parser_free_nexttoke_ops||| parser_free||| path_is_searchable|||n peep||| pending_ident||| perl_alloc_using|||n perl_alloc|||n perl_clone_using|||n perl_clone|||n perl_construct|||n perl_destruct||5.007003|n perl_free|||n perl_parse||5.006000|n perl_run|||n pidgone||| pm_description||| pmop_dump||5.006000| pmop_xmldump||| pmruntime||| pmtrans||| pop_scope||| populate_isa|||v pregcomp||5.009005| pregexec||| pregfree2||5.011000| pregfree||| prepend_madprops||| prescan_version||5.011004| printbuf||| printf_nocontext|||vn process_special_blocks||| ptr_hash|||n ptr_table_clear||5.009005| ptr_table_fetch||5.009005| ptr_table_find|||n ptr_table_free||5.009005| ptr_table_new||5.009005| ptr_table_split||5.009005| ptr_table_store||5.009005| push_scope||| put_byte||| put_latin1_charclass_innards||| pv_display|5.006000||p pv_escape|5.009004||p pv_pretty|5.009004||p pv_uni_display||5.007003| qerror||| qsortsvu||| re_compile||5.009005| re_croak2||| re_dup_guts||| re_intuit_start||5.019001| re_intuit_string||5.006000| re_op_compile||| readpipe_override||| realloc||5.007002|n reentrant_free||5.019003| reentrant_init||5.019003| reentrant_retry||5.019003|vn reentrant_size||5.019003| ref_array_or_hash||| refcounted_he_chain_2hv||| refcounted_he_fetch_pvn||| refcounted_he_fetch_pvs||| refcounted_he_fetch_pv||| refcounted_he_fetch_sv||| refcounted_he_free||| refcounted_he_inc||| refcounted_he_new_pvn||| refcounted_he_new_pvs||| refcounted_he_new_pv||| refcounted_he_new_sv||| refcounted_he_value||| refkids||| refto||| ref||5.019003| reg_check_named_buff_matched||| reg_named_buff_all||5.009005| reg_named_buff_exists||5.009005| reg_named_buff_fetch||5.009005| reg_named_buff_firstkey||5.009005| reg_named_buff_iter||| reg_named_buff_nextkey||5.009005| reg_named_buff_scalar||5.009005| reg_named_buff||| reg_node||| reg_numbered_buff_fetch||| reg_numbered_buff_length||| reg_numbered_buff_store||| reg_qr_package||| reg_recode||| reg_scan_name||| reg_skipcomment||| reg_temp_copy||| reganode||| regatom||| regbranch||| regclass_swash||5.009004| regclass||| regcppop||| regcppush||| regcurly||| regdump_extflags||| regdump_intflags||| regdump||5.005000| regdupe_internal||| regexec_flags||5.005000| regfree_internal||5.009005| reghop3|||n reghop4|||n reghopmaybe3|||n reginclass||| reginitcolors||5.006000| reginsert||| regmatch||| regnext||5.005000| regpatws|||n regpiece||| regpposixcc||| regprop||| regrepeat||| regtail_study||| regtail||| regtry||| reguni||| regwhite|||n reg||| repeatcpy|||n report_evil_fh||| report_redefined_cv||| report_uninit||| report_wrongway_fh||| require_pv||5.006000| require_tie_mod||| restore_magic||| rninstr|||n rpeep||| rsignal_restore||| rsignal_save||| rsignal_state||5.004000| rsignal||5.004000| run_body||| run_user_filter||| runops_debug||5.005000| runops_standard||5.005000| rv2cv_op_cv||5.013006| rvpv_dup||| rxres_free||| rxres_restore||| rxres_save||| safesyscalloc||5.006000|n safesysfree||5.006000|n safesysmalloc||5.006000|n safesysrealloc||5.006000|n same_dirent||| save_I16||5.004000| save_I32||| save_I8||5.006000| save_adelete||5.011000| save_aelem_flags||5.011000| save_aelem||5.004050| save_alloc||5.006000| save_aptr||| save_ary||| save_bool||5.008001| save_clearsv||| save_delete||| save_destructor_x||5.006000| save_destructor||5.006000| save_freeop||| save_freepv||| save_freesv||| save_generic_pvref||5.006001| save_generic_svref||5.005030| save_gp||5.004000| save_hash||| save_hdelete||5.011000| save_hek_flags|||n save_helem_flags||5.011000| save_helem||5.004050| save_hints||5.010001| save_hptr||| save_int||| save_item||| save_iv||5.005000| save_lines||| save_list||| save_long||| save_magic_flags||| save_mortalizesv||5.007001| save_nogv||| save_op||5.005000| save_padsv_and_mortalize||5.010001| save_pptr||| save_pushi32ptr||5.010001| save_pushptri32ptr||| save_pushptrptr||5.010001| save_pushptr||5.010001| save_re_context||5.006000| save_scalar_at||| save_scalar||| save_set_svflags||5.009000| save_shared_pvref||5.007003| save_sptr||| save_svref||| save_vptr||5.006000| savepvn||| savepvs||5.009003| savepv||| savesharedpvn||5.009005| savesharedpvs||5.013006| savesharedpv||5.007003| savesharedsvpv||5.013006| savestack_grow_cnt||5.008001| savestack_grow||| savesvpv||5.009002| sawparens||| scalar_mod_type|||n scalarboolean||| scalarkids||| scalarseq||| scalarvoid||| scalar||| scan_bin||5.006000| scan_commit||| scan_const||| scan_formline||| scan_heredoc||| scan_hex||| scan_ident||| scan_inputsymbol||| scan_num||5.007001| scan_oct||| scan_pat||| scan_str||| scan_subst||| scan_trans||| scan_version||5.009001| scan_vstring||5.009005| scan_word||| screaminstr||5.005000| search_const||| seed||5.008001| sequence_num||| set_context||5.006000|n set_numeric_local||5.006000| set_numeric_radix||5.006000| set_numeric_standard||5.006000| setdefout||| share_hek_flags||| share_hek||5.004000| si_dup||| sighandler|||n simplify_sort||| skipspace0||| skipspace1||| skipspace2||| skipspace_flags||| softref2xv||| sortcv_stacked||| sortcv_xsub||| sortcv||| sortsv_flags||5.009003| sortsv||5.007003| space_join_names_mortal||| ss_dup||| stack_grow||| start_force||| start_glob||| start_subparse||5.004000| stdize_locale||| strEQ||| strGE||| strGT||| strLE||| strLT||| strNE||| str_to_version||5.006000| strip_return||| strnEQ||| strnNE||| study_chunk||| sub_crush_depth||| sublex_done||| sublex_push||| sublex_start||| sv_2bool_flags||5.013006| sv_2bool||| sv_2cv||| sv_2io||| sv_2iuv_common||| sv_2iuv_non_preserve||| sv_2iv_flags||5.009001| sv_2iv||| sv_2mortal||| sv_2num||| sv_2nv_flags||5.013001| sv_2pv_flags|5.007002||p sv_2pv_nolen|5.006000||p sv_2pvbyte_nolen|5.006000||p sv_2pvbyte|5.006000||p sv_2pvutf8_nolen||5.006000| sv_2pvutf8||5.006000| sv_2pv||| sv_2uv_flags||5.009001| sv_2uv|5.004000||p sv_add_arena||| sv_add_backref||| sv_backoff||| sv_bless||| sv_cat_decode||5.008001| sv_catpv_flags||5.013006| sv_catpv_mg|5.004050||p sv_catpv_nomg||5.013006| sv_catpvf_mg_nocontext|||pvn sv_catpvf_mg|5.006000|5.004000|pv sv_catpvf_nocontext|||vn sv_catpvf||5.004000|v sv_catpvn_flags||5.007002| sv_catpvn_mg|5.004050||p sv_catpvn_nomg|5.007002||p sv_catpvn||| sv_catpvs_flags||5.013006| sv_catpvs_mg||5.013006| sv_catpvs_nomg||5.013006| sv_catpvs|5.009003||p sv_catpv||| sv_catsv_flags||5.007002| sv_catsv_mg|5.004050||p sv_catsv_nomg|5.007002||p sv_catsv||| sv_catxmlpvn||| sv_catxmlpv||| sv_catxmlsv||| sv_chop||| sv_clean_all||| sv_clean_objs||| sv_clear||| sv_cmp_flags||5.013006| sv_cmp_locale_flags||5.013006| sv_cmp_locale||5.004000| sv_cmp||| sv_collxfrm_flags||5.013006| sv_collxfrm||| sv_copypv_flags||5.017002| sv_copypv_nomg||5.017002| sv_copypv||| sv_dec_nomg||5.013002| sv_dec||| sv_del_backref||| sv_derived_from_pvn||5.015004| sv_derived_from_pv||5.015004| sv_derived_from_sv||5.015004| sv_derived_from||5.004000| sv_destroyable||5.010000| sv_display||| sv_does_pvn||5.015004| sv_does_pv||5.015004| sv_does_sv||5.015004| sv_does||5.009004| sv_dump||| sv_dup_common||| sv_dup_inc_multiple||| sv_dup_inc||| sv_dup||| sv_eq_flags||5.013006| sv_eq||| sv_exp_grow||| sv_force_normal_flags||5.007001| sv_force_normal||5.006000| sv_free2||| sv_free_arenas||| sv_free||| sv_gets||5.004000| sv_grow||| sv_i_ncmp||| sv_inc_nomg||5.013002| sv_inc||| sv_insert_flags||5.010001| sv_insert||| sv_isa||| sv_isobject||| sv_iv||5.005000| sv_kill_backrefs||| sv_len_utf8_nomg||| sv_len_utf8||5.006000| sv_len||| sv_magic_portable|5.019003|5.004000|p sv_magicext_mglob||| sv_magicext||5.007003| sv_magic||| sv_mortalcopy_flags||| sv_mortalcopy||| sv_ncmp||| sv_newmortal||| sv_newref||| sv_nolocking||5.007003| sv_nosharing||5.007003| sv_nounlocking||| sv_nv||5.005000| sv_peek||5.005000| sv_pos_b2u_flags||5.019003| sv_pos_b2u_midway||| sv_pos_b2u||5.006000| sv_pos_u2b_cached||| sv_pos_u2b_flags||5.011005| sv_pos_u2b_forwards|||n sv_pos_u2b_midway|||n sv_pos_u2b||5.006000| sv_pvbyten_force||5.006000| sv_pvbyten||5.006000| sv_pvbyte||5.006000| sv_pvn_force_flags|5.007002||p sv_pvn_force||| sv_pvn_nomg|5.007003|5.005000|p sv_pvn||5.005000| sv_pvutf8n_force||5.006000| sv_pvutf8n||5.006000| sv_pvutf8||5.006000| sv_pv||5.006000| sv_recode_to_utf8||5.007003| sv_reftype||| sv_ref||| sv_release_COW||| sv_replace||| sv_report_used||| sv_resetpvn||| sv_reset||| sv_rvweaken||5.006000| sv_sethek||| sv_setiv_mg|5.004050||p sv_setiv||| sv_setnv_mg|5.006000||p sv_setnv||| sv_setpv_mg|5.004050||p sv_setpvf_mg_nocontext|||pvn sv_setpvf_mg|5.006000|5.004000|pv sv_setpvf_nocontext|||vn sv_setpvf||5.004000|v sv_setpviv_mg||5.008001| sv_setpviv||5.008001| sv_setpvn_mg|5.004050||p sv_setpvn||| sv_setpvs_mg||5.013006| sv_setpvs|5.009004||p sv_setpv||| sv_setref_iv||| sv_setref_nv||| sv_setref_pvn||| sv_setref_pvs||5.019003| sv_setref_pv||| sv_setref_uv||5.007001| sv_setsv_cow||| sv_setsv_flags||5.007002| sv_setsv_mg|5.004050||p sv_setsv_nomg|5.007002||p sv_setsv||| sv_setuv_mg|5.004050||p sv_setuv|5.004000||p sv_tainted||5.004000| sv_taint||5.004000| sv_true||5.005000| sv_unglob||| sv_uni_display||5.007003| sv_unmagicext||5.013008| sv_unmagic||| sv_unref_flags||5.007001| sv_unref||| sv_untaint||5.004000| sv_upgrade||| sv_usepvn_flags||5.009004| sv_usepvn_mg|5.004050||p sv_usepvn||| sv_utf8_decode||5.006000| sv_utf8_downgrade||5.006000| sv_utf8_encode||5.006000| sv_utf8_upgrade_flags_grow||5.011000| sv_utf8_upgrade_flags||5.007002| sv_utf8_upgrade_nomg||5.007002| sv_utf8_upgrade||5.007001| sv_uv|5.005000||p sv_vcatpvf_mg|5.006000|5.004000|p sv_vcatpvfn_flags||5.017002| sv_vcatpvfn||5.004000| sv_vcatpvf|5.006000|5.004000|p sv_vsetpvf_mg|5.006000|5.004000|p sv_vsetpvfn||5.004000| sv_vsetpvf|5.006000|5.004000|p sv_xmlpeek||| svtype||| swallow_bom||| swash_fetch||5.007002| swash_init||5.006000| swatch_get||| sys_init3||5.010000|n sys_init||5.010000|n sys_intern_clear||| sys_intern_dup||| sys_intern_init||| sys_term||5.010000|n taint_env||| taint_proper||| tied_method|||v tmps_grow||5.006000| toFOLD_uni||5.007003| toFOLD_utf8||5.019001| toFOLD||5.019001| toLOWER_L1||5.019001| toLOWER_LC||5.004000| toLOWER_uni||5.007003| toLOWER_utf8||5.015007| toLOWER||| toTITLE_uni||5.007003| toTITLE_utf8||5.015007| toTITLE||5.019001| toUPPER_uni||5.007003| toUPPER_utf8||5.015007| toUPPER||5.004000| to_byte_substr||| to_lower_latin1||| to_uni_fold||5.007003| to_uni_lower_lc||5.006000| to_uni_lower||5.007003| to_uni_title_lc||5.006000| to_uni_title||5.007003| to_uni_upper_lc||5.006000| to_uni_upper||5.007003| to_utf8_case||5.007003| to_utf8_fold||5.015007| to_utf8_lower||5.015007| to_utf8_substr||| to_utf8_title||5.015007| to_utf8_upper||5.015007| token_free||| token_getmad||| tokenize_use||| tokeq||| tokereport||| too_few_arguments_pv||| too_few_arguments_sv||| too_many_arguments_pv||| too_many_arguments_sv||| translate_substr_offsets||| try_amagic_bin||| try_amagic_un||| uiv_2buf|||n unlnk||| unpack_rec||| unpack_str||5.007003| unpackstring||5.008001| unreferenced_to_tmp_stack||| unshare_hek_or_pvn||| unshare_hek||| unsharepvn||5.004000| unwind_handler_stack||| update_debugger_info||| upg_version||5.009005| usage||| utf16_textfilter||| utf16_to_utf8_reversed||5.006001| utf16_to_utf8||5.006001| utf8_distance||5.006000| utf8_hop||5.006000| utf8_length||5.007001| utf8_mg_len_cache_update||| utf8_mg_pos_cache_update||| utf8_to_bytes||5.006001| utf8_to_uvchr_buf||5.015009| utf8_to_uvchr||5.007001| utf8_to_uvuni_buf||5.015009| utf8_to_uvuni||5.007001| utf8n_to_uvchr||| utf8n_to_uvuni||5.007001| utilize||| uvchr_to_utf8_flags||5.007003| uvchr_to_utf8||| uvuni_to_utf8_flags||5.007003| uvuni_to_utf8||5.007001| valid_utf8_to_uvchr||| valid_utf8_to_uvuni||5.015009| validate_proto||| validate_suid||| varname||| vcmp||5.009000| vcroak||5.006000| vdeb||5.007003| vform||5.006000| visit||| vivify_defelem||| vivify_ref||| vload_module|5.006000||p vmess||5.006000| vnewSVpvf|5.006000|5.004000|p vnormal||5.009002| vnumify||5.009000| vstringify||5.009000| vverify||5.009003| vwarner||5.006000| vwarn||5.006000| wait4pid||| warn_nocontext|||vn warn_sv||5.013001| warner_nocontext|||vn warner|5.006000|5.004000|pv warn|||v was_lvalue_sub||| watch||| whichsig_pvn||5.015004| whichsig_pv||5.015004| whichsig_sv||5.015004| whichsig||| win32_croak_not_implemented|||n with_queued_errors||| wrap_op_checker||5.015008| write_to_stderr||| xmldump_all_perl||| xmldump_all||| xmldump_attr||| xmldump_eval||| xmldump_form||| xmldump_indent|||v xmldump_packsubs_perl||| xmldump_packsubs||| xmldump_sub_perl||| xmldump_sub||| xmldump_vindent||| xs_apiversion_bootcheck||| xs_version_bootcheck||| yyerror_pvn||| yyerror_pv||| yyerror||| yylex||| yyparse||| yyunlex||| yywarn||| ); if (exists $opt{'list-unsupported'}) { my $f; for $f (sort { lc $a cmp lc $b } keys %API) { next unless $API{$f}{todo}; print "$f ", '.'x(40-length($f)), " ", format_version($API{$f}{todo}), "\n"; } exit 0; } # Scan for possible replacement candidates my(%replace, %need, %hints, %warnings, %depends); my $replace = 0; my($hint, $define, $function); sub find_api { my $code = shift; $code =~ s{ / (?: \*[^*]*\*+(?:[^$ccs][^*]*\*+)* / | /[^\r\n]*) | "[^"\\]*(?:\\.[^"\\]*)*" | '[^'\\]*(?:\\.[^'\\]*)*' }{}egsx; grep { exists $API{$_} } $code =~ /(\w+)/mg; } while () { if ($hint) { my $h = $hint->[0] eq 'Hint' ? \%hints : \%warnings; if (m{^\s*\*\s(.*?)\s*$}) { for (@{$hint->[1]}) { $h->{$_} ||= ''; # suppress warning with older perls $h->{$_} .= "$1\n"; } } else { undef $hint } } $hint = [$1, [split /,?\s+/, $2]] if m{^\s*$rccs\s+(Hint|Warning):\s+(\w+(?:,?\s+\w+)*)\s*$}; if ($define) { if ($define->[1] =~ /\\$/) { $define->[1] .= $_; } else { if (exists $API{$define->[0]} && $define->[1] !~ /^DPPP_\(/) { my @n = find_api($define->[1]); push @{$depends{$define->[0]}}, @n if @n } undef $define; } } $define = [$1, $2] if m{^\s*#\s*define\s+(\w+)(?:\([^)]*\))?\s+(.*)}; if ($function) { if (/^}/) { if (exists $API{$function->[0]}) { my @n = find_api($function->[1]); push @{$depends{$function->[0]}}, @n if @n } undef $function; } else { $function->[1] .= $_; } } $function = [$1, ''] if m{^DPPP_\(my_(\w+)\)}; $replace = $1 if m{^\s*$rccs\s+Replace:\s+(\d+)\s+$rcce\s*$}; $replace{$2} = $1 if $replace and m{^\s*#\s*define\s+(\w+)(?:\([^)]*\))?\s+(\w+)}; $replace{$2} = $1 if m{^\s*#\s*define\s+(\w+)(?:\([^)]*\))?\s+(\w+).*$rccs\s+Replace\s+$rcce}; $replace{$1} = $2 if m{^\s*$rccs\s+Replace (\w+) with (\w+)\s+$rcce\s*$}; if (m{^\s*$rccs\s+(\w+(\s*,\s*\w+)*)\s+depends\s+on\s+(\w+(\s*,\s*\w+)*)\s+$rcce\s*$}) { my @deps = map { s/\s+//g; $_ } split /,/, $3; my $d; for $d (map { s/\s+//g; $_ } split /,/, $1) { push @{$depends{$d}}, @deps; } } $need{$1} = 1 if m{^#if\s+defined\(NEED_(\w+)(?:_GLOBAL)?\)}; } for (values %depends) { my %s; $_ = [sort grep !$s{$_}++, @$_]; } if (exists $opt{'api-info'}) { my $f; my $count = 0; my $match = $opt{'api-info'} =~ m!^/(.*)/$! ? $1 : "^\Q$opt{'api-info'}\E\$"; for $f (sort { lc $a cmp lc $b } keys %API) { next unless $f =~ /$match/; print "\n=== $f ===\n\n"; my $info = 0; if ($API{$f}{base} || $API{$f}{todo}) { my $base = format_version($API{$f}{base} || $API{$f}{todo}); print "Supported at least starting from perl-$base.\n"; $info++; } if ($API{$f}{provided}) { my $todo = $API{$f}{todo} ? format_version($API{$f}{todo}) : "5.003"; print "Support by $ppport provided back to perl-$todo.\n"; print "Support needs to be explicitly requested by NEED_$f.\n" if exists $need{$f}; print "Depends on: ", join(', ', @{$depends{$f}}), ".\n" if exists $depends{$f}; print "\n$hints{$f}" if exists $hints{$f}; print "\nWARNING:\n$warnings{$f}" if exists $warnings{$f}; $info++; } print "No portability information available.\n" unless $info; $count++; } $count or print "Found no API matching '$opt{'api-info'}'."; print "\n"; exit 0; } if (exists $opt{'list-provided'}) { my $f; for $f (sort { lc $a cmp lc $b } keys %API) { next unless $API{$f}{provided}; my @flags; push @flags, 'explicit' if exists $need{$f}; push @flags, 'depend' if exists $depends{$f}; push @flags, 'hint' if exists $hints{$f}; push @flags, 'warning' if exists $warnings{$f}; my $flags = @flags ? ' ['.join(', ', @flags).']' : ''; print "$f$flags\n"; } exit 0; } my @files; my @srcext = qw( .xs .c .h .cc .cpp -c.inc -xs.inc ); my $srcext = join '|', map { quotemeta $_ } @srcext; if (@ARGV) { my %seen; for (@ARGV) { if (-e) { if (-f) { push @files, $_ unless $seen{$_}++; } else { warn "'$_' is not a file.\n" } } else { my @new = grep { -f } glob $_ or warn "'$_' does not exist.\n"; push @files, grep { !$seen{$_}++ } @new; } } } else { eval { require File::Find; File::Find::find(sub { $File::Find::name =~ /($srcext)$/i and push @files, $File::Find::name; }, '.'); }; if ($@) { @files = map { glob "*$_" } @srcext; } } if (!@ARGV || $opt{filter}) { my(@in, @out); my %xsc = map { /(.*)\.xs$/ ? ("$1.c" => 1, "$1.cc" => 1) : () } @files; for (@files) { my $out = exists $xsc{$_} || /\b\Q$ppport\E$/i || !/($srcext)$/i; push @{ $out ? \@out : \@in }, $_; } if (@ARGV && @out) { warning("Skipping the following files (use --nofilter to avoid this):\n| ", join "\n| ", @out); } @files = @in; } die "No input files given!\n" unless @files; my(%files, %global, %revreplace); %revreplace = reverse %replace; my $filename; my $patch_opened = 0; for $filename (@files) { unless (open IN, "<$filename") { warn "Unable to read from $filename: $!\n"; next; } info("Scanning $filename ..."); my $c = do { local $/; }; close IN; my %file = (orig => $c, changes => 0); # Temporarily remove C/XS comments and strings from the code my @ccom; $c =~ s{ ( ^$HS*\#$HS*include\b[^\r\n]+\b(?:\Q$ppport\E|XSUB\.h)\b[^\r\n]* | ^$HS*\#$HS*(?:define|elif|if(?:def)?)\b[^\r\n]* ) | ( ^$HS*\#[^\r\n]* | "[^"\\]*(?:\\.[^"\\]*)*" | '[^'\\]*(?:\\.[^'\\]*)*' | / (?: \*[^*]*\*+(?:[^$ccs][^*]*\*+)* / | /[^\r\n]* ) ) }{ defined $2 and push @ccom, $2; defined $1 ? $1 : "$ccs$#ccom$cce" }mgsex; $file{ccom} = \@ccom; $file{code} = $c; $file{has_inc_ppport} = $c =~ /^$HS*#$HS*include[^\r\n]+\b\Q$ppport\E\b/m; my $func; for $func (keys %API) { my $match = $func; $match .= "|$revreplace{$func}" if exists $revreplace{$func}; if ($c =~ /\b(?:Perl_)?($match)\b/) { $file{uses_replace}{$1}++ if exists $revreplace{$func} && $1 eq $revreplace{$func}; $file{uses_Perl}{$func}++ if $c =~ /\bPerl_$func\b/; if (exists $API{$func}{provided}) { $file{uses_provided}{$func}++; if (!exists $API{$func}{base} || $API{$func}{base} > $opt{'compat-version'}) { $file{uses}{$func}++; my @deps = rec_depend($func); if (@deps) { $file{uses_deps}{$func} = \@deps; for (@deps) { $file{uses}{$_} = 0 unless exists $file{uses}{$_}; } } for ($func, @deps) { $file{needs}{$_} = 'static' if exists $need{$_}; } } } if (exists $API{$func}{todo} && $API{$func}{todo} > $opt{'compat-version'}) { if ($c =~ /\b$func\b/) { $file{uses_todo}{$func}++; } } } } while ($c =~ /^$HS*#$HS*define$HS+(NEED_(\w+?)(_GLOBAL)?)\b/mg) { if (exists $need{$2}) { $file{defined $3 ? 'needed_global' : 'needed_static'}{$2}++; } else { warning("Possibly wrong #define $1 in $filename") } } for (qw(uses needs uses_todo needed_global needed_static)) { for $func (keys %{$file{$_}}) { push @{$global{$_}{$func}}, $filename; } } $files{$filename} = \%file; } # Globally resolve NEED_'s my $need; for $need (keys %{$global{needs}}) { if (@{$global{needs}{$need}} > 1) { my @targets = @{$global{needs}{$need}}; my @t = grep $files{$_}{needed_global}{$need}, @targets; @targets = @t if @t; @t = grep /\.xs$/i, @targets; @targets = @t if @t; my $target = shift @targets; $files{$target}{needs}{$need} = 'global'; for (@{$global{needs}{$need}}) { $files{$_}{needs}{$need} = 'extern' if $_ ne $target; } } } for $filename (@files) { exists $files{$filename} or next; info("=== Analyzing $filename ==="); my %file = %{$files{$filename}}; my $func; my $c = $file{code}; my $warnings = 0; for $func (sort keys %{$file{uses_Perl}}) { if ($API{$func}{varargs}) { unless ($API{$func}{nothxarg}) { my $changes = ($c =~ s{\b(Perl_$func\s*\(\s*)(?!aTHX_?)(\)|[^\s)]*\))} { $1 . ($2 eq ')' ? 'aTHX' : 'aTHX_ ') . $2 }ge); if ($changes) { warning("Doesn't pass interpreter argument aTHX to Perl_$func"); $file{changes} += $changes; } } } else { warning("Uses Perl_$func instead of $func"); $file{changes} += ($c =~ s{\bPerl_$func(\s*)\((\s*aTHX_?)?\s*} {$func$1(}g); } } for $func (sort keys %{$file{uses_replace}}) { warning("Uses $func instead of $replace{$func}"); $file{changes} += ($c =~ s/\b$func\b/$replace{$func}/g); } for $func (sort keys %{$file{uses_provided}}) { if ($file{uses}{$func}) { if (exists $file{uses_deps}{$func}) { diag("Uses $func, which depends on ", join(', ', @{$file{uses_deps}{$func}})); } else { diag("Uses $func"); } } $warnings += hint($func); } unless ($opt{quiet}) { for $func (sort keys %{$file{uses_todo}}) { print "*** WARNING: Uses $func, which may not be portable below perl ", format_version($API{$func}{todo}), ", even with '$ppport'\n"; $warnings++; } } for $func (sort keys %{$file{needed_static}}) { my $message = ''; if (not exists $file{uses}{$func}) { $message = "No need to define NEED_$func if $func is never used"; } elsif (exists $file{needs}{$func} && $file{needs}{$func} ne 'static') { $message = "No need to define NEED_$func when already needed globally"; } if ($message) { diag($message); $file{changes} += ($c =~ s/^$HS*#$HS*define$HS+NEED_$func\b.*$LF//mg); } } for $func (sort keys %{$file{needed_global}}) { my $message = ''; if (not exists $global{uses}{$func}) { $message = "No need to define NEED_${func}_GLOBAL if $func is never used"; } elsif (exists $file{needs}{$func}) { if ($file{needs}{$func} eq 'extern') { $message = "No need to define NEED_${func}_GLOBAL when already needed globally"; } elsif ($file{needs}{$func} eq 'static') { $message = "No need to define NEED_${func}_GLOBAL when only used in this file"; } } if ($message) { diag($message); $file{changes} += ($c =~ s/^$HS*#$HS*define$HS+NEED_${func}_GLOBAL\b.*$LF//mg); } } $file{needs_inc_ppport} = keys %{$file{uses}}; if ($file{needs_inc_ppport}) { my $pp = ''; for $func (sort keys %{$file{needs}}) { my $type = $file{needs}{$func}; next if $type eq 'extern'; my $suffix = $type eq 'global' ? '_GLOBAL' : ''; unless (exists $file{"needed_$type"}{$func}) { if ($type eq 'global') { diag("Files [@{$global{needs}{$func}}] need $func, adding global request"); } else { diag("File needs $func, adding static request"); } $pp .= "#define NEED_$func$suffix\n"; } } if ($pp && ($c =~ s/^(?=$HS*#$HS*define$HS+NEED_\w+)/$pp/m)) { $pp = ''; $file{changes}++; } unless ($file{has_inc_ppport}) { diag("Needs to include '$ppport'"); $pp .= qq(#include "$ppport"\n) } if ($pp) { $file{changes} += ($c =~ s/^($HS*#$HS*define$HS+NEED_\w+.*?)^/$1$pp/ms) || ($c =~ s/^(?=$HS*#$HS*include.*\Q$ppport\E)/$pp/m) || ($c =~ s/^($HS*#$HS*include.*XSUB.*\s*?)^/$1$pp/m) || ($c =~ s/^/$pp/); } } else { if ($file{has_inc_ppport}) { diag("No need to include '$ppport'"); $file{changes} += ($c =~ s/^$HS*?#$HS*include.*\Q$ppport\E.*?$LF//m); } } # put back in our C comments my $ix; my $cppc = 0; my @ccom = @{$file{ccom}}; for $ix (0 .. $#ccom) { if (!$opt{cplusplus} && $ccom[$ix] =~ s!^//!!) { $cppc++; $file{changes} += $c =~ s/$rccs$ix$rcce/$ccs$ccom[$ix] $cce/; } else { $c =~ s/$rccs$ix$rcce/$ccom[$ix]/; } } if ($cppc) { my $s = $cppc != 1 ? 's' : ''; warning("Uses $cppc C++ style comment$s, which is not portable"); } my $s = $warnings != 1 ? 's' : ''; my $warn = $warnings ? " ($warnings warning$s)" : ''; info("Analysis completed$warn"); if ($file{changes}) { if (exists $opt{copy}) { my $newfile = "$filename$opt{copy}"; if (-e $newfile) { error("'$newfile' already exists, refusing to write copy of '$filename'"); } else { local *F; if (open F, ">$newfile") { info("Writing copy of '$filename' with changes to '$newfile'"); print F $c; close F; } else { error("Cannot open '$newfile' for writing: $!"); } } } elsif (exists $opt{patch} || $opt{changes}) { if (exists $opt{patch}) { unless ($patch_opened) { if (open PATCH, ">$opt{patch}") { $patch_opened = 1; } else { error("Cannot open '$opt{patch}' for writing: $!"); delete $opt{patch}; $opt{changes} = 1; goto fallback; } } mydiff(\*PATCH, $filename, $c); } else { fallback: info("Suggested changes:"); mydiff(\*STDOUT, $filename, $c); } } else { my $s = $file{changes} == 1 ? '' : 's'; info("$file{changes} potentially required change$s detected"); } } else { info("Looks good"); } } close PATCH if $patch_opened; exit 0; sub try_use { eval "use @_;"; return $@ eq '' } sub mydiff { local *F = shift; my($file, $str) = @_; my $diff; if (exists $opt{diff}) { $diff = run_diff($opt{diff}, $file, $str); } if (!defined $diff and try_use('Text::Diff')) { $diff = Text::Diff::diff($file, \$str, { STYLE => 'Unified' }); $diff = <
$tmp") { print F $str; close F; if (open F, "$prog $file $tmp |") { while () { s/\Q$tmp\E/$file.patched/; $diff .= $_; } close F; unlink $tmp; return $diff; } unlink $tmp; } else { error("Cannot open '$tmp' for writing: $!"); } return undef; } sub rec_depend { my($func, $seen) = @_; return () unless exists $depends{$func}; $seen = {%{$seen||{}}}; return () if $seen->{$func}++; my %s; grep !$s{$_}++, map { ($_, rec_depend($_, $seen)) } @{$depends{$func}}; } sub parse_version { my $ver = shift; if ($ver =~ /^(\d+)\.(\d+)\.(\d+)$/) { return ($1, $2, $3); } elsif ($ver !~ /^\d+\.[\d_]+$/) { die "cannot parse version '$ver'\n"; } $ver =~ s/_//g; $ver =~ s/$/000000/; my($r,$v,$s) = $ver =~ /(\d+)\.(\d{3})(\d{3})/; $v = int $v; $s = int $s; if ($r < 5 || ($r == 5 && $v < 6)) { if ($s % 10) { die "cannot parse version '$ver'\n"; } } return ($r, $v, $s); } sub format_version { my $ver = shift; $ver =~ s/$/000000/; my($r,$v,$s) = $ver =~ /(\d+)\.(\d{3})(\d{3})/; $v = int $v; $s = int $s; if ($r < 5 || ($r == 5 && $v < 6)) { if ($s % 10) { die "invalid version '$ver'\n"; } $s /= 10; $ver = sprintf "%d.%03d", $r, $v; $s > 0 and $ver .= sprintf "_%02d", $s; return $ver; } return sprintf "%d.%d.%d", $r, $v, $s; } sub info { $opt{quiet} and return; print @_, "\n"; } sub diag { $opt{quiet} and return; $opt{diag} and print @_, "\n"; } sub warning { $opt{quiet} and return; print "*** ", @_, "\n"; } sub error { print "*** ERROR: ", @_, "\n"; } my %given_hints; my %given_warnings; sub hint { $opt{quiet} and return; my $func = shift; my $rv = 0; if (exists $warnings{$func} && !$given_warnings{$func}++) { my $warn = $warnings{$func}; $warn =~ s!^!*** !mg; print "*** WARNING: $func\n", $warn; $rv++; } if ($opt{hints} && exists $hints{$func} && !$given_hints{$func}++) { my $hint = $hints{$func}; $hint =~ s/^/ /mg; print " --- hint for $func ---\n", $hint; } $rv; } sub usage { my($usage) = do { local(@ARGV,$/)=($0); <> } =~ /^=head\d$HS+SYNOPSIS\s*^(.*?)\s*^=/ms; my %M = ( 'I' => '*' ); $usage =~ s/^\s*perl\s+\S+/$^X $0/; $usage =~ s/([A-Z])<([^>]+)>/$M{$1}$2$M{$1}/g; print < }; my($copy) = $self =~ /^=head\d\s+COPYRIGHT\s*^(.*?)^=\w+/ms; $copy =~ s/^(?=\S+)/ /gms; $self =~ s/^$HS+Do NOT edit.*?(?=^-)/$copy/ms; $self =~ s/^SKIP.*(?=^__DATA__)/SKIP if (\@ARGV && \$ARGV[0] eq '--unstrip') { eval { require Devel::PPPort }; \$@ and die "Cannot require Devel::PPPort, please install.\\n"; if (eval \$Devel::PPPort::VERSION < $VERSION) { die "$0 was originally generated with Devel::PPPort $VERSION.\\n" . "Your Devel::PPPort is only version \$Devel::PPPort::VERSION.\\n" . "Please install a newer version, or --unstrip will not work.\\n"; } Devel::PPPort::WriteFile(\$0); exit 0; } print <$0" or die "cannot strip $0: $!\n"; print OUT "$pl$c\n"; exit 0; } __DATA__ */ #ifndef _P_P_PORTABILITY_H_ #define _P_P_PORTABILITY_H_ #ifndef DPPP_NAMESPACE # define DPPP_NAMESPACE DPPP_ #endif #define DPPP_CAT2(x,y) CAT2(x,y) #define DPPP_(name) DPPP_CAT2(DPPP_NAMESPACE, name) #ifndef PERL_REVISION # if !defined(__PATCHLEVEL_H_INCLUDED__) && !(defined(PATCHLEVEL) && defined(SUBVERSION)) # define PERL_PATCHLEVEL_H_IMPLICIT # include # endif # if !(defined(PERL_VERSION) || (defined(SUBVERSION) && defined(PATCHLEVEL))) # include # endif # ifndef PERL_REVISION # define PERL_REVISION (5) /* Replace: 1 */ # define PERL_VERSION PATCHLEVEL # define PERL_SUBVERSION SUBVERSION /* Replace PERL_PATCHLEVEL with PERL_VERSION */ /* Replace: 0 */ # endif #endif #define _dpppDEC2BCD(dec) ((((dec)/100)<<8)|((((dec)%100)/10)<<4)|((dec)%10)) #define PERL_BCDVERSION ((_dpppDEC2BCD(PERL_REVISION)<<24)|(_dpppDEC2BCD(PERL_VERSION)<<12)|_dpppDEC2BCD(PERL_SUBVERSION)) /* It is very unlikely that anyone will try to use this with Perl 6 (or greater), but who knows. */ #if PERL_REVISION != 5 # error ppport.h only works with Perl version 5 #endif /* PERL_REVISION != 5 */ #ifndef dTHR # define dTHR dNOOP #endif #ifndef dTHX # define dTHX dNOOP #endif #ifndef dTHXa # define dTHXa(x) dNOOP #endif #ifndef pTHX # define pTHX void #endif #ifndef pTHX_ # define pTHX_ #endif #ifndef aTHX # define aTHX #endif #ifndef aTHX_ # define aTHX_ #endif #if (PERL_BCDVERSION < 0x5006000) # ifdef USE_THREADS # define aTHXR thr # define aTHXR_ thr, # else # define aTHXR # define aTHXR_ # endif # define dTHXR dTHR #else # define aTHXR aTHX # define aTHXR_ aTHX_ # define dTHXR dTHX #endif #ifndef dTHXoa # define dTHXoa(x) dTHXa(x) #endif #ifdef I_LIMITS # include #endif #ifndef PERL_UCHAR_MIN # define PERL_UCHAR_MIN ((unsigned char)0) #endif #ifndef PERL_UCHAR_MAX # ifdef UCHAR_MAX # define PERL_UCHAR_MAX ((unsigned char)UCHAR_MAX) # else # ifdef MAXUCHAR # define PERL_UCHAR_MAX ((unsigned char)MAXUCHAR) # else # define PERL_UCHAR_MAX ((unsigned char)~(unsigned)0) # endif # endif #endif #ifndef PERL_USHORT_MIN # define PERL_USHORT_MIN ((unsigned short)0) #endif #ifndef PERL_USHORT_MAX # ifdef USHORT_MAX # define PERL_USHORT_MAX ((unsigned short)USHORT_MAX) # else # ifdef MAXUSHORT # define PERL_USHORT_MAX ((unsigned short)MAXUSHORT) # else # ifdef USHRT_MAX # define PERL_USHORT_MAX ((unsigned short)USHRT_MAX) # else # define PERL_USHORT_MAX ((unsigned short)~(unsigned)0) # endif # endif # endif #endif #ifndef PERL_SHORT_MAX # ifdef SHORT_MAX # define PERL_SHORT_MAX ((short)SHORT_MAX) # else # ifdef MAXSHORT /* Often used in */ # define PERL_SHORT_MAX ((short)MAXSHORT) # else # ifdef SHRT_MAX # define PERL_SHORT_MAX ((short)SHRT_MAX) # else # define PERL_SHORT_MAX ((short) (PERL_USHORT_MAX >> 1)) # endif # endif # endif #endif #ifndef PERL_SHORT_MIN # ifdef SHORT_MIN # define PERL_SHORT_MIN ((short)SHORT_MIN) # else # ifdef MINSHORT # define PERL_SHORT_MIN ((short)MINSHORT) # else # ifdef SHRT_MIN # define PERL_SHORT_MIN ((short)SHRT_MIN) # else # define PERL_SHORT_MIN (-PERL_SHORT_MAX - ((3 & -1) == 3)) # endif # endif # endif #endif #ifndef PERL_UINT_MAX # ifdef UINT_MAX # define PERL_UINT_MAX ((unsigned int)UINT_MAX) # else # ifdef MAXUINT # define PERL_UINT_MAX ((unsigned int)MAXUINT) # else # define PERL_UINT_MAX (~(unsigned int)0) # endif # endif #endif #ifndef PERL_UINT_MIN # define PERL_UINT_MIN ((unsigned int)0) #endif #ifndef PERL_INT_MAX # ifdef INT_MAX # define PERL_INT_MAX ((int)INT_MAX) # else # ifdef MAXINT /* Often used in */ # define PERL_INT_MAX ((int)MAXINT) # else # define PERL_INT_MAX ((int)(PERL_UINT_MAX >> 1)) # endif # endif #endif #ifndef PERL_INT_MIN # ifdef INT_MIN # define PERL_INT_MIN ((int)INT_MIN) # else # ifdef MININT # define PERL_INT_MIN ((int)MININT) # else # define PERL_INT_MIN (-PERL_INT_MAX - ((3 & -1) == 3)) # endif # endif #endif #ifndef PERL_ULONG_MAX # ifdef ULONG_MAX # define PERL_ULONG_MAX ((unsigned long)ULONG_MAX) # else # ifdef MAXULONG # define PERL_ULONG_MAX ((unsigned long)MAXULONG) # else # define PERL_ULONG_MAX (~(unsigned long)0) # endif # endif #endif #ifndef PERL_ULONG_MIN # define PERL_ULONG_MIN ((unsigned long)0L) #endif #ifndef PERL_LONG_MAX # ifdef LONG_MAX # define PERL_LONG_MAX ((long)LONG_MAX) # else # ifdef MAXLONG # define PERL_LONG_MAX ((long)MAXLONG) # else # define PERL_LONG_MAX ((long) (PERL_ULONG_MAX >> 1)) # endif # endif #endif #ifndef PERL_LONG_MIN # ifdef LONG_MIN # define PERL_LONG_MIN ((long)LONG_MIN) # else # ifdef MINLONG # define PERL_LONG_MIN ((long)MINLONG) # else # define PERL_LONG_MIN (-PERL_LONG_MAX - ((3 & -1) == 3)) # endif # endif #endif #if defined(HAS_QUAD) && (defined(convex) || defined(uts)) # ifndef PERL_UQUAD_MAX # ifdef ULONGLONG_MAX # define PERL_UQUAD_MAX ((unsigned long long)ULONGLONG_MAX) # else # ifdef MAXULONGLONG # define PERL_UQUAD_MAX ((unsigned long long)MAXULONGLONG) # else # define PERL_UQUAD_MAX (~(unsigned long long)0) # endif # endif # endif # ifndef PERL_UQUAD_MIN # define PERL_UQUAD_MIN ((unsigned long long)0L) # endif # ifndef PERL_QUAD_MAX # ifdef LONGLONG_MAX # define PERL_QUAD_MAX ((long long)LONGLONG_MAX) # else # ifdef MAXLONGLONG # define PERL_QUAD_MAX ((long long)MAXLONGLONG) # else # define PERL_QUAD_MAX ((long long) (PERL_UQUAD_MAX >> 1)) # endif # endif # endif # ifndef PERL_QUAD_MIN # ifdef LONGLONG_MIN # define PERL_QUAD_MIN ((long long)LONGLONG_MIN) # else # ifdef MINLONGLONG # define PERL_QUAD_MIN ((long long)MINLONGLONG) # else # define PERL_QUAD_MIN (-PERL_QUAD_MAX - ((3 & -1) == 3)) # endif # endif # endif #endif /* This is based on code from 5.003 perl.h */ #ifdef HAS_QUAD # ifdef cray #ifndef IVTYPE # define IVTYPE int #endif #ifndef IV_MIN # define IV_MIN PERL_INT_MIN #endif #ifndef IV_MAX # define IV_MAX PERL_INT_MAX #endif #ifndef UV_MIN # define UV_MIN PERL_UINT_MIN #endif #ifndef UV_MAX # define UV_MAX PERL_UINT_MAX #endif # ifdef INTSIZE #ifndef IVSIZE # define IVSIZE INTSIZE #endif # endif # else # if defined(convex) || defined(uts) #ifndef IVTYPE # define IVTYPE long long #endif #ifndef IV_MIN # define IV_MIN PERL_QUAD_MIN #endif #ifndef IV_MAX # define IV_MAX PERL_QUAD_MAX #endif #ifndef UV_MIN # define UV_MIN PERL_UQUAD_MIN #endif #ifndef UV_MAX # define UV_MAX PERL_UQUAD_MAX #endif # ifdef LONGLONGSIZE #ifndef IVSIZE # define IVSIZE LONGLONGSIZE #endif # endif # else #ifndef IVTYPE # define IVTYPE long #endif #ifndef IV_MIN # define IV_MIN PERL_LONG_MIN #endif #ifndef IV_MAX # define IV_MAX PERL_LONG_MAX #endif #ifndef UV_MIN # define UV_MIN PERL_ULONG_MIN #endif #ifndef UV_MAX # define UV_MAX PERL_ULONG_MAX #endif # ifdef LONGSIZE #ifndef IVSIZE # define IVSIZE LONGSIZE #endif # endif # endif # endif #ifndef IVSIZE # define IVSIZE 8 #endif #ifndef LONGSIZE # define LONGSIZE 8 #endif #ifndef PERL_QUAD_MIN # define PERL_QUAD_MIN IV_MIN #endif #ifndef PERL_QUAD_MAX # define PERL_QUAD_MAX IV_MAX #endif #ifndef PERL_UQUAD_MIN # define PERL_UQUAD_MIN UV_MIN #endif #ifndef PERL_UQUAD_MAX # define PERL_UQUAD_MAX UV_MAX #endif #else #ifndef IVTYPE # define IVTYPE long #endif #ifndef LONGSIZE # define LONGSIZE 4 #endif #ifndef IV_MIN # define IV_MIN PERL_LONG_MIN #endif #ifndef IV_MAX # define IV_MAX PERL_LONG_MAX #endif #ifndef UV_MIN # define UV_MIN PERL_ULONG_MIN #endif #ifndef UV_MAX # define UV_MAX PERL_ULONG_MAX #endif #endif #ifndef IVSIZE # ifdef LONGSIZE # define IVSIZE LONGSIZE # else # define IVSIZE 4 /* A bold guess, but the best we can make. */ # endif #endif #ifndef UVTYPE # define UVTYPE unsigned IVTYPE #endif #ifndef UVSIZE # define UVSIZE IVSIZE #endif #ifndef sv_setuv # define sv_setuv(sv, uv) \ STMT_START { \ UV TeMpUv = uv; \ if (TeMpUv <= IV_MAX) \ sv_setiv(sv, TeMpUv); \ else \ sv_setnv(sv, (double)TeMpUv); \ } STMT_END #endif #ifndef newSVuv # define newSVuv(uv) ((uv) <= IV_MAX ? newSViv((IV)uv) : newSVnv((NV)uv)) #endif #ifndef sv_2uv # define sv_2uv(sv) ((PL_Sv = (sv)), (UV) (SvNOK(PL_Sv) ? SvNV(PL_Sv) : sv_2nv(PL_Sv))) #endif #ifndef SvUVX # define SvUVX(sv) ((UV)SvIVX(sv)) #endif #ifndef SvUVXx # define SvUVXx(sv) SvUVX(sv) #endif #ifndef SvUV # define SvUV(sv) (SvIOK(sv) ? SvUVX(sv) : sv_2uv(sv)) #endif #ifndef SvUVx # define SvUVx(sv) ((PL_Sv = (sv)), SvUV(PL_Sv)) #endif /* Hint: sv_uv * Always use the SvUVx() macro instead of sv_uv(). */ #ifndef sv_uv # define sv_uv(sv) SvUVx(sv) #endif #if !defined(SvUOK) && defined(SvIOK_UV) # define SvUOK(sv) SvIOK_UV(sv) #endif #ifndef XST_mUV # define XST_mUV(i,v) (ST(i) = sv_2mortal(newSVuv(v)) ) #endif #ifndef XSRETURN_UV # define XSRETURN_UV(v) STMT_START { XST_mUV(0,v); XSRETURN(1); } STMT_END #endif #ifndef PUSHu # define PUSHu(u) STMT_START { sv_setuv(TARG, (UV)(u)); PUSHTARG; } STMT_END #endif #ifndef XPUSHu # define XPUSHu(u) STMT_START { sv_setuv(TARG, (UV)(u)); XPUSHTARG; } STMT_END #endif #ifdef HAS_MEMCMP #ifndef memNE # define memNE(s1,s2,l) (memcmp(s1,s2,l)) #endif #ifndef memEQ # define memEQ(s1,s2,l) (!memcmp(s1,s2,l)) #endif #else #ifndef memNE # define memNE(s1,s2,l) (bcmp(s1,s2,l)) #endif #ifndef memEQ # define memEQ(s1,s2,l) (!bcmp(s1,s2,l)) #endif #endif #ifndef memEQs # define memEQs(s1, l, s2) \ (sizeof(s2)-1 == l && memEQ(s1, (s2 ""), (sizeof(s2)-1))) #endif #ifndef memNEs # define memNEs(s1, l, s2) !memEQs(s1, l, s2) #endif #ifndef MoveD # define MoveD(s,d,n,t) memmove((char*)(d),(char*)(s), (n) * sizeof(t)) #endif #ifndef CopyD # define CopyD(s,d,n,t) memcpy((char*)(d),(char*)(s), (n) * sizeof(t)) #endif #ifdef HAS_MEMSET #ifndef ZeroD # define ZeroD(d,n,t) memzero((char*)(d), (n) * sizeof(t)) #endif #else #ifndef ZeroD # define ZeroD(d,n,t) ((void)memzero((char*)(d), (n) * sizeof(t)), d) #endif #endif #ifndef PoisonWith # define PoisonWith(d,n,t,b) (void)memset((char*)(d), (U8)(b), (n) * sizeof(t)) #endif #ifndef PoisonNew # define PoisonNew(d,n,t) PoisonWith(d,n,t,0xAB) #endif #ifndef PoisonFree # define PoisonFree(d,n,t) PoisonWith(d,n,t,0xEF) #endif #ifndef Poison # define Poison(d,n,t) PoisonFree(d,n,t) #endif #ifndef Newx # define Newx(v,n,t) New(0,v,n,t) #endif #ifndef Newxc # define Newxc(v,n,t,c) Newc(0,v,n,t,c) #endif #ifndef Newxz # define Newxz(v,n,t) Newz(0,v,n,t) #endif #ifndef PERL_UNUSED_DECL # ifdef HASATTRIBUTE # if (defined(__GNUC__) && defined(__cplusplus)) || defined(__INTEL_COMPILER) # define PERL_UNUSED_DECL # else # define PERL_UNUSED_DECL __attribute__((unused)) # endif # else # define PERL_UNUSED_DECL # endif #endif #ifndef PERL_UNUSED_ARG # if defined(lint) && defined(S_SPLINT_S) /* www.splint.org */ # include # define PERL_UNUSED_ARG(x) NOTE(ARGUNUSED(x)) # else # define PERL_UNUSED_ARG(x) ((void)x) # endif #endif #ifndef PERL_UNUSED_VAR # define PERL_UNUSED_VAR(x) ((void)x) #endif #ifndef PERL_UNUSED_CONTEXT # ifdef USE_ITHREADS # define PERL_UNUSED_CONTEXT PERL_UNUSED_ARG(my_perl) # else # define PERL_UNUSED_CONTEXT # endif #endif #ifndef NOOP # define NOOP /*EMPTY*/(void)0 #endif #ifndef dNOOP # define dNOOP extern int /*@unused@*/ Perl___notused PERL_UNUSED_DECL #endif #ifndef NVTYPE # if defined(USE_LONG_DOUBLE) && defined(HAS_LONG_DOUBLE) # define NVTYPE long double # else # define NVTYPE double # endif typedef NVTYPE NV; #endif #ifndef INT2PTR # if (IVSIZE == PTRSIZE) && (UVSIZE == PTRSIZE) # define PTRV UV # define INT2PTR(any,d) (any)(d) # else # if PTRSIZE == LONGSIZE # define PTRV unsigned long # else # define PTRV unsigned # endif # define INT2PTR(any,d) (any)(PTRV)(d) # endif #endif #ifndef PTR2ul # if PTRSIZE == LONGSIZE # define PTR2ul(p) (unsigned long)(p) # else # define PTR2ul(p) INT2PTR(unsigned long,p) # endif #endif #ifndef PTR2nat # define PTR2nat(p) (PTRV)(p) #endif #ifndef NUM2PTR # define NUM2PTR(any,d) (any)PTR2nat(d) #endif #ifndef PTR2IV # define PTR2IV(p) INT2PTR(IV,p) #endif #ifndef PTR2UV # define PTR2UV(p) INT2PTR(UV,p) #endif #ifndef PTR2NV # define PTR2NV(p) NUM2PTR(NV,p) #endif #undef START_EXTERN_C #undef END_EXTERN_C #undef EXTERN_C #ifdef __cplusplus # define START_EXTERN_C extern "C" { # define END_EXTERN_C } # define EXTERN_C extern "C" #else # define START_EXTERN_C # define END_EXTERN_C # define EXTERN_C extern #endif #if defined(PERL_GCC_PEDANTIC) # ifndef PERL_GCC_BRACE_GROUPS_FORBIDDEN # define PERL_GCC_BRACE_GROUPS_FORBIDDEN # endif #endif #if defined(__GNUC__) && !defined(PERL_GCC_BRACE_GROUPS_FORBIDDEN) && !defined(__cplusplus) # ifndef PERL_USE_GCC_BRACE_GROUPS # define PERL_USE_GCC_BRACE_GROUPS # endif #endif #undef STMT_START #undef STMT_END #ifdef PERL_USE_GCC_BRACE_GROUPS # define STMT_START (void)( /* gcc supports ``({ STATEMENTS; })'' */ # define STMT_END ) #else # if defined(VOIDFLAGS) && (VOIDFLAGS) && (defined(sun) || defined(__sun__)) && !defined(__GNUC__) # define STMT_START if (1) # define STMT_END else (void)0 # else # define STMT_START do # define STMT_END while (0) # endif #endif #ifndef boolSV # define boolSV(b) ((b) ? &PL_sv_yes : &PL_sv_no) #endif /* DEFSV appears first in 5.004_56 */ #ifndef DEFSV # define DEFSV GvSV(PL_defgv) #endif #ifndef SAVE_DEFSV # define SAVE_DEFSV SAVESPTR(GvSV(PL_defgv)) #endif #ifndef DEFSV_set # define DEFSV_set(sv) (DEFSV = (sv)) #endif /* Older perls (<=5.003) lack AvFILLp */ #ifndef AvFILLp # define AvFILLp AvFILL #endif #ifndef ERRSV # define ERRSV get_sv("@",FALSE) #endif /* Hint: gv_stashpvn * This function's backport doesn't support the length parameter, but * rather ignores it. Portability can only be ensured if the length * parameter is used for speed reasons, but the length can always be * correctly computed from the string argument. */ #ifndef gv_stashpvn # define gv_stashpvn(str,len,create) gv_stashpv(str,create) #endif /* Replace: 1 */ #ifndef get_cv # define get_cv perl_get_cv #endif #ifndef get_sv # define get_sv perl_get_sv #endif #ifndef get_av # define get_av perl_get_av #endif #ifndef get_hv # define get_hv perl_get_hv #endif /* Replace: 0 */ #ifndef dUNDERBAR # define dUNDERBAR dNOOP #endif #ifndef UNDERBAR # define UNDERBAR DEFSV #endif #ifndef dAX # define dAX I32 ax = MARK - PL_stack_base + 1 #endif #ifndef dITEMS # define dITEMS I32 items = SP - MARK #endif #ifndef dXSTARG # define dXSTARG SV * targ = sv_newmortal() #endif #ifndef dAXMARK # define dAXMARK I32 ax = POPMARK; \ register SV ** const mark = PL_stack_base + ax++ #endif #ifndef XSprePUSH # define XSprePUSH (sp = PL_stack_base + ax - 1) #endif #if (PERL_BCDVERSION < 0x5005000) # undef XSRETURN # define XSRETURN(off) \ STMT_START { \ PL_stack_sp = PL_stack_base + ax + ((off) - 1); \ return; \ } STMT_END #endif #ifndef XSPROTO # define XSPROTO(name) void name(pTHX_ CV* cv) #endif #ifndef SVfARG # define SVfARG(p) ((void*)(p)) #endif #ifndef PERL_ABS # define PERL_ABS(x) ((x) < 0 ? -(x) : (x)) #endif #ifndef dVAR # define dVAR dNOOP #endif #ifndef SVf # define SVf "_" #endif #ifndef UTF8_MAXBYTES # define UTF8_MAXBYTES UTF8_MAXLEN #endif #ifndef CPERLscope # define CPERLscope(x) x #endif #ifndef PERL_HASH # define PERL_HASH(hash,str,len) \ STMT_START { \ const char *s_PeRlHaSh = str; \ I32 i_PeRlHaSh = len; \ U32 hash_PeRlHaSh = 0; \ while (i_PeRlHaSh--) \ hash_PeRlHaSh = hash_PeRlHaSh * 33 + *s_PeRlHaSh++; \ (hash) = hash_PeRlHaSh; \ } STMT_END #endif #ifndef PERLIO_FUNCS_DECL # ifdef PERLIO_FUNCS_CONST # define PERLIO_FUNCS_DECL(funcs) const PerlIO_funcs funcs # define PERLIO_FUNCS_CAST(funcs) (PerlIO_funcs*)(funcs) # else # define PERLIO_FUNCS_DECL(funcs) PerlIO_funcs funcs # define PERLIO_FUNCS_CAST(funcs) (funcs) # endif #endif /* provide these typedefs for older perls */ #if (PERL_BCDVERSION < 0x5009003) # ifdef ARGSproto typedef OP* (CPERLscope(*Perl_ppaddr_t))(ARGSproto); # else typedef OP* (CPERLscope(*Perl_ppaddr_t))(pTHX); # endif typedef OP* (CPERLscope(*Perl_check_t)) (pTHX_ OP*); #endif #ifndef isPSXSPC # define isPSXSPC(c) (isSPACE(c) || (c) == '\v') #endif #ifndef isBLANK # define isBLANK(c) ((c) == ' ' || (c) == '\t') #endif #ifdef EBCDIC #ifndef isALNUMC # define isALNUMC(c) isalnum(c) #endif #ifndef isASCII # define isASCII(c) isascii(c) #endif #ifndef isCNTRL # define isCNTRL(c) iscntrl(c) #endif #ifndef isGRAPH # define isGRAPH(c) isgraph(c) #endif #ifndef isPRINT # define isPRINT(c) isprint(c) #endif #ifndef isPUNCT # define isPUNCT(c) ispunct(c) #endif #ifndef isXDIGIT # define isXDIGIT(c) isxdigit(c) #endif #else # if (PERL_BCDVERSION < 0x5010000) /* Hint: isPRINT * The implementation in older perl versions includes all of the * isSPACE() characters, which is wrong. The version provided by * Devel::PPPort always overrides a present buggy version. */ # undef isPRINT # endif #ifdef HAS_QUAD # define WIDEST_UTYPE U64TYPE #else # define WIDEST_UTYPE U32 #endif #ifndef isALNUMC # define isALNUMC(c) (isALPHA(c) || isDIGIT(c)) #endif #ifndef isASCII # define isASCII(c) ((WIDEST_UTYPE) (c) <= 127) #endif #ifndef isCNTRL # define isCNTRL(c) ((WIDEST_UTYPE) (c) < ' ' || (c) == 127) #endif #ifndef isGRAPH # define isGRAPH(c) (isALNUM(c) || isPUNCT(c)) #endif #ifndef isPRINT # define isPRINT(c) (((c) >= 32 && (c) < 127)) #endif #ifndef isPUNCT # define isPUNCT(c) (((c) >= 33 && (c) <= 47) || ((c) >= 58 && (c) <= 64) || ((c) >= 91 && (c) <= 96) || ((c) >= 123 && (c) <= 126)) #endif #ifndef isXDIGIT # define isXDIGIT(c) (isDIGIT(c) || ((c) >= 'a' && (c) <= 'f') || ((c) >= 'A' && (c) <= 'F')) #endif #endif #ifndef PERL_SIGNALS_UNSAFE_FLAG #define PERL_SIGNALS_UNSAFE_FLAG 0x0001 #if (PERL_BCDVERSION < 0x5008000) # define D_PPP_PERL_SIGNALS_INIT PERL_SIGNALS_UNSAFE_FLAG #else # define D_PPP_PERL_SIGNALS_INIT 0 #endif #if defined(NEED_PL_signals) static U32 DPPP_(my_PL_signals) = D_PPP_PERL_SIGNALS_INIT; #elif defined(NEED_PL_signals_GLOBAL) U32 DPPP_(my_PL_signals) = D_PPP_PERL_SIGNALS_INIT; #else extern U32 DPPP_(my_PL_signals); #endif #define PL_signals DPPP_(my_PL_signals) #endif /* Hint: PL_ppaddr * Calling an op via PL_ppaddr requires passing a context argument * for threaded builds. Since the context argument is different for * 5.005 perls, you can use aTHXR (supplied by ppport.h), which will * automatically be defined as the correct argument. */ #if (PERL_BCDVERSION <= 0x5005005) /* Replace: 1 */ # define PL_ppaddr ppaddr # define PL_no_modify no_modify /* Replace: 0 */ #endif #if (PERL_BCDVERSION <= 0x5004005) /* Replace: 1 */ # define PL_DBsignal DBsignal # define PL_DBsingle DBsingle # define PL_DBsub DBsub # define PL_DBtrace DBtrace # define PL_Sv Sv # define PL_bufend bufend # define PL_bufptr bufptr # define PL_compiling compiling # define PL_copline copline # define PL_curcop curcop # define PL_curstash curstash # define PL_debstash debstash # define PL_defgv defgv # define PL_diehook diehook # define PL_dirty dirty # define PL_dowarn dowarn # define PL_errgv errgv # define PL_error_count error_count # define PL_expect expect # define PL_hexdigit hexdigit # define PL_hints hints # define PL_in_my in_my # define PL_laststatval laststatval # define PL_lex_state lex_state # define PL_lex_stuff lex_stuff # define PL_linestr linestr # define PL_na na # define PL_perl_destruct_level perl_destruct_level # define PL_perldb perldb # define PL_rsfp_filters rsfp_filters # define PL_rsfp rsfp # define PL_stack_base stack_base # define PL_stack_sp stack_sp # define PL_statcache statcache # define PL_stdingv stdingv # define PL_sv_arenaroot sv_arenaroot # define PL_sv_no sv_no # define PL_sv_undef sv_undef # define PL_sv_yes sv_yes # define PL_tainted tainted # define PL_tainting tainting # define PL_tokenbuf tokenbuf /* Replace: 0 */ #endif /* Warning: PL_parser * For perl versions earlier than 5.9.5, this is an always * non-NULL dummy. Also, it cannot be dereferenced. Don't * use it if you can avoid is and unless you absolutely know * what you're doing. * If you always check that PL_parser is non-NULL, you can * define DPPP_PL_parser_NO_DUMMY to avoid the creation of * a dummy parser structure. */ #if (PERL_BCDVERSION >= 0x5009005) # ifdef DPPP_PL_parser_NO_DUMMY # define D_PPP_my_PL_parser_var(var) ((PL_parser ? PL_parser : \ (croak("panic: PL_parser == NULL in %s:%d", \ __FILE__, __LINE__), (yy_parser *) NULL))->var) # else # ifdef DPPP_PL_parser_NO_DUMMY_WARNING # define D_PPP_parser_dummy_warning(var) # else # define D_PPP_parser_dummy_warning(var) \ warn("warning: dummy PL_" #var " used in %s:%d", __FILE__, __LINE__), # endif # define D_PPP_my_PL_parser_var(var) ((PL_parser ? PL_parser : \ (D_PPP_parser_dummy_warning(var) &DPPP_(dummy_PL_parser)))->var) #if defined(NEED_PL_parser) static yy_parser DPPP_(dummy_PL_parser); #elif defined(NEED_PL_parser_GLOBAL) yy_parser DPPP_(dummy_PL_parser); #else extern yy_parser DPPP_(dummy_PL_parser); #endif # endif /* PL_expect, PL_copline, PL_rsfp, PL_rsfp_filters, PL_linestr, PL_bufptr, PL_bufend, PL_lex_state, PL_lex_stuff, PL_tokenbuf depends on PL_parser */ /* Warning: PL_expect, PL_copline, PL_rsfp, PL_rsfp_filters, PL_linestr, PL_bufptr, PL_bufend, PL_lex_state, PL_lex_stuff, PL_tokenbuf * Do not use this variable unless you know exactly what you're * doint. It is internal to the perl parser and may change or even * be removed in the future. As of perl 5.9.5, you have to check * for (PL_parser != NULL) for this variable to have any effect. * An always non-NULL PL_parser dummy is provided for earlier * perl versions. * If PL_parser is NULL when you try to access this variable, a * dummy is being accessed instead and a warning is issued unless * you define DPPP_PL_parser_NO_DUMMY_WARNING. * If DPPP_PL_parser_NO_DUMMY is defined, the code trying to access * this variable will croak with a panic message. */ # define PL_expect D_PPP_my_PL_parser_var(expect) # define PL_copline D_PPP_my_PL_parser_var(copline) # define PL_rsfp D_PPP_my_PL_parser_var(rsfp) # define PL_rsfp_filters D_PPP_my_PL_parser_var(rsfp_filters) # define PL_linestr D_PPP_my_PL_parser_var(linestr) # define PL_bufptr D_PPP_my_PL_parser_var(bufptr) # define PL_bufend D_PPP_my_PL_parser_var(bufend) # define PL_lex_state D_PPP_my_PL_parser_var(lex_state) # define PL_lex_stuff D_PPP_my_PL_parser_var(lex_stuff) # define PL_tokenbuf D_PPP_my_PL_parser_var(tokenbuf) # define PL_in_my D_PPP_my_PL_parser_var(in_my) # define PL_in_my_stash D_PPP_my_PL_parser_var(in_my_stash) # define PL_error_count D_PPP_my_PL_parser_var(error_count) #else /* ensure that PL_parser != NULL and cannot be dereferenced */ # define PL_parser ((void *) 1) #endif #ifndef mPUSHs # define mPUSHs(s) PUSHs(sv_2mortal(s)) #endif #ifndef PUSHmortal # define PUSHmortal PUSHs(sv_newmortal()) #endif #ifndef mPUSHp # define mPUSHp(p,l) sv_setpvn(PUSHmortal, (p), (l)) #endif #ifndef mPUSHn # define mPUSHn(n) sv_setnv(PUSHmortal, (NV)(n)) #endif #ifndef mPUSHi # define mPUSHi(i) sv_setiv(PUSHmortal, (IV)(i)) #endif #ifndef mPUSHu # define mPUSHu(u) sv_setuv(PUSHmortal, (UV)(u)) #endif #ifndef mXPUSHs # define mXPUSHs(s) XPUSHs(sv_2mortal(s)) #endif #ifndef XPUSHmortal # define XPUSHmortal XPUSHs(sv_newmortal()) #endif #ifndef mXPUSHp # define mXPUSHp(p,l) STMT_START { EXTEND(sp,1); sv_setpvn(PUSHmortal, (p), (l)); } STMT_END #endif #ifndef mXPUSHn # define mXPUSHn(n) STMT_START { EXTEND(sp,1); sv_setnv(PUSHmortal, (NV)(n)); } STMT_END #endif #ifndef mXPUSHi # define mXPUSHi(i) STMT_START { EXTEND(sp,1); sv_setiv(PUSHmortal, (IV)(i)); } STMT_END #endif #ifndef mXPUSHu # define mXPUSHu(u) STMT_START { EXTEND(sp,1); sv_setuv(PUSHmortal, (UV)(u)); } STMT_END #endif /* Replace: 1 */ #ifndef call_sv # define call_sv perl_call_sv #endif #ifndef call_pv # define call_pv perl_call_pv #endif #ifndef call_argv # define call_argv perl_call_argv #endif #ifndef call_method # define call_method perl_call_method #endif #ifndef eval_sv # define eval_sv perl_eval_sv #endif /* Replace: 0 */ #ifndef PERL_LOADMOD_DENY # define PERL_LOADMOD_DENY 0x1 #endif #ifndef PERL_LOADMOD_NOIMPORT # define PERL_LOADMOD_NOIMPORT 0x2 #endif #ifndef PERL_LOADMOD_IMPORT_OPS # define PERL_LOADMOD_IMPORT_OPS 0x4 #endif #ifndef G_METHOD # define G_METHOD 64 # ifdef call_sv # undef call_sv # endif # if (PERL_BCDVERSION < 0x5006000) # define call_sv(sv, flags) ((flags) & G_METHOD ? perl_call_method((char *) SvPV_nolen_const(sv), \ (flags) & ~G_METHOD) : perl_call_sv(sv, flags)) # else # define call_sv(sv, flags) ((flags) & G_METHOD ? Perl_call_method(aTHX_ (char *) SvPV_nolen_const(sv), \ (flags) & ~G_METHOD) : Perl_call_sv(aTHX_ sv, flags)) # endif #endif /* Replace perl_eval_pv with eval_pv */ #ifndef eval_pv #if defined(NEED_eval_pv) static SV* DPPP_(my_eval_pv)(char *p, I32 croak_on_error); static #else extern SV* DPPP_(my_eval_pv)(char *p, I32 croak_on_error); #endif #ifdef eval_pv # undef eval_pv #endif #define eval_pv(a,b) DPPP_(my_eval_pv)(aTHX_ a,b) #define Perl_eval_pv DPPP_(my_eval_pv) #if defined(NEED_eval_pv) || defined(NEED_eval_pv_GLOBAL) SV* DPPP_(my_eval_pv)(char *p, I32 croak_on_error) { dSP; SV* sv = newSVpv(p, 0); PUSHMARK(sp); eval_sv(sv, G_SCALAR); SvREFCNT_dec(sv); SPAGAIN; sv = POPs; PUTBACK; if (croak_on_error && SvTRUE(GvSV(errgv))) croak(SvPVx(GvSV(errgv), na)); return sv; } #endif #endif #ifndef vload_module #if defined(NEED_vload_module) static void DPPP_(my_vload_module)(U32 flags, SV *name, SV *ver, va_list *args); static #else extern void DPPP_(my_vload_module)(U32 flags, SV *name, SV *ver, va_list *args); #endif #ifdef vload_module # undef vload_module #endif #define vload_module(a,b,c,d) DPPP_(my_vload_module)(aTHX_ a,b,c,d) #define Perl_vload_module DPPP_(my_vload_module) #if defined(NEED_vload_module) || defined(NEED_vload_module_GLOBAL) void DPPP_(my_vload_module)(U32 flags, SV *name, SV *ver, va_list *args) { dTHR; dVAR; OP *veop, *imop; OP * const modname = newSVOP(OP_CONST, 0, name); /* 5.005 has a somewhat hacky force_normal that doesn't croak on SvREADONLY() if PL_compling is true. Current perls take care in ck_require() to correctly turn off SvREADONLY before calling force_normal_flags(). This seems a better fix than fudging PL_compling */ SvREADONLY_off(((SVOP*)modname)->op_sv); modname->op_private |= OPpCONST_BARE; if (ver) { veop = newSVOP(OP_CONST, 0, ver); } else veop = NULL; if (flags & PERL_LOADMOD_NOIMPORT) { imop = sawparens(newNULLLIST()); } else if (flags & PERL_LOADMOD_IMPORT_OPS) { imop = va_arg(*args, OP*); } else { SV *sv; imop = NULL; sv = va_arg(*args, SV*); while (sv) { imop = append_elem(OP_LIST, imop, newSVOP(OP_CONST, 0, sv)); sv = va_arg(*args, SV*); } } { const line_t ocopline = PL_copline; COP * const ocurcop = PL_curcop; const int oexpect = PL_expect; #if (PERL_BCDVERSION >= 0x5004000) utilize(!(flags & PERL_LOADMOD_DENY), start_subparse(FALSE, 0), veop, modname, imop); #else utilize(!(flags & PERL_LOADMOD_DENY), start_subparse(), modname, imop); #endif PL_expect = oexpect; PL_copline = ocopline; PL_curcop = ocurcop; } } #endif #endif #ifndef load_module #if defined(NEED_load_module) static void DPPP_(my_load_module)(U32 flags, SV *name, SV *ver, ...); static #else extern void DPPP_(my_load_module)(U32 flags, SV *name, SV *ver, ...); #endif #ifdef load_module # undef load_module #endif #define load_module DPPP_(my_load_module) #define Perl_load_module DPPP_(my_load_module) #if defined(NEED_load_module) || defined(NEED_load_module_GLOBAL) void DPPP_(my_load_module)(U32 flags, SV *name, SV *ver, ...) { va_list args; va_start(args, ver); vload_module(flags, name, ver, &args); va_end(args); } #endif #endif #ifndef newRV_inc # define newRV_inc(sv) newRV(sv) /* Replace */ #endif #ifndef newRV_noinc #if defined(NEED_newRV_noinc) static SV * DPPP_(my_newRV_noinc)(SV *sv); static #else extern SV * DPPP_(my_newRV_noinc)(SV *sv); #endif #ifdef newRV_noinc # undef newRV_noinc #endif #define newRV_noinc(a) DPPP_(my_newRV_noinc)(aTHX_ a) #define Perl_newRV_noinc DPPP_(my_newRV_noinc) #if defined(NEED_newRV_noinc) || defined(NEED_newRV_noinc_GLOBAL) SV * DPPP_(my_newRV_noinc)(SV *sv) { SV *rv = (SV *)newRV(sv); SvREFCNT_dec(sv); return rv; } #endif #endif /* Hint: newCONSTSUB * Returns a CV* as of perl-5.7.1. This return value is not supported * by Devel::PPPort. */ /* newCONSTSUB from IO.xs is in the core starting with 5.004_63 */ #if (PERL_BCDVERSION < 0x5004063) && (PERL_BCDVERSION != 0x5004005) #if defined(NEED_newCONSTSUB) static void DPPP_(my_newCONSTSUB)(HV *stash, const char *name, SV *sv); static #else extern void DPPP_(my_newCONSTSUB)(HV *stash, const char *name, SV *sv); #endif #ifdef newCONSTSUB # undef newCONSTSUB #endif #define newCONSTSUB(a,b,c) DPPP_(my_newCONSTSUB)(aTHX_ a,b,c) #define Perl_newCONSTSUB DPPP_(my_newCONSTSUB) #if defined(NEED_newCONSTSUB) || defined(NEED_newCONSTSUB_GLOBAL) /* This is just a trick to avoid a dependency of newCONSTSUB on PL_parser */ /* (There's no PL_parser in perl < 5.005, so this is completely safe) */ #define D_PPP_PL_copline PL_copline void DPPP_(my_newCONSTSUB)(HV *stash, const char *name, SV *sv) { U32 oldhints = PL_hints; HV *old_cop_stash = PL_curcop->cop_stash; HV *old_curstash = PL_curstash; line_t oldline = PL_curcop->cop_line; PL_curcop->cop_line = D_PPP_PL_copline; PL_hints &= ~HINT_BLOCK_SCOPE; if (stash) PL_curstash = PL_curcop->cop_stash = stash; newSUB( #if (PERL_BCDVERSION < 0x5003022) start_subparse(), #elif (PERL_BCDVERSION == 0x5003022) start_subparse(0), #else /* 5.003_23 onwards */ start_subparse(FALSE, 0), #endif newSVOP(OP_CONST, 0, newSVpv((char *) name, 0)), newSVOP(OP_CONST, 0, &PL_sv_no), /* SvPV(&PL_sv_no) == "" -- GMB */ newSTATEOP(0, Nullch, newSVOP(OP_CONST, 0, sv)) ); PL_hints = oldhints; PL_curcop->cop_stash = old_cop_stash; PL_curstash = old_curstash; PL_curcop->cop_line = oldline; } #endif #endif /* * Boilerplate macros for initializing and accessing interpreter-local * data from C. All statics in extensions should be reworked to use * this, if you want to make the extension thread-safe. See ext/re/re.xs * for an example of the use of these macros. * * Code that uses these macros is responsible for the following: * 1. #define MY_CXT_KEY to a unique string, e.g. "DynaLoader_guts" * 2. Declare a typedef named my_cxt_t that is a structure that contains * all the data that needs to be interpreter-local. * 3. Use the START_MY_CXT macro after the declaration of my_cxt_t. * 4. Use the MY_CXT_INIT macro such that it is called exactly once * (typically put in the BOOT: section). * 5. Use the members of the my_cxt_t structure everywhere as * MY_CXT.member. * 6. Use the dMY_CXT macro (a declaration) in all the functions that * access MY_CXT. */ #if defined(MULTIPLICITY) || defined(PERL_OBJECT) || \ defined(PERL_CAPI) || defined(PERL_IMPLICIT_CONTEXT) #ifndef START_MY_CXT /* This must appear in all extensions that define a my_cxt_t structure, * right after the definition (i.e. at file scope). The non-threads * case below uses it to declare the data as static. */ #define START_MY_CXT #if (PERL_BCDVERSION < 0x5004068) /* Fetches the SV that keeps the per-interpreter data. */ #define dMY_CXT_SV \ SV *my_cxt_sv = get_sv(MY_CXT_KEY, FALSE) #else /* >= perl5.004_68 */ #define dMY_CXT_SV \ SV *my_cxt_sv = *hv_fetch(PL_modglobal, MY_CXT_KEY, \ sizeof(MY_CXT_KEY)-1, TRUE) #endif /* < perl5.004_68 */ /* This declaration should be used within all functions that use the * interpreter-local data. */ #define dMY_CXT \ dMY_CXT_SV; \ my_cxt_t *my_cxtp = INT2PTR(my_cxt_t*,SvUV(my_cxt_sv)) /* Creates and zeroes the per-interpreter data. * (We allocate my_cxtp in a Perl SV so that it will be released when * the interpreter goes away.) */ #define MY_CXT_INIT \ dMY_CXT_SV; \ /* newSV() allocates one more than needed */ \ my_cxt_t *my_cxtp = (my_cxt_t*)SvPVX(newSV(sizeof(my_cxt_t)-1));\ Zero(my_cxtp, 1, my_cxt_t); \ sv_setuv(my_cxt_sv, PTR2UV(my_cxtp)) /* This macro must be used to access members of the my_cxt_t structure. * e.g. MYCXT.some_data */ #define MY_CXT (*my_cxtp) /* Judicious use of these macros can reduce the number of times dMY_CXT * is used. Use is similar to pTHX, aTHX etc. */ #define pMY_CXT my_cxt_t *my_cxtp #define pMY_CXT_ pMY_CXT, #define _pMY_CXT ,pMY_CXT #define aMY_CXT my_cxtp #define aMY_CXT_ aMY_CXT, #define _aMY_CXT ,aMY_CXT #endif /* START_MY_CXT */ #ifndef MY_CXT_CLONE /* Clones the per-interpreter data. */ #define MY_CXT_CLONE \ dMY_CXT_SV; \ my_cxt_t *my_cxtp = (my_cxt_t*)SvPVX(newSV(sizeof(my_cxt_t)-1));\ Copy(INT2PTR(my_cxt_t*, SvUV(my_cxt_sv)), my_cxtp, 1, my_cxt_t);\ sv_setuv(my_cxt_sv, PTR2UV(my_cxtp)) #endif #else /* single interpreter */ #ifndef START_MY_CXT #define START_MY_CXT static my_cxt_t my_cxt; #define dMY_CXT_SV dNOOP #define dMY_CXT dNOOP #define MY_CXT_INIT NOOP #define MY_CXT my_cxt #define pMY_CXT void #define pMY_CXT_ #define _pMY_CXT #define aMY_CXT #define aMY_CXT_ #define _aMY_CXT #endif /* START_MY_CXT */ #ifndef MY_CXT_CLONE #define MY_CXT_CLONE NOOP #endif #endif #ifndef IVdf # if IVSIZE == LONGSIZE # define IVdf "ld" # define UVuf "lu" # define UVof "lo" # define UVxf "lx" # define UVXf "lX" # elif IVSIZE == INTSIZE # define IVdf "d" # define UVuf "u" # define UVof "o" # define UVxf "x" # define UVXf "X" # else # error "cannot define IV/UV formats" # endif #endif #ifndef NVef # if defined(USE_LONG_DOUBLE) && defined(HAS_LONG_DOUBLE) && \ defined(PERL_PRIfldbl) && (PERL_BCDVERSION != 0x5006000) /* Not very likely, but let's try anyway. */ # define NVef PERL_PRIeldbl # define NVff PERL_PRIfldbl # define NVgf PERL_PRIgldbl # else # define NVef "e" # define NVff "f" # define NVgf "g" # endif #endif #ifndef SvREFCNT_inc # ifdef PERL_USE_GCC_BRACE_GROUPS # define SvREFCNT_inc(sv) \ ({ \ SV * const _sv = (SV*)(sv); \ if (_sv) \ (SvREFCNT(_sv))++; \ _sv; \ }) # else # define SvREFCNT_inc(sv) \ ((PL_Sv=(SV*)(sv)) ? (++(SvREFCNT(PL_Sv)),PL_Sv) : NULL) # endif #endif #ifndef SvREFCNT_inc_simple # ifdef PERL_USE_GCC_BRACE_GROUPS # define SvREFCNT_inc_simple(sv) \ ({ \ if (sv) \ (SvREFCNT(sv))++; \ (SV *)(sv); \ }) # else # define SvREFCNT_inc_simple(sv) \ ((sv) ? (SvREFCNT(sv)++,(SV*)(sv)) : NULL) # endif #endif #ifndef SvREFCNT_inc_NN # ifdef PERL_USE_GCC_BRACE_GROUPS # define SvREFCNT_inc_NN(sv) \ ({ \ SV * const _sv = (SV*)(sv); \ SvREFCNT(_sv)++; \ _sv; \ }) # else # define SvREFCNT_inc_NN(sv) \ (PL_Sv=(SV*)(sv),++(SvREFCNT(PL_Sv)),PL_Sv) # endif #endif #ifndef SvREFCNT_inc_void # ifdef PERL_USE_GCC_BRACE_GROUPS # define SvREFCNT_inc_void(sv) \ ({ \ SV * const _sv = (SV*)(sv); \ if (_sv) \ (void)(SvREFCNT(_sv)++); \ }) # else # define SvREFCNT_inc_void(sv) \ (void)((PL_Sv=(SV*)(sv)) ? ++(SvREFCNT(PL_Sv)) : 0) # endif #endif #ifndef SvREFCNT_inc_simple_void # define SvREFCNT_inc_simple_void(sv) STMT_START { if (sv) SvREFCNT(sv)++; } STMT_END #endif #ifndef SvREFCNT_inc_simple_NN # define SvREFCNT_inc_simple_NN(sv) (++SvREFCNT(sv), (SV*)(sv)) #endif #ifndef SvREFCNT_inc_void_NN # define SvREFCNT_inc_void_NN(sv) (void)(++SvREFCNT((SV*)(sv))) #endif #ifndef SvREFCNT_inc_simple_void_NN # define SvREFCNT_inc_simple_void_NN(sv) (void)(++SvREFCNT((SV*)(sv))) #endif #ifndef newSV_type #if defined(NEED_newSV_type) static SV* DPPP_(my_newSV_type)(pTHX_ svtype const t); static #else extern SV* DPPP_(my_newSV_type)(pTHX_ svtype const t); #endif #ifdef newSV_type # undef newSV_type #endif #define newSV_type(a) DPPP_(my_newSV_type)(aTHX_ a) #define Perl_newSV_type DPPP_(my_newSV_type) #if defined(NEED_newSV_type) || defined(NEED_newSV_type_GLOBAL) SV* DPPP_(my_newSV_type)(pTHX_ svtype const t) { SV* const sv = newSV(0); sv_upgrade(sv, t); return sv; } #endif #endif #if (PERL_BCDVERSION < 0x5006000) # define D_PPP_CONSTPV_ARG(x) ((char *) (x)) #else # define D_PPP_CONSTPV_ARG(x) (x) #endif #ifndef newSVpvn # define newSVpvn(data,len) ((data) \ ? ((len) ? newSVpv((data), (len)) : newSVpv("", 0)) \ : newSV(0)) #endif #ifndef newSVpvn_utf8 # define newSVpvn_utf8(s, len, u) newSVpvn_flags((s), (len), (u) ? SVf_UTF8 : 0) #endif #ifndef SVf_UTF8 # define SVf_UTF8 0 #endif #ifndef newSVpvn_flags #if defined(NEED_newSVpvn_flags) static SV * DPPP_(my_newSVpvn_flags)(pTHX_ const char *s, STRLEN len, U32 flags); static #else extern SV * DPPP_(my_newSVpvn_flags)(pTHX_ const char *s, STRLEN len, U32 flags); #endif #ifdef newSVpvn_flags # undef newSVpvn_flags #endif #define newSVpvn_flags(a,b,c) DPPP_(my_newSVpvn_flags)(aTHX_ a,b,c) #define Perl_newSVpvn_flags DPPP_(my_newSVpvn_flags) #if defined(NEED_newSVpvn_flags) || defined(NEED_newSVpvn_flags_GLOBAL) SV * DPPP_(my_newSVpvn_flags)(pTHX_ const char *s, STRLEN len, U32 flags) { SV *sv = newSVpvn(D_PPP_CONSTPV_ARG(s), len); SvFLAGS(sv) |= (flags & SVf_UTF8); return (flags & SVs_TEMP) ? sv_2mortal(sv) : sv; } #endif #endif /* Backwards compatibility stuff... :-( */ #if !defined(NEED_sv_2pv_flags) && defined(NEED_sv_2pv_nolen) # define NEED_sv_2pv_flags #endif #if !defined(NEED_sv_2pv_flags_GLOBAL) && defined(NEED_sv_2pv_nolen_GLOBAL) # define NEED_sv_2pv_flags_GLOBAL #endif /* Hint: sv_2pv_nolen * Use the SvPV_nolen() or SvPV_nolen_const() macros instead of sv_2pv_nolen(). */ #ifndef sv_2pv_nolen # define sv_2pv_nolen(sv) SvPV_nolen(sv) #endif #ifdef SvPVbyte /* Hint: SvPVbyte * Does not work in perl-5.6.1, ppport.h implements a version * borrowed from perl-5.7.3. */ #if (PERL_BCDVERSION < 0x5007000) #if defined(NEED_sv_2pvbyte) static char * DPPP_(my_sv_2pvbyte)(pTHX_ SV *sv, STRLEN *lp); static #else extern char * DPPP_(my_sv_2pvbyte)(pTHX_ SV *sv, STRLEN *lp); #endif #ifdef sv_2pvbyte # undef sv_2pvbyte #endif #define sv_2pvbyte(a,b) DPPP_(my_sv_2pvbyte)(aTHX_ a,b) #define Perl_sv_2pvbyte DPPP_(my_sv_2pvbyte) #if defined(NEED_sv_2pvbyte) || defined(NEED_sv_2pvbyte_GLOBAL) char * DPPP_(my_sv_2pvbyte)(pTHX_ SV *sv, STRLEN *lp) { sv_utf8_downgrade(sv,0); return SvPV(sv,*lp); } #endif /* Hint: sv_2pvbyte * Use the SvPVbyte() macro instead of sv_2pvbyte(). */ #undef SvPVbyte #define SvPVbyte(sv, lp) \ ((SvFLAGS(sv) & (SVf_POK|SVf_UTF8)) == (SVf_POK) \ ? ((lp = SvCUR(sv)), SvPVX(sv)) : sv_2pvbyte(sv, &lp)) #endif #else # define SvPVbyte SvPV # define sv_2pvbyte sv_2pv #endif #ifndef sv_2pvbyte_nolen # define sv_2pvbyte_nolen(sv) sv_2pv_nolen(sv) #endif /* Hint: sv_pvn * Always use the SvPV() macro instead of sv_pvn(). */ /* Hint: sv_pvn_force * Always use the SvPV_force() macro instead of sv_pvn_force(). */ /* If these are undefined, they're not handled by the core anyway */ #ifndef SV_IMMEDIATE_UNREF # define SV_IMMEDIATE_UNREF 0 #endif #ifndef SV_GMAGIC # define SV_GMAGIC 0 #endif #ifndef SV_COW_DROP_PV # define SV_COW_DROP_PV 0 #endif #ifndef SV_UTF8_NO_ENCODING # define SV_UTF8_NO_ENCODING 0 #endif #ifndef SV_NOSTEAL # define SV_NOSTEAL 0 #endif #ifndef SV_CONST_RETURN # define SV_CONST_RETURN 0 #endif #ifndef SV_MUTABLE_RETURN # define SV_MUTABLE_RETURN 0 #endif #ifndef SV_SMAGIC # define SV_SMAGIC 0 #endif #ifndef SV_HAS_TRAILING_NUL # define SV_HAS_TRAILING_NUL 0 #endif #ifndef SV_COW_SHARED_HASH_KEYS # define SV_COW_SHARED_HASH_KEYS 0 #endif #if (PERL_BCDVERSION < 0x5007002) #if defined(NEED_sv_2pv_flags) static char * DPPP_(my_sv_2pv_flags)(pTHX_ SV *sv, STRLEN *lp, I32 flags); static #else extern char * DPPP_(my_sv_2pv_flags)(pTHX_ SV *sv, STRLEN *lp, I32 flags); #endif #ifdef sv_2pv_flags # undef sv_2pv_flags #endif #define sv_2pv_flags(a,b,c) DPPP_(my_sv_2pv_flags)(aTHX_ a,b,c) #define Perl_sv_2pv_flags DPPP_(my_sv_2pv_flags) #if defined(NEED_sv_2pv_flags) || defined(NEED_sv_2pv_flags_GLOBAL) char * DPPP_(my_sv_2pv_flags)(pTHX_ SV *sv, STRLEN *lp, I32 flags) { STRLEN n_a = (STRLEN) flags; return sv_2pv(sv, lp ? lp : &n_a); } #endif #if defined(NEED_sv_pvn_force_flags) static char * DPPP_(my_sv_pvn_force_flags)(pTHX_ SV *sv, STRLEN *lp, I32 flags); static #else extern char * DPPP_(my_sv_pvn_force_flags)(pTHX_ SV *sv, STRLEN *lp, I32 flags); #endif #ifdef sv_pvn_force_flags # undef sv_pvn_force_flags #endif #define sv_pvn_force_flags(a,b,c) DPPP_(my_sv_pvn_force_flags)(aTHX_ a,b,c) #define Perl_sv_pvn_force_flags DPPP_(my_sv_pvn_force_flags) #if defined(NEED_sv_pvn_force_flags) || defined(NEED_sv_pvn_force_flags_GLOBAL) char * DPPP_(my_sv_pvn_force_flags)(pTHX_ SV *sv, STRLEN *lp, I32 flags) { STRLEN n_a = (STRLEN) flags; return sv_pvn_force(sv, lp ? lp : &n_a); } #endif #endif #if (PERL_BCDVERSION < 0x5008008) || ( (PERL_BCDVERSION >= 0x5009000) && (PERL_BCDVERSION < 0x5009003) ) # define DPPP_SVPV_NOLEN_LP_ARG &PL_na #else # define DPPP_SVPV_NOLEN_LP_ARG 0 #endif #ifndef SvPV_const # define SvPV_const(sv, lp) SvPV_flags_const(sv, lp, SV_GMAGIC) #endif #ifndef SvPV_mutable # define SvPV_mutable(sv, lp) SvPV_flags_mutable(sv, lp, SV_GMAGIC) #endif #ifndef SvPV_flags # define SvPV_flags(sv, lp, flags) \ ((SvFLAGS(sv) & (SVf_POK)) == SVf_POK \ ? ((lp = SvCUR(sv)), SvPVX(sv)) : sv_2pv_flags(sv, &lp, flags)) #endif #ifndef SvPV_flags_const # define SvPV_flags_const(sv, lp, flags) \ ((SvFLAGS(sv) & (SVf_POK)) == SVf_POK \ ? ((lp = SvCUR(sv)), SvPVX_const(sv)) : \ (const char*) sv_2pv_flags(sv, &lp, flags|SV_CONST_RETURN)) #endif #ifndef SvPV_flags_const_nolen # define SvPV_flags_const_nolen(sv, flags) \ ((SvFLAGS(sv) & (SVf_POK)) == SVf_POK \ ? SvPVX_const(sv) : \ (const char*) sv_2pv_flags(sv, DPPP_SVPV_NOLEN_LP_ARG, flags|SV_CONST_RETURN)) #endif #ifndef SvPV_flags_mutable # define SvPV_flags_mutable(sv, lp, flags) \ ((SvFLAGS(sv) & (SVf_POK)) == SVf_POK \ ? ((lp = SvCUR(sv)), SvPVX_mutable(sv)) : \ sv_2pv_flags(sv, &lp, flags|SV_MUTABLE_RETURN)) #endif #ifndef SvPV_force # define SvPV_force(sv, lp) SvPV_force_flags(sv, lp, SV_GMAGIC) #endif #ifndef SvPV_force_nolen # define SvPV_force_nolen(sv) SvPV_force_flags_nolen(sv, SV_GMAGIC) #endif #ifndef SvPV_force_mutable # define SvPV_force_mutable(sv, lp) SvPV_force_flags_mutable(sv, lp, SV_GMAGIC) #endif #ifndef SvPV_force_nomg # define SvPV_force_nomg(sv, lp) SvPV_force_flags(sv, lp, 0) #endif #ifndef SvPV_force_nomg_nolen # define SvPV_force_nomg_nolen(sv) SvPV_force_flags_nolen(sv, 0) #endif #ifndef SvPV_force_flags # define SvPV_force_flags(sv, lp, flags) \ ((SvFLAGS(sv) & (SVf_POK|SVf_THINKFIRST)) == SVf_POK \ ? ((lp = SvCUR(sv)), SvPVX(sv)) : sv_pvn_force_flags(sv, &lp, flags)) #endif #ifndef SvPV_force_flags_nolen # define SvPV_force_flags_nolen(sv, flags) \ ((SvFLAGS(sv) & (SVf_POK|SVf_THINKFIRST)) == SVf_POK \ ? SvPVX(sv) : sv_pvn_force_flags(sv, DPPP_SVPV_NOLEN_LP_ARG, flags)) #endif #ifndef SvPV_force_flags_mutable # define SvPV_force_flags_mutable(sv, lp, flags) \ ((SvFLAGS(sv) & (SVf_POK|SVf_THINKFIRST)) == SVf_POK \ ? ((lp = SvCUR(sv)), SvPVX_mutable(sv)) \ : sv_pvn_force_flags(sv, &lp, flags|SV_MUTABLE_RETURN)) #endif #ifndef SvPV_nolen # define SvPV_nolen(sv) \ ((SvFLAGS(sv) & (SVf_POK)) == SVf_POK \ ? SvPVX(sv) : sv_2pv_flags(sv, DPPP_SVPV_NOLEN_LP_ARG, SV_GMAGIC)) #endif #ifndef SvPV_nolen_const # define SvPV_nolen_const(sv) \ ((SvFLAGS(sv) & (SVf_POK)) == SVf_POK \ ? SvPVX_const(sv) : sv_2pv_flags(sv, DPPP_SVPV_NOLEN_LP_ARG, SV_GMAGIC|SV_CONST_RETURN)) #endif #ifndef SvPV_nomg # define SvPV_nomg(sv, lp) SvPV_flags(sv, lp, 0) #endif #ifndef SvPV_nomg_const # define SvPV_nomg_const(sv, lp) SvPV_flags_const(sv, lp, 0) #endif #ifndef SvPV_nomg_const_nolen # define SvPV_nomg_const_nolen(sv) SvPV_flags_const_nolen(sv, 0) #endif #ifndef SvPV_nomg_nolen # define SvPV_nomg_nolen(sv) ((SvFLAGS(sv) & (SVf_POK)) == SVf_POK \ ? SvPVX(sv) : sv_2pv_flags(sv, DPPP_SVPV_NOLEN_LP_ARG, 0)) #endif #ifndef SvPV_renew # define SvPV_renew(sv,n) STMT_START { SvLEN_set(sv, n); \ SvPV_set((sv), (char *) saferealloc( \ (Malloc_t)SvPVX(sv), (MEM_SIZE)((n)))); \ } STMT_END #endif #ifndef SvMAGIC_set # define SvMAGIC_set(sv, val) \ STMT_START { assert(SvTYPE(sv) >= SVt_PVMG); \ (((XPVMG*) SvANY(sv))->xmg_magic = (val)); } STMT_END #endif #if (PERL_BCDVERSION < 0x5009003) #ifndef SvPVX_const # define SvPVX_const(sv) ((const char*) (0 + SvPVX(sv))) #endif #ifndef SvPVX_mutable # define SvPVX_mutable(sv) (0 + SvPVX(sv)) #endif #ifndef SvRV_set # define SvRV_set(sv, val) \ STMT_START { assert(SvTYPE(sv) >= SVt_RV); \ (((XRV*) SvANY(sv))->xrv_rv = (val)); } STMT_END #endif #else #ifndef SvPVX_const # define SvPVX_const(sv) ((const char*)((sv)->sv_u.svu_pv)) #endif #ifndef SvPVX_mutable # define SvPVX_mutable(sv) ((sv)->sv_u.svu_pv) #endif #ifndef SvRV_set # define SvRV_set(sv, val) \ STMT_START { assert(SvTYPE(sv) >= SVt_RV); \ ((sv)->sv_u.svu_rv = (val)); } STMT_END #endif #endif #ifndef SvSTASH_set # define SvSTASH_set(sv, val) \ STMT_START { assert(SvTYPE(sv) >= SVt_PVMG); \ (((XPVMG*) SvANY(sv))->xmg_stash = (val)); } STMT_END #endif #if (PERL_BCDVERSION < 0x5004000) #ifndef SvUV_set # define SvUV_set(sv, val) \ STMT_START { assert(SvTYPE(sv) == SVt_IV || SvTYPE(sv) >= SVt_PVIV); \ (((XPVIV*) SvANY(sv))->xiv_iv = (IV) (val)); } STMT_END #endif #else #ifndef SvUV_set # define SvUV_set(sv, val) \ STMT_START { assert(SvTYPE(sv) == SVt_IV || SvTYPE(sv) >= SVt_PVIV); \ (((XPVUV*) SvANY(sv))->xuv_uv = (val)); } STMT_END #endif #endif #if (PERL_BCDVERSION >= 0x5004000) && !defined(vnewSVpvf) #if defined(NEED_vnewSVpvf) static SV * DPPP_(my_vnewSVpvf)(pTHX_ const char *pat, va_list *args); static #else extern SV * DPPP_(my_vnewSVpvf)(pTHX_ const char *pat, va_list *args); #endif #ifdef vnewSVpvf # undef vnewSVpvf #endif #define vnewSVpvf(a,b) DPPP_(my_vnewSVpvf)(aTHX_ a,b) #define Perl_vnewSVpvf DPPP_(my_vnewSVpvf) #if defined(NEED_vnewSVpvf) || defined(NEED_vnewSVpvf_GLOBAL) SV * DPPP_(my_vnewSVpvf)(pTHX_ const char *pat, va_list *args) { register SV *sv = newSV(0); sv_vsetpvfn(sv, pat, strlen(pat), args, Null(SV**), 0, Null(bool*)); return sv; } #endif #endif #if (PERL_BCDVERSION >= 0x5004000) && !defined(sv_vcatpvf) # define sv_vcatpvf(sv, pat, args) sv_vcatpvfn(sv, pat, strlen(pat), args, Null(SV**), 0, Null(bool*)) #endif #if (PERL_BCDVERSION >= 0x5004000) && !defined(sv_vsetpvf) # define sv_vsetpvf(sv, pat, args) sv_vsetpvfn(sv, pat, strlen(pat), args, Null(SV**), 0, Null(bool*)) #endif #if (PERL_BCDVERSION >= 0x5004000) && !defined(sv_catpvf_mg) #if defined(NEED_sv_catpvf_mg) static void DPPP_(my_sv_catpvf_mg)(pTHX_ SV *sv, const char *pat, ...); static #else extern void DPPP_(my_sv_catpvf_mg)(pTHX_ SV *sv, const char *pat, ...); #endif #define Perl_sv_catpvf_mg DPPP_(my_sv_catpvf_mg) #if defined(NEED_sv_catpvf_mg) || defined(NEED_sv_catpvf_mg_GLOBAL) void DPPP_(my_sv_catpvf_mg)(pTHX_ SV *sv, const char *pat, ...) { va_list args; va_start(args, pat); sv_vcatpvfn(sv, pat, strlen(pat), &args, Null(SV**), 0, Null(bool*)); SvSETMAGIC(sv); va_end(args); } #endif #endif #ifdef PERL_IMPLICIT_CONTEXT #if (PERL_BCDVERSION >= 0x5004000) && !defined(sv_catpvf_mg_nocontext) #if defined(NEED_sv_catpvf_mg_nocontext) static void DPPP_(my_sv_catpvf_mg_nocontext)(SV *sv, const char *pat, ...); static #else extern void DPPP_(my_sv_catpvf_mg_nocontext)(SV *sv, const char *pat, ...); #endif #define sv_catpvf_mg_nocontext DPPP_(my_sv_catpvf_mg_nocontext) #define Perl_sv_catpvf_mg_nocontext DPPP_(my_sv_catpvf_mg_nocontext) #if defined(NEED_sv_catpvf_mg_nocontext) || defined(NEED_sv_catpvf_mg_nocontext_GLOBAL) void DPPP_(my_sv_catpvf_mg_nocontext)(SV *sv, const char *pat, ...) { dTHX; va_list args; va_start(args, pat); sv_vcatpvfn(sv, pat, strlen(pat), &args, Null(SV**), 0, Null(bool*)); SvSETMAGIC(sv); va_end(args); } #endif #endif #endif /* sv_catpvf_mg depends on sv_catpvf_mg_nocontext */ #ifndef sv_catpvf_mg # ifdef PERL_IMPLICIT_CONTEXT # define sv_catpvf_mg Perl_sv_catpvf_mg_nocontext # else # define sv_catpvf_mg Perl_sv_catpvf_mg # endif #endif #if (PERL_BCDVERSION >= 0x5004000) && !defined(sv_vcatpvf_mg) # define sv_vcatpvf_mg(sv, pat, args) \ STMT_START { \ sv_vcatpvfn(sv, pat, strlen(pat), args, Null(SV**), 0, Null(bool*)); \ SvSETMAGIC(sv); \ } STMT_END #endif #if (PERL_BCDVERSION >= 0x5004000) && !defined(sv_setpvf_mg) #if defined(NEED_sv_setpvf_mg) static void DPPP_(my_sv_setpvf_mg)(pTHX_ SV *sv, const char *pat, ...); static #else extern void DPPP_(my_sv_setpvf_mg)(pTHX_ SV *sv, const char *pat, ...); #endif #define Perl_sv_setpvf_mg DPPP_(my_sv_setpvf_mg) #if defined(NEED_sv_setpvf_mg) || defined(NEED_sv_setpvf_mg_GLOBAL) void DPPP_(my_sv_setpvf_mg)(pTHX_ SV *sv, const char *pat, ...) { va_list args; va_start(args, pat); sv_vsetpvfn(sv, pat, strlen(pat), &args, Null(SV**), 0, Null(bool*)); SvSETMAGIC(sv); va_end(args); } #endif #endif #ifdef PERL_IMPLICIT_CONTEXT #if (PERL_BCDVERSION >= 0x5004000) && !defined(sv_setpvf_mg_nocontext) #if defined(NEED_sv_setpvf_mg_nocontext) static void DPPP_(my_sv_setpvf_mg_nocontext)(SV *sv, const char *pat, ...); static #else extern void DPPP_(my_sv_setpvf_mg_nocontext)(SV *sv, const char *pat, ...); #endif #define sv_setpvf_mg_nocontext DPPP_(my_sv_setpvf_mg_nocontext) #define Perl_sv_setpvf_mg_nocontext DPPP_(my_sv_setpvf_mg_nocontext) #if defined(NEED_sv_setpvf_mg_nocontext) || defined(NEED_sv_setpvf_mg_nocontext_GLOBAL) void DPPP_(my_sv_setpvf_mg_nocontext)(SV *sv, const char *pat, ...) { dTHX; va_list args; va_start(args, pat); sv_vsetpvfn(sv, pat, strlen(pat), &args, Null(SV**), 0, Null(bool*)); SvSETMAGIC(sv); va_end(args); } #endif #endif #endif /* sv_setpvf_mg depends on sv_setpvf_mg_nocontext */ #ifndef sv_setpvf_mg # ifdef PERL_IMPLICIT_CONTEXT # define sv_setpvf_mg Perl_sv_setpvf_mg_nocontext # else # define sv_setpvf_mg Perl_sv_setpvf_mg # endif #endif #if (PERL_BCDVERSION >= 0x5004000) && !defined(sv_vsetpvf_mg) # define sv_vsetpvf_mg(sv, pat, args) \ STMT_START { \ sv_vsetpvfn(sv, pat, strlen(pat), args, Null(SV**), 0, Null(bool*)); \ SvSETMAGIC(sv); \ } STMT_END #endif /* Hint: newSVpvn_share * The SVs created by this function only mimic the behaviour of * shared PVs without really being shared. Only use if you know * what you're doing. */ #ifndef newSVpvn_share #if defined(NEED_newSVpvn_share) static SV * DPPP_(my_newSVpvn_share)(pTHX_ const char *src, I32 len, U32 hash); static #else extern SV * DPPP_(my_newSVpvn_share)(pTHX_ const char *src, I32 len, U32 hash); #endif #ifdef newSVpvn_share # undef newSVpvn_share #endif #define newSVpvn_share(a,b,c) DPPP_(my_newSVpvn_share)(aTHX_ a,b,c) #define Perl_newSVpvn_share DPPP_(my_newSVpvn_share) #if defined(NEED_newSVpvn_share) || defined(NEED_newSVpvn_share_GLOBAL) SV * DPPP_(my_newSVpvn_share)(pTHX_ const char *src, I32 len, U32 hash) { SV *sv; if (len < 0) len = -len; if (!hash) PERL_HASH(hash, (char*) src, len); sv = newSVpvn((char *) src, len); sv_upgrade(sv, SVt_PVIV); SvIVX(sv) = hash; SvREADONLY_on(sv); SvPOK_on(sv); return sv; } #endif #endif #ifndef SvSHARED_HASH # define SvSHARED_HASH(sv) (0 + SvUVX(sv)) #endif #ifndef HvNAME_get # define HvNAME_get(hv) HvNAME(hv) #endif #ifndef HvNAMELEN_get # define HvNAMELEN_get(hv) (HvNAME_get(hv) ? (I32)strlen(HvNAME_get(hv)) : 0) #endif #ifndef GvSVn # define GvSVn(gv) GvSV(gv) #endif #ifndef isGV_with_GP # define isGV_with_GP(gv) isGV(gv) #endif #ifndef gv_fetchpvn_flags # define gv_fetchpvn_flags(name, len, flags, svt) gv_fetchpv(name, flags, svt) #endif #ifndef gv_fetchsv # define gv_fetchsv(name, flags, svt) gv_fetchpv(SvPV_nolen_const(name), flags, svt) #endif #ifndef get_cvn_flags # define get_cvn_flags(name, namelen, flags) get_cv(name, flags) #endif #ifndef WARN_ALL # define WARN_ALL 0 #endif #ifndef WARN_CLOSURE # define WARN_CLOSURE 1 #endif #ifndef WARN_DEPRECATED # define WARN_DEPRECATED 2 #endif #ifndef WARN_EXITING # define WARN_EXITING 3 #endif #ifndef WARN_GLOB # define WARN_GLOB 4 #endif #ifndef WARN_IO # define WARN_IO 5 #endif #ifndef WARN_CLOSED # define WARN_CLOSED 6 #endif #ifndef WARN_EXEC # define WARN_EXEC 7 #endif #ifndef WARN_LAYER # define WARN_LAYER 8 #endif #ifndef WARN_NEWLINE # define WARN_NEWLINE 9 #endif #ifndef WARN_PIPE # define WARN_PIPE 10 #endif #ifndef WARN_UNOPENED # define WARN_UNOPENED 11 #endif #ifndef WARN_MISC # define WARN_MISC 12 #endif #ifndef WARN_NUMERIC # define WARN_NUMERIC 13 #endif #ifndef WARN_ONCE # define WARN_ONCE 14 #endif #ifndef WARN_OVERFLOW # define WARN_OVERFLOW 15 #endif #ifndef WARN_PACK # define WARN_PACK 16 #endif #ifndef WARN_PORTABLE # define WARN_PORTABLE 17 #endif #ifndef WARN_RECURSION # define WARN_RECURSION 18 #endif #ifndef WARN_REDEFINE # define WARN_REDEFINE 19 #endif #ifndef WARN_REGEXP # define WARN_REGEXP 20 #endif #ifndef WARN_SEVERE # define WARN_SEVERE 21 #endif #ifndef WARN_DEBUGGING # define WARN_DEBUGGING 22 #endif #ifndef WARN_INPLACE # define WARN_INPLACE 23 #endif #ifndef WARN_INTERNAL # define WARN_INTERNAL 24 #endif #ifndef WARN_MALLOC # define WARN_MALLOC 25 #endif #ifndef WARN_SIGNAL # define WARN_SIGNAL 26 #endif #ifndef WARN_SUBSTR # define WARN_SUBSTR 27 #endif #ifndef WARN_SYNTAX # define WARN_SYNTAX 28 #endif #ifndef WARN_AMBIGUOUS # define WARN_AMBIGUOUS 29 #endif #ifndef WARN_BAREWORD # define WARN_BAREWORD 30 #endif #ifndef WARN_DIGIT # define WARN_DIGIT 31 #endif #ifndef WARN_PARENTHESIS # define WARN_PARENTHESIS 32 #endif #ifndef WARN_PRECEDENCE # define WARN_PRECEDENCE 33 #endif #ifndef WARN_PRINTF # define WARN_PRINTF 34 #endif #ifndef WARN_PROTOTYPE # define WARN_PROTOTYPE 35 #endif #ifndef WARN_QW # define WARN_QW 36 #endif #ifndef WARN_RESERVED # define WARN_RESERVED 37 #endif #ifndef WARN_SEMICOLON # define WARN_SEMICOLON 38 #endif #ifndef WARN_TAINT # define WARN_TAINT 39 #endif #ifndef WARN_THREADS # define WARN_THREADS 40 #endif #ifndef WARN_UNINITIALIZED # define WARN_UNINITIALIZED 41 #endif #ifndef WARN_UNPACK # define WARN_UNPACK 42 #endif #ifndef WARN_UNTIE # define WARN_UNTIE 43 #endif #ifndef WARN_UTF8 # define WARN_UTF8 44 #endif #ifndef WARN_VOID # define WARN_VOID 45 #endif #ifndef WARN_ASSERTIONS # define WARN_ASSERTIONS 46 #endif #ifndef packWARN # define packWARN(a) (a) #endif #ifndef ckWARN # ifdef G_WARN_ON # define ckWARN(a) (PL_dowarn & G_WARN_ON) # else # define ckWARN(a) PL_dowarn # endif #endif #if (PERL_BCDVERSION >= 0x5004000) && !defined(warner) #if defined(NEED_warner) static void DPPP_(my_warner)(U32 err, const char *pat, ...); static #else extern void DPPP_(my_warner)(U32 err, const char *pat, ...); #endif #define Perl_warner DPPP_(my_warner) #if defined(NEED_warner) || defined(NEED_warner_GLOBAL) void DPPP_(my_warner)(U32 err, const char *pat, ...) { SV *sv; va_list args; PERL_UNUSED_ARG(err); va_start(args, pat); sv = vnewSVpvf(pat, &args); va_end(args); sv_2mortal(sv); warn("%s", SvPV_nolen(sv)); } #define warner Perl_warner #define Perl_warner_nocontext Perl_warner #endif #endif /* concatenating with "" ensures that only literal strings are accepted as argument * note that STR_WITH_LEN() can't be used as argument to macros or functions that * under some configurations might be macros */ #ifndef STR_WITH_LEN # define STR_WITH_LEN(s) (s ""), (sizeof(s)-1) #endif #ifndef newSVpvs # define newSVpvs(str) newSVpvn(str "", sizeof(str) - 1) #endif #ifndef newSVpvs_flags # define newSVpvs_flags(str, flags) newSVpvn_flags(str "", sizeof(str) - 1, flags) #endif #ifndef newSVpvs_share # define newSVpvs_share(str) newSVpvn_share(str "", sizeof(str) - 1, 0) #endif #ifndef sv_catpvs # define sv_catpvs(sv, str) sv_catpvn(sv, str "", sizeof(str) - 1) #endif #ifndef sv_setpvs # define sv_setpvs(sv, str) sv_setpvn(sv, str "", sizeof(str) - 1) #endif #ifndef hv_fetchs # define hv_fetchs(hv, key, lval) hv_fetch(hv, key "", sizeof(key) - 1, lval) #endif #ifndef hv_stores # define hv_stores(hv, key, val) hv_store(hv, key "", sizeof(key) - 1, val, 0) #endif #ifndef gv_fetchpvs # define gv_fetchpvs(name, flags, svt) gv_fetchpvn_flags(name "", sizeof(name) - 1, flags, svt) #endif #ifndef gv_stashpvs # define gv_stashpvs(name, flags) gv_stashpvn(name "", sizeof(name) - 1, flags) #endif #ifndef get_cvs # define get_cvs(name, flags) get_cvn_flags(name "", sizeof(name)-1, flags) #endif #ifndef SvGETMAGIC # define SvGETMAGIC(x) STMT_START { if (SvGMAGICAL(x)) mg_get(x); } STMT_END #endif #ifndef PERL_MAGIC_sv # define PERL_MAGIC_sv '\0' #endif #ifndef PERL_MAGIC_overload # define PERL_MAGIC_overload 'A' #endif #ifndef PERL_MAGIC_overload_elem # define PERL_MAGIC_overload_elem 'a' #endif #ifndef PERL_MAGIC_overload_table # define PERL_MAGIC_overload_table 'c' #endif #ifndef PERL_MAGIC_bm # define PERL_MAGIC_bm 'B' #endif #ifndef PERL_MAGIC_regdata # define PERL_MAGIC_regdata 'D' #endif #ifndef PERL_MAGIC_regdatum # define PERL_MAGIC_regdatum 'd' #endif #ifndef PERL_MAGIC_env # define PERL_MAGIC_env 'E' #endif #ifndef PERL_MAGIC_envelem # define PERL_MAGIC_envelem 'e' #endif #ifndef PERL_MAGIC_fm # define PERL_MAGIC_fm 'f' #endif #ifndef PERL_MAGIC_regex_global # define PERL_MAGIC_regex_global 'g' #endif #ifndef PERL_MAGIC_isa # define PERL_MAGIC_isa 'I' #endif #ifndef PERL_MAGIC_isaelem # define PERL_MAGIC_isaelem 'i' #endif #ifndef PERL_MAGIC_nkeys # define PERL_MAGIC_nkeys 'k' #endif #ifndef PERL_MAGIC_dbfile # define PERL_MAGIC_dbfile 'L' #endif #ifndef PERL_MAGIC_dbline # define PERL_MAGIC_dbline 'l' #endif #ifndef PERL_MAGIC_mutex # define PERL_MAGIC_mutex 'm' #endif #ifndef PERL_MAGIC_shared # define PERL_MAGIC_shared 'N' #endif #ifndef PERL_MAGIC_shared_scalar # define PERL_MAGIC_shared_scalar 'n' #endif #ifndef PERL_MAGIC_collxfrm # define PERL_MAGIC_collxfrm 'o' #endif #ifndef PERL_MAGIC_tied # define PERL_MAGIC_tied 'P' #endif #ifndef PERL_MAGIC_tiedelem # define PERL_MAGIC_tiedelem 'p' #endif #ifndef PERL_MAGIC_tiedscalar # define PERL_MAGIC_tiedscalar 'q' #endif #ifndef PERL_MAGIC_qr # define PERL_MAGIC_qr 'r' #endif #ifndef PERL_MAGIC_sig # define PERL_MAGIC_sig 'S' #endif #ifndef PERL_MAGIC_sigelem # define PERL_MAGIC_sigelem 's' #endif #ifndef PERL_MAGIC_taint # define PERL_MAGIC_taint 't' #endif #ifndef PERL_MAGIC_uvar # define PERL_MAGIC_uvar 'U' #endif #ifndef PERL_MAGIC_uvar_elem # define PERL_MAGIC_uvar_elem 'u' #endif #ifndef PERL_MAGIC_vstring # define PERL_MAGIC_vstring 'V' #endif #ifndef PERL_MAGIC_vec # define PERL_MAGIC_vec 'v' #endif #ifndef PERL_MAGIC_utf8 # define PERL_MAGIC_utf8 'w' #endif #ifndef PERL_MAGIC_substr # define PERL_MAGIC_substr 'x' #endif #ifndef PERL_MAGIC_defelem # define PERL_MAGIC_defelem 'y' #endif #ifndef PERL_MAGIC_glob # define PERL_MAGIC_glob '*' #endif #ifndef PERL_MAGIC_arylen # define PERL_MAGIC_arylen '#' #endif #ifndef PERL_MAGIC_pos # define PERL_MAGIC_pos '.' #endif #ifndef PERL_MAGIC_backref # define PERL_MAGIC_backref '<' #endif #ifndef PERL_MAGIC_ext # define PERL_MAGIC_ext '~' #endif /* That's the best we can do... */ #ifndef sv_catpvn_nomg # define sv_catpvn_nomg sv_catpvn #endif #ifndef sv_catsv_nomg # define sv_catsv_nomg sv_catsv #endif #ifndef sv_setsv_nomg # define sv_setsv_nomg sv_setsv #endif #ifndef sv_pvn_nomg # define sv_pvn_nomg sv_pvn #endif #ifndef SvIV_nomg # define SvIV_nomg SvIV #endif #ifndef SvUV_nomg # define SvUV_nomg SvUV #endif #ifndef sv_catpv_mg # define sv_catpv_mg(sv, ptr) \ STMT_START { \ SV *TeMpSv = sv; \ sv_catpv(TeMpSv,ptr); \ SvSETMAGIC(TeMpSv); \ } STMT_END #endif #ifndef sv_catpvn_mg # define sv_catpvn_mg(sv, ptr, len) \ STMT_START { \ SV *TeMpSv = sv; \ sv_catpvn(TeMpSv,ptr,len); \ SvSETMAGIC(TeMpSv); \ } STMT_END #endif #ifndef sv_catsv_mg # define sv_catsv_mg(dsv, ssv) \ STMT_START { \ SV *TeMpSv = dsv; \ sv_catsv(TeMpSv,ssv); \ SvSETMAGIC(TeMpSv); \ } STMT_END #endif #ifndef sv_setiv_mg # define sv_setiv_mg(sv, i) \ STMT_START { \ SV *TeMpSv = sv; \ sv_setiv(TeMpSv,i); \ SvSETMAGIC(TeMpSv); \ } STMT_END #endif #ifndef sv_setnv_mg # define sv_setnv_mg(sv, num) \ STMT_START { \ SV *TeMpSv = sv; \ sv_setnv(TeMpSv,num); \ SvSETMAGIC(TeMpSv); \ } STMT_END #endif #ifndef sv_setpv_mg # define sv_setpv_mg(sv, ptr) \ STMT_START { \ SV *TeMpSv = sv; \ sv_setpv(TeMpSv,ptr); \ SvSETMAGIC(TeMpSv); \ } STMT_END #endif #ifndef sv_setpvn_mg # define sv_setpvn_mg(sv, ptr, len) \ STMT_START { \ SV *TeMpSv = sv; \ sv_setpvn(TeMpSv,ptr,len); \ SvSETMAGIC(TeMpSv); \ } STMT_END #endif #ifndef sv_setsv_mg # define sv_setsv_mg(dsv, ssv) \ STMT_START { \ SV *TeMpSv = dsv; \ sv_setsv(TeMpSv,ssv); \ SvSETMAGIC(TeMpSv); \ } STMT_END #endif #ifndef sv_setuv_mg # define sv_setuv_mg(sv, i) \ STMT_START { \ SV *TeMpSv = sv; \ sv_setuv(TeMpSv,i); \ SvSETMAGIC(TeMpSv); \ } STMT_END #endif #ifndef sv_usepvn_mg # define sv_usepvn_mg(sv, ptr, len) \ STMT_START { \ SV *TeMpSv = sv; \ sv_usepvn(TeMpSv,ptr,len); \ SvSETMAGIC(TeMpSv); \ } STMT_END #endif #ifndef SvVSTRING_mg # define SvVSTRING_mg(sv) (SvMAGICAL(sv) ? mg_find(sv, PERL_MAGIC_vstring) : NULL) #endif /* Hint: sv_magic_portable * This is a compatibility function that is only available with * Devel::PPPort. It is NOT in the perl core. * Its purpose is to mimic the 5.8.0 behaviour of sv_magic() when * it is being passed a name pointer with namlen == 0. In that * case, perl 5.8.0 and later store the pointer, not a copy of it. * The compatibility can be provided back to perl 5.004. With * earlier versions, the code will not compile. */ #if (PERL_BCDVERSION < 0x5004000) /* code that uses sv_magic_portable will not compile */ #elif (PERL_BCDVERSION < 0x5008000) # define sv_magic_portable(sv, obj, how, name, namlen) \ STMT_START { \ SV *SvMp_sv = (sv); \ char *SvMp_name = (char *) (name); \ I32 SvMp_namlen = (namlen); \ if (SvMp_name && SvMp_namlen == 0) \ { \ MAGIC *mg; \ sv_magic(SvMp_sv, obj, how, 0, 0); \ mg = SvMAGIC(SvMp_sv); \ mg->mg_len = -42; /* XXX: this is the tricky part */ \ mg->mg_ptr = SvMp_name; \ } \ else \ { \ sv_magic(SvMp_sv, obj, how, SvMp_name, SvMp_namlen); \ } \ } STMT_END #else # define sv_magic_portable(a, b, c, d, e) sv_magic(a, b, c, d, e) #endif #ifdef USE_ITHREADS #ifndef CopFILE # define CopFILE(c) ((c)->cop_file) #endif #ifndef CopFILEGV # define CopFILEGV(c) (CopFILE(c) ? gv_fetchfile(CopFILE(c)) : Nullgv) #endif #ifndef CopFILE_set # define CopFILE_set(c,pv) ((c)->cop_file = savepv(pv)) #endif #ifndef CopFILESV # define CopFILESV(c) (CopFILE(c) ? GvSV(gv_fetchfile(CopFILE(c))) : Nullsv) #endif #ifndef CopFILEAV # define CopFILEAV(c) (CopFILE(c) ? GvAV(gv_fetchfile(CopFILE(c))) : Nullav) #endif #ifndef CopSTASHPV # define CopSTASHPV(c) ((c)->cop_stashpv) #endif #ifndef CopSTASHPV_set # define CopSTASHPV_set(c,pv) ((c)->cop_stashpv = ((pv) ? savepv(pv) : Nullch)) #endif #ifndef CopSTASH # define CopSTASH(c) (CopSTASHPV(c) ? gv_stashpv(CopSTASHPV(c),GV_ADD) : Nullhv) #endif #ifndef CopSTASH_set # define CopSTASH_set(c,hv) CopSTASHPV_set(c, (hv) ? HvNAME(hv) : Nullch) #endif #ifndef CopSTASH_eq # define CopSTASH_eq(c,hv) ((hv) && (CopSTASHPV(c) == HvNAME(hv) \ || (CopSTASHPV(c) && HvNAME(hv) \ && strEQ(CopSTASHPV(c), HvNAME(hv))))) #endif #else #ifndef CopFILEGV # define CopFILEGV(c) ((c)->cop_filegv) #endif #ifndef CopFILEGV_set # define CopFILEGV_set(c,gv) ((c)->cop_filegv = (GV*)SvREFCNT_inc(gv)) #endif #ifndef CopFILE_set # define CopFILE_set(c,pv) CopFILEGV_set((c), gv_fetchfile(pv)) #endif #ifndef CopFILESV # define CopFILESV(c) (CopFILEGV(c) ? GvSV(CopFILEGV(c)) : Nullsv) #endif #ifndef CopFILEAV # define CopFILEAV(c) (CopFILEGV(c) ? GvAV(CopFILEGV(c)) : Nullav) #endif #ifndef CopFILE # define CopFILE(c) (CopFILESV(c) ? SvPVX(CopFILESV(c)) : Nullch) #endif #ifndef CopSTASH # define CopSTASH(c) ((c)->cop_stash) #endif #ifndef CopSTASH_set # define CopSTASH_set(c,hv) ((c)->cop_stash = (hv)) #endif #ifndef CopSTASHPV # define CopSTASHPV(c) (CopSTASH(c) ? HvNAME(CopSTASH(c)) : Nullch) #endif #ifndef CopSTASHPV_set # define CopSTASHPV_set(c,pv) CopSTASH_set((c), gv_stashpv(pv,GV_ADD)) #endif #ifndef CopSTASH_eq # define CopSTASH_eq(c,hv) (CopSTASH(c) == (hv)) #endif #endif /* USE_ITHREADS */ #ifndef IN_PERL_COMPILETIME # define IN_PERL_COMPILETIME (PL_curcop == &PL_compiling) #endif #ifndef IN_LOCALE_RUNTIME # define IN_LOCALE_RUNTIME (PL_curcop->op_private & HINT_LOCALE) #endif #ifndef IN_LOCALE_COMPILETIME # define IN_LOCALE_COMPILETIME (PL_hints & HINT_LOCALE) #endif #ifndef IN_LOCALE # define IN_LOCALE (IN_PERL_COMPILETIME ? IN_LOCALE_COMPILETIME : IN_LOCALE_RUNTIME) #endif #ifndef IS_NUMBER_IN_UV # define IS_NUMBER_IN_UV 0x01 #endif #ifndef IS_NUMBER_GREATER_THAN_UV_MAX # define IS_NUMBER_GREATER_THAN_UV_MAX 0x02 #endif #ifndef IS_NUMBER_NOT_INT # define IS_NUMBER_NOT_INT 0x04 #endif #ifndef IS_NUMBER_NEG # define IS_NUMBER_NEG 0x08 #endif #ifndef IS_NUMBER_INFINITY # define IS_NUMBER_INFINITY 0x10 #endif #ifndef IS_NUMBER_NAN # define IS_NUMBER_NAN 0x20 #endif #ifndef GROK_NUMERIC_RADIX # define GROK_NUMERIC_RADIX(sp, send) grok_numeric_radix(sp, send) #endif #ifndef PERL_SCAN_GREATER_THAN_UV_MAX # define PERL_SCAN_GREATER_THAN_UV_MAX 0x02 #endif #ifndef PERL_SCAN_SILENT_ILLDIGIT # define PERL_SCAN_SILENT_ILLDIGIT 0x04 #endif #ifndef PERL_SCAN_ALLOW_UNDERSCORES # define PERL_SCAN_ALLOW_UNDERSCORES 0x01 #endif #ifndef PERL_SCAN_DISALLOW_PREFIX # define PERL_SCAN_DISALLOW_PREFIX 0x02 #endif #ifndef grok_numeric_radix #if defined(NEED_grok_numeric_radix) static bool DPPP_(my_grok_numeric_radix)(pTHX_ const char ** sp, const char * send); static #else extern bool DPPP_(my_grok_numeric_radix)(pTHX_ const char ** sp, const char * send); #endif #ifdef grok_numeric_radix # undef grok_numeric_radix #endif #define grok_numeric_radix(a,b) DPPP_(my_grok_numeric_radix)(aTHX_ a,b) #define Perl_grok_numeric_radix DPPP_(my_grok_numeric_radix) #if defined(NEED_grok_numeric_radix) || defined(NEED_grok_numeric_radix_GLOBAL) bool DPPP_(my_grok_numeric_radix)(pTHX_ const char **sp, const char *send) { #ifdef USE_LOCALE_NUMERIC #ifdef PL_numeric_radix_sv if (PL_numeric_radix_sv && IN_LOCALE) { STRLEN len; char* radix = SvPV(PL_numeric_radix_sv, len); if (*sp + len <= send && memEQ(*sp, radix, len)) { *sp += len; return TRUE; } } #else /* older perls don't have PL_numeric_radix_sv so the radix * must manually be requested from locale.h */ #include dTHR; /* needed for older threaded perls */ struct lconv *lc = localeconv(); char *radix = lc->decimal_point; if (radix && IN_LOCALE) { STRLEN len = strlen(radix); if (*sp + len <= send && memEQ(*sp, radix, len)) { *sp += len; return TRUE; } } #endif #endif /* USE_LOCALE_NUMERIC */ /* always try "." if numeric radix didn't match because * we may have data from different locales mixed */ if (*sp < send && **sp == '.') { ++*sp; return TRUE; } return FALSE; } #endif #endif #ifndef grok_number #if defined(NEED_grok_number) static int DPPP_(my_grok_number)(pTHX_ const char * pv, STRLEN len, UV * valuep); static #else extern int DPPP_(my_grok_number)(pTHX_ const char * pv, STRLEN len, UV * valuep); #endif #ifdef grok_number # undef grok_number #endif #define grok_number(a,b,c) DPPP_(my_grok_number)(aTHX_ a,b,c) #define Perl_grok_number DPPP_(my_grok_number) #if defined(NEED_grok_number) || defined(NEED_grok_number_GLOBAL) int DPPP_(my_grok_number)(pTHX_ const char *pv, STRLEN len, UV *valuep) { const char *s = pv; const char *send = pv + len; const UV max_div_10 = UV_MAX / 10; const char max_mod_10 = UV_MAX % 10; int numtype = 0; int sawinf = 0; int sawnan = 0; while (s < send && isSPACE(*s)) s++; if (s == send) { return 0; } else if (*s == '-') { s++; numtype = IS_NUMBER_NEG; } else if (*s == '+') s++; if (s == send) return 0; /* next must be digit or the radix separator or beginning of infinity */ if (isDIGIT(*s)) { /* UVs are at least 32 bits, so the first 9 decimal digits cannot overflow. */ UV value = *s - '0'; /* This construction seems to be more optimiser friendly. (without it gcc does the isDIGIT test and the *s - '0' separately) With it gcc on arm is managing 6 instructions (6 cycles) per digit. In theory the optimiser could deduce how far to unroll the loop before checking for overflow. */ if (++s < send) { int digit = *s - '0'; if (digit >= 0 && digit <= 9) { value = value * 10 + digit; if (++s < send) { digit = *s - '0'; if (digit >= 0 && digit <= 9) { value = value * 10 + digit; if (++s < send) { digit = *s - '0'; if (digit >= 0 && digit <= 9) { value = value * 10 + digit; if (++s < send) { digit = *s - '0'; if (digit >= 0 && digit <= 9) { value = value * 10 + digit; if (++s < send) { digit = *s - '0'; if (digit >= 0 && digit <= 9) { value = value * 10 + digit; if (++s < send) { digit = *s - '0'; if (digit >= 0 && digit <= 9) { value = value * 10 + digit; if (++s < send) { digit = *s - '0'; if (digit >= 0 && digit <= 9) { value = value * 10 + digit; if (++s < send) { digit = *s - '0'; if (digit >= 0 && digit <= 9) { value = value * 10 + digit; if (++s < send) { /* Now got 9 digits, so need to check each time for overflow. */ digit = *s - '0'; while (digit >= 0 && digit <= 9 && (value < max_div_10 || (value == max_div_10 && digit <= max_mod_10))) { value = value * 10 + digit; if (++s < send) digit = *s - '0'; else break; } if (digit >= 0 && digit <= 9 && (s < send)) { /* value overflowed. skip the remaining digits, don't worry about setting *valuep. */ do { s++; } while (s < send && isDIGIT(*s)); numtype |= IS_NUMBER_GREATER_THAN_UV_MAX; goto skip_value; } } } } } } } } } } } } } } } } } } numtype |= IS_NUMBER_IN_UV; if (valuep) *valuep = value; skip_value: if (GROK_NUMERIC_RADIX(&s, send)) { numtype |= IS_NUMBER_NOT_INT; while (s < send && isDIGIT(*s)) /* optional digits after the radix */ s++; } } else if (GROK_NUMERIC_RADIX(&s, send)) { numtype |= IS_NUMBER_NOT_INT | IS_NUMBER_IN_UV; /* valuep assigned below */ /* no digits before the radix means we need digits after it */ if (s < send && isDIGIT(*s)) { do { s++; } while (s < send && isDIGIT(*s)); if (valuep) { /* integer approximation is valid - it's 0. */ *valuep = 0; } } else return 0; } else if (*s == 'I' || *s == 'i') { s++; if (s == send || (*s != 'N' && *s != 'n')) return 0; s++; if (s == send || (*s != 'F' && *s != 'f')) return 0; s++; if (s < send && (*s == 'I' || *s == 'i')) { s++; if (s == send || (*s != 'N' && *s != 'n')) return 0; s++; if (s == send || (*s != 'I' && *s != 'i')) return 0; s++; if (s == send || (*s != 'T' && *s != 't')) return 0; s++; if (s == send || (*s != 'Y' && *s != 'y')) return 0; s++; } sawinf = 1; } else if (*s == 'N' || *s == 'n') { /* XXX TODO: There are signaling NaNs and quiet NaNs. */ s++; if (s == send || (*s != 'A' && *s != 'a')) return 0; s++; if (s == send || (*s != 'N' && *s != 'n')) return 0; s++; sawnan = 1; } else return 0; if (sawinf) { numtype &= IS_NUMBER_NEG; /* Keep track of sign */ numtype |= IS_NUMBER_INFINITY | IS_NUMBER_NOT_INT; } else if (sawnan) { numtype &= IS_NUMBER_NEG; /* Keep track of sign */ numtype |= IS_NUMBER_NAN | IS_NUMBER_NOT_INT; } else if (s < send) { /* we can have an optional exponent part */ if (*s == 'e' || *s == 'E') { /* The only flag we keep is sign. Blow away any "it's UV" */ numtype &= IS_NUMBER_NEG; numtype |= IS_NUMBER_NOT_INT; s++; if (s < send && (*s == '-' || *s == '+')) s++; if (s < send && isDIGIT(*s)) { do { s++; } while (s < send && isDIGIT(*s)); } else return 0; } } while (s < send && isSPACE(*s)) s++; if (s >= send) return numtype; if (len == 10 && memEQ(pv, "0 but true", 10)) { if (valuep) *valuep = 0; return IS_NUMBER_IN_UV; } return 0; } #endif #endif /* * The grok_* routines have been modified to use warn() instead of * Perl_warner(). Also, 'hexdigit' was the former name of PL_hexdigit, * which is why the stack variable has been renamed to 'xdigit'. */ #ifndef grok_bin #if defined(NEED_grok_bin) static UV DPPP_(my_grok_bin)(pTHX_ const char * start, STRLEN * len_p, I32 * flags, NV * result); static #else extern UV DPPP_(my_grok_bin)(pTHX_ const char * start, STRLEN * len_p, I32 * flags, NV * result); #endif #ifdef grok_bin # undef grok_bin #endif #define grok_bin(a,b,c,d) DPPP_(my_grok_bin)(aTHX_ a,b,c,d) #define Perl_grok_bin DPPP_(my_grok_bin) #if defined(NEED_grok_bin) || defined(NEED_grok_bin_GLOBAL) UV DPPP_(my_grok_bin)(pTHX_ const char *start, STRLEN *len_p, I32 *flags, NV *result) { const char *s = start; STRLEN len = *len_p; UV value = 0; NV value_nv = 0; const UV max_div_2 = UV_MAX / 2; bool allow_underscores = *flags & PERL_SCAN_ALLOW_UNDERSCORES; bool overflowed = FALSE; if (!(*flags & PERL_SCAN_DISALLOW_PREFIX)) { /* strip off leading b or 0b. for compatibility silently suffer "b" and "0b" as valid binary numbers. */ if (len >= 1) { if (s[0] == 'b') { s++; len--; } else if (len >= 2 && s[0] == '0' && s[1] == 'b') { s+=2; len-=2; } } } for (; len-- && *s; s++) { char bit = *s; if (bit == '0' || bit == '1') { /* Write it in this wonky order with a goto to attempt to get the compiler to make the common case integer-only loop pretty tight. With gcc seems to be much straighter code than old scan_bin. */ redo: if (!overflowed) { if (value <= max_div_2) { value = (value << 1) | (bit - '0'); continue; } /* Bah. We're just overflowed. */ warn("Integer overflow in binary number"); overflowed = TRUE; value_nv = (NV) value; } value_nv *= 2.0; /* If an NV has not enough bits in its mantissa to * represent a UV this summing of small low-order numbers * is a waste of time (because the NV cannot preserve * the low-order bits anyway): we could just remember when * did we overflow and in the end just multiply value_nv by the * right amount. */ value_nv += (NV)(bit - '0'); continue; } if (bit == '_' && len && allow_underscores && (bit = s[1]) && (bit == '0' || bit == '1')) { --len; ++s; goto redo; } if (!(*flags & PERL_SCAN_SILENT_ILLDIGIT)) warn("Illegal binary digit '%c' ignored", *s); break; } if ( ( overflowed && value_nv > 4294967295.0) #if UVSIZE > 4 || (!overflowed && value > 0xffffffff ) #endif ) { warn("Binary number > 0b11111111111111111111111111111111 non-portable"); } *len_p = s - start; if (!overflowed) { *flags = 0; return value; } *flags = PERL_SCAN_GREATER_THAN_UV_MAX; if (result) *result = value_nv; return UV_MAX; } #endif #endif #ifndef grok_hex #if defined(NEED_grok_hex) static UV DPPP_(my_grok_hex)(pTHX_ const char * start, STRLEN * len_p, I32 * flags, NV * result); static #else extern UV DPPP_(my_grok_hex)(pTHX_ const char * start, STRLEN * len_p, I32 * flags, NV * result); #endif #ifdef grok_hex # undef grok_hex #endif #define grok_hex(a,b,c,d) DPPP_(my_grok_hex)(aTHX_ a,b,c,d) #define Perl_grok_hex DPPP_(my_grok_hex) #if defined(NEED_grok_hex) || defined(NEED_grok_hex_GLOBAL) UV DPPP_(my_grok_hex)(pTHX_ const char *start, STRLEN *len_p, I32 *flags, NV *result) { const char *s = start; STRLEN len = *len_p; UV value = 0; NV value_nv = 0; const UV max_div_16 = UV_MAX / 16; bool allow_underscores = *flags & PERL_SCAN_ALLOW_UNDERSCORES; bool overflowed = FALSE; const char *xdigit; if (!(*flags & PERL_SCAN_DISALLOW_PREFIX)) { /* strip off leading x or 0x. for compatibility silently suffer "x" and "0x" as valid hex numbers. */ if (len >= 1) { if (s[0] == 'x') { s++; len--; } else if (len >= 2 && s[0] == '0' && s[1] == 'x') { s+=2; len-=2; } } } for (; len-- && *s; s++) { xdigit = strchr((char *) PL_hexdigit, *s); if (xdigit) { /* Write it in this wonky order with a goto to attempt to get the compiler to make the common case integer-only loop pretty tight. With gcc seems to be much straighter code than old scan_hex. */ redo: if (!overflowed) { if (value <= max_div_16) { value = (value << 4) | ((xdigit - PL_hexdigit) & 15); continue; } warn("Integer overflow in hexadecimal number"); overflowed = TRUE; value_nv = (NV) value; } value_nv *= 16.0; /* If an NV has not enough bits in its mantissa to * represent a UV this summing of small low-order numbers * is a waste of time (because the NV cannot preserve * the low-order bits anyway): we could just remember when * did we overflow and in the end just multiply value_nv by the * right amount of 16-tuples. */ value_nv += (NV)((xdigit - PL_hexdigit) & 15); continue; } if (*s == '_' && len && allow_underscores && s[1] && (xdigit = strchr((char *) PL_hexdigit, s[1]))) { --len; ++s; goto redo; } if (!(*flags & PERL_SCAN_SILENT_ILLDIGIT)) warn("Illegal hexadecimal digit '%c' ignored", *s); break; } if ( ( overflowed && value_nv > 4294967295.0) #if UVSIZE > 4 || (!overflowed && value > 0xffffffff ) #endif ) { warn("Hexadecimal number > 0xffffffff non-portable"); } *len_p = s - start; if (!overflowed) { *flags = 0; return value; } *flags = PERL_SCAN_GREATER_THAN_UV_MAX; if (result) *result = value_nv; return UV_MAX; } #endif #endif #ifndef grok_oct #if defined(NEED_grok_oct) static UV DPPP_(my_grok_oct)(pTHX_ const char * start, STRLEN * len_p, I32 * flags, NV * result); static #else extern UV DPPP_(my_grok_oct)(pTHX_ const char * start, STRLEN * len_p, I32 * flags, NV * result); #endif #ifdef grok_oct # undef grok_oct #endif #define grok_oct(a,b,c,d) DPPP_(my_grok_oct)(aTHX_ a,b,c,d) #define Perl_grok_oct DPPP_(my_grok_oct) #if defined(NEED_grok_oct) || defined(NEED_grok_oct_GLOBAL) UV DPPP_(my_grok_oct)(pTHX_ const char *start, STRLEN *len_p, I32 *flags, NV *result) { const char *s = start; STRLEN len = *len_p; UV value = 0; NV value_nv = 0; const UV max_div_8 = UV_MAX / 8; bool allow_underscores = *flags & PERL_SCAN_ALLOW_UNDERSCORES; bool overflowed = FALSE; for (; len-- && *s; s++) { /* gcc 2.95 optimiser not smart enough to figure that this subtraction out front allows slicker code. */ int digit = *s - '0'; if (digit >= 0 && digit <= 7) { /* Write it in this wonky order with a goto to attempt to get the compiler to make the common case integer-only loop pretty tight. */ redo: if (!overflowed) { if (value <= max_div_8) { value = (value << 3) | digit; continue; } /* Bah. We're just overflowed. */ warn("Integer overflow in octal number"); overflowed = TRUE; value_nv = (NV) value; } value_nv *= 8.0; /* If an NV has not enough bits in its mantissa to * represent a UV this summing of small low-order numbers * is a waste of time (because the NV cannot preserve * the low-order bits anyway): we could just remember when * did we overflow and in the end just multiply value_nv by the * right amount of 8-tuples. */ value_nv += (NV)digit; continue; } if (digit == ('_' - '0') && len && allow_underscores && (digit = s[1] - '0') && (digit >= 0 && digit <= 7)) { --len; ++s; goto redo; } /* Allow \octal to work the DWIM way (that is, stop scanning * as soon as non-octal characters are seen, complain only iff * someone seems to want to use the digits eight and nine). */ if (digit == 8 || digit == 9) { if (!(*flags & PERL_SCAN_SILENT_ILLDIGIT)) warn("Illegal octal digit '%c' ignored", *s); } break; } if ( ( overflowed && value_nv > 4294967295.0) #if UVSIZE > 4 || (!overflowed && value > 0xffffffff ) #endif ) { warn("Octal number > 037777777777 non-portable"); } *len_p = s - start; if (!overflowed) { *flags = 0; return value; } *flags = PERL_SCAN_GREATER_THAN_UV_MAX; if (result) *result = value_nv; return UV_MAX; } #endif #endif #if !defined(my_snprintf) #if defined(NEED_my_snprintf) static int DPPP_(my_my_snprintf)(char * buffer, const Size_t len, const char * format, ...); static #else extern int DPPP_(my_my_snprintf)(char * buffer, const Size_t len, const char * format, ...); #endif #define my_snprintf DPPP_(my_my_snprintf) #define Perl_my_snprintf DPPP_(my_my_snprintf) #if defined(NEED_my_snprintf) || defined(NEED_my_snprintf_GLOBAL) int DPPP_(my_my_snprintf)(char *buffer, const Size_t len, const char *format, ...) { dTHX; int retval; va_list ap; va_start(ap, format); #ifdef HAS_VSNPRINTF retval = vsnprintf(buffer, len, format, ap); #else retval = vsprintf(buffer, format, ap); #endif va_end(ap); if (retval < 0 || (len > 0 && (Size_t)retval >= len)) Perl_croak(aTHX_ "panic: my_snprintf buffer overflow"); return retval; } #endif #endif #if !defined(my_sprintf) #if defined(NEED_my_sprintf) static int DPPP_(my_my_sprintf)(char * buffer, const char * pat, ...); static #else extern int DPPP_(my_my_sprintf)(char * buffer, const char * pat, ...); #endif #define my_sprintf DPPP_(my_my_sprintf) #define Perl_my_sprintf DPPP_(my_my_sprintf) #if defined(NEED_my_sprintf) || defined(NEED_my_sprintf_GLOBAL) int DPPP_(my_my_sprintf)(char *buffer, const char* pat, ...) { va_list args; va_start(args, pat); vsprintf(buffer, pat, args); va_end(args); return strlen(buffer); } #endif #endif #ifdef NO_XSLOCKS # ifdef dJMPENV # define dXCPT dJMPENV; int rEtV = 0 # define XCPT_TRY_START JMPENV_PUSH(rEtV); if (rEtV == 0) # define XCPT_TRY_END JMPENV_POP; # define XCPT_CATCH if (rEtV != 0) # define XCPT_RETHROW JMPENV_JUMP(rEtV) # else # define dXCPT Sigjmp_buf oldTOP; int rEtV = 0 # define XCPT_TRY_START Copy(top_env, oldTOP, 1, Sigjmp_buf); rEtV = Sigsetjmp(top_env, 1); if (rEtV == 0) # define XCPT_TRY_END Copy(oldTOP, top_env, 1, Sigjmp_buf); # define XCPT_CATCH if (rEtV != 0) # define XCPT_RETHROW Siglongjmp(top_env, rEtV) # endif #endif #if !defined(my_strlcat) #if defined(NEED_my_strlcat) static Size_t DPPP_(my_my_strlcat)(char * dst, const char * src, Size_t size); static #else extern Size_t DPPP_(my_my_strlcat)(char * dst, const char * src, Size_t size); #endif #define my_strlcat DPPP_(my_my_strlcat) #define Perl_my_strlcat DPPP_(my_my_strlcat) #if defined(NEED_my_strlcat) || defined(NEED_my_strlcat_GLOBAL) Size_t DPPP_(my_my_strlcat)(char *dst, const char *src, Size_t size) { Size_t used, length, copy; used = strlen(dst); length = strlen(src); if (size > 0 && used < size - 1) { copy = (length >= size - used) ? size - used - 1 : length; memcpy(dst + used, src, copy); dst[used + copy] = '\0'; } return used + length; } #endif #endif #if !defined(my_strlcpy) #if defined(NEED_my_strlcpy) static Size_t DPPP_(my_my_strlcpy)(char * dst, const char * src, Size_t size); static #else extern Size_t DPPP_(my_my_strlcpy)(char * dst, const char * src, Size_t size); #endif #define my_strlcpy DPPP_(my_my_strlcpy) #define Perl_my_strlcpy DPPP_(my_my_strlcpy) #if defined(NEED_my_strlcpy) || defined(NEED_my_strlcpy_GLOBAL) Size_t DPPP_(my_my_strlcpy)(char *dst, const char *src, Size_t size) { Size_t length, copy; length = strlen(src); if (size > 0) { copy = (length >= size) ? size - 1 : length; memcpy(dst, src, copy); dst[copy] = '\0'; } return length; } #endif #endif #ifndef PERL_PV_ESCAPE_QUOTE # define PERL_PV_ESCAPE_QUOTE 0x0001 #endif #ifndef PERL_PV_PRETTY_QUOTE # define PERL_PV_PRETTY_QUOTE PERL_PV_ESCAPE_QUOTE #endif #ifndef PERL_PV_PRETTY_ELLIPSES # define PERL_PV_PRETTY_ELLIPSES 0x0002 #endif #ifndef PERL_PV_PRETTY_LTGT # define PERL_PV_PRETTY_LTGT 0x0004 #endif #ifndef PERL_PV_ESCAPE_FIRSTCHAR # define PERL_PV_ESCAPE_FIRSTCHAR 0x0008 #endif #ifndef PERL_PV_ESCAPE_UNI # define PERL_PV_ESCAPE_UNI 0x0100 #endif #ifndef PERL_PV_ESCAPE_UNI_DETECT # define PERL_PV_ESCAPE_UNI_DETECT 0x0200 #endif #ifndef PERL_PV_ESCAPE_ALL # define PERL_PV_ESCAPE_ALL 0x1000 #endif #ifndef PERL_PV_ESCAPE_NOBACKSLASH # define PERL_PV_ESCAPE_NOBACKSLASH 0x2000 #endif #ifndef PERL_PV_ESCAPE_NOCLEAR # define PERL_PV_ESCAPE_NOCLEAR 0x4000 #endif #ifndef PERL_PV_ESCAPE_RE # define PERL_PV_ESCAPE_RE 0x8000 #endif #ifndef PERL_PV_PRETTY_NOCLEAR # define PERL_PV_PRETTY_NOCLEAR PERL_PV_ESCAPE_NOCLEAR #endif #ifndef PERL_PV_PRETTY_DUMP # define PERL_PV_PRETTY_DUMP PERL_PV_PRETTY_ELLIPSES|PERL_PV_PRETTY_QUOTE #endif #ifndef PERL_PV_PRETTY_REGPROP # define PERL_PV_PRETTY_REGPROP PERL_PV_PRETTY_ELLIPSES|PERL_PV_PRETTY_LTGT|PERL_PV_ESCAPE_RE #endif /* Hint: pv_escape * Note that unicode functionality is only backported to * those perl versions that support it. For older perl * versions, the implementation will fall back to bytes. */ #ifndef pv_escape #if defined(NEED_pv_escape) static char * DPPP_(my_pv_escape)(pTHX_ SV * dsv, char const * const str, const STRLEN count, const STRLEN max, STRLEN * const escaped, const U32 flags); static #else extern char * DPPP_(my_pv_escape)(pTHX_ SV * dsv, char const * const str, const STRLEN count, const STRLEN max, STRLEN * const escaped, const U32 flags); #endif #ifdef pv_escape # undef pv_escape #endif #define pv_escape(a,b,c,d,e,f) DPPP_(my_pv_escape)(aTHX_ a,b,c,d,e,f) #define Perl_pv_escape DPPP_(my_pv_escape) #if defined(NEED_pv_escape) || defined(NEED_pv_escape_GLOBAL) char * DPPP_(my_pv_escape)(pTHX_ SV *dsv, char const * const str, const STRLEN count, const STRLEN max, STRLEN * const escaped, const U32 flags) { const char esc = flags & PERL_PV_ESCAPE_RE ? '%' : '\\'; const char dq = flags & PERL_PV_ESCAPE_QUOTE ? '"' : esc; char octbuf[32] = "%123456789ABCDF"; STRLEN wrote = 0; STRLEN chsize = 0; STRLEN readsize = 1; #if defined(is_utf8_string) && defined(utf8_to_uvchr) bool isuni = flags & PERL_PV_ESCAPE_UNI ? 1 : 0; #endif const char *pv = str; const char * const end = pv + count; octbuf[0] = esc; if (!(flags & PERL_PV_ESCAPE_NOCLEAR)) sv_setpvs(dsv, ""); #if defined(is_utf8_string) && defined(utf8_to_uvchr) if ((flags & PERL_PV_ESCAPE_UNI_DETECT) && is_utf8_string((U8*)pv, count)) isuni = 1; #endif for (; pv < end && (!max || wrote < max) ; pv += readsize) { const UV u = #if defined(is_utf8_string) && defined(utf8_to_uvchr) isuni ? utf8_to_uvchr((U8*)pv, &readsize) : #endif (U8)*pv; const U8 c = (U8)u & 0xFF; if (u > 255 || (flags & PERL_PV_ESCAPE_ALL)) { if (flags & PERL_PV_ESCAPE_FIRSTCHAR) chsize = my_snprintf(octbuf, sizeof octbuf, "%"UVxf, u); else chsize = my_snprintf(octbuf, sizeof octbuf, "%cx{%"UVxf"}", esc, u); } else if (flags & PERL_PV_ESCAPE_NOBACKSLASH) { chsize = 1; } else { if (c == dq || c == esc || !isPRINT(c)) { chsize = 2; switch (c) { case '\\' : /* fallthrough */ case '%' : if (c == esc) octbuf[1] = esc; else chsize = 1; break; case '\v' : octbuf[1] = 'v'; break; case '\t' : octbuf[1] = 't'; break; case '\r' : octbuf[1] = 'r'; break; case '\n' : octbuf[1] = 'n'; break; case '\f' : octbuf[1] = 'f'; break; case '"' : if (dq == '"') octbuf[1] = '"'; else chsize = 1; break; default: chsize = my_snprintf(octbuf, sizeof octbuf, pv < end && isDIGIT((U8)*(pv+readsize)) ? "%c%03o" : "%c%o", esc, c); } } else { chsize = 1; } } if (max && wrote + chsize > max) { break; } else if (chsize > 1) { sv_catpvn(dsv, octbuf, chsize); wrote += chsize; } else { char tmp[2]; my_snprintf(tmp, sizeof tmp, "%c", c); sv_catpvn(dsv, tmp, 1); wrote++; } if (flags & PERL_PV_ESCAPE_FIRSTCHAR) break; } if (escaped != NULL) *escaped= pv - str; return SvPVX(dsv); } #endif #endif #ifndef pv_pretty #if defined(NEED_pv_pretty) static char * DPPP_(my_pv_pretty)(pTHX_ SV * dsv, char const * const str, const STRLEN count, const STRLEN max, char const * const start_color, char const * const end_color, const U32 flags); static #else extern char * DPPP_(my_pv_pretty)(pTHX_ SV * dsv, char const * const str, const STRLEN count, const STRLEN max, char const * const start_color, char const * const end_color, const U32 flags); #endif #ifdef pv_pretty # undef pv_pretty #endif #define pv_pretty(a,b,c,d,e,f,g) DPPP_(my_pv_pretty)(aTHX_ a,b,c,d,e,f,g) #define Perl_pv_pretty DPPP_(my_pv_pretty) #if defined(NEED_pv_pretty) || defined(NEED_pv_pretty_GLOBAL) char * DPPP_(my_pv_pretty)(pTHX_ SV *dsv, char const * const str, const STRLEN count, const STRLEN max, char const * const start_color, char const * const end_color, const U32 flags) { const U8 dq = (flags & PERL_PV_PRETTY_QUOTE) ? '"' : '%'; STRLEN escaped; if (!(flags & PERL_PV_PRETTY_NOCLEAR)) sv_setpvs(dsv, ""); if (dq == '"') sv_catpvs(dsv, "\""); else if (flags & PERL_PV_PRETTY_LTGT) sv_catpvs(dsv, "<"); if (start_color != NULL) sv_catpv(dsv, D_PPP_CONSTPV_ARG(start_color)); pv_escape(dsv, str, count, max, &escaped, flags | PERL_PV_ESCAPE_NOCLEAR); if (end_color != NULL) sv_catpv(dsv, D_PPP_CONSTPV_ARG(end_color)); if (dq == '"') sv_catpvs(dsv, "\""); else if (flags & PERL_PV_PRETTY_LTGT) sv_catpvs(dsv, ">"); if ((flags & PERL_PV_PRETTY_ELLIPSES) && escaped < count) sv_catpvs(dsv, "..."); return SvPVX(dsv); } #endif #endif #ifndef pv_display #if defined(NEED_pv_display) static char * DPPP_(my_pv_display)(pTHX_ SV * dsv, const char * pv, STRLEN cur, STRLEN len, STRLEN pvlim); static #else extern char * DPPP_(my_pv_display)(pTHX_ SV * dsv, const char * pv, STRLEN cur, STRLEN len, STRLEN pvlim); #endif #ifdef pv_display # undef pv_display #endif #define pv_display(a,b,c,d,e) DPPP_(my_pv_display)(aTHX_ a,b,c,d,e) #define Perl_pv_display DPPP_(my_pv_display) #if defined(NEED_pv_display) || defined(NEED_pv_display_GLOBAL) char * DPPP_(my_pv_display)(pTHX_ SV *dsv, const char *pv, STRLEN cur, STRLEN len, STRLEN pvlim) { pv_pretty(dsv, pv, cur, pvlim, NULL, NULL, PERL_PV_PRETTY_DUMP); if (len > cur && pv[cur] == '\0') sv_catpvs(dsv, "\\0"); return SvPVX(dsv); } #endif #endif #endif /* _P_P_PORTABILITY_H_ */ /* End of File ppport.h */ Moose-2.1604/README.md000644 000766 000024 00000000705 12617452415 014433 0ustar00etherstaff000000 000000 [![CPAN version](https://badge.fury.io/pl/Moose.svg)](http://badge.fury.io/pl/Moose) [![Build Status](https://travis-ci.org/moose/Moose.png?branch=master,stable/2.12)](https://travis-ci.org/moose/Moose) [![Coverage Status](https://coveralls.io/repos/moose/Moose/badge.png?branch=master)](https://coveralls.io/r/moose/Moose?branch=master) Moose ===== Moose is a postmodern object system for Perl 5. Moose on CPAN: [https://metacpan.org/release/Moose] Moose-2.1604/t/000700 000766 000024 00000000000 12617452415 013403 5ustar00etherstaff000000 000000 Moose-2.1604/TODO000644 000766 000024 00000044101 12617452415 013642 0ustar00etherstaff000000 000000 # vim: set ft=markdown : ## Uncontroversial Items These items are reasonably well thought out, and can go in any major release. ### RT Tickets RT#59478/RT#63000 - 0+ overload causes NV conversion on == on perls before 5.14 - this causes comparisons to fail when the number can't fit in an NV without precision loss. I'd like to fix this in a more general way (forcing anyone else who might be using == on tc objects to do weird things isn't very good), although it's hard to test to see what actually works. ### Revise MetaRole API to reunify class/role metaroles: apply_metaroles( for => $meta, roles => { attribute => [...], class => [...], role_attribute => [ ... ], } ); If the $meta is a class, we apply the roles to the class. If it's a role, we hold onto them and apply them as part of applying the role to a class. To make this all work nicely, we'll probably want to track the original role where a method was defined, just like we do with attributes currently. We'll also need to store method modifiers with their original role, which may mean adding some sort of Moose::Meta::Role::MethodModifier class. For each role-specific thing (methods, attributes, etc.) we should allow a `role_attribute`, `role_method`, etc. key. The common case will be that the metaroles are intended for the consuming class, but we should allow for metaroles on the role's metaobjects as well. ### Deprecate old-style Moose extensions Moose extensions that work by calling `Moose->init_meta(metaclass => 'Some::Custom::Metaclass', ...)` during their own `init_meta` should be deprecated, so they can be removed later (this should fix the issues with `init_meta` generation in Moose::Exporter, see RT51561) This needs to wait until the previous fix gets in, since it will hopefully eliminate the need to write custom `init_meta` methods entirely. ### Attributes in roles need to be able to participate in role composition Right now, this fails with no decent workaround: package R1; use Moose::Role; has foo => (is => 'ro'); package R2; use Moose::Role; with 'R1'; requires 'foo'; package C; use Moose; with 'R2'; Role attributes really need to be able to participate in role-role combination. This should also fix "with 'Role1', 'Role2'" being broken when Role1 implements a method as an accessor and Role2 requires that method, but at least in that case you can split it into two 'with' statements with minimal loss of functionality. ### Method modifiers in roles should silently add 'requires' for them This shouldn't be a functionality change, just a better error message (and better introspectability). This shouldn't happen if the role already contains a method by that name, so it'll depend on the previous fix going in (so "has foo => (is => 'ro'); around foo => sub { }" doesn't produce a 'requires' entry). ### has +foo in roles There's no actual reason for this not to work, and it gets asked often enough that we really should just do it at some point. ### use Sub::Identify instead of doing our own thing with `get_code_info` No idea why we stopped using Sub::Identify in the past, but there's no reason not to do this. We have a bug fix in our version (the `isGV_with_GP` thing), so this should be submitted to Sub::Identify first. ## Needs Thought These are things we think are good ideas, but they need more fleshing out. ### Actual API for metaclass extensions Right now, the only way to bundle multiple metaclass traits is via Moose::Exporter. This is unhelpful if you want to apply the extension to a metaclass object rather than a class you're actually writing. We should come up with an API for doing this. ### MooseX::NonMoose in core I think all of the actual issues are solved at this point. The only issue is the (necessary) implementation weirdness - it sets up multiple inheritance between the non-Moose class and Moose::Object, and it installs a custom constructor method at 'extends' time (although perhaps this could be solved by moving some of the logic back into Moose::Object::new?). Other than that, it handles everything transparently as far as I can tell. ### Fix attribute and method metaclass compatibility So i got this wrong when rewriting it last year - right now, metaclass compat checks the default attribute and method metaclasses, which is wrong. This means that if a parent class does "use MooseX::FollowPBP", then attributes declared in a subclass will get PBP-style accessors, which is quite surprising. On the other hand, sometimes metaclasses might need to be able to say "I'm going to assume that all of my attributes at least inherit from this custom class", so we might need to split it into "default specified by the user" and "default specified by the metaclass" and only do compat checking on the second? I'm not actually sure this is a valid use case though. Something that probably should be taken into account though is attributes and methods that extend existing attributes or methods from a superclass should inherit the metaclass of the existing one. Also not sure if this is correct, but something to think about. ### Rename a bunch of the public API methods Right now the public API is kind of a mess - we have things like `get_method` vs `find_method_by_name` (you almost always want to use the latter), there being no `has_method` equivalent that checks superclasses, `get_method_list` being public but only returning method names, while `_get_local_methods` is private (returning method objects), and yet neither of those looks at superclasses, and basically none of this naming follows any kind of consistent pattern. What we really need is a consistent and easy to remember API where the method that people would think to use first is the method that they actually mean. Something like renaming `find_method_by_name` to `find_method`, and `get_method` to `find_local_method` or something along those lines. ### Clean up metaclass constructors There's a _lot_ of different conventions in here. Some things to consider: * `new` vs `_new` * allowing new( 'name', %args ) vs ( name => 'name', %args ) * `Method->wrap` vs `Method->new` ### Move method modifiers out to an external module Class::Method::Modifiers uses a different method for doing method modifiers, which I'm not sure why we aren't using in Moose right now. Optionally using Class::Method::Modifiers::Fast would be even better - it uses Data::Util to implement XS method modifiers, which could help things a lot. ### Move type constraints out to an external module There's nothing about our type constraint system that requires being tied to Moose - it's conceptually an entirely separate system that Moose just happens to use. Splitting it out into its own thing (that Moose could extend to add things like role types) would make things conceptually a lot cleaner, and would let people interested in just the type system have that. ### Merge Class::MOP and Moose This is a long term goal, but would allow for a lot of things to be cleaned up. There's a bunch of stuff that's duplicated, and other stuff that's not implemented as well as it could be (Class::MOP::Method::Wrapped should be a role, for instance). ### Moose::Util::TypeConstraints vs Moose::Meta::Type{Coercion,Constraint} The Util module has _way_ too much functionality. It needs to be refactored so it's a thin sugar layer on top of the meta API. As it stands now, it does things like parse type names (and determine if they're valid), manage the registry, and much more. ### Anything with a \_(meta)?class method Every method that returns a class name needs to become a rw attribute that can be set via the constructor. ## Things to contemplate These are ideas we're not sure about. Prototypes are welcome, but we may never merge the feature. ### Does applying metaroles really need to reinitialize the metaclass? Seems like the logic that's actually necessary is already contained in `rebless_instance`, and not reinitializing means that existing attributes and methods won't be blown away when metaroles are applied. ### Do we want to core namespace::autoclean behavior somehow? This would add Variable::Magic as a required XS dep (not a huge deal at the moment, since Sub::Name is also a required XS dep, but it'd be nice for Moose to be able to be pure perl again at some point in the future, and I'm not sure what the relative chances of Sub::Name vs Variable::Magic making it into core are). If we enabled it by default, this would also break things for people who have introduced Moose into legacy-ish systems where roles are faked using exporters (since those imported methods would be cleaned). If we decide we want this, we may want to core it as an option first ("use Moose -clean" or so), and move to making it the default later. ### Should using -excludes with a role add 'requires' for excluded methods? It seems to make sense, since otherwise you're violating the role's API contract. ### Moose "strict" mode use Moose 'strict'; This would allow us to have all sort of expensive tests which can be turned off in prod. ### Moose::Philosophy.pod To explain Moose from a very high level ### moosedoc We certainly have enough meta-information to make pretty complete POD docs. ## TODO test summary Note that some of these are fairly old, and may not be things we actually want to do anymore. ### `t/basics/basic_class_setup.t` Imports aren't automatically cleaned. Need to think about bringing namespace::autoclean functionality into core. ### `t/bugs/create_anon_recursion.t` Loading Moose::Meta::Class (or probably a lot of other metaclasses) before loading Moose or Class::MOP causes issues (the bootstrapping gets confused). ### `t/bugs/handles_foreign_class_bug.t` There should be a warning when delegated methods override 'new' (and possibly others?). ### `t/bugs/role_caller.t` Role methods should be cloned into classes on composition so that using caller(0) in a role method uses the class's package, not the role's. ### `t/cmop/metaclass_incompatibility.t` If a child class is created before a parent class, metaclass compatibility checks won't run on the child when the parent is created, and so the child could end up with an incompatible metaclass. ### `t/cmop/modify_parent_method.t` Modifying parent class methods after a child class has already wrapped them with a method modifier will cause the child class method to retain the original method that it wrapped, not the new one it was replaced with. ### `t/immutable/inline_close_over.t` Initializers and custom error classes still close over metaobjects. Initializers do it because the initializer has to be passed in the attribute metaobject as a parameter, and custom error classes can't be automatically inlined. ### `t/metaclasses/moose_exporter_trait_aliases.t` Renamed imports aren't cleaned on unimport. For instance: package Foo; use Moose has => { -as => 'my_has' }; no Moose; # Foo still contains my_has ### `t/metaclasses/reinitialize.t` Special method types can't have method metaroles applied. Applying a method metarole to a class doesn't apply that role to things like constructors, accessors, etc. ### `t/roles/method_modifiers.t` Method modifiers in roles don't support the regex form of method selection. ### `t/roles/role_compose_requires.t` Accessors for attributes defined in roles don't satisfy role method requirements (this is detailed above - Attributes in roles need to be able to participate in role composition). ### `t/todo_tests/exception_reflects_failed_constraint.t` Type constraint failures should indicate which ancestor constraint failed - subtype 'Foo', as 'Str', where { length < 5 } should mention Str when passed an arrayref, but not when passed the string "ArrayRef". ### `t/todo_tests/moose_and_threads.t` On 5.8, the type constraint name parser isn't thread safe. ### `t/todo_tests/replacing_super_methods.t` Modifying parent class methods after a child class has already wrapped them with a override will cause 'super' in the child class to call the original parent class method, not the one it was overridden with. ### `t/todo_tests/required_role_accessors.t` Role attribute accessors don't satisfy requires from roles they consume. ### `t/todo_tests/role_insertion_order.t` Roles don't preserve attribute `insertion_order`. ### `t/todo_tests/various_role_features.t` * Role attribute accessors don't satisfy requires from roles they consume. * Role combination should produce a conflict when one role has an actual method and the other role has an accessor. * Role attribute accessors should not override methods in the class the role is applied to. * Role attribute accessors should be delegated when a class does handles => 'Role'. * Delegating to a role doesn't make $class->does('Role') true. * Method modifier in a role doesn't create a method requirement. * `Role->meta->has_method('attr_accessor')` is false. ### `t/type_constraints/type_names.t` Type constraint object constructors don't validate the type name provided. ### MooseX::Aliases in core Is there any reason why this would be bad? It would certainly make the implementation a little faster (it can be inlined better). ### MooseX::MethodAttributes in core discuss ---- ## Old todo Old todo stuff which may be totally out of date. ### DDuncan's Str types subtype 'Str' => as 'Value' => where { Encode::is_utf8( $_[0] ) or $_[0] !~ m/[^0x00-0x7F]/x } => optimize_as { defined($_[0]) && !ref($_[0]) }; subtype 'Blob' => as 'Value' => where { !Encode::is_utf8( $_[0] ) } => optimize_as { defined($_[0]) && !ref($_[0]) }; ### type unions Add support for doing it with Classes which do not have a type constraint yet created ### type intersections Mostly just for Roles KENTNL is working on this ### inherited slot specs 'does' can be added to,.. but not changed (need type unions for this) ### proxy attributes a proxied attribute is an attribute which looks like an attribute, talks like an attribute, smells like an attribute,.. but if you look behind the curtain,.. its over there.. in that other object (... probably be a custom metaclass) ### local coerce [13:16] mst stevan: slight problem with coerce [13:16] mst I only get to declare it once [13:17] mst so if I'm trying to declare it cast-style per-source-class rather than per-target-class [13:17] mst I am extremely screwed [13:17] stevan yes [13:17] stevan they are not class specific [13:18] stevan they are attached to the type constraint itself [13:18] * stevan ponders anon-coercion-metaobjects [13:18] mst yes, that's fine [13:19] mst but when I declare a class [13:19] mst I want to be able to say "this class coerces to X type via " [13:19] stevan yeah something like that [13:19] stevan oh,.. hmm [13:20] stevan sort of like inflate/deflate? [13:20] stevan around the accessors? [13:25] * bluefeet has quit (Remote host closed the connection) [13:27] mst no [13:27] mst nothing like that [13:27] mst like a cast [13:31] mst stevan: $obj->foo($bar); where 'foo' expects a 'Foo' object [13:31] mst stevan: is effectively $bar, right? [13:32] mst stevan: I want to be able to say in package Bar [13:32] mst stevan: coerce_to 'Foo' via { ... }; [13:32] mst etc. [13:53] stevan hmm ### add support for locally scoped TC This would borrow from MooseX::TypeLibrary to prefix the TC with the name of the package. It would then be accesible from the outside as the fully scoped name, but the local attributes would use it first. (this would need support in the registry for this). ### look into sugar extensions Use roles as sugar layer function providers (ala MooseX::AttributeHelpers). This would allow custom metaclasses to provide roles to extend the sugar syntax with. (NOTE: Talk to phaylon a bit more on this) ### allow a switch of some kind to optionally turn TC checking off at runtime The type checks can get expensive and some people have suggested that allowing the checks to be turned off would be helpful for deploying into performance intensive systems. Perhaps this can actually be done as an option to `make_immutable`? ### misc. minor bits * make the errors for TCs use `->message` * look into localizing the messages too * make ANON TCs be lazy, so they can possibly be subsituted for the real thing later * make ANON TCs more introspectable * add this ... subtype 'Username', from 'Str', where { (/[a-z][a-z0-9]+/i or fail('Invalid character(s)')) and (length($_) >= 5 or fail('Too short (less than 5 chars)')) } on_fail { MyException->throw(value => $_[0], message => $_[1]) }; fail() will just return false unless the call is made via `$tc->check_or_fail($value);` * and then something like this: subtype Foo => as Bar => where { ... } => scoped => -global; subtype Foo => as Bar => where { ... } => scoped => -local; # or subtype Foo => as Bar => where { ... } => in __PACKAGE__ ; # or (not sure if it would be possible) my $Foo = subtype Bar => where { ... }; ### Deep coercion? [17:10] stevan: it should do it if I pass coerce => 1 as part of the attribute definition [17:12] autarch: what I am not 100% sure of is how to tell it to deep coerce and when to not [17:13] cause a basic coerce is from A to B [17:13] hmm [17:13] which is valid for collection types too [17:13] deep coercion is what you are asking for [17:13] yeah [17:13] so perhaps we add deep_coerce => 1 [17:13] which will do it [17:13] that's fine for me [17:13] k `coerce_deeply => 1 # reads better` ### Moose::Meta::TypeConstraint::Parameter{izable,ized} The relationship between these two classes is very odd. In particular, this line in Parameterized is insane: foreach my $type (Moose::Util::TypeConstraints::get_all_parameterizable_types()) { Why does it need to loop through all parameterizable types? Shouldn't it know which parameterizable type it "came from"? Moose-2.1604/xs/000700 000766 000024 00000000000 12617452415 013572 5ustar00etherstaff000000 000000 Moose-2.1604/xt/000700 000766 000024 00000000000 12617452415 013573 5ustar00etherstaff000000 000000 Moose-2.1604/xt/author/000700 000766 000024 00000000000 12617452415 015075 5ustar00etherstaff000000 000000 Moose-2.1604/xt/release/000700 000766 000024 00000000000 12617452415 015213 5ustar00etherstaff000000 000000 Moose-2.1604/xt/release/00-compile.t000644 000766 000024 00000052047 12617452415 017267 0ustar00etherstaff000000 000000 use 5.006; use strict; use warnings; # this test was generated with Dist::Zilla::Plugin::Test::Compile 2.054 use Test::More 0.94; plan tests => 367 + ($ENV{AUTHOR_TESTING} ? 1 : 0); my @module_files = ( 'Class/MOP.pm', 'Class/MOP/Class/Immutable/Trait.pm', 'Class/MOP/Deprecated.pm', 'Class/MOP/Instance.pm', 'Class/MOP/Method.pm', 'Class/MOP/Method/Generated.pm', 'Class/MOP/Method/Meta.pm', 'Class/MOP/MiniTrait.pm', 'Class/MOP/Mixin.pm', 'Class/MOP/Mixin/AttributeCore.pm', 'Class/MOP/Mixin/HasMethods.pm', 'Class/MOP/Mixin/HasOverloads.pm', 'Class/MOP/Object.pm', 'Class/MOP/Overload.pm', 'Moose.pm', 'Moose/Conflicts.pm', 'Moose/Deprecated.pm', 'Moose/Exception.pm', 'Moose/Exception/AccessorMustReadWrite.pm', 'Moose/Exception/AddParameterizableTypeTakesParameterizableType.pm', 'Moose/Exception/AddRoleTakesAMooseMetaRoleInstance.pm', 'Moose/Exception/AddRoleToARoleTakesAMooseMetaRole.pm', 'Moose/Exception/ApplyTakesABlessedInstance.pm', 'Moose/Exception/AttachToClassNeedsAClassMOPClassInstanceOrASubclass.pm', 'Moose/Exception/AttributeConflictInRoles.pm', 'Moose/Exception/AttributeConflictInSummation.pm', 'Moose/Exception/AttributeExtensionIsNotSupportedInRoles.pm', 'Moose/Exception/AttributeIsRequired.pm', 'Moose/Exception/AttributeMustBeAnClassMOPMixinAttributeCoreOrSubclass.pm', 'Moose/Exception/AttributeNamesDoNotMatch.pm', 'Moose/Exception/AttributeValueIsNotAnObject.pm', 'Moose/Exception/AttributeValueIsNotDefined.pm', 'Moose/Exception/AutoDeRefNeedsArrayRefOrHashRef.pm', 'Moose/Exception/BadOptionFormat.pm', 'Moose/Exception/BothBuilderAndDefaultAreNotAllowed.pm', 'Moose/Exception/BuilderDoesNotExist.pm', 'Moose/Exception/BuilderMethodNotSupportedForAttribute.pm', 'Moose/Exception/BuilderMethodNotSupportedForInlineAttribute.pm', 'Moose/Exception/BuilderMustBeAMethodName.pm', 'Moose/Exception/CallingMethodOnAnImmutableInstance.pm', 'Moose/Exception/CallingReadOnlyMethodOnAnImmutableInstance.pm', 'Moose/Exception/CanExtendOnlyClasses.pm', 'Moose/Exception/CanOnlyConsumeRole.pm', 'Moose/Exception/CanOnlyWrapBlessedCode.pm', 'Moose/Exception/CanReblessOnlyIntoASubclass.pm', 'Moose/Exception/CanReblessOnlyIntoASuperclass.pm', 'Moose/Exception/CannotAddAdditionalTypeCoercionsToUnion.pm', 'Moose/Exception/CannotAddAsAnAttributeToARole.pm', 'Moose/Exception/CannotApplyBaseClassRolesToRole.pm', 'Moose/Exception/CannotAssignValueToReadOnlyAccessor.pm', 'Moose/Exception/CannotAugmentIfLocalMethodPresent.pm', 'Moose/Exception/CannotAugmentNoSuperMethod.pm', 'Moose/Exception/CannotAutoDerefWithoutIsa.pm', 'Moose/Exception/CannotAutoDereferenceTypeConstraint.pm', 'Moose/Exception/CannotCalculateNativeType.pm', 'Moose/Exception/CannotCallAnAbstractBaseMethod.pm', 'Moose/Exception/CannotCallAnAbstractMethod.pm', 'Moose/Exception/CannotCoerceAWeakRef.pm', 'Moose/Exception/CannotCoerceAttributeWhichHasNoCoercion.pm', 'Moose/Exception/CannotCreateHigherOrderTypeWithoutATypeParameter.pm', 'Moose/Exception/CannotCreateMethodAliasLocalMethodIsPresent.pm', 'Moose/Exception/CannotCreateMethodAliasLocalMethodIsPresentInClass.pm', 'Moose/Exception/CannotDelegateLocalMethodIsPresent.pm', 'Moose/Exception/CannotDelegateWithoutIsa.pm', 'Moose/Exception/CannotFindDelegateMetaclass.pm', 'Moose/Exception/CannotFindType.pm', 'Moose/Exception/CannotFindTypeGivenToMatchOnType.pm', 'Moose/Exception/CannotFixMetaclassCompatibility.pm', 'Moose/Exception/CannotGenerateInlineConstraint.pm', 'Moose/Exception/CannotInitializeMooseMetaRoleComposite.pm', 'Moose/Exception/CannotInlineTypeConstraintCheck.pm', 'Moose/Exception/CannotLocatePackageInINC.pm', 'Moose/Exception/CannotMakeMetaclassCompatible.pm', 'Moose/Exception/CannotOverrideALocalMethod.pm', 'Moose/Exception/CannotOverrideBodyOfMetaMethods.pm', 'Moose/Exception/CannotOverrideLocalMethodIsPresent.pm', 'Moose/Exception/CannotOverrideNoSuperMethod.pm', 'Moose/Exception/CannotRegisterUnnamedTypeConstraint.pm', 'Moose/Exception/CannotUseLazyBuildAndDefaultSimultaneously.pm', 'Moose/Exception/CircularReferenceInAlso.pm', 'Moose/Exception/ClassDoesNotHaveInitMeta.pm', 'Moose/Exception/ClassDoesTheExcludedRole.pm', 'Moose/Exception/ClassNamesDoNotMatch.pm', 'Moose/Exception/CloneObjectExpectsAnInstanceOfMetaclass.pm', 'Moose/Exception/CodeBlockMustBeACodeRef.pm', 'Moose/Exception/CoercingWithoutCoercions.pm', 'Moose/Exception/CoercionAlreadyExists.pm', 'Moose/Exception/CoercionNeedsTypeConstraint.pm', 'Moose/Exception/ConflictDetectedInCheckRoleExclusions.pm', 'Moose/Exception/ConflictDetectedInCheckRoleExclusionsInToClass.pm', 'Moose/Exception/ConstructClassInstanceTakesPackageName.pm', 'Moose/Exception/CouldNotCreateMethod.pm', 'Moose/Exception/CouldNotCreateWriter.pm', 'Moose/Exception/CouldNotEvalConstructor.pm', 'Moose/Exception/CouldNotEvalDestructor.pm', 'Moose/Exception/CouldNotFindTypeConstraintToCoerceFrom.pm', 'Moose/Exception/CouldNotGenerateInlineAttributeMethod.pm', 'Moose/Exception/CouldNotLocateTypeConstraintForUnion.pm', 'Moose/Exception/CouldNotParseType.pm', 'Moose/Exception/CreateMOPClassTakesArrayRefOfAttributes.pm', 'Moose/Exception/CreateMOPClassTakesArrayRefOfSuperclasses.pm', 'Moose/Exception/CreateMOPClassTakesHashRefOfMethods.pm', 'Moose/Exception/CreateTakesArrayRefOfRoles.pm', 'Moose/Exception/CreateTakesHashRefOfAttributes.pm', 'Moose/Exception/CreateTakesHashRefOfMethods.pm', 'Moose/Exception/DefaultToMatchOnTypeMustBeCodeRef.pm', 'Moose/Exception/DelegationToAClassWhichIsNotLoaded.pm', 'Moose/Exception/DelegationToARoleWhichIsNotLoaded.pm', 'Moose/Exception/DelegationToATypeWhichIsNotAClass.pm', 'Moose/Exception/DoesRequiresRoleName.pm', 'Moose/Exception/EnumCalledWithAnArrayRefAndAdditionalArgs.pm', 'Moose/Exception/EnumValuesMustBeString.pm', 'Moose/Exception/ExtendsMissingArgs.pm', 'Moose/Exception/HandlesMustBeAHashRef.pm', 'Moose/Exception/IllegalInheritedOptions.pm', 'Moose/Exception/IllegalMethodTypeToAddMethodModifier.pm', 'Moose/Exception/IncompatibleMetaclassOfSuperclass.pm', 'Moose/Exception/InitMetaRequiresClass.pm', 'Moose/Exception/InitializeTakesUnBlessedPackageName.pm', 'Moose/Exception/InstanceBlessedIntoWrongClass.pm', 'Moose/Exception/InstanceMustBeABlessedReference.pm', 'Moose/Exception/InvalidArgPassedToMooseUtilMetaRole.pm', 'Moose/Exception/InvalidArgumentToMethod.pm', 'Moose/Exception/InvalidArgumentsToTraitAliases.pm', 'Moose/Exception/InvalidBaseTypeGivenToCreateParameterizedTypeConstraint.pm', 'Moose/Exception/InvalidHandleValue.pm', 'Moose/Exception/InvalidHasProvidedInARole.pm', 'Moose/Exception/InvalidNameForType.pm', 'Moose/Exception/InvalidOverloadOperator.pm', 'Moose/Exception/InvalidRoleApplication.pm', 'Moose/Exception/InvalidTypeConstraint.pm', 'Moose/Exception/InvalidTypeGivenToCreateParameterizedTypeConstraint.pm', 'Moose/Exception/InvalidValueForIs.pm', 'Moose/Exception/IsaDoesNotDoTheRole.pm', 'Moose/Exception/IsaLacksDoesMethod.pm', 'Moose/Exception/LazyAttributeNeedsADefault.pm', 'Moose/Exception/Legacy.pm', 'Moose/Exception/MOPAttributeNewNeedsAttributeName.pm', 'Moose/Exception/MatchActionMustBeACodeRef.pm', 'Moose/Exception/MessageParameterMustBeCodeRef.pm', 'Moose/Exception/MetaclassIsAClassNotASubclassOfGivenMetaclass.pm', 'Moose/Exception/MetaclassIsARoleNotASubclassOfGivenMetaclass.pm', 'Moose/Exception/MetaclassIsNotASubclassOfGivenMetaclass.pm', 'Moose/Exception/MetaclassMustBeASubclassOfMooseMetaClass.pm', 'Moose/Exception/MetaclassMustBeASubclassOfMooseMetaRole.pm', 'Moose/Exception/MetaclassMustBeDerivedFromClassMOPClass.pm', 'Moose/Exception/MetaclassNotLoaded.pm', 'Moose/Exception/MetaclassTypeIncompatible.pm', 'Moose/Exception/MethodExpectedAMetaclassObject.pm', 'Moose/Exception/MethodExpectsFewerArgs.pm', 'Moose/Exception/MethodExpectsMoreArgs.pm', 'Moose/Exception/MethodModifierNeedsMethodName.pm', 'Moose/Exception/MethodNameConflictInRoles.pm', 'Moose/Exception/MethodNameNotFoundInInheritanceHierarchy.pm', 'Moose/Exception/MethodNameNotGiven.pm', 'Moose/Exception/MustDefineAMethodName.pm', 'Moose/Exception/MustDefineAnAttributeName.pm', 'Moose/Exception/MustDefineAnOverloadOperator.pm', 'Moose/Exception/MustHaveAtLeastOneValueToEnumerate.pm', 'Moose/Exception/MustPassAHashOfOptions.pm', 'Moose/Exception/MustPassAMooseMetaRoleInstanceOrSubclass.pm', 'Moose/Exception/MustPassAPackageNameOrAnExistingClassMOPPackageInstance.pm', 'Moose/Exception/MustPassEvenNumberOfArguments.pm', 'Moose/Exception/MustPassEvenNumberOfAttributeOptions.pm', 'Moose/Exception/MustProvideANameForTheAttribute.pm', 'Moose/Exception/MustSpecifyAtleastOneMethod.pm', 'Moose/Exception/MustSpecifyAtleastOneRole.pm', 'Moose/Exception/MustSpecifyAtleastOneRoleToApplicant.pm', 'Moose/Exception/MustSupplyAClassMOPAttributeInstance.pm', 'Moose/Exception/MustSupplyADelegateToMethod.pm', 'Moose/Exception/MustSupplyAMetaclass.pm', 'Moose/Exception/MustSupplyAMooseMetaAttributeInstance.pm', 'Moose/Exception/MustSupplyAnAccessorTypeToConstructWith.pm', 'Moose/Exception/MustSupplyAnAttributeToConstructWith.pm', 'Moose/Exception/MustSupplyArrayRefAsCurriedArguments.pm', 'Moose/Exception/MustSupplyPackageNameAndName.pm', 'Moose/Exception/NeedsTypeConstraintUnionForTypeCoercionUnion.pm', 'Moose/Exception/NeitherAttributeNorAttributeNameIsGiven.pm', 'Moose/Exception/NeitherClassNorClassNameIsGiven.pm', 'Moose/Exception/NeitherRoleNorRoleNameIsGiven.pm', 'Moose/Exception/NeitherTypeNorTypeNameIsGiven.pm', 'Moose/Exception/NoAttributeFoundInSuperClass.pm', 'Moose/Exception/NoBodyToInitializeInAnAbstractBaseClass.pm', 'Moose/Exception/NoCasesMatched.pm', 'Moose/Exception/NoConstraintCheckForTypeConstraint.pm', 'Moose/Exception/NoDestructorClassSpecified.pm', 'Moose/Exception/NoImmutableTraitSpecifiedForClass.pm', 'Moose/Exception/NoParentGivenToSubtype.pm', 'Moose/Exception/OnlyInstancesCanBeCloned.pm', 'Moose/Exception/OperatorIsRequired.pm', 'Moose/Exception/OverloadConflictInSummation.pm', 'Moose/Exception/OverloadRequiresAMetaClass.pm', 'Moose/Exception/OverloadRequiresAMetaMethod.pm', 'Moose/Exception/OverloadRequiresAMetaOverload.pm', 'Moose/Exception/OverloadRequiresAMethodNameOrCoderef.pm', 'Moose/Exception/OverloadRequiresAnOperator.pm', 'Moose/Exception/OverloadRequiresNamesForCoderef.pm', 'Moose/Exception/OverrideConflictInComposition.pm', 'Moose/Exception/OverrideConflictInSummation.pm', 'Moose/Exception/PackageDoesNotUseMooseExporter.pm', 'Moose/Exception/PackageNameAndNameParamsNotGivenToWrap.pm', 'Moose/Exception/PackagesAndModulesAreNotCachable.pm', 'Moose/Exception/ParameterIsNotSubtypeOfParent.pm', 'Moose/Exception/ReferencesAreNotAllowedAsDefault.pm', 'Moose/Exception/RequiredAttributeLacksInitialization.pm', 'Moose/Exception/RequiredAttributeNeedsADefault.pm', 'Moose/Exception/RequiredMethodsImportedByClass.pm', 'Moose/Exception/RequiredMethodsNotImplementedByClass.pm', 'Moose/Exception/Role/Attribute.pm', 'Moose/Exception/Role/AttributeName.pm', 'Moose/Exception/Role/Class.pm', 'Moose/Exception/Role/EitherAttributeOrAttributeName.pm', 'Moose/Exception/Role/Instance.pm', 'Moose/Exception/Role/InstanceClass.pm', 'Moose/Exception/Role/InvalidAttributeOptions.pm', 'Moose/Exception/Role/Method.pm', 'Moose/Exception/Role/ParamsHash.pm', 'Moose/Exception/Role/Role.pm', 'Moose/Exception/Role/RoleForCreate.pm', 'Moose/Exception/Role/RoleForCreateMOPClass.pm', 'Moose/Exception/Role/TypeConstraint.pm', 'Moose/Exception/RoleDoesTheExcludedRole.pm', 'Moose/Exception/RoleExclusionConflict.pm', 'Moose/Exception/RoleNameRequired.pm', 'Moose/Exception/RoleNameRequiredForMooseMetaRole.pm', 'Moose/Exception/RolesDoNotSupportAugment.pm', 'Moose/Exception/RolesDoNotSupportExtends.pm', 'Moose/Exception/RolesDoNotSupportInner.pm', 'Moose/Exception/RolesDoNotSupportRegexReferencesForMethodModifiers.pm', 'Moose/Exception/RolesInCreateTakesAnArrayRef.pm', 'Moose/Exception/RolesListMustBeInstancesOfMooseMetaRole.pm', 'Moose/Exception/SingleParamsToNewMustBeHashRef.pm', 'Moose/Exception/TriggerMustBeACodeRef.pm', 'Moose/Exception/TypeConstraintCannotBeUsedForAParameterizableType.pm', 'Moose/Exception/TypeConstraintIsAlreadyCreated.pm', 'Moose/Exception/TypeParameterMustBeMooseMetaType.pm', 'Moose/Exception/UnableToCanonicalizeHandles.pm', 'Moose/Exception/UnableToCanonicalizeNonRolePackage.pm', 'Moose/Exception/UnableToRecognizeDelegateMetaclass.pm', 'Moose/Exception/UndefinedHashKeysPassedToMethod.pm', 'Moose/Exception/UnionCalledWithAnArrayRefAndAdditionalArgs.pm', 'Moose/Exception/UnionTakesAtleastTwoTypeNames.pm', 'Moose/Exception/ValidationFailedForInlineTypeConstraint.pm', 'Moose/Exception/ValidationFailedForTypeConstraint.pm', 'Moose/Exception/WrapTakesACodeRefToBless.pm', 'Moose/Exception/WrongTypeConstraintGiven.pm', 'Moose/Exporter.pm', 'Moose/Meta/Attribute/Native/Trait.pm', 'Moose/Meta/Attribute/Native/Trait/Array.pm', 'Moose/Meta/Attribute/Native/Trait/Bool.pm', 'Moose/Meta/Attribute/Native/Trait/Code.pm', 'Moose/Meta/Attribute/Native/Trait/Counter.pm', 'Moose/Meta/Attribute/Native/Trait/Hash.pm', 'Moose/Meta/Attribute/Native/Trait/Number.pm', 'Moose/Meta/Attribute/Native/Trait/String.pm', 'Moose/Meta/Class.pm', 'Moose/Meta/Class/Immutable/Trait.pm', 'Moose/Meta/Instance.pm', 'Moose/Meta/Method.pm', 'Moose/Meta/Method/Accessor.pm', 'Moose/Meta/Method/Accessor/Native.pm', 'Moose/Meta/Method/Accessor/Native/Array.pm', 'Moose/Meta/Method/Accessor/Native/Array/Writer.pm', 'Moose/Meta/Method/Accessor/Native/Array/accessor.pm', 'Moose/Meta/Method/Accessor/Native/Array/clear.pm', 'Moose/Meta/Method/Accessor/Native/Array/count.pm', 'Moose/Meta/Method/Accessor/Native/Array/delete.pm', 'Moose/Meta/Method/Accessor/Native/Array/elements.pm', 'Moose/Meta/Method/Accessor/Native/Array/first.pm', 'Moose/Meta/Method/Accessor/Native/Array/first_index.pm', 'Moose/Meta/Method/Accessor/Native/Array/get.pm', 'Moose/Meta/Method/Accessor/Native/Array/grep.pm', 'Moose/Meta/Method/Accessor/Native/Array/insert.pm', 'Moose/Meta/Method/Accessor/Native/Array/is_empty.pm', 'Moose/Meta/Method/Accessor/Native/Array/join.pm', 'Moose/Meta/Method/Accessor/Native/Array/map.pm', 'Moose/Meta/Method/Accessor/Native/Array/natatime.pm', 'Moose/Meta/Method/Accessor/Native/Array/pop.pm', 'Moose/Meta/Method/Accessor/Native/Array/push.pm', 'Moose/Meta/Method/Accessor/Native/Array/reduce.pm', 'Moose/Meta/Method/Accessor/Native/Array/set.pm', 'Moose/Meta/Method/Accessor/Native/Array/shallow_clone.pm', 'Moose/Meta/Method/Accessor/Native/Array/shift.pm', 'Moose/Meta/Method/Accessor/Native/Array/shuffle.pm', 'Moose/Meta/Method/Accessor/Native/Array/sort.pm', 'Moose/Meta/Method/Accessor/Native/Array/sort_in_place.pm', 'Moose/Meta/Method/Accessor/Native/Array/splice.pm', 'Moose/Meta/Method/Accessor/Native/Array/uniq.pm', 'Moose/Meta/Method/Accessor/Native/Array/unshift.pm', 'Moose/Meta/Method/Accessor/Native/Bool/not.pm', 'Moose/Meta/Method/Accessor/Native/Bool/set.pm', 'Moose/Meta/Method/Accessor/Native/Bool/toggle.pm', 'Moose/Meta/Method/Accessor/Native/Bool/unset.pm', 'Moose/Meta/Method/Accessor/Native/Code/execute.pm', 'Moose/Meta/Method/Accessor/Native/Code/execute_method.pm', 'Moose/Meta/Method/Accessor/Native/Collection.pm', 'Moose/Meta/Method/Accessor/Native/Counter/Writer.pm', 'Moose/Meta/Method/Accessor/Native/Counter/dec.pm', 'Moose/Meta/Method/Accessor/Native/Counter/inc.pm', 'Moose/Meta/Method/Accessor/Native/Counter/reset.pm', 'Moose/Meta/Method/Accessor/Native/Counter/set.pm', 'Moose/Meta/Method/Accessor/Native/Hash.pm', 'Moose/Meta/Method/Accessor/Native/Hash/Writer.pm', 'Moose/Meta/Method/Accessor/Native/Hash/accessor.pm', 'Moose/Meta/Method/Accessor/Native/Hash/clear.pm', 'Moose/Meta/Method/Accessor/Native/Hash/count.pm', 'Moose/Meta/Method/Accessor/Native/Hash/defined.pm', 'Moose/Meta/Method/Accessor/Native/Hash/delete.pm', 'Moose/Meta/Method/Accessor/Native/Hash/elements.pm', 'Moose/Meta/Method/Accessor/Native/Hash/exists.pm', 'Moose/Meta/Method/Accessor/Native/Hash/get.pm', 'Moose/Meta/Method/Accessor/Native/Hash/is_empty.pm', 'Moose/Meta/Method/Accessor/Native/Hash/keys.pm', 'Moose/Meta/Method/Accessor/Native/Hash/kv.pm', 'Moose/Meta/Method/Accessor/Native/Hash/set.pm', 'Moose/Meta/Method/Accessor/Native/Hash/shallow_clone.pm', 'Moose/Meta/Method/Accessor/Native/Hash/values.pm', 'Moose/Meta/Method/Accessor/Native/Number/abs.pm', 'Moose/Meta/Method/Accessor/Native/Number/add.pm', 'Moose/Meta/Method/Accessor/Native/Number/div.pm', 'Moose/Meta/Method/Accessor/Native/Number/mod.pm', 'Moose/Meta/Method/Accessor/Native/Number/mul.pm', 'Moose/Meta/Method/Accessor/Native/Number/set.pm', 'Moose/Meta/Method/Accessor/Native/Number/sub.pm', 'Moose/Meta/Method/Accessor/Native/Reader.pm', 'Moose/Meta/Method/Accessor/Native/String/append.pm', 'Moose/Meta/Method/Accessor/Native/String/chomp.pm', 'Moose/Meta/Method/Accessor/Native/String/chop.pm', 'Moose/Meta/Method/Accessor/Native/String/clear.pm', 'Moose/Meta/Method/Accessor/Native/String/inc.pm', 'Moose/Meta/Method/Accessor/Native/String/length.pm', 'Moose/Meta/Method/Accessor/Native/String/match.pm', 'Moose/Meta/Method/Accessor/Native/String/prepend.pm', 'Moose/Meta/Method/Accessor/Native/String/replace.pm', 'Moose/Meta/Method/Accessor/Native/String/substr.pm', 'Moose/Meta/Method/Accessor/Native/Writer.pm', 'Moose/Meta/Method/Augmented.pm', 'Moose/Meta/Method/Constructor.pm', 'Moose/Meta/Method/Delegation.pm', 'Moose/Meta/Method/Destructor.pm', 'Moose/Meta/Method/Meta.pm', 'Moose/Meta/Method/Overridden.pm', 'Moose/Meta/Object/Trait.pm', 'Moose/Meta/Role.pm', 'Moose/Meta/Role/Application.pm', 'Moose/Meta/Role/Application/RoleSummation.pm', 'Moose/Meta/Role/Application/ToClass.pm', 'Moose/Meta/Role/Application/ToInstance.pm', 'Moose/Meta/Role/Application/ToRole.pm', 'Moose/Meta/Role/Composite.pm', 'Moose/Meta/Role/Method.pm', 'Moose/Meta/Role/Method/Conflicting.pm', 'Moose/Meta/Role/Method/Required.pm', 'Moose/Meta/TypeCoercion.pm', 'Moose/Meta/TypeCoercion/Union.pm', 'Moose/Meta/TypeConstraint.pm', 'Moose/Meta/TypeConstraint/Registry.pm', 'Moose/Object.pm', 'Moose/Role.pm', 'Moose/Util.pm', 'Moose/Util/MetaRole.pm', 'Moose/Util/TypeConstraints.pm', 'Moose/Util/TypeConstraints/Builtins.pm', 'Test/Moose.pm', 'metaclass.pm', 'oose.pm' ); my @scripts = ( 'bin/moose-outdated' ); # no fake home requested my $inc_switch = -d 'blib' ? '-Mblib' : '-Ilib'; use File::Spec; use IPC::Open3; use IO::Handle; open my $stdin, '<', File::Spec->devnull or die "can't open devnull: $!"; my @warnings; for my $lib (@module_files) { # see L my $stderr = IO::Handle->new; my $pid = open3($stdin, '>&STDERR', $stderr, $^X, $inc_switch, '-e', "require q[$lib]"); binmode $stderr, ':crlf' if $^O eq 'MSWin32'; my @_warnings = <$stderr>; waitpid($pid, 0); is($?, 0, "$lib loaded ok"); shift @_warnings if @_warnings and $_warnings[0] =~ /^Using .*\bblib/ and not eval { require blib; blib->VERSION('1.01') }; if (@_warnings) { warn @_warnings; push @warnings, @_warnings; } } foreach my $file (@scripts) { SKIP: { open my $fh, '<', $file or warn("Unable to open $file: $!"), next; my $line = <$fh>; close $fh and skip("$file isn't perl", 1) unless $line =~ /^#!\s*(?:\S*perl\S*)((?:\s+-\w*)*)(?:\s*#.*)?$/; my @flags = $1 ? split(' ', $1) : (); my $stderr = IO::Handle->new; my $pid = open3($stdin, '>&STDERR', $stderr, $^X, $inc_switch, @flags, '-c', $file); binmode $stderr, ':crlf' if $^O eq 'MSWin32'; my @_warnings = <$stderr>; waitpid($pid, 0); is($?, 0, "$file compiled ok"); shift @_warnings if @_warnings and $_warnings[0] =~ /^Using .*\bblib/ and not eval { require blib; blib->VERSION('1.01') }; # in older perls, -c output is simply the file portion of the path being tested if (@_warnings = grep { !/\bsyntax OK$/ } grep { chomp; $_ ne (File::Spec->splitpath($file))[2] } @_warnings) { warn @_warnings; push @warnings, @_warnings; } } } is(scalar(@warnings), 0, 'no warnings found') or diag 'got warnings: ', explain(\@warnings) if $ENV{AUTHOR_TESTING}; BAIL_OUT("Compilation problems") if !Test::More->builder->is_passing; Moose-2.1604/xt/release/cpan-changes.t000644 000766 000024 00000000263 12617452415 017742 0ustar00etherstaff000000 000000 #!perl use strict; use warnings; use Test::More 0.96 tests => 2; use_ok('Test::CPAN::Changes'); subtest 'changes_ok' => sub { changes_file_ok('Changes'); }; done_testing(); Moose-2.1604/xt/release/distmeta.t000644 000766 000024 00000000172 12617452415 017224 0ustar00etherstaff000000 000000 #!perl # This file was automatically generated by Dist::Zilla::Plugin::MetaTests. use Test::CPAN::Meta; meta_yaml_ok(); Moose-2.1604/xt/release/kwalitee.t000644 000766 000024 00000000320 12617452415 017212 0ustar00etherstaff000000 000000 # this test was generated with Dist::Zilla::Plugin::Test::Kwalitee 2.12 use strict; use warnings; use Test::More 0.88; use Test::Kwalitee 1.21 'kwalitee_ok'; kwalitee_ok( qw( -use_strict ) ); done_testing; Moose-2.1604/xt/author/authority.t000644 000766 000024 00000000444 12617452415 017326 0ustar00etherstaff000000 000000 use strict; use warnings; use Test::More; BEGIN { plan skip_all => 'this test requires a built dist' unless -f 'MANIFEST' && -f 'META.json'; } use Moose (); # this is used in Moo::sification ok(defined $Moose::AUTHORITY, '$AUTHORITY is set in the main module'); done_testing; Moose-2.1604/xt/author/debugger-duck_type.t000644 000766 000024 00000000471 12617452415 021047 0ustar00etherstaff000000 000000 use FindBin qw/ $Bin /; BEGIN { #line 1 #!/usr/bin/perl -d push @DB::typeahead, "c", "q"; # try to shut it up at least a little bit open my $out, ">", \my $out_buf; $DB::OUT = $out; open my $in, "<", \my $in_buf; $DB::IN = $in; } require "$Bin/../../t/type_constraints/duck_types.t"; Moose-2.1604/xt/author/eol.t000644 000766 000024 00000131337 12617452415 016063 0ustar00etherstaff000000 000000 use strict; use warnings; # this test was generated with Dist::Zilla::Plugin::Test::EOL 0.18 use Test::More 0.88; use Test::EOL; my @files = ( 'bin/moose-outdated', 'lib/Class/MOP.pm', 'lib/Class/MOP/Attribute.pm', 'lib/Class/MOP/Class.pm', 'lib/Class/MOP/Class/Immutable/Trait.pm', 'lib/Class/MOP/Deprecated.pm', 'lib/Class/MOP/Instance.pm', 'lib/Class/MOP/Method.pm', 'lib/Class/MOP/Method/Accessor.pm', 'lib/Class/MOP/Method/Constructor.pm', 'lib/Class/MOP/Method/Generated.pm', 'lib/Class/MOP/Method/Inlined.pm', 'lib/Class/MOP/Method/Meta.pm', 'lib/Class/MOP/Method/Wrapped.pm', 'lib/Class/MOP/MiniTrait.pm', 'lib/Class/MOP/Mixin.pm', 'lib/Class/MOP/Mixin/AttributeCore.pm', 'lib/Class/MOP/Mixin/HasAttributes.pm', 'lib/Class/MOP/Mixin/HasMethods.pm', 'lib/Class/MOP/Mixin/HasOverloads.pm', 'lib/Class/MOP/Module.pm', 'lib/Class/MOP/Object.pm', 'lib/Class/MOP/Overload.pm', 'lib/Class/MOP/Package.pm', 'lib/Moose.pm', 'lib/Moose/Conflicts.pm', 'lib/Moose/Cookbook.pod', 'lib/Moose/Cookbook/Basics/BankAccount_MethodModifiersAndSubclassing.pod', 'lib/Moose/Cookbook/Basics/BinaryTree_AttributeFeatures.pod', 'lib/Moose/Cookbook/Basics/BinaryTree_BuilderAndLazyBuild.pod', 'lib/Moose/Cookbook/Basics/Company_Subtypes.pod', 'lib/Moose/Cookbook/Basics/DateTime_ExtendingNonMooseParent.pod', 'lib/Moose/Cookbook/Basics/Document_AugmentAndInner.pod', 'lib/Moose/Cookbook/Basics/Genome_OverloadingSubtypesAndCoercion.pod', 'lib/Moose/Cookbook/Basics/HTTP_SubtypesAndCoercion.pod', 'lib/Moose/Cookbook/Basics/Immutable.pod', 'lib/Moose/Cookbook/Basics/Person_BUILDARGSAndBUILD.pod', 'lib/Moose/Cookbook/Basics/Point_AttributesAndSubclassing.pod', 'lib/Moose/Cookbook/Extending/Debugging_BaseClassRole.pod', 'lib/Moose/Cookbook/Extending/ExtensionOverview.pod', 'lib/Moose/Cookbook/Extending/Mooseish_MooseSugar.pod', 'lib/Moose/Cookbook/Legacy/Debugging_BaseClassReplacement.pod', 'lib/Moose/Cookbook/Legacy/Labeled_AttributeMetaclass.pod', 'lib/Moose/Cookbook/Legacy/Table_ClassMetaclass.pod', 'lib/Moose/Cookbook/Meta/GlobRef_InstanceMetaclass.pod', 'lib/Moose/Cookbook/Meta/Labeled_AttributeTrait.pod', 'lib/Moose/Cookbook/Meta/PrivateOrPublic_MethodMetaclass.pod', 'lib/Moose/Cookbook/Meta/Table_MetaclassTrait.pod', 'lib/Moose/Cookbook/Meta/WhyMeta.pod', 'lib/Moose/Cookbook/Roles/ApplicationToInstance.pod', 'lib/Moose/Cookbook/Roles/Comparable_CodeReuse.pod', 'lib/Moose/Cookbook/Roles/Restartable_AdvancedComposition.pod', 'lib/Moose/Cookbook/Snack/Keywords.pod', 'lib/Moose/Cookbook/Snack/Types.pod', 'lib/Moose/Cookbook/Style.pod', 'lib/Moose/Deprecated.pm', 'lib/Moose/Exception.pm', 'lib/Moose/Exception/AccessorMustReadWrite.pm', 'lib/Moose/Exception/AddParameterizableTypeTakesParameterizableType.pm', 'lib/Moose/Exception/AddRoleTakesAMooseMetaRoleInstance.pm', 'lib/Moose/Exception/AddRoleToARoleTakesAMooseMetaRole.pm', 'lib/Moose/Exception/ApplyTakesABlessedInstance.pm', 'lib/Moose/Exception/AttachToClassNeedsAClassMOPClassInstanceOrASubclass.pm', 'lib/Moose/Exception/AttributeConflictInRoles.pm', 'lib/Moose/Exception/AttributeConflictInSummation.pm', 'lib/Moose/Exception/AttributeExtensionIsNotSupportedInRoles.pm', 'lib/Moose/Exception/AttributeIsRequired.pm', 'lib/Moose/Exception/AttributeMustBeAnClassMOPMixinAttributeCoreOrSubclass.pm', 'lib/Moose/Exception/AttributeNamesDoNotMatch.pm', 'lib/Moose/Exception/AttributeValueIsNotAnObject.pm', 'lib/Moose/Exception/AttributeValueIsNotDefined.pm', 'lib/Moose/Exception/AutoDeRefNeedsArrayRefOrHashRef.pm', 'lib/Moose/Exception/BadOptionFormat.pm', 'lib/Moose/Exception/BothBuilderAndDefaultAreNotAllowed.pm', 'lib/Moose/Exception/BuilderDoesNotExist.pm', 'lib/Moose/Exception/BuilderMethodNotSupportedForAttribute.pm', 'lib/Moose/Exception/BuilderMethodNotSupportedForInlineAttribute.pm', 'lib/Moose/Exception/BuilderMustBeAMethodName.pm', 'lib/Moose/Exception/CallingMethodOnAnImmutableInstance.pm', 'lib/Moose/Exception/CallingReadOnlyMethodOnAnImmutableInstance.pm', 'lib/Moose/Exception/CanExtendOnlyClasses.pm', 'lib/Moose/Exception/CanOnlyConsumeRole.pm', 'lib/Moose/Exception/CanOnlyWrapBlessedCode.pm', 'lib/Moose/Exception/CanReblessOnlyIntoASubclass.pm', 'lib/Moose/Exception/CanReblessOnlyIntoASuperclass.pm', 'lib/Moose/Exception/CannotAddAdditionalTypeCoercionsToUnion.pm', 'lib/Moose/Exception/CannotAddAsAnAttributeToARole.pm', 'lib/Moose/Exception/CannotApplyBaseClassRolesToRole.pm', 'lib/Moose/Exception/CannotAssignValueToReadOnlyAccessor.pm', 'lib/Moose/Exception/CannotAugmentIfLocalMethodPresent.pm', 'lib/Moose/Exception/CannotAugmentNoSuperMethod.pm', 'lib/Moose/Exception/CannotAutoDerefWithoutIsa.pm', 'lib/Moose/Exception/CannotAutoDereferenceTypeConstraint.pm', 'lib/Moose/Exception/CannotCalculateNativeType.pm', 'lib/Moose/Exception/CannotCallAnAbstractBaseMethod.pm', 'lib/Moose/Exception/CannotCallAnAbstractMethod.pm', 'lib/Moose/Exception/CannotCoerceAWeakRef.pm', 'lib/Moose/Exception/CannotCoerceAttributeWhichHasNoCoercion.pm', 'lib/Moose/Exception/CannotCreateHigherOrderTypeWithoutATypeParameter.pm', 'lib/Moose/Exception/CannotCreateMethodAliasLocalMethodIsPresent.pm', 'lib/Moose/Exception/CannotCreateMethodAliasLocalMethodIsPresentInClass.pm', 'lib/Moose/Exception/CannotDelegateLocalMethodIsPresent.pm', 'lib/Moose/Exception/CannotDelegateWithoutIsa.pm', 'lib/Moose/Exception/CannotFindDelegateMetaclass.pm', 'lib/Moose/Exception/CannotFindType.pm', 'lib/Moose/Exception/CannotFindTypeGivenToMatchOnType.pm', 'lib/Moose/Exception/CannotFixMetaclassCompatibility.pm', 'lib/Moose/Exception/CannotGenerateInlineConstraint.pm', 'lib/Moose/Exception/CannotInitializeMooseMetaRoleComposite.pm', 'lib/Moose/Exception/CannotInlineTypeConstraintCheck.pm', 'lib/Moose/Exception/CannotLocatePackageInINC.pm', 'lib/Moose/Exception/CannotMakeMetaclassCompatible.pm', 'lib/Moose/Exception/CannotOverrideALocalMethod.pm', 'lib/Moose/Exception/CannotOverrideBodyOfMetaMethods.pm', 'lib/Moose/Exception/CannotOverrideLocalMethodIsPresent.pm', 'lib/Moose/Exception/CannotOverrideNoSuperMethod.pm', 'lib/Moose/Exception/CannotRegisterUnnamedTypeConstraint.pm', 'lib/Moose/Exception/CannotUseLazyBuildAndDefaultSimultaneously.pm', 'lib/Moose/Exception/CircularReferenceInAlso.pm', 'lib/Moose/Exception/ClassDoesNotHaveInitMeta.pm', 'lib/Moose/Exception/ClassDoesTheExcludedRole.pm', 'lib/Moose/Exception/ClassNamesDoNotMatch.pm', 'lib/Moose/Exception/CloneObjectExpectsAnInstanceOfMetaclass.pm', 'lib/Moose/Exception/CodeBlockMustBeACodeRef.pm', 'lib/Moose/Exception/CoercingWithoutCoercions.pm', 'lib/Moose/Exception/CoercionAlreadyExists.pm', 'lib/Moose/Exception/CoercionNeedsTypeConstraint.pm', 'lib/Moose/Exception/ConflictDetectedInCheckRoleExclusions.pm', 'lib/Moose/Exception/ConflictDetectedInCheckRoleExclusionsInToClass.pm', 'lib/Moose/Exception/ConstructClassInstanceTakesPackageName.pm', 'lib/Moose/Exception/CouldNotCreateMethod.pm', 'lib/Moose/Exception/CouldNotCreateWriter.pm', 'lib/Moose/Exception/CouldNotEvalConstructor.pm', 'lib/Moose/Exception/CouldNotEvalDestructor.pm', 'lib/Moose/Exception/CouldNotFindTypeConstraintToCoerceFrom.pm', 'lib/Moose/Exception/CouldNotGenerateInlineAttributeMethod.pm', 'lib/Moose/Exception/CouldNotLocateTypeConstraintForUnion.pm', 'lib/Moose/Exception/CouldNotParseType.pm', 'lib/Moose/Exception/CreateMOPClassTakesArrayRefOfAttributes.pm', 'lib/Moose/Exception/CreateMOPClassTakesArrayRefOfSuperclasses.pm', 'lib/Moose/Exception/CreateMOPClassTakesHashRefOfMethods.pm', 'lib/Moose/Exception/CreateTakesArrayRefOfRoles.pm', 'lib/Moose/Exception/CreateTakesHashRefOfAttributes.pm', 'lib/Moose/Exception/CreateTakesHashRefOfMethods.pm', 'lib/Moose/Exception/DefaultToMatchOnTypeMustBeCodeRef.pm', 'lib/Moose/Exception/DelegationToAClassWhichIsNotLoaded.pm', 'lib/Moose/Exception/DelegationToARoleWhichIsNotLoaded.pm', 'lib/Moose/Exception/DelegationToATypeWhichIsNotAClass.pm', 'lib/Moose/Exception/DoesRequiresRoleName.pm', 'lib/Moose/Exception/EnumCalledWithAnArrayRefAndAdditionalArgs.pm', 'lib/Moose/Exception/EnumValuesMustBeString.pm', 'lib/Moose/Exception/ExtendsMissingArgs.pm', 'lib/Moose/Exception/HandlesMustBeAHashRef.pm', 'lib/Moose/Exception/IllegalInheritedOptions.pm', 'lib/Moose/Exception/IllegalMethodTypeToAddMethodModifier.pm', 'lib/Moose/Exception/IncompatibleMetaclassOfSuperclass.pm', 'lib/Moose/Exception/InitMetaRequiresClass.pm', 'lib/Moose/Exception/InitializeTakesUnBlessedPackageName.pm', 'lib/Moose/Exception/InstanceBlessedIntoWrongClass.pm', 'lib/Moose/Exception/InstanceMustBeABlessedReference.pm', 'lib/Moose/Exception/InvalidArgPassedToMooseUtilMetaRole.pm', 'lib/Moose/Exception/InvalidArgumentToMethod.pm', 'lib/Moose/Exception/InvalidArgumentsToTraitAliases.pm', 'lib/Moose/Exception/InvalidBaseTypeGivenToCreateParameterizedTypeConstraint.pm', 'lib/Moose/Exception/InvalidHandleValue.pm', 'lib/Moose/Exception/InvalidHasProvidedInARole.pm', 'lib/Moose/Exception/InvalidNameForType.pm', 'lib/Moose/Exception/InvalidOverloadOperator.pm', 'lib/Moose/Exception/InvalidRoleApplication.pm', 'lib/Moose/Exception/InvalidTypeConstraint.pm', 'lib/Moose/Exception/InvalidTypeGivenToCreateParameterizedTypeConstraint.pm', 'lib/Moose/Exception/InvalidValueForIs.pm', 'lib/Moose/Exception/IsaDoesNotDoTheRole.pm', 'lib/Moose/Exception/IsaLacksDoesMethod.pm', 'lib/Moose/Exception/LazyAttributeNeedsADefault.pm', 'lib/Moose/Exception/Legacy.pm', 'lib/Moose/Exception/MOPAttributeNewNeedsAttributeName.pm', 'lib/Moose/Exception/MatchActionMustBeACodeRef.pm', 'lib/Moose/Exception/MessageParameterMustBeCodeRef.pm', 'lib/Moose/Exception/MetaclassIsAClassNotASubclassOfGivenMetaclass.pm', 'lib/Moose/Exception/MetaclassIsARoleNotASubclassOfGivenMetaclass.pm', 'lib/Moose/Exception/MetaclassIsNotASubclassOfGivenMetaclass.pm', 'lib/Moose/Exception/MetaclassMustBeASubclassOfMooseMetaClass.pm', 'lib/Moose/Exception/MetaclassMustBeASubclassOfMooseMetaRole.pm', 'lib/Moose/Exception/MetaclassMustBeDerivedFromClassMOPClass.pm', 'lib/Moose/Exception/MetaclassNotLoaded.pm', 'lib/Moose/Exception/MetaclassTypeIncompatible.pm', 'lib/Moose/Exception/MethodExpectedAMetaclassObject.pm', 'lib/Moose/Exception/MethodExpectsFewerArgs.pm', 'lib/Moose/Exception/MethodExpectsMoreArgs.pm', 'lib/Moose/Exception/MethodModifierNeedsMethodName.pm', 'lib/Moose/Exception/MethodNameConflictInRoles.pm', 'lib/Moose/Exception/MethodNameNotFoundInInheritanceHierarchy.pm', 'lib/Moose/Exception/MethodNameNotGiven.pm', 'lib/Moose/Exception/MustDefineAMethodName.pm', 'lib/Moose/Exception/MustDefineAnAttributeName.pm', 'lib/Moose/Exception/MustDefineAnOverloadOperator.pm', 'lib/Moose/Exception/MustHaveAtLeastOneValueToEnumerate.pm', 'lib/Moose/Exception/MustPassAHashOfOptions.pm', 'lib/Moose/Exception/MustPassAMooseMetaRoleInstanceOrSubclass.pm', 'lib/Moose/Exception/MustPassAPackageNameOrAnExistingClassMOPPackageInstance.pm', 'lib/Moose/Exception/MustPassEvenNumberOfArguments.pm', 'lib/Moose/Exception/MustPassEvenNumberOfAttributeOptions.pm', 'lib/Moose/Exception/MustProvideANameForTheAttribute.pm', 'lib/Moose/Exception/MustSpecifyAtleastOneMethod.pm', 'lib/Moose/Exception/MustSpecifyAtleastOneRole.pm', 'lib/Moose/Exception/MustSpecifyAtleastOneRoleToApplicant.pm', 'lib/Moose/Exception/MustSupplyAClassMOPAttributeInstance.pm', 'lib/Moose/Exception/MustSupplyADelegateToMethod.pm', 'lib/Moose/Exception/MustSupplyAMetaclass.pm', 'lib/Moose/Exception/MustSupplyAMooseMetaAttributeInstance.pm', 'lib/Moose/Exception/MustSupplyAnAccessorTypeToConstructWith.pm', 'lib/Moose/Exception/MustSupplyAnAttributeToConstructWith.pm', 'lib/Moose/Exception/MustSupplyArrayRefAsCurriedArguments.pm', 'lib/Moose/Exception/MustSupplyPackageNameAndName.pm', 'lib/Moose/Exception/NeedsTypeConstraintUnionForTypeCoercionUnion.pm', 'lib/Moose/Exception/NeitherAttributeNorAttributeNameIsGiven.pm', 'lib/Moose/Exception/NeitherClassNorClassNameIsGiven.pm', 'lib/Moose/Exception/NeitherRoleNorRoleNameIsGiven.pm', 'lib/Moose/Exception/NeitherTypeNorTypeNameIsGiven.pm', 'lib/Moose/Exception/NoAttributeFoundInSuperClass.pm', 'lib/Moose/Exception/NoBodyToInitializeInAnAbstractBaseClass.pm', 'lib/Moose/Exception/NoCasesMatched.pm', 'lib/Moose/Exception/NoConstraintCheckForTypeConstraint.pm', 'lib/Moose/Exception/NoDestructorClassSpecified.pm', 'lib/Moose/Exception/NoImmutableTraitSpecifiedForClass.pm', 'lib/Moose/Exception/NoParentGivenToSubtype.pm', 'lib/Moose/Exception/OnlyInstancesCanBeCloned.pm', 'lib/Moose/Exception/OperatorIsRequired.pm', 'lib/Moose/Exception/OverloadConflictInSummation.pm', 'lib/Moose/Exception/OverloadRequiresAMetaClass.pm', 'lib/Moose/Exception/OverloadRequiresAMetaMethod.pm', 'lib/Moose/Exception/OverloadRequiresAMetaOverload.pm', 'lib/Moose/Exception/OverloadRequiresAMethodNameOrCoderef.pm', 'lib/Moose/Exception/OverloadRequiresAnOperator.pm', 'lib/Moose/Exception/OverloadRequiresNamesForCoderef.pm', 'lib/Moose/Exception/OverrideConflictInComposition.pm', 'lib/Moose/Exception/OverrideConflictInSummation.pm', 'lib/Moose/Exception/PackageDoesNotUseMooseExporter.pm', 'lib/Moose/Exception/PackageNameAndNameParamsNotGivenToWrap.pm', 'lib/Moose/Exception/PackagesAndModulesAreNotCachable.pm', 'lib/Moose/Exception/ParameterIsNotSubtypeOfParent.pm', 'lib/Moose/Exception/ReferencesAreNotAllowedAsDefault.pm', 'lib/Moose/Exception/RequiredAttributeLacksInitialization.pm', 'lib/Moose/Exception/RequiredAttributeNeedsADefault.pm', 'lib/Moose/Exception/RequiredMethodsImportedByClass.pm', 'lib/Moose/Exception/RequiredMethodsNotImplementedByClass.pm', 'lib/Moose/Exception/Role/Attribute.pm', 'lib/Moose/Exception/Role/AttributeName.pm', 'lib/Moose/Exception/Role/Class.pm', 'lib/Moose/Exception/Role/EitherAttributeOrAttributeName.pm', 'lib/Moose/Exception/Role/Instance.pm', 'lib/Moose/Exception/Role/InstanceClass.pm', 'lib/Moose/Exception/Role/InvalidAttributeOptions.pm', 'lib/Moose/Exception/Role/Method.pm', 'lib/Moose/Exception/Role/ParamsHash.pm', 'lib/Moose/Exception/Role/Role.pm', 'lib/Moose/Exception/Role/RoleForCreate.pm', 'lib/Moose/Exception/Role/RoleForCreateMOPClass.pm', 'lib/Moose/Exception/Role/TypeConstraint.pm', 'lib/Moose/Exception/RoleDoesTheExcludedRole.pm', 'lib/Moose/Exception/RoleExclusionConflict.pm', 'lib/Moose/Exception/RoleNameRequired.pm', 'lib/Moose/Exception/RoleNameRequiredForMooseMetaRole.pm', 'lib/Moose/Exception/RolesDoNotSupportAugment.pm', 'lib/Moose/Exception/RolesDoNotSupportExtends.pm', 'lib/Moose/Exception/RolesDoNotSupportInner.pm', 'lib/Moose/Exception/RolesDoNotSupportRegexReferencesForMethodModifiers.pm', 'lib/Moose/Exception/RolesInCreateTakesAnArrayRef.pm', 'lib/Moose/Exception/RolesListMustBeInstancesOfMooseMetaRole.pm', 'lib/Moose/Exception/SingleParamsToNewMustBeHashRef.pm', 'lib/Moose/Exception/TriggerMustBeACodeRef.pm', 'lib/Moose/Exception/TypeConstraintCannotBeUsedForAParameterizableType.pm', 'lib/Moose/Exception/TypeConstraintIsAlreadyCreated.pm', 'lib/Moose/Exception/TypeParameterMustBeMooseMetaType.pm', 'lib/Moose/Exception/UnableToCanonicalizeHandles.pm', 'lib/Moose/Exception/UnableToCanonicalizeNonRolePackage.pm', 'lib/Moose/Exception/UnableToRecognizeDelegateMetaclass.pm', 'lib/Moose/Exception/UndefinedHashKeysPassedToMethod.pm', 'lib/Moose/Exception/UnionCalledWithAnArrayRefAndAdditionalArgs.pm', 'lib/Moose/Exception/UnionTakesAtleastTwoTypeNames.pm', 'lib/Moose/Exception/ValidationFailedForInlineTypeConstraint.pm', 'lib/Moose/Exception/ValidationFailedForTypeConstraint.pm', 'lib/Moose/Exception/WrapTakesACodeRefToBless.pm', 'lib/Moose/Exception/WrongTypeConstraintGiven.pm', 'lib/Moose/Exporter.pm', 'lib/Moose/Intro.pod', 'lib/Moose/Manual.pod', 'lib/Moose/Manual/Attributes.pod', 'lib/Moose/Manual/BestPractices.pod', 'lib/Moose/Manual/Classes.pod', 'lib/Moose/Manual/Concepts.pod', 'lib/Moose/Manual/Construction.pod', 'lib/Moose/Manual/Contributing.pod', 'lib/Moose/Manual/Delegation.pod', 'lib/Moose/Manual/Delta.pod', 'lib/Moose/Manual/Exceptions.pod', 'lib/Moose/Manual/Exceptions/Manifest.pod', 'lib/Moose/Manual/FAQ.pod', 'lib/Moose/Manual/MOP.pod', 'lib/Moose/Manual/MethodModifiers.pod', 'lib/Moose/Manual/MooseX.pod', 'lib/Moose/Manual/Resources.pod', 'lib/Moose/Manual/Roles.pod', 'lib/Moose/Manual/Support.pod', 'lib/Moose/Manual/Types.pod', 'lib/Moose/Manual/Unsweetened.pod', 'lib/Moose/Meta/Attribute.pm', 'lib/Moose/Meta/Attribute/Native.pm', 'lib/Moose/Meta/Attribute/Native/Trait.pm', 'lib/Moose/Meta/Attribute/Native/Trait/Array.pm', 'lib/Moose/Meta/Attribute/Native/Trait/Bool.pm', 'lib/Moose/Meta/Attribute/Native/Trait/Code.pm', 'lib/Moose/Meta/Attribute/Native/Trait/Counter.pm', 'lib/Moose/Meta/Attribute/Native/Trait/Hash.pm', 'lib/Moose/Meta/Attribute/Native/Trait/Number.pm', 'lib/Moose/Meta/Attribute/Native/Trait/String.pm', 'lib/Moose/Meta/Class.pm', 'lib/Moose/Meta/Class/Immutable/Trait.pm', 'lib/Moose/Meta/Instance.pm', 'lib/Moose/Meta/Method.pm', 'lib/Moose/Meta/Method/Accessor.pm', 'lib/Moose/Meta/Method/Accessor/Native.pm', 'lib/Moose/Meta/Method/Accessor/Native/Array.pm', 'lib/Moose/Meta/Method/Accessor/Native/Array/Writer.pm', 'lib/Moose/Meta/Method/Accessor/Native/Array/accessor.pm', 'lib/Moose/Meta/Method/Accessor/Native/Array/clear.pm', 'lib/Moose/Meta/Method/Accessor/Native/Array/count.pm', 'lib/Moose/Meta/Method/Accessor/Native/Array/delete.pm', 'lib/Moose/Meta/Method/Accessor/Native/Array/elements.pm', 'lib/Moose/Meta/Method/Accessor/Native/Array/first.pm', 'lib/Moose/Meta/Method/Accessor/Native/Array/first_index.pm', 'lib/Moose/Meta/Method/Accessor/Native/Array/get.pm', 'lib/Moose/Meta/Method/Accessor/Native/Array/grep.pm', 'lib/Moose/Meta/Method/Accessor/Native/Array/insert.pm', 'lib/Moose/Meta/Method/Accessor/Native/Array/is_empty.pm', 'lib/Moose/Meta/Method/Accessor/Native/Array/join.pm', 'lib/Moose/Meta/Method/Accessor/Native/Array/map.pm', 'lib/Moose/Meta/Method/Accessor/Native/Array/natatime.pm', 'lib/Moose/Meta/Method/Accessor/Native/Array/pop.pm', 'lib/Moose/Meta/Method/Accessor/Native/Array/push.pm', 'lib/Moose/Meta/Method/Accessor/Native/Array/reduce.pm', 'lib/Moose/Meta/Method/Accessor/Native/Array/set.pm', 'lib/Moose/Meta/Method/Accessor/Native/Array/shallow_clone.pm', 'lib/Moose/Meta/Method/Accessor/Native/Array/shift.pm', 'lib/Moose/Meta/Method/Accessor/Native/Array/shuffle.pm', 'lib/Moose/Meta/Method/Accessor/Native/Array/sort.pm', 'lib/Moose/Meta/Method/Accessor/Native/Array/sort_in_place.pm', 'lib/Moose/Meta/Method/Accessor/Native/Array/splice.pm', 'lib/Moose/Meta/Method/Accessor/Native/Array/uniq.pm', 'lib/Moose/Meta/Method/Accessor/Native/Array/unshift.pm', 'lib/Moose/Meta/Method/Accessor/Native/Bool/not.pm', 'lib/Moose/Meta/Method/Accessor/Native/Bool/set.pm', 'lib/Moose/Meta/Method/Accessor/Native/Bool/toggle.pm', 'lib/Moose/Meta/Method/Accessor/Native/Bool/unset.pm', 'lib/Moose/Meta/Method/Accessor/Native/Code/execute.pm', 'lib/Moose/Meta/Method/Accessor/Native/Code/execute_method.pm', 'lib/Moose/Meta/Method/Accessor/Native/Collection.pm', 'lib/Moose/Meta/Method/Accessor/Native/Counter/Writer.pm', 'lib/Moose/Meta/Method/Accessor/Native/Counter/dec.pm', 'lib/Moose/Meta/Method/Accessor/Native/Counter/inc.pm', 'lib/Moose/Meta/Method/Accessor/Native/Counter/reset.pm', 'lib/Moose/Meta/Method/Accessor/Native/Counter/set.pm', 'lib/Moose/Meta/Method/Accessor/Native/Hash.pm', 'lib/Moose/Meta/Method/Accessor/Native/Hash/Writer.pm', 'lib/Moose/Meta/Method/Accessor/Native/Hash/accessor.pm', 'lib/Moose/Meta/Method/Accessor/Native/Hash/clear.pm', 'lib/Moose/Meta/Method/Accessor/Native/Hash/count.pm', 'lib/Moose/Meta/Method/Accessor/Native/Hash/defined.pm', 'lib/Moose/Meta/Method/Accessor/Native/Hash/delete.pm', 'lib/Moose/Meta/Method/Accessor/Native/Hash/elements.pm', 'lib/Moose/Meta/Method/Accessor/Native/Hash/exists.pm', 'lib/Moose/Meta/Method/Accessor/Native/Hash/get.pm', 'lib/Moose/Meta/Method/Accessor/Native/Hash/is_empty.pm', 'lib/Moose/Meta/Method/Accessor/Native/Hash/keys.pm', 'lib/Moose/Meta/Method/Accessor/Native/Hash/kv.pm', 'lib/Moose/Meta/Method/Accessor/Native/Hash/set.pm', 'lib/Moose/Meta/Method/Accessor/Native/Hash/shallow_clone.pm', 'lib/Moose/Meta/Method/Accessor/Native/Hash/values.pm', 'lib/Moose/Meta/Method/Accessor/Native/Number/abs.pm', 'lib/Moose/Meta/Method/Accessor/Native/Number/add.pm', 'lib/Moose/Meta/Method/Accessor/Native/Number/div.pm', 'lib/Moose/Meta/Method/Accessor/Native/Number/mod.pm', 'lib/Moose/Meta/Method/Accessor/Native/Number/mul.pm', 'lib/Moose/Meta/Method/Accessor/Native/Number/set.pm', 'lib/Moose/Meta/Method/Accessor/Native/Number/sub.pm', 'lib/Moose/Meta/Method/Accessor/Native/Reader.pm', 'lib/Moose/Meta/Method/Accessor/Native/String/append.pm', 'lib/Moose/Meta/Method/Accessor/Native/String/chomp.pm', 'lib/Moose/Meta/Method/Accessor/Native/String/chop.pm', 'lib/Moose/Meta/Method/Accessor/Native/String/clear.pm', 'lib/Moose/Meta/Method/Accessor/Native/String/inc.pm', 'lib/Moose/Meta/Method/Accessor/Native/String/length.pm', 'lib/Moose/Meta/Method/Accessor/Native/String/match.pm', 'lib/Moose/Meta/Method/Accessor/Native/String/prepend.pm', 'lib/Moose/Meta/Method/Accessor/Native/String/replace.pm', 'lib/Moose/Meta/Method/Accessor/Native/String/substr.pm', 'lib/Moose/Meta/Method/Accessor/Native/Writer.pm', 'lib/Moose/Meta/Method/Augmented.pm', 'lib/Moose/Meta/Method/Constructor.pm', 'lib/Moose/Meta/Method/Delegation.pm', 'lib/Moose/Meta/Method/Destructor.pm', 'lib/Moose/Meta/Method/Meta.pm', 'lib/Moose/Meta/Method/Overridden.pm', 'lib/Moose/Meta/Mixin/AttributeCore.pm', 'lib/Moose/Meta/Object/Trait.pm', 'lib/Moose/Meta/Role.pm', 'lib/Moose/Meta/Role/Application.pm', 'lib/Moose/Meta/Role/Application/RoleSummation.pm', 'lib/Moose/Meta/Role/Application/ToClass.pm', 'lib/Moose/Meta/Role/Application/ToInstance.pm', 'lib/Moose/Meta/Role/Application/ToRole.pm', 'lib/Moose/Meta/Role/Attribute.pm', 'lib/Moose/Meta/Role/Composite.pm', 'lib/Moose/Meta/Role/Method.pm', 'lib/Moose/Meta/Role/Method/Conflicting.pm', 'lib/Moose/Meta/Role/Method/Required.pm', 'lib/Moose/Meta/TypeCoercion.pm', 'lib/Moose/Meta/TypeCoercion/Union.pm', 'lib/Moose/Meta/TypeConstraint.pm', 'lib/Moose/Meta/TypeConstraint/Class.pm', 'lib/Moose/Meta/TypeConstraint/DuckType.pm', 'lib/Moose/Meta/TypeConstraint/Enum.pm', 'lib/Moose/Meta/TypeConstraint/Parameterizable.pm', 'lib/Moose/Meta/TypeConstraint/Parameterized.pm', 'lib/Moose/Meta/TypeConstraint/Registry.pm', 'lib/Moose/Meta/TypeConstraint/Role.pm', 'lib/Moose/Meta/TypeConstraint/Union.pm', 'lib/Moose/Object.pm', 'lib/Moose/Role.pm', 'lib/Moose/Spec/Role.pod', 'lib/Moose/Unsweetened.pod', 'lib/Moose/Util.pm', 'lib/Moose/Util/MetaRole.pm', 'lib/Moose/Util/TypeConstraints.pm', 'lib/Moose/Util/TypeConstraints/Builtins.pm', 'lib/Test/Moose.pm', 'lib/metaclass.pm', 'lib/oose.pm', 't/00-report-prereqs.dd', 't/00-report-prereqs.t', 't/000_load.t', 't/attributes/accessor_context.t', 't/attributes/accessor_inlining.t', 't/attributes/accessor_override_method.t', 't/attributes/accessor_overwrite_warning.t', 't/attributes/attr_dereference_test.t', 't/attributes/attribute_accessor_generation.t', 't/attributes/attribute_custom_metaclass.t', 't/attributes/attribute_delegation.t', 't/attributes/attribute_does.t', 't/attributes/attribute_inherited_slot_specs.t', 't/attributes/attribute_lazy_initializer.t', 't/attributes/attribute_names.t', 't/attributes/attribute_reader_generation.t', 't/attributes/attribute_required.t', 't/attributes/attribute_traits.t', 't/attributes/attribute_traits_n_meta.t', 't/attributes/attribute_traits_parameterized.t', 't/attributes/attribute_traits_registered.t', 't/attributes/attribute_triggers.t', 't/attributes/attribute_type_unions.t', 't/attributes/attribute_without_any_methods.t', 't/attributes/attribute_writer_generation.t', 't/attributes/bad_coerce.t', 't/attributes/chained_coercion.t', 't/attributes/clone_weak.t', 't/attributes/default_class_role_types.t', 't/attributes/default_undef.t', 't/attributes/delegation_and_modifiers.t', 't/attributes/delegation_arg_aliasing.t', 't/attributes/delegation_target_not_loaded.t', 't/attributes/illegal_options_for_inheritance.t', 't/attributes/inherit_lazy_build.t', 't/attributes/lazy_no_default.t', 't/attributes/method_generation_rules.t', 't/attributes/misc_attribute_coerce_lazy.t', 't/attributes/misc_attribute_tests.t', 't/attributes/more_attr_delegation.t', 't/attributes/no_init_arg.t', 't/attributes/no_slot_access.t', 't/attributes/non_alpha_attr_names.t', 't/attributes/numeric_defaults.t', 't/attributes/trigger_and_coerce.t', 't/attributes/type_constraint.t', 't/basics/always_strict_warnings.t', 't/basics/basic_class_setup.t', 't/basics/buildargs.t', 't/basics/buildargs_warning.t', 't/basics/create.t', 't/basics/create_anon.t', 't/basics/deprecations.t', 't/basics/destruction.t', 't/basics/error_handling.t', 't/basics/global-destruction-helper.pl', 't/basics/global_destruction.t', 't/basics/import_unimport.t', 't/basics/inner_and_augment.t', 't/basics/load_into_main.t', 't/basics/method_modifier_with_regexp.t', 't/basics/methods.t', 't/basics/moose_object_does.t', 't/basics/moose_respects_type_constraints.t', 't/basics/override_and_foreign_classes.t', 't/basics/override_augment_inner_super.t', 't/basics/rebless.t', 't/basics/require_superclasses.t', 't/basics/super_and_override.t', 't/basics/super_warns_on_args.t', 't/basics/universal_methods_wrappable.t', 't/basics/wrapped_method_cxt_propagation.t', 't/bugs/DEMOLISHALL.t', 't/bugs/DEMOLISHALL_shortcutted.t', 't/bugs/DEMOLISH_eats_exceptions.t', 't/bugs/DEMOLISH_eats_mini.t', 't/bugs/DEMOLISH_fails_without_metaclass.t', 't/bugs/Moose_Object_error.t', 't/bugs/anon_method_metaclass.t', 't/bugs/application_metarole_compat.t', 't/bugs/apply_role_to_one_instance_only.t', 't/bugs/attribute_trait_parameters.t', 't/bugs/augment_recursion_bug.t', 't/bugs/coerce_without_coercion.t', 't/bugs/constructor_object_overload.t', 't/bugs/create_anon_recursion.t', 't/bugs/create_anon_role_pass.t', 't/bugs/delete_sub_stash.t', 't/bugs/handles_foreign_class_bug.t', 't/bugs/immutable_metaclass_does_role.t', 't/bugs/immutable_n_default_x2.t', 't/bugs/inheriting_from_roles.t', 't/bugs/inline_reader_bug.t', 't/bugs/instance_application_role_args.t', 't/bugs/lazybuild_required_undef.t', 't/bugs/mark_as_methods_overloading_breakage.t', 't/bugs/moose_exporter_false_circular_reference_rt_63818.t', 't/bugs/moose_octal_defaults.t', 't/bugs/native_trait_handles_bad_value.t', 't/bugs/overloading_edge_cases.t', 't/bugs/reader_precedence_bug.t', 't/bugs/role_caller.t', 't/bugs/subclass_use_base_bug.t', 't/bugs/subtype_conflict_bug.t', 't/bugs/subtype_quote_bug.t', 't/bugs/super_recursion.t', 't/bugs/traits_with_exporter.t', 't/bugs/type_constraint_messages.t', 't/cmop/ArrayBasedStorage_test.t', 't/cmop/AttributesWithHistory_test.t', 't/cmop/BinaryTree_test.t', 't/cmop/C3MethodDispatchOrder_test.t', 't/cmop/ClassEncapsulatedAttributes_test.t', 't/cmop/Class_C3_compatibility.t', 't/cmop/InsideOutClass_test.t', 't/cmop/InstanceCountingClass_test.t', 't/cmop/LazyClass_test.t', 't/cmop/Perl6Attribute_test.t', 't/cmop/RT_27329_fix.t', 't/cmop/RT_39001_fix.t', 't/cmop/RT_41255.t', 't/cmop/add_attribute_alternate.t', 't/cmop/add_method_debugmode.t', 't/cmop/add_method_modifier.t', 't/cmop/advanced_methods.t', 't/cmop/anon_class.t', 't/cmop/anon_class_create_init.t', 't/cmop/anon_class_keep_alive.t', 't/cmop/anon_class_leak.t', 't/cmop/anon_class_removal.t', 't/cmop/anon_packages.t', 't/cmop/attribute.t', 't/cmop/attribute_duplication.t', 't/cmop/attribute_errors_and_edge_cases.t', 't/cmop/attribute_get_read_write.t', 't/cmop/attribute_initializer.t', 't/cmop/attribute_introspection.t', 't/cmop/attribute_non_alpha_name.t', 't/cmop/attributes.t', 't/cmop/basic.t', 't/cmop/before_after_dollar_under.t', 't/cmop/class_errors_and_edge_cases.t', 't/cmop/class_is_pristine.t', 't/cmop/class_precedence_list.t', 't/cmop/constant_codeinfo.t', 't/cmop/create_class.t', 't/cmop/custom_instance.t', 't/cmop/deprecated.t', 't/cmop/get_code_info.t', 't/cmop/immutable_custom_trait.t', 't/cmop/immutable_metaclass.t', 't/cmop/immutable_w_constructors.t', 't/cmop/immutable_w_custom_metaclass.t', 't/cmop/inline_and_dollar_at.t', 't/cmop/inline_structor.t', 't/cmop/insertion_order.t', 't/cmop/instance.t', 't/cmop/instance_inline.t', 't/cmop/instance_metaclass_incompat.t', 't/cmop/instance_metaclass_incompat_dyn.t', 't/cmop/lib/ArrayBasedStorage.pm', 't/cmop/lib/AttributesWithHistory.pm', 't/cmop/lib/BinaryTree.pm', 't/cmop/lib/C3MethodDispatchOrder.pm', 't/cmop/lib/ClassEncapsulatedAttributes.pm', 't/cmop/lib/InsideOutClass.pm', 't/cmop/lib/InstanceCountingClass.pm', 't/cmop/lib/LazyClass.pm', 't/cmop/lib/MyMetaClass.pm', 't/cmop/lib/MyMetaClass/Attribute.pm', 't/cmop/lib/MyMetaClass/Instance.pm', 't/cmop/lib/MyMetaClass/Method.pm', 't/cmop/lib/MyMetaClass/Random.pm', 't/cmop/lib/Perl6Attribute.pm', 't/cmop/lib/SyntaxError.pm', 't/cmop/load.t', 't/cmop/magic.t', 't/cmop/make_mutable.t', 't/cmop/meta_method.t', 't/cmop/meta_package.t', 't/cmop/meta_package_extension.t', 't/cmop/metaclass.t', 't/cmop/metaclass_incompatibility.t', 't/cmop/metaclass_incompatibility_dyn.t', 't/cmop/metaclass_inheritance.t', 't/cmop/metaclass_loads_classes.t', 't/cmop/metaclass_reinitialize.t', 't/cmop/method.t', 't/cmop/method_modifiers.t', 't/cmop/methods.t', 't/cmop/modify_parent_method.t', 't/cmop/new_and_clone_metaclasses.t', 't/cmop/null_stash.t', 't/cmop/numeric_defaults.t', 't/cmop/package_variables.t', 't/cmop/random_eval_bug.t', 't/cmop/rebless_instance.t', 't/cmop/rebless_instance_away.t', 't/cmop/rebless_overload.t', 't/cmop/rebless_with_extra_params.t', 't/cmop/scala_style_mixin_composition.t', 't/cmop/self_introspection.t', 't/cmop/subclasses.t', 't/cmop/subname.t', 't/cmop/universal_methods.t', 't/compat/composite_metaroles.t', 't/compat/extends_nonmoose_that_isa_moose_with_metarole.t', 't/compat/foreign_inheritence.t', 't/compat/inc_hash.t', 't/compat/module_refresh_compat.t', 't/compat/moose_respects_base.t', 't/examples/Child_Parent_attr_inherit.t', 't/examples/example1.t', 't/examples/example2.t', 't/examples/example_Moose_POOP.t', 't/examples/example_Protomoose.t', 't/examples/example_w_DCS.t', 't/examples/example_w_TestDeep.t', 't/examples/record_set_iterator.t', 't/exceptions/attribute.t', 't/exceptions/class-mop-attribute.t', 't/exceptions/class-mop-class-immutable-trait.t', 't/exceptions/class-mop-class.t', 't/exceptions/class-mop-method-accessor.t', 't/exceptions/class-mop-method-constructor.t', 't/exceptions/class-mop-method-generated.t', 't/exceptions/class-mop-method-meta.t', 't/exceptions/class-mop-method-wrapped.t', 't/exceptions/class-mop-method.t', 't/exceptions/class-mop-mixin-hasattributes.t', 't/exceptions/class-mop-mixin-hasmethods.t', 't/exceptions/class-mop-module.t', 't/exceptions/class-mop-object.t', 't/exceptions/class-mop-package.t', 't/exceptions/class.t', 't/exceptions/cmop.t', 't/exceptions/exception-lazyattributeneedsadefault.t', 't/exceptions/frame-leak.t', 't/exceptions/meta-role.t', 't/exceptions/metaclass.t', 't/exceptions/moose-exporter.t', 't/exceptions/moose-meta-attribute-native-traits.t', 't/exceptions/moose-meta-class-immutable-trait.t', 't/exceptions/moose-meta-method-accessor-native-array.t', 't/exceptions/moose-meta-method-accessor-native-collection.t', 't/exceptions/moose-meta-method-accessor-native-grep.t', 't/exceptions/moose-meta-method-accessor-native-hash-set.t', 't/exceptions/moose-meta-method-accessor-native-hash.t', 't/exceptions/moose-meta-method-accessor-native-string-match.t', 't/exceptions/moose-meta-method-accessor-native-string-replace.t', 't/exceptions/moose-meta-method-accessor-native-string-substr.t', 't/exceptions/moose-meta-method-accessor-native.t', 't/exceptions/moose-meta-method-accessor.t', 't/exceptions/moose-meta-method-augmented.t', 't/exceptions/moose-meta-method-constructor.t', 't/exceptions/moose-meta-method-delegation.t', 't/exceptions/moose-meta-method-destructor.t', 't/exceptions/moose-meta-method-overridden.t', 't/exceptions/moose-meta-role-application-rolesummation.t', 't/exceptions/moose-meta-role-application-toclass.t', 't/exceptions/moose-meta-role-application-torole.t', 't/exceptions/moose-meta-role-application.t', 't/exceptions/moose-meta-role-attribute.t', 't/exceptions/moose-meta-role-composite.t', 't/exceptions/moose-meta-typecoercion-union.t', 't/exceptions/moose-meta-typecoercion.t', 't/exceptions/moose-meta-typeconstraint-enum.t', 't/exceptions/moose-meta-typeconstraint-parameterizable.t', 't/exceptions/moose-meta-typeconstraint-parameterized.t', 't/exceptions/moose-meta-typeconstraint-registry.t', 't/exceptions/moose-meta-typeconstraint.t', 't/exceptions/moose-role.t', 't/exceptions/moose-util-metarole.t', 't/exceptions/moose-util-typeconstraints.t', 't/exceptions/moose.t', 't/exceptions/object.t', 't/exceptions/overload.t', 't/exceptions/rt-92818.t', 't/exceptions/rt-94795.t', 't/exceptions/stringify.t', 't/exceptions/traits.t', 't/exceptions/typeconstraints.t', 't/exceptions/util.t', 't/immutable/apply_roles_to_immutable.t', 't/immutable/buildargs.t', 't/immutable/constructor_is_not_moose.t', 't/immutable/constructor_is_wrapped.t', 't/immutable/default_values.t', 't/immutable/definition_context.t', 't/immutable/immutable_constructor_error.t', 't/immutable/immutable_destroy.t', 't/immutable/immutable_meta_class.t', 't/immutable/immutable_metaclass_with_traits.t', 't/immutable/immutable_moose.t', 't/immutable/immutable_roundtrip.t', 't/immutable/immutable_trigger_from_constructor.t', 't/immutable/inline_close_over.t', 't/immutable/inline_fallbacks.t', 't/immutable/inlined_constructors_n_types.t', 't/immutable/multiple_demolish_inline.t', 't/lib/Bar.pm', 't/lib/Bar7/Meta/Trait.pm', 't/lib/Bar7/Meta/Trait2.pm', 't/lib/Foo.pm', 't/lib/Moose/Meta/Attribute/Custom/Bar.pm', 't/lib/Moose/Meta/Attribute/Custom/Foo.pm', 't/lib/Moose/Meta/Attribute/Custom/Trait/Bar.pm', 't/lib/Moose/Meta/Attribute/Custom/Trait/Foo.pm', 't/lib/MyExporter.pm', 't/lib/MyMetaclassRole.pm', 't/lib/MyMooseA.pm', 't/lib/MyMooseB.pm', 't/lib/MyMooseObject.pm', 't/lib/NoInlineAttribute.pm', 't/lib/Overloading/ClassConsumesRoleConsumesOverloads.pm', 't/lib/Overloading/ClassWithCombiningRole.pm', 't/lib/Overloading/ClassWithOneRole.pm', 't/lib/Overloading/CombiningClass.pm', 't/lib/Overloading/CombiningRole.pm', 't/lib/Overloading/RoleConsumesOverloads.pm', 't/lib/Overloading/RoleWithOverloads.pm', 't/lib/Overloading/RoleWithoutOverloads.pm', 't/lib/OverloadingTests.pm', 't/lib/Real/Package.pm', 't/lib/Role/BreakOnLoad.pm', 't/lib/Role/Child.pm', 't/lib/Role/Interface.pm', 't/lib/Role/Parent.pm', 't/metaclasses/create_anon_with_required_attr.t', 't/metaclasses/custom_attr_meta_as_role.t', 't/metaclasses/custom_attr_meta_with_roles.t', 't/metaclasses/easy_init_meta.t', 't/metaclasses/export_with_prototype.t', 't/metaclasses/exporter_also_with_trait.t', 't/metaclasses/exporter_meta_lookup.t', 't/metaclasses/exporter_sub_names.t', 't/metaclasses/goto_moose_import.t', 't/metaclasses/immutable_metaclass_compat_bug.t', 't/metaclasses/meta_name.t', 't/metaclasses/metaclass_compat.t', 't/metaclasses/metaclass_compat_no_fixing_bug.t', 't/metaclasses/metaclass_compat_role_conflicts.t', 't/metaclasses/metaclass_parameterized_traits.t', 't/metaclasses/metaclass_traits.t', 't/metaclasses/metarole.t', 't/metaclasses/metarole_combination.t', 't/metaclasses/metarole_on_anon.t', 't/metaclasses/metarole_w_metaclass_pm.t', 't/metaclasses/metaroles_of_metaroles.t', 't/metaclasses/moose_exporter.t', 't/metaclasses/moose_exporter_trait_aliases.t', 't/metaclasses/moose_for_meta.t', 't/metaclasses/moose_nonmoose_metatrait_init_order.t', 't/metaclasses/moose_nonmoose_moose_chain_init_meta.t', 't/metaclasses/moose_w_metaclass.t', 't/metaclasses/new_metaclass.t', 't/metaclasses/new_object_BUILD.t', 't/metaclasses/overloading.t', 't/metaclasses/reinitialize.t', 't/metaclasses/use_base_of_moose.t', 't/moose_util/apply_roles.t', 't/moose_util/create_alias.t', 't/moose_util/ensure_all_roles.t', 't/moose_util/method_mod_args.t', 't/moose_util/moose_util.t', 't/moose_util/moose_util_does_role.t', 't/moose_util/moose_util_search_class_by_role.t', 't/moose_util/resolve_alias.t', 't/moose_util/with_traits.t', 't/native_traits/array_coerce.t', 't/native_traits/array_from_role.t', 't/native_traits/array_subtypes.t', 't/native_traits/array_trigger.t', 't/native_traits/collection_with_roles.t', 't/native_traits/custom_instance.t', 't/native_traits/hash_coerce.t', 't/native_traits/hash_subtypes.t', 't/native_traits/hash_trigger.t', 't/native_traits/remove_attribute.t', 't/native_traits/shallow_clone.t', 't/native_traits/trait_array.t', 't/native_traits/trait_bool.t', 't/native_traits/trait_code.t', 't/native_traits/trait_counter.t', 't/native_traits/trait_hash.t', 't/native_traits/trait_number.t', 't/native_traits/trait_string.t', 't/recipes/basics_bankaccount_methodmodifiersandsubclassing.t', 't/recipes/basics_binarytree_attributefeatures.t', 't/recipes/basics_company_subtypes.t', 't/recipes/basics_datetime_extendingnonmooseparent.t', 't/recipes/basics_document_augmentandinner.t', 't/recipes/basics_genome_overloadingsubtypesandcoercion.t', 't/recipes/basics_http_subtypesandcoercion.t', 't/recipes/basics_point_attributesandsubclassing.t', 't/recipes/extending_debugging_baseclassrole.t', 't/recipes/extending_mooseish_moosesugar.t', 't/recipes/legacy_debugging_baseclassreplacement.t', 't/recipes/legacy_labeled_attributemetaclass.t', 't/recipes/meta_globref_instancemetaclass.t', 't/recipes/meta_labeled_attributetrait.t', 't/recipes/meta_privateorpublic_methodmetaclass.t', 't/recipes/meta_table_metaclasstrait.t', 't/recipes/roles_applicationtoinstance.t', 't/recipes/roles_comparable_codereuse.t', 't/recipes/roles_restartable_advancedcomposition.t', 't/roles/anonymous_roles.t', 't/roles/application_toclass.t', 't/roles/apply_role.t', 't/roles/build.t', 't/roles/conflict_many_methods.t', 't/roles/create_role.t', 't/roles/create_role_subclass.t', 't/roles/empty_method_modifiers_meta_bug.t', 't/roles/extending_role_attrs.t', 't/roles/free_anonymous_roles.t', 't/roles/imported_required_method.t', 't/roles/meta_role.t', 't/roles/method_aliasing_in_composition.t', 't/roles/method_exclusion_in_composition.t', 't/roles/method_modifiers.t', 't/roles/methods.t', 't/roles/more_alias_and_exclude.t', 't/roles/more_role_edge_cases.t', 't/roles/new_meta_role.t', 't/roles/overloading_combine_to_class.t', 't/roles/overloading_combine_to_instance.t', 't/roles/overloading_combine_to_role.t', 't/roles/overloading_composition_errors.t', 't/roles/overloading_remove_attributes_bug.t', 't/roles/overloading_to_class.t', 't/roles/overloading_to_instance.t', 't/roles/overloading_to_role.t', 't/roles/overriding.t', 't/roles/reinitialize_anon_role.t', 't/roles/role.t', 't/roles/role_attr_application.t', 't/roles/role_attribute_conflict.t', 't/roles/role_attrs.t', 't/roles/role_compose_requires.t', 't/roles/role_composite.t', 't/roles/role_composite_exclusion.t', 't/roles/role_composition_attributes.t', 't/roles/role_composition_conflict_detection.t', 't/roles/role_composition_errors.t', 't/roles/role_composition_method_mods.t', 't/roles/role_composition_methods.t', 't/roles/role_composition_override.t', 't/roles/role_composition_req_methods.t', 't/roles/role_conflict_detection.t', 't/roles/role_conflict_edge_cases.t', 't/roles/role_consumers.t', 't/roles/role_exclusion.t', 't/roles/role_exclusion_and_alias_bug.t', 't/roles/role_for_combination.t', 't/roles/roles_and_method_cloning.t', 't/roles/roles_and_req_method_edge_cases.t', 't/roles/roles_applied_in_create.t', 't/roles/run_time_role_composition.t', 't/roles/runtime_roles_and_attrs.t', 't/roles/runtime_roles_and_nonmoose.t', 't/roles/runtime_roles_w_params.t', 't/roles/use_base_does.t', 't/test_moose/test_moose.t', 't/test_moose/test_moose_does_ok.t', 't/test_moose/test_moose_has_attribute_ok.t', 't/test_moose/test_moose_meta_ok.t', 't/test_moose/with_immutable.t', 't/todo_tests/exception_reflects_failed_constraint.t', 't/todo_tests/immutable_n_around.t', 't/todo_tests/moose_and_threads.t', 't/todo_tests/replacing_super_methods.t', 't/todo_tests/required_role_accessors.t', 't/todo_tests/role_attr_methods_original_package.t', 't/todo_tests/role_insertion_order.t', 't/todo_tests/various_role_features.t', 't/todo_tests/wrong-inner.t', 't/type_constraints/advanced_type_creation.t', 't/type_constraints/class_subtypes.t', 't/type_constraints/class_type_constraint.t', 't/type_constraints/coerced_parameterized_types.t', 't/type_constraints/container_type_coercion.t', 't/type_constraints/container_type_constraint.t', 't/type_constraints/custom_parameterized_types.t', 't/type_constraints/custom_type_errors.t', 't/type_constraints/define_type_twice_throws.t', 't/type_constraints/duck_type_handles.t', 't/type_constraints/duck_types.t', 't/type_constraints/enum.t', 't/type_constraints/inlining.t', 't/type_constraints/match_type_operator.t', 't/type_constraints/maybe_type_constraint.t', 't/type_constraints/misc_type_tests.t', 't/type_constraints/name_conflicts.t', 't/type_constraints/normalize_type_name.t', 't/type_constraints/parameterize_from.t', 't/type_constraints/role_type_constraint.t', 't/type_constraints/subtype_auto_vivify_parent.t', 't/type_constraints/subtyping_parameterized_types.t', 't/type_constraints/subtyping_union_types.t', 't/type_constraints/throw_error.t', 't/type_constraints/type_coersion_on_lazy_attributes.t', 't/type_constraints/type_names.t', 't/type_constraints/type_notation_parser.t', 't/type_constraints/types_and_undef.t', 't/type_constraints/union_is_a_type_of.t', 't/type_constraints/union_types.t', 't/type_constraints/union_types_and_coercions.t', 't/type_constraints/util_find_type_constraint.t', 't/type_constraints/util_more_type_coercion.t', 't/type_constraints/util_std_type_constraints.t', 't/type_constraints/util_type_coercion.t', 't/type_constraints/util_type_constraints.t', 't/type_constraints/util_type_constraints_export.t', 't/type_constraints/util_type_reloading.t', 't/type_constraints/with-specio.t', 't/zzz-check-breaks.t' ); eol_unix_ok($_, { trailing_whitespace => 1 }) foreach @files; done_testing; Moose-2.1604/xt/author/memory_leaks.t000644 000766 000024 00000014030 12617452415 017761 0ustar00etherstaff000000 000000 use strict; use warnings; use Test::More; BEGIN { plan skip_all => 'Leak tests fail under perl 5.21.[6-9]' if $] >= '5.021006' and $] <= '5.021011'; plan skip_all => 'Leak tests fail under Devel::Cover' if $INC{'Devel/Cover.pm'}; } use Test::LeakTrace; use Test::Memory::Cycle; use Moose (); use Moose::Util qw( apply_all_roles ); use Moose::Util::TypeConstraints; { package MyRole; use Moose::Role; sub myname { "I'm a role" } } { package Fake::DateTime; use Moose; has 'string_repr' => ( is => 'ro' ); package Mortgage; use Moose; use Moose::Util::TypeConstraints; coerce 'Fake::DateTime' => from 'Str' => via { Fake::DateTime->new( string_repr => $_ ) }; has 'closing_date' => ( is => 'rw', isa => 'Fake::DateTime', coerce => 1, trigger => sub { my ( $self, $val ) = @_; ::pass('... trigger is being called'); ::isa_ok( $self->closing_date, 'Fake::DateTime' ); ::isa_ok( $val, 'Fake::DateTime' ); } ); } { package Man; use Moose; my @actions; sub live { push @actions, 'live'; } sub create { push @actions, 'create'; } sub breathe { push @actions, 'breathe'; } package Earth; use Moose; use Moose::Util::TypeConstraints; has man => ( isa => 'Man', handles => [qw( live create breathe )], ); } { local $TODO = 'anonymous classes leak on 5.8' if $] < 5.010; no_leaks_ok( sub { Moose::Meta::Class->create_anon_class->new_object; }, 'anonymous class with no roles is leak-free' ); } no_leaks_ok( sub { Moose::Meta::Role->initialize('MyRole2'); }, 'Moose::Meta::Role->initialize is leak-free' ); no_leaks_ok( sub { Moose::Meta::Class->create('MyClass2')->new_object; }, 'creating named class is leak-free' ); { local $TODO = 'role application leaks because we end up applying the role more than once to the meta object'; no_leaks_ok( sub { Moose::Meta::Class->create( 'MyClass', roles => ['MyRole'] ); }, 'named class with roles is leak-free' ); no_leaks_ok( sub { Moose::Meta::Role->create( 'MyRole2', roles => ['MyRole'] ); }, 'named role with roles is leak-free' ); } no_leaks_ok( sub { my $object = Moose::Meta::Class->create('MyClass2')->new_object; apply_all_roles( $object, 'MyRole' ); }, 'applying role to an instance is leak-free' ); no_leaks_ok( sub { Moose::Meta::Role->create_anon_role; }, 'anonymous role is leak-free' ); { # fixing this leak currently triggers a bug in Carp # we can un-TODO once that fix goes in allowing the leak # in Eval::Closure to be fixed local $TODO = 'Eval::Closure leaks a bit at the moment'; no_leaks_ok( sub { my $meta = Moose::Meta::Class->create_anon_class; $meta->make_immutable; }, 'making an anon class immutable is leak-free' ); } { my $meta3 = Moose::Meta::Class->create('MyClass3'); memory_cycle_ok( $meta3, 'named metaclass object is cycle-free' ); memory_cycle_ok( $meta3->new_object, 'MyClass3 object is cycle-free' ); my $anon_class = Moose::Meta::Class->create_anon_class; memory_cycle_ok($anon_class, 'anon metaclass object is cycle-free' ); memory_cycle_ok( $anon_class->new_object, 'object from anon metaclass is cycle-free' ); $anon_class->make_immutable; memory_cycle_ok($anon_class, 'immutable anon metaclass object is cycle-free' ); memory_cycle_ok( $anon_class->new_object, 'object from immutable anon metaclass is cycle-free' ); my $anon_role = Moose::Meta::Role->create_anon_role; memory_cycle_ok($anon_role, 'anon role meta object is cycle-free' ); } { my $Str = find_type_constraint('Str'); my $Undef = find_type_constraint('Undef'); my $Str_or_Undef = Moose::Meta::TypeConstraint::Union->new( type_constraints => [ $Str, $Undef ] ); memory_cycle_ok($Str_or_Undef, 'union types do not leak'); } { my $mtg = Mortgage->new( closing_date => 'yesterday' ); $mtg->closing_date; Mortgage->meta->make_immutable; memory_cycle_ok($mtg->meta, 'meta (triggers/coerce) is cycle-free'); } { local $TODO = 'meta cycles exist at the moment'; memory_cycle_ok(Earth->new->meta, 'meta (handles) is cycle-free'); memory_cycle_ok(Earth->meta, 'meta (class) is cycle-free'); } { my $Point = Class::MOP::Class->create('Point' => ( version => '0.01', attributes => [ Class::MOP::Attribute->new('x' => ( reader => 'x', init_arg => 'x' )), Class::MOP::Attribute->new('y' => ( accessor => 'y', init_arg => 'y' )), ], methods => { 'new' => sub { my $class = shift; my $instance = $class->meta->new_object(@_); bless $instance => $class; }, 'clear' => sub { my $self = shift; $self->{'x'} = 0; $self->{'y'} = 0; } } )); my $Point3D = Class::MOP::Class->create('Point3D' => ( version => '0.01', superclasses => [ 'Point' ], attributes => [ Class::MOP::Attribute->new('z' => ( default => 123 )), ], methods => { 'clear' => sub { my $self = shift; $self->{'z'} = 0; $self->SUPER::clear(); } } )); local $TODO = 'CMOP cycles exist at the moment'; memory_cycle_ok($Point3D, 'Point3D is cycle-free'); memory_cycle_ok($Point, 'Point is cycle-free'); memory_cycle_ok($Point3D->meta, 'Point3D meta is cycle-free'); memory_cycle_ok($Point->meta, 'Point meta is cycle-free'); } done_testing; Moose-2.1604/xt/author/mojibake.t000644 000766 000024 00000000151 12617452415 017052 0ustar00etherstaff000000 000000 #!perl use strict; use warnings qw(all); use Test::More; use Test::Mojibake; all_files_encoding_ok(); Moose-2.1604/xt/author/no-tabs.t000644 000766 000024 00000131305 12617452415 016642 0ustar00etherstaff000000 000000 use strict; use warnings; # this test was generated with Dist::Zilla::Plugin::Test::NoTabs 0.15 use Test::More 0.88; use Test::NoTabs; my @files = ( 'bin/moose-outdated', 'lib/Class/MOP.pm', 'lib/Class/MOP/Attribute.pm', 'lib/Class/MOP/Class.pm', 'lib/Class/MOP/Class/Immutable/Trait.pm', 'lib/Class/MOP/Deprecated.pm', 'lib/Class/MOP/Instance.pm', 'lib/Class/MOP/Method.pm', 'lib/Class/MOP/Method/Accessor.pm', 'lib/Class/MOP/Method/Constructor.pm', 'lib/Class/MOP/Method/Generated.pm', 'lib/Class/MOP/Method/Inlined.pm', 'lib/Class/MOP/Method/Meta.pm', 'lib/Class/MOP/Method/Wrapped.pm', 'lib/Class/MOP/MiniTrait.pm', 'lib/Class/MOP/Mixin.pm', 'lib/Class/MOP/Mixin/AttributeCore.pm', 'lib/Class/MOP/Mixin/HasAttributes.pm', 'lib/Class/MOP/Mixin/HasMethods.pm', 'lib/Class/MOP/Mixin/HasOverloads.pm', 'lib/Class/MOP/Module.pm', 'lib/Class/MOP/Object.pm', 'lib/Class/MOP/Overload.pm', 'lib/Class/MOP/Package.pm', 'lib/Moose.pm', 'lib/Moose/Conflicts.pm', 'lib/Moose/Cookbook.pod', 'lib/Moose/Cookbook/Basics/BankAccount_MethodModifiersAndSubclassing.pod', 'lib/Moose/Cookbook/Basics/BinaryTree_AttributeFeatures.pod', 'lib/Moose/Cookbook/Basics/BinaryTree_BuilderAndLazyBuild.pod', 'lib/Moose/Cookbook/Basics/Company_Subtypes.pod', 'lib/Moose/Cookbook/Basics/DateTime_ExtendingNonMooseParent.pod', 'lib/Moose/Cookbook/Basics/Document_AugmentAndInner.pod', 'lib/Moose/Cookbook/Basics/Genome_OverloadingSubtypesAndCoercion.pod', 'lib/Moose/Cookbook/Basics/HTTP_SubtypesAndCoercion.pod', 'lib/Moose/Cookbook/Basics/Immutable.pod', 'lib/Moose/Cookbook/Basics/Person_BUILDARGSAndBUILD.pod', 'lib/Moose/Cookbook/Basics/Point_AttributesAndSubclassing.pod', 'lib/Moose/Cookbook/Extending/Debugging_BaseClassRole.pod', 'lib/Moose/Cookbook/Extending/ExtensionOverview.pod', 'lib/Moose/Cookbook/Extending/Mooseish_MooseSugar.pod', 'lib/Moose/Cookbook/Legacy/Debugging_BaseClassReplacement.pod', 'lib/Moose/Cookbook/Legacy/Labeled_AttributeMetaclass.pod', 'lib/Moose/Cookbook/Legacy/Table_ClassMetaclass.pod', 'lib/Moose/Cookbook/Meta/GlobRef_InstanceMetaclass.pod', 'lib/Moose/Cookbook/Meta/Labeled_AttributeTrait.pod', 'lib/Moose/Cookbook/Meta/PrivateOrPublic_MethodMetaclass.pod', 'lib/Moose/Cookbook/Meta/Table_MetaclassTrait.pod', 'lib/Moose/Cookbook/Meta/WhyMeta.pod', 'lib/Moose/Cookbook/Roles/ApplicationToInstance.pod', 'lib/Moose/Cookbook/Roles/Comparable_CodeReuse.pod', 'lib/Moose/Cookbook/Roles/Restartable_AdvancedComposition.pod', 'lib/Moose/Cookbook/Snack/Keywords.pod', 'lib/Moose/Cookbook/Snack/Types.pod', 'lib/Moose/Cookbook/Style.pod', 'lib/Moose/Deprecated.pm', 'lib/Moose/Exception.pm', 'lib/Moose/Exception/AccessorMustReadWrite.pm', 'lib/Moose/Exception/AddParameterizableTypeTakesParameterizableType.pm', 'lib/Moose/Exception/AddRoleTakesAMooseMetaRoleInstance.pm', 'lib/Moose/Exception/AddRoleToARoleTakesAMooseMetaRole.pm', 'lib/Moose/Exception/ApplyTakesABlessedInstance.pm', 'lib/Moose/Exception/AttachToClassNeedsAClassMOPClassInstanceOrASubclass.pm', 'lib/Moose/Exception/AttributeConflictInRoles.pm', 'lib/Moose/Exception/AttributeConflictInSummation.pm', 'lib/Moose/Exception/AttributeExtensionIsNotSupportedInRoles.pm', 'lib/Moose/Exception/AttributeIsRequired.pm', 'lib/Moose/Exception/AttributeMustBeAnClassMOPMixinAttributeCoreOrSubclass.pm', 'lib/Moose/Exception/AttributeNamesDoNotMatch.pm', 'lib/Moose/Exception/AttributeValueIsNotAnObject.pm', 'lib/Moose/Exception/AttributeValueIsNotDefined.pm', 'lib/Moose/Exception/AutoDeRefNeedsArrayRefOrHashRef.pm', 'lib/Moose/Exception/BadOptionFormat.pm', 'lib/Moose/Exception/BothBuilderAndDefaultAreNotAllowed.pm', 'lib/Moose/Exception/BuilderDoesNotExist.pm', 'lib/Moose/Exception/BuilderMethodNotSupportedForAttribute.pm', 'lib/Moose/Exception/BuilderMethodNotSupportedForInlineAttribute.pm', 'lib/Moose/Exception/BuilderMustBeAMethodName.pm', 'lib/Moose/Exception/CallingMethodOnAnImmutableInstance.pm', 'lib/Moose/Exception/CallingReadOnlyMethodOnAnImmutableInstance.pm', 'lib/Moose/Exception/CanExtendOnlyClasses.pm', 'lib/Moose/Exception/CanOnlyConsumeRole.pm', 'lib/Moose/Exception/CanOnlyWrapBlessedCode.pm', 'lib/Moose/Exception/CanReblessOnlyIntoASubclass.pm', 'lib/Moose/Exception/CanReblessOnlyIntoASuperclass.pm', 'lib/Moose/Exception/CannotAddAdditionalTypeCoercionsToUnion.pm', 'lib/Moose/Exception/CannotAddAsAnAttributeToARole.pm', 'lib/Moose/Exception/CannotApplyBaseClassRolesToRole.pm', 'lib/Moose/Exception/CannotAssignValueToReadOnlyAccessor.pm', 'lib/Moose/Exception/CannotAugmentIfLocalMethodPresent.pm', 'lib/Moose/Exception/CannotAugmentNoSuperMethod.pm', 'lib/Moose/Exception/CannotAutoDerefWithoutIsa.pm', 'lib/Moose/Exception/CannotAutoDereferenceTypeConstraint.pm', 'lib/Moose/Exception/CannotCalculateNativeType.pm', 'lib/Moose/Exception/CannotCallAnAbstractBaseMethod.pm', 'lib/Moose/Exception/CannotCallAnAbstractMethod.pm', 'lib/Moose/Exception/CannotCoerceAWeakRef.pm', 'lib/Moose/Exception/CannotCoerceAttributeWhichHasNoCoercion.pm', 'lib/Moose/Exception/CannotCreateHigherOrderTypeWithoutATypeParameter.pm', 'lib/Moose/Exception/CannotCreateMethodAliasLocalMethodIsPresent.pm', 'lib/Moose/Exception/CannotCreateMethodAliasLocalMethodIsPresentInClass.pm', 'lib/Moose/Exception/CannotDelegateLocalMethodIsPresent.pm', 'lib/Moose/Exception/CannotDelegateWithoutIsa.pm', 'lib/Moose/Exception/CannotFindDelegateMetaclass.pm', 'lib/Moose/Exception/CannotFindType.pm', 'lib/Moose/Exception/CannotFindTypeGivenToMatchOnType.pm', 'lib/Moose/Exception/CannotFixMetaclassCompatibility.pm', 'lib/Moose/Exception/CannotGenerateInlineConstraint.pm', 'lib/Moose/Exception/CannotInitializeMooseMetaRoleComposite.pm', 'lib/Moose/Exception/CannotInlineTypeConstraintCheck.pm', 'lib/Moose/Exception/CannotLocatePackageInINC.pm', 'lib/Moose/Exception/CannotMakeMetaclassCompatible.pm', 'lib/Moose/Exception/CannotOverrideALocalMethod.pm', 'lib/Moose/Exception/CannotOverrideBodyOfMetaMethods.pm', 'lib/Moose/Exception/CannotOverrideLocalMethodIsPresent.pm', 'lib/Moose/Exception/CannotOverrideNoSuperMethod.pm', 'lib/Moose/Exception/CannotRegisterUnnamedTypeConstraint.pm', 'lib/Moose/Exception/CannotUseLazyBuildAndDefaultSimultaneously.pm', 'lib/Moose/Exception/CircularReferenceInAlso.pm', 'lib/Moose/Exception/ClassDoesNotHaveInitMeta.pm', 'lib/Moose/Exception/ClassDoesTheExcludedRole.pm', 'lib/Moose/Exception/ClassNamesDoNotMatch.pm', 'lib/Moose/Exception/CloneObjectExpectsAnInstanceOfMetaclass.pm', 'lib/Moose/Exception/CodeBlockMustBeACodeRef.pm', 'lib/Moose/Exception/CoercingWithoutCoercions.pm', 'lib/Moose/Exception/CoercionAlreadyExists.pm', 'lib/Moose/Exception/CoercionNeedsTypeConstraint.pm', 'lib/Moose/Exception/ConflictDetectedInCheckRoleExclusions.pm', 'lib/Moose/Exception/ConflictDetectedInCheckRoleExclusionsInToClass.pm', 'lib/Moose/Exception/ConstructClassInstanceTakesPackageName.pm', 'lib/Moose/Exception/CouldNotCreateMethod.pm', 'lib/Moose/Exception/CouldNotCreateWriter.pm', 'lib/Moose/Exception/CouldNotEvalConstructor.pm', 'lib/Moose/Exception/CouldNotEvalDestructor.pm', 'lib/Moose/Exception/CouldNotFindTypeConstraintToCoerceFrom.pm', 'lib/Moose/Exception/CouldNotGenerateInlineAttributeMethod.pm', 'lib/Moose/Exception/CouldNotLocateTypeConstraintForUnion.pm', 'lib/Moose/Exception/CouldNotParseType.pm', 'lib/Moose/Exception/CreateMOPClassTakesArrayRefOfAttributes.pm', 'lib/Moose/Exception/CreateMOPClassTakesArrayRefOfSuperclasses.pm', 'lib/Moose/Exception/CreateMOPClassTakesHashRefOfMethods.pm', 'lib/Moose/Exception/CreateTakesArrayRefOfRoles.pm', 'lib/Moose/Exception/CreateTakesHashRefOfAttributes.pm', 'lib/Moose/Exception/CreateTakesHashRefOfMethods.pm', 'lib/Moose/Exception/DefaultToMatchOnTypeMustBeCodeRef.pm', 'lib/Moose/Exception/DelegationToAClassWhichIsNotLoaded.pm', 'lib/Moose/Exception/DelegationToARoleWhichIsNotLoaded.pm', 'lib/Moose/Exception/DelegationToATypeWhichIsNotAClass.pm', 'lib/Moose/Exception/DoesRequiresRoleName.pm', 'lib/Moose/Exception/EnumCalledWithAnArrayRefAndAdditionalArgs.pm', 'lib/Moose/Exception/EnumValuesMustBeString.pm', 'lib/Moose/Exception/ExtendsMissingArgs.pm', 'lib/Moose/Exception/HandlesMustBeAHashRef.pm', 'lib/Moose/Exception/IllegalInheritedOptions.pm', 'lib/Moose/Exception/IllegalMethodTypeToAddMethodModifier.pm', 'lib/Moose/Exception/IncompatibleMetaclassOfSuperclass.pm', 'lib/Moose/Exception/InitMetaRequiresClass.pm', 'lib/Moose/Exception/InitializeTakesUnBlessedPackageName.pm', 'lib/Moose/Exception/InstanceBlessedIntoWrongClass.pm', 'lib/Moose/Exception/InstanceMustBeABlessedReference.pm', 'lib/Moose/Exception/InvalidArgPassedToMooseUtilMetaRole.pm', 'lib/Moose/Exception/InvalidArgumentToMethod.pm', 'lib/Moose/Exception/InvalidArgumentsToTraitAliases.pm', 'lib/Moose/Exception/InvalidBaseTypeGivenToCreateParameterizedTypeConstraint.pm', 'lib/Moose/Exception/InvalidHandleValue.pm', 'lib/Moose/Exception/InvalidHasProvidedInARole.pm', 'lib/Moose/Exception/InvalidNameForType.pm', 'lib/Moose/Exception/InvalidOverloadOperator.pm', 'lib/Moose/Exception/InvalidRoleApplication.pm', 'lib/Moose/Exception/InvalidTypeConstraint.pm', 'lib/Moose/Exception/InvalidTypeGivenToCreateParameterizedTypeConstraint.pm', 'lib/Moose/Exception/InvalidValueForIs.pm', 'lib/Moose/Exception/IsaDoesNotDoTheRole.pm', 'lib/Moose/Exception/IsaLacksDoesMethod.pm', 'lib/Moose/Exception/LazyAttributeNeedsADefault.pm', 'lib/Moose/Exception/Legacy.pm', 'lib/Moose/Exception/MOPAttributeNewNeedsAttributeName.pm', 'lib/Moose/Exception/MatchActionMustBeACodeRef.pm', 'lib/Moose/Exception/MessageParameterMustBeCodeRef.pm', 'lib/Moose/Exception/MetaclassIsAClassNotASubclassOfGivenMetaclass.pm', 'lib/Moose/Exception/MetaclassIsARoleNotASubclassOfGivenMetaclass.pm', 'lib/Moose/Exception/MetaclassIsNotASubclassOfGivenMetaclass.pm', 'lib/Moose/Exception/MetaclassMustBeASubclassOfMooseMetaClass.pm', 'lib/Moose/Exception/MetaclassMustBeASubclassOfMooseMetaRole.pm', 'lib/Moose/Exception/MetaclassMustBeDerivedFromClassMOPClass.pm', 'lib/Moose/Exception/MetaclassNotLoaded.pm', 'lib/Moose/Exception/MetaclassTypeIncompatible.pm', 'lib/Moose/Exception/MethodExpectedAMetaclassObject.pm', 'lib/Moose/Exception/MethodExpectsFewerArgs.pm', 'lib/Moose/Exception/MethodExpectsMoreArgs.pm', 'lib/Moose/Exception/MethodModifierNeedsMethodName.pm', 'lib/Moose/Exception/MethodNameConflictInRoles.pm', 'lib/Moose/Exception/MethodNameNotFoundInInheritanceHierarchy.pm', 'lib/Moose/Exception/MethodNameNotGiven.pm', 'lib/Moose/Exception/MustDefineAMethodName.pm', 'lib/Moose/Exception/MustDefineAnAttributeName.pm', 'lib/Moose/Exception/MustDefineAnOverloadOperator.pm', 'lib/Moose/Exception/MustHaveAtLeastOneValueToEnumerate.pm', 'lib/Moose/Exception/MustPassAHashOfOptions.pm', 'lib/Moose/Exception/MustPassAMooseMetaRoleInstanceOrSubclass.pm', 'lib/Moose/Exception/MustPassAPackageNameOrAnExistingClassMOPPackageInstance.pm', 'lib/Moose/Exception/MustPassEvenNumberOfArguments.pm', 'lib/Moose/Exception/MustPassEvenNumberOfAttributeOptions.pm', 'lib/Moose/Exception/MustProvideANameForTheAttribute.pm', 'lib/Moose/Exception/MustSpecifyAtleastOneMethod.pm', 'lib/Moose/Exception/MustSpecifyAtleastOneRole.pm', 'lib/Moose/Exception/MustSpecifyAtleastOneRoleToApplicant.pm', 'lib/Moose/Exception/MustSupplyAClassMOPAttributeInstance.pm', 'lib/Moose/Exception/MustSupplyADelegateToMethod.pm', 'lib/Moose/Exception/MustSupplyAMetaclass.pm', 'lib/Moose/Exception/MustSupplyAMooseMetaAttributeInstance.pm', 'lib/Moose/Exception/MustSupplyAnAccessorTypeToConstructWith.pm', 'lib/Moose/Exception/MustSupplyAnAttributeToConstructWith.pm', 'lib/Moose/Exception/MustSupplyArrayRefAsCurriedArguments.pm', 'lib/Moose/Exception/MustSupplyPackageNameAndName.pm', 'lib/Moose/Exception/NeedsTypeConstraintUnionForTypeCoercionUnion.pm', 'lib/Moose/Exception/NeitherAttributeNorAttributeNameIsGiven.pm', 'lib/Moose/Exception/NeitherClassNorClassNameIsGiven.pm', 'lib/Moose/Exception/NeitherRoleNorRoleNameIsGiven.pm', 'lib/Moose/Exception/NeitherTypeNorTypeNameIsGiven.pm', 'lib/Moose/Exception/NoAttributeFoundInSuperClass.pm', 'lib/Moose/Exception/NoBodyToInitializeInAnAbstractBaseClass.pm', 'lib/Moose/Exception/NoCasesMatched.pm', 'lib/Moose/Exception/NoConstraintCheckForTypeConstraint.pm', 'lib/Moose/Exception/NoDestructorClassSpecified.pm', 'lib/Moose/Exception/NoImmutableTraitSpecifiedForClass.pm', 'lib/Moose/Exception/NoParentGivenToSubtype.pm', 'lib/Moose/Exception/OnlyInstancesCanBeCloned.pm', 'lib/Moose/Exception/OperatorIsRequired.pm', 'lib/Moose/Exception/OverloadConflictInSummation.pm', 'lib/Moose/Exception/OverloadRequiresAMetaClass.pm', 'lib/Moose/Exception/OverloadRequiresAMetaMethod.pm', 'lib/Moose/Exception/OverloadRequiresAMetaOverload.pm', 'lib/Moose/Exception/OverloadRequiresAMethodNameOrCoderef.pm', 'lib/Moose/Exception/OverloadRequiresAnOperator.pm', 'lib/Moose/Exception/OverloadRequiresNamesForCoderef.pm', 'lib/Moose/Exception/OverrideConflictInComposition.pm', 'lib/Moose/Exception/OverrideConflictInSummation.pm', 'lib/Moose/Exception/PackageDoesNotUseMooseExporter.pm', 'lib/Moose/Exception/PackageNameAndNameParamsNotGivenToWrap.pm', 'lib/Moose/Exception/PackagesAndModulesAreNotCachable.pm', 'lib/Moose/Exception/ParameterIsNotSubtypeOfParent.pm', 'lib/Moose/Exception/ReferencesAreNotAllowedAsDefault.pm', 'lib/Moose/Exception/RequiredAttributeLacksInitialization.pm', 'lib/Moose/Exception/RequiredAttributeNeedsADefault.pm', 'lib/Moose/Exception/RequiredMethodsImportedByClass.pm', 'lib/Moose/Exception/RequiredMethodsNotImplementedByClass.pm', 'lib/Moose/Exception/Role/Attribute.pm', 'lib/Moose/Exception/Role/AttributeName.pm', 'lib/Moose/Exception/Role/Class.pm', 'lib/Moose/Exception/Role/EitherAttributeOrAttributeName.pm', 'lib/Moose/Exception/Role/Instance.pm', 'lib/Moose/Exception/Role/InstanceClass.pm', 'lib/Moose/Exception/Role/InvalidAttributeOptions.pm', 'lib/Moose/Exception/Role/Method.pm', 'lib/Moose/Exception/Role/ParamsHash.pm', 'lib/Moose/Exception/Role/Role.pm', 'lib/Moose/Exception/Role/RoleForCreate.pm', 'lib/Moose/Exception/Role/RoleForCreateMOPClass.pm', 'lib/Moose/Exception/Role/TypeConstraint.pm', 'lib/Moose/Exception/RoleDoesTheExcludedRole.pm', 'lib/Moose/Exception/RoleExclusionConflict.pm', 'lib/Moose/Exception/RoleNameRequired.pm', 'lib/Moose/Exception/RoleNameRequiredForMooseMetaRole.pm', 'lib/Moose/Exception/RolesDoNotSupportAugment.pm', 'lib/Moose/Exception/RolesDoNotSupportExtends.pm', 'lib/Moose/Exception/RolesDoNotSupportInner.pm', 'lib/Moose/Exception/RolesDoNotSupportRegexReferencesForMethodModifiers.pm', 'lib/Moose/Exception/RolesInCreateTakesAnArrayRef.pm', 'lib/Moose/Exception/RolesListMustBeInstancesOfMooseMetaRole.pm', 'lib/Moose/Exception/SingleParamsToNewMustBeHashRef.pm', 'lib/Moose/Exception/TriggerMustBeACodeRef.pm', 'lib/Moose/Exception/TypeConstraintCannotBeUsedForAParameterizableType.pm', 'lib/Moose/Exception/TypeConstraintIsAlreadyCreated.pm', 'lib/Moose/Exception/TypeParameterMustBeMooseMetaType.pm', 'lib/Moose/Exception/UnableToCanonicalizeHandles.pm', 'lib/Moose/Exception/UnableToCanonicalizeNonRolePackage.pm', 'lib/Moose/Exception/UnableToRecognizeDelegateMetaclass.pm', 'lib/Moose/Exception/UndefinedHashKeysPassedToMethod.pm', 'lib/Moose/Exception/UnionCalledWithAnArrayRefAndAdditionalArgs.pm', 'lib/Moose/Exception/UnionTakesAtleastTwoTypeNames.pm', 'lib/Moose/Exception/ValidationFailedForInlineTypeConstraint.pm', 'lib/Moose/Exception/ValidationFailedForTypeConstraint.pm', 'lib/Moose/Exception/WrapTakesACodeRefToBless.pm', 'lib/Moose/Exception/WrongTypeConstraintGiven.pm', 'lib/Moose/Exporter.pm', 'lib/Moose/Intro.pod', 'lib/Moose/Manual.pod', 'lib/Moose/Manual/Attributes.pod', 'lib/Moose/Manual/BestPractices.pod', 'lib/Moose/Manual/Classes.pod', 'lib/Moose/Manual/Concepts.pod', 'lib/Moose/Manual/Construction.pod', 'lib/Moose/Manual/Contributing.pod', 'lib/Moose/Manual/Delegation.pod', 'lib/Moose/Manual/Delta.pod', 'lib/Moose/Manual/Exceptions.pod', 'lib/Moose/Manual/Exceptions/Manifest.pod', 'lib/Moose/Manual/FAQ.pod', 'lib/Moose/Manual/MOP.pod', 'lib/Moose/Manual/MethodModifiers.pod', 'lib/Moose/Manual/MooseX.pod', 'lib/Moose/Manual/Resources.pod', 'lib/Moose/Manual/Roles.pod', 'lib/Moose/Manual/Support.pod', 'lib/Moose/Manual/Types.pod', 'lib/Moose/Manual/Unsweetened.pod', 'lib/Moose/Meta/Attribute.pm', 'lib/Moose/Meta/Attribute/Native.pm', 'lib/Moose/Meta/Attribute/Native/Trait.pm', 'lib/Moose/Meta/Attribute/Native/Trait/Array.pm', 'lib/Moose/Meta/Attribute/Native/Trait/Bool.pm', 'lib/Moose/Meta/Attribute/Native/Trait/Code.pm', 'lib/Moose/Meta/Attribute/Native/Trait/Counter.pm', 'lib/Moose/Meta/Attribute/Native/Trait/Hash.pm', 'lib/Moose/Meta/Attribute/Native/Trait/Number.pm', 'lib/Moose/Meta/Attribute/Native/Trait/String.pm', 'lib/Moose/Meta/Class.pm', 'lib/Moose/Meta/Class/Immutable/Trait.pm', 'lib/Moose/Meta/Instance.pm', 'lib/Moose/Meta/Method.pm', 'lib/Moose/Meta/Method/Accessor.pm', 'lib/Moose/Meta/Method/Accessor/Native.pm', 'lib/Moose/Meta/Method/Accessor/Native/Array.pm', 'lib/Moose/Meta/Method/Accessor/Native/Array/Writer.pm', 'lib/Moose/Meta/Method/Accessor/Native/Array/accessor.pm', 'lib/Moose/Meta/Method/Accessor/Native/Array/clear.pm', 'lib/Moose/Meta/Method/Accessor/Native/Array/count.pm', 'lib/Moose/Meta/Method/Accessor/Native/Array/delete.pm', 'lib/Moose/Meta/Method/Accessor/Native/Array/elements.pm', 'lib/Moose/Meta/Method/Accessor/Native/Array/first.pm', 'lib/Moose/Meta/Method/Accessor/Native/Array/first_index.pm', 'lib/Moose/Meta/Method/Accessor/Native/Array/get.pm', 'lib/Moose/Meta/Method/Accessor/Native/Array/grep.pm', 'lib/Moose/Meta/Method/Accessor/Native/Array/insert.pm', 'lib/Moose/Meta/Method/Accessor/Native/Array/is_empty.pm', 'lib/Moose/Meta/Method/Accessor/Native/Array/join.pm', 'lib/Moose/Meta/Method/Accessor/Native/Array/map.pm', 'lib/Moose/Meta/Method/Accessor/Native/Array/natatime.pm', 'lib/Moose/Meta/Method/Accessor/Native/Array/pop.pm', 'lib/Moose/Meta/Method/Accessor/Native/Array/push.pm', 'lib/Moose/Meta/Method/Accessor/Native/Array/reduce.pm', 'lib/Moose/Meta/Method/Accessor/Native/Array/set.pm', 'lib/Moose/Meta/Method/Accessor/Native/Array/shallow_clone.pm', 'lib/Moose/Meta/Method/Accessor/Native/Array/shift.pm', 'lib/Moose/Meta/Method/Accessor/Native/Array/shuffle.pm', 'lib/Moose/Meta/Method/Accessor/Native/Array/sort.pm', 'lib/Moose/Meta/Method/Accessor/Native/Array/sort_in_place.pm', 'lib/Moose/Meta/Method/Accessor/Native/Array/splice.pm', 'lib/Moose/Meta/Method/Accessor/Native/Array/uniq.pm', 'lib/Moose/Meta/Method/Accessor/Native/Array/unshift.pm', 'lib/Moose/Meta/Method/Accessor/Native/Bool/not.pm', 'lib/Moose/Meta/Method/Accessor/Native/Bool/set.pm', 'lib/Moose/Meta/Method/Accessor/Native/Bool/toggle.pm', 'lib/Moose/Meta/Method/Accessor/Native/Bool/unset.pm', 'lib/Moose/Meta/Method/Accessor/Native/Code/execute.pm', 'lib/Moose/Meta/Method/Accessor/Native/Code/execute_method.pm', 'lib/Moose/Meta/Method/Accessor/Native/Collection.pm', 'lib/Moose/Meta/Method/Accessor/Native/Counter/Writer.pm', 'lib/Moose/Meta/Method/Accessor/Native/Counter/dec.pm', 'lib/Moose/Meta/Method/Accessor/Native/Counter/inc.pm', 'lib/Moose/Meta/Method/Accessor/Native/Counter/reset.pm', 'lib/Moose/Meta/Method/Accessor/Native/Counter/set.pm', 'lib/Moose/Meta/Method/Accessor/Native/Hash.pm', 'lib/Moose/Meta/Method/Accessor/Native/Hash/Writer.pm', 'lib/Moose/Meta/Method/Accessor/Native/Hash/accessor.pm', 'lib/Moose/Meta/Method/Accessor/Native/Hash/clear.pm', 'lib/Moose/Meta/Method/Accessor/Native/Hash/count.pm', 'lib/Moose/Meta/Method/Accessor/Native/Hash/defined.pm', 'lib/Moose/Meta/Method/Accessor/Native/Hash/delete.pm', 'lib/Moose/Meta/Method/Accessor/Native/Hash/elements.pm', 'lib/Moose/Meta/Method/Accessor/Native/Hash/exists.pm', 'lib/Moose/Meta/Method/Accessor/Native/Hash/get.pm', 'lib/Moose/Meta/Method/Accessor/Native/Hash/is_empty.pm', 'lib/Moose/Meta/Method/Accessor/Native/Hash/keys.pm', 'lib/Moose/Meta/Method/Accessor/Native/Hash/kv.pm', 'lib/Moose/Meta/Method/Accessor/Native/Hash/set.pm', 'lib/Moose/Meta/Method/Accessor/Native/Hash/shallow_clone.pm', 'lib/Moose/Meta/Method/Accessor/Native/Hash/values.pm', 'lib/Moose/Meta/Method/Accessor/Native/Number/abs.pm', 'lib/Moose/Meta/Method/Accessor/Native/Number/add.pm', 'lib/Moose/Meta/Method/Accessor/Native/Number/div.pm', 'lib/Moose/Meta/Method/Accessor/Native/Number/mod.pm', 'lib/Moose/Meta/Method/Accessor/Native/Number/mul.pm', 'lib/Moose/Meta/Method/Accessor/Native/Number/set.pm', 'lib/Moose/Meta/Method/Accessor/Native/Number/sub.pm', 'lib/Moose/Meta/Method/Accessor/Native/Reader.pm', 'lib/Moose/Meta/Method/Accessor/Native/String/append.pm', 'lib/Moose/Meta/Method/Accessor/Native/String/chomp.pm', 'lib/Moose/Meta/Method/Accessor/Native/String/chop.pm', 'lib/Moose/Meta/Method/Accessor/Native/String/clear.pm', 'lib/Moose/Meta/Method/Accessor/Native/String/inc.pm', 'lib/Moose/Meta/Method/Accessor/Native/String/length.pm', 'lib/Moose/Meta/Method/Accessor/Native/String/match.pm', 'lib/Moose/Meta/Method/Accessor/Native/String/prepend.pm', 'lib/Moose/Meta/Method/Accessor/Native/String/replace.pm', 'lib/Moose/Meta/Method/Accessor/Native/String/substr.pm', 'lib/Moose/Meta/Method/Accessor/Native/Writer.pm', 'lib/Moose/Meta/Method/Augmented.pm', 'lib/Moose/Meta/Method/Constructor.pm', 'lib/Moose/Meta/Method/Delegation.pm', 'lib/Moose/Meta/Method/Destructor.pm', 'lib/Moose/Meta/Method/Meta.pm', 'lib/Moose/Meta/Method/Overridden.pm', 'lib/Moose/Meta/Mixin/AttributeCore.pm', 'lib/Moose/Meta/Object/Trait.pm', 'lib/Moose/Meta/Role.pm', 'lib/Moose/Meta/Role/Application.pm', 'lib/Moose/Meta/Role/Application/RoleSummation.pm', 'lib/Moose/Meta/Role/Application/ToClass.pm', 'lib/Moose/Meta/Role/Application/ToInstance.pm', 'lib/Moose/Meta/Role/Application/ToRole.pm', 'lib/Moose/Meta/Role/Attribute.pm', 'lib/Moose/Meta/Role/Composite.pm', 'lib/Moose/Meta/Role/Method.pm', 'lib/Moose/Meta/Role/Method/Conflicting.pm', 'lib/Moose/Meta/Role/Method/Required.pm', 'lib/Moose/Meta/TypeCoercion.pm', 'lib/Moose/Meta/TypeCoercion/Union.pm', 'lib/Moose/Meta/TypeConstraint.pm', 'lib/Moose/Meta/TypeConstraint/Class.pm', 'lib/Moose/Meta/TypeConstraint/DuckType.pm', 'lib/Moose/Meta/TypeConstraint/Enum.pm', 'lib/Moose/Meta/TypeConstraint/Parameterizable.pm', 'lib/Moose/Meta/TypeConstraint/Parameterized.pm', 'lib/Moose/Meta/TypeConstraint/Registry.pm', 'lib/Moose/Meta/TypeConstraint/Role.pm', 'lib/Moose/Meta/TypeConstraint/Union.pm', 'lib/Moose/Object.pm', 'lib/Moose/Role.pm', 'lib/Moose/Spec/Role.pod', 'lib/Moose/Unsweetened.pod', 'lib/Moose/Util.pm', 'lib/Moose/Util/MetaRole.pm', 'lib/Moose/Util/TypeConstraints.pm', 'lib/Moose/Util/TypeConstraints/Builtins.pm', 'lib/Test/Moose.pm', 'lib/metaclass.pm', 'lib/oose.pm', 't/00-report-prereqs.dd', 't/00-report-prereqs.t', 't/000_load.t', 't/attributes/accessor_context.t', 't/attributes/accessor_inlining.t', 't/attributes/accessor_override_method.t', 't/attributes/accessor_overwrite_warning.t', 't/attributes/attr_dereference_test.t', 't/attributes/attribute_accessor_generation.t', 't/attributes/attribute_custom_metaclass.t', 't/attributes/attribute_delegation.t', 't/attributes/attribute_does.t', 't/attributes/attribute_inherited_slot_specs.t', 't/attributes/attribute_lazy_initializer.t', 't/attributes/attribute_names.t', 't/attributes/attribute_reader_generation.t', 't/attributes/attribute_required.t', 't/attributes/attribute_traits.t', 't/attributes/attribute_traits_n_meta.t', 't/attributes/attribute_traits_parameterized.t', 't/attributes/attribute_traits_registered.t', 't/attributes/attribute_triggers.t', 't/attributes/attribute_type_unions.t', 't/attributes/attribute_without_any_methods.t', 't/attributes/attribute_writer_generation.t', 't/attributes/bad_coerce.t', 't/attributes/chained_coercion.t', 't/attributes/clone_weak.t', 't/attributes/default_class_role_types.t', 't/attributes/default_undef.t', 't/attributes/delegation_and_modifiers.t', 't/attributes/delegation_arg_aliasing.t', 't/attributes/delegation_target_not_loaded.t', 't/attributes/illegal_options_for_inheritance.t', 't/attributes/inherit_lazy_build.t', 't/attributes/lazy_no_default.t', 't/attributes/method_generation_rules.t', 't/attributes/misc_attribute_coerce_lazy.t', 't/attributes/misc_attribute_tests.t', 't/attributes/more_attr_delegation.t', 't/attributes/no_init_arg.t', 't/attributes/no_slot_access.t', 't/attributes/non_alpha_attr_names.t', 't/attributes/numeric_defaults.t', 't/attributes/trigger_and_coerce.t', 't/attributes/type_constraint.t', 't/basics/always_strict_warnings.t', 't/basics/basic_class_setup.t', 't/basics/buildargs.t', 't/basics/buildargs_warning.t', 't/basics/create.t', 't/basics/create_anon.t', 't/basics/deprecations.t', 't/basics/destruction.t', 't/basics/error_handling.t', 't/basics/global-destruction-helper.pl', 't/basics/global_destruction.t', 't/basics/import_unimport.t', 't/basics/inner_and_augment.t', 't/basics/load_into_main.t', 't/basics/method_modifier_with_regexp.t', 't/basics/methods.t', 't/basics/moose_object_does.t', 't/basics/moose_respects_type_constraints.t', 't/basics/override_and_foreign_classes.t', 't/basics/override_augment_inner_super.t', 't/basics/rebless.t', 't/basics/require_superclasses.t', 't/basics/super_and_override.t', 't/basics/super_warns_on_args.t', 't/basics/universal_methods_wrappable.t', 't/basics/wrapped_method_cxt_propagation.t', 't/bugs/DEMOLISHALL.t', 't/bugs/DEMOLISHALL_shortcutted.t', 't/bugs/DEMOLISH_eats_exceptions.t', 't/bugs/DEMOLISH_eats_mini.t', 't/bugs/DEMOLISH_fails_without_metaclass.t', 't/bugs/Moose_Object_error.t', 't/bugs/anon_method_metaclass.t', 't/bugs/application_metarole_compat.t', 't/bugs/apply_role_to_one_instance_only.t', 't/bugs/attribute_trait_parameters.t', 't/bugs/augment_recursion_bug.t', 't/bugs/coerce_without_coercion.t', 't/bugs/constructor_object_overload.t', 't/bugs/create_anon_recursion.t', 't/bugs/create_anon_role_pass.t', 't/bugs/delete_sub_stash.t', 't/bugs/handles_foreign_class_bug.t', 't/bugs/immutable_metaclass_does_role.t', 't/bugs/immutable_n_default_x2.t', 't/bugs/inheriting_from_roles.t', 't/bugs/inline_reader_bug.t', 't/bugs/instance_application_role_args.t', 't/bugs/lazybuild_required_undef.t', 't/bugs/mark_as_methods_overloading_breakage.t', 't/bugs/moose_exporter_false_circular_reference_rt_63818.t', 't/bugs/moose_octal_defaults.t', 't/bugs/native_trait_handles_bad_value.t', 't/bugs/overloading_edge_cases.t', 't/bugs/reader_precedence_bug.t', 't/bugs/role_caller.t', 't/bugs/subclass_use_base_bug.t', 't/bugs/subtype_conflict_bug.t', 't/bugs/subtype_quote_bug.t', 't/bugs/super_recursion.t', 't/bugs/traits_with_exporter.t', 't/bugs/type_constraint_messages.t', 't/cmop/ArrayBasedStorage_test.t', 't/cmop/AttributesWithHistory_test.t', 't/cmop/BinaryTree_test.t', 't/cmop/C3MethodDispatchOrder_test.t', 't/cmop/ClassEncapsulatedAttributes_test.t', 't/cmop/Class_C3_compatibility.t', 't/cmop/InsideOutClass_test.t', 't/cmop/InstanceCountingClass_test.t', 't/cmop/LazyClass_test.t', 't/cmop/Perl6Attribute_test.t', 't/cmop/RT_27329_fix.t', 't/cmop/RT_39001_fix.t', 't/cmop/RT_41255.t', 't/cmop/add_attribute_alternate.t', 't/cmop/add_method_debugmode.t', 't/cmop/add_method_modifier.t', 't/cmop/advanced_methods.t', 't/cmop/anon_class.t', 't/cmop/anon_class_create_init.t', 't/cmop/anon_class_keep_alive.t', 't/cmop/anon_class_leak.t', 't/cmop/anon_class_removal.t', 't/cmop/anon_packages.t', 't/cmop/attribute.t', 't/cmop/attribute_duplication.t', 't/cmop/attribute_errors_and_edge_cases.t', 't/cmop/attribute_get_read_write.t', 't/cmop/attribute_initializer.t', 't/cmop/attribute_introspection.t', 't/cmop/attribute_non_alpha_name.t', 't/cmop/attributes.t', 't/cmop/basic.t', 't/cmop/before_after_dollar_under.t', 't/cmop/class_errors_and_edge_cases.t', 't/cmop/class_is_pristine.t', 't/cmop/class_precedence_list.t', 't/cmop/constant_codeinfo.t', 't/cmop/create_class.t', 't/cmop/custom_instance.t', 't/cmop/deprecated.t', 't/cmop/get_code_info.t', 't/cmop/immutable_custom_trait.t', 't/cmop/immutable_metaclass.t', 't/cmop/immutable_w_constructors.t', 't/cmop/immutable_w_custom_metaclass.t', 't/cmop/inline_and_dollar_at.t', 't/cmop/inline_structor.t', 't/cmop/insertion_order.t', 't/cmop/instance.t', 't/cmop/instance_inline.t', 't/cmop/instance_metaclass_incompat.t', 't/cmop/instance_metaclass_incompat_dyn.t', 't/cmop/lib/ArrayBasedStorage.pm', 't/cmop/lib/AttributesWithHistory.pm', 't/cmop/lib/BinaryTree.pm', 't/cmop/lib/C3MethodDispatchOrder.pm', 't/cmop/lib/ClassEncapsulatedAttributes.pm', 't/cmop/lib/InsideOutClass.pm', 't/cmop/lib/InstanceCountingClass.pm', 't/cmop/lib/LazyClass.pm', 't/cmop/lib/MyMetaClass.pm', 't/cmop/lib/MyMetaClass/Attribute.pm', 't/cmop/lib/MyMetaClass/Instance.pm', 't/cmop/lib/MyMetaClass/Method.pm', 't/cmop/lib/MyMetaClass/Random.pm', 't/cmop/lib/Perl6Attribute.pm', 't/cmop/lib/SyntaxError.pm', 't/cmop/load.t', 't/cmop/magic.t', 't/cmop/make_mutable.t', 't/cmop/meta_method.t', 't/cmop/meta_package.t', 't/cmop/meta_package_extension.t', 't/cmop/metaclass.t', 't/cmop/metaclass_incompatibility.t', 't/cmop/metaclass_incompatibility_dyn.t', 't/cmop/metaclass_inheritance.t', 't/cmop/metaclass_loads_classes.t', 't/cmop/metaclass_reinitialize.t', 't/cmop/method.t', 't/cmop/method_modifiers.t', 't/cmop/methods.t', 't/cmop/modify_parent_method.t', 't/cmop/new_and_clone_metaclasses.t', 't/cmop/null_stash.t', 't/cmop/numeric_defaults.t', 't/cmop/package_variables.t', 't/cmop/random_eval_bug.t', 't/cmop/rebless_instance.t', 't/cmop/rebless_instance_away.t', 't/cmop/rebless_overload.t', 't/cmop/rebless_with_extra_params.t', 't/cmop/scala_style_mixin_composition.t', 't/cmop/self_introspection.t', 't/cmop/subclasses.t', 't/cmop/subname.t', 't/cmop/universal_methods.t', 't/compat/composite_metaroles.t', 't/compat/extends_nonmoose_that_isa_moose_with_metarole.t', 't/compat/foreign_inheritence.t', 't/compat/inc_hash.t', 't/compat/module_refresh_compat.t', 't/compat/moose_respects_base.t', 't/examples/Child_Parent_attr_inherit.t', 't/examples/example1.t', 't/examples/example2.t', 't/examples/example_Moose_POOP.t', 't/examples/example_Protomoose.t', 't/examples/example_w_DCS.t', 't/examples/example_w_TestDeep.t', 't/examples/record_set_iterator.t', 't/exceptions/attribute.t', 't/exceptions/class-mop-attribute.t', 't/exceptions/class-mop-class-immutable-trait.t', 't/exceptions/class-mop-class.t', 't/exceptions/class-mop-method-accessor.t', 't/exceptions/class-mop-method-constructor.t', 't/exceptions/class-mop-method-generated.t', 't/exceptions/class-mop-method-meta.t', 't/exceptions/class-mop-method-wrapped.t', 't/exceptions/class-mop-method.t', 't/exceptions/class-mop-mixin-hasattributes.t', 't/exceptions/class-mop-mixin-hasmethods.t', 't/exceptions/class-mop-module.t', 't/exceptions/class-mop-object.t', 't/exceptions/class-mop-package.t', 't/exceptions/class.t', 't/exceptions/cmop.t', 't/exceptions/exception-lazyattributeneedsadefault.t', 't/exceptions/frame-leak.t', 't/exceptions/meta-role.t', 't/exceptions/metaclass.t', 't/exceptions/moose-exporter.t', 't/exceptions/moose-meta-attribute-native-traits.t', 't/exceptions/moose-meta-class-immutable-trait.t', 't/exceptions/moose-meta-method-accessor-native-array.t', 't/exceptions/moose-meta-method-accessor-native-collection.t', 't/exceptions/moose-meta-method-accessor-native-grep.t', 't/exceptions/moose-meta-method-accessor-native-hash-set.t', 't/exceptions/moose-meta-method-accessor-native-hash.t', 't/exceptions/moose-meta-method-accessor-native-string-match.t', 't/exceptions/moose-meta-method-accessor-native-string-replace.t', 't/exceptions/moose-meta-method-accessor-native-string-substr.t', 't/exceptions/moose-meta-method-accessor-native.t', 't/exceptions/moose-meta-method-accessor.t', 't/exceptions/moose-meta-method-augmented.t', 't/exceptions/moose-meta-method-constructor.t', 't/exceptions/moose-meta-method-delegation.t', 't/exceptions/moose-meta-method-destructor.t', 't/exceptions/moose-meta-method-overridden.t', 't/exceptions/moose-meta-role-application-rolesummation.t', 't/exceptions/moose-meta-role-application-toclass.t', 't/exceptions/moose-meta-role-application-torole.t', 't/exceptions/moose-meta-role-application.t', 't/exceptions/moose-meta-role-attribute.t', 't/exceptions/moose-meta-role-composite.t', 't/exceptions/moose-meta-typecoercion-union.t', 't/exceptions/moose-meta-typecoercion.t', 't/exceptions/moose-meta-typeconstraint-enum.t', 't/exceptions/moose-meta-typeconstraint-parameterizable.t', 't/exceptions/moose-meta-typeconstraint-parameterized.t', 't/exceptions/moose-meta-typeconstraint-registry.t', 't/exceptions/moose-meta-typeconstraint.t', 't/exceptions/moose-role.t', 't/exceptions/moose-util-metarole.t', 't/exceptions/moose-util-typeconstraints.t', 't/exceptions/moose.t', 't/exceptions/object.t', 't/exceptions/overload.t', 't/exceptions/rt-92818.t', 't/exceptions/rt-94795.t', 't/exceptions/stringify.t', 't/exceptions/traits.t', 't/exceptions/typeconstraints.t', 't/exceptions/util.t', 't/immutable/apply_roles_to_immutable.t', 't/immutable/buildargs.t', 't/immutable/constructor_is_not_moose.t', 't/immutable/constructor_is_wrapped.t', 't/immutable/default_values.t', 't/immutable/definition_context.t', 't/immutable/immutable_constructor_error.t', 't/immutable/immutable_destroy.t', 't/immutable/immutable_meta_class.t', 't/immutable/immutable_metaclass_with_traits.t', 't/immutable/immutable_moose.t', 't/immutable/immutable_roundtrip.t', 't/immutable/immutable_trigger_from_constructor.t', 't/immutable/inline_close_over.t', 't/immutable/inline_fallbacks.t', 't/immutable/inlined_constructors_n_types.t', 't/immutable/multiple_demolish_inline.t', 't/lib/Bar.pm', 't/lib/Bar7/Meta/Trait.pm', 't/lib/Bar7/Meta/Trait2.pm', 't/lib/Foo.pm', 't/lib/Moose/Meta/Attribute/Custom/Bar.pm', 't/lib/Moose/Meta/Attribute/Custom/Foo.pm', 't/lib/Moose/Meta/Attribute/Custom/Trait/Bar.pm', 't/lib/Moose/Meta/Attribute/Custom/Trait/Foo.pm', 't/lib/MyExporter.pm', 't/lib/MyMetaclassRole.pm', 't/lib/MyMooseA.pm', 't/lib/MyMooseB.pm', 't/lib/MyMooseObject.pm', 't/lib/NoInlineAttribute.pm', 't/lib/Overloading/ClassConsumesRoleConsumesOverloads.pm', 't/lib/Overloading/ClassWithCombiningRole.pm', 't/lib/Overloading/ClassWithOneRole.pm', 't/lib/Overloading/CombiningClass.pm', 't/lib/Overloading/CombiningRole.pm', 't/lib/Overloading/RoleConsumesOverloads.pm', 't/lib/Overloading/RoleWithOverloads.pm', 't/lib/Overloading/RoleWithoutOverloads.pm', 't/lib/OverloadingTests.pm', 't/lib/Real/Package.pm', 't/lib/Role/BreakOnLoad.pm', 't/lib/Role/Child.pm', 't/lib/Role/Interface.pm', 't/lib/Role/Parent.pm', 't/metaclasses/create_anon_with_required_attr.t', 't/metaclasses/custom_attr_meta_as_role.t', 't/metaclasses/custom_attr_meta_with_roles.t', 't/metaclasses/easy_init_meta.t', 't/metaclasses/export_with_prototype.t', 't/metaclasses/exporter_also_with_trait.t', 't/metaclasses/exporter_meta_lookup.t', 't/metaclasses/exporter_sub_names.t', 't/metaclasses/goto_moose_import.t', 't/metaclasses/immutable_metaclass_compat_bug.t', 't/metaclasses/meta_name.t', 't/metaclasses/metaclass_compat.t', 't/metaclasses/metaclass_compat_no_fixing_bug.t', 't/metaclasses/metaclass_compat_role_conflicts.t', 't/metaclasses/metaclass_parameterized_traits.t', 't/metaclasses/metaclass_traits.t', 't/metaclasses/metarole.t', 't/metaclasses/metarole_combination.t', 't/metaclasses/metarole_on_anon.t', 't/metaclasses/metarole_w_metaclass_pm.t', 't/metaclasses/metaroles_of_metaroles.t', 't/metaclasses/moose_exporter.t', 't/metaclasses/moose_exporter_trait_aliases.t', 't/metaclasses/moose_for_meta.t', 't/metaclasses/moose_nonmoose_metatrait_init_order.t', 't/metaclasses/moose_nonmoose_moose_chain_init_meta.t', 't/metaclasses/moose_w_metaclass.t', 't/metaclasses/new_metaclass.t', 't/metaclasses/new_object_BUILD.t', 't/metaclasses/overloading.t', 't/metaclasses/reinitialize.t', 't/metaclasses/use_base_of_moose.t', 't/moose_util/apply_roles.t', 't/moose_util/create_alias.t', 't/moose_util/ensure_all_roles.t', 't/moose_util/method_mod_args.t', 't/moose_util/moose_util.t', 't/moose_util/moose_util_does_role.t', 't/moose_util/moose_util_search_class_by_role.t', 't/moose_util/resolve_alias.t', 't/moose_util/with_traits.t', 't/native_traits/array_coerce.t', 't/native_traits/array_from_role.t', 't/native_traits/array_subtypes.t', 't/native_traits/array_trigger.t', 't/native_traits/collection_with_roles.t', 't/native_traits/custom_instance.t', 't/native_traits/hash_coerce.t', 't/native_traits/hash_subtypes.t', 't/native_traits/hash_trigger.t', 't/native_traits/remove_attribute.t', 't/native_traits/shallow_clone.t', 't/native_traits/trait_array.t', 't/native_traits/trait_bool.t', 't/native_traits/trait_code.t', 't/native_traits/trait_counter.t', 't/native_traits/trait_hash.t', 't/native_traits/trait_number.t', 't/native_traits/trait_string.t', 't/recipes/basics_bankaccount_methodmodifiersandsubclassing.t', 't/recipes/basics_binarytree_attributefeatures.t', 't/recipes/basics_company_subtypes.t', 't/recipes/basics_datetime_extendingnonmooseparent.t', 't/recipes/basics_document_augmentandinner.t', 't/recipes/basics_genome_overloadingsubtypesandcoercion.t', 't/recipes/basics_http_subtypesandcoercion.t', 't/recipes/basics_point_attributesandsubclassing.t', 't/recipes/extending_debugging_baseclassrole.t', 't/recipes/extending_mooseish_moosesugar.t', 't/recipes/legacy_debugging_baseclassreplacement.t', 't/recipes/legacy_labeled_attributemetaclass.t', 't/recipes/meta_globref_instancemetaclass.t', 't/recipes/meta_labeled_attributetrait.t', 't/recipes/meta_privateorpublic_methodmetaclass.t', 't/recipes/meta_table_metaclasstrait.t', 't/recipes/roles_applicationtoinstance.t', 't/recipes/roles_comparable_codereuse.t', 't/recipes/roles_restartable_advancedcomposition.t', 't/roles/anonymous_roles.t', 't/roles/application_toclass.t', 't/roles/apply_role.t', 't/roles/build.t', 't/roles/conflict_many_methods.t', 't/roles/create_role.t', 't/roles/create_role_subclass.t', 't/roles/empty_method_modifiers_meta_bug.t', 't/roles/extending_role_attrs.t', 't/roles/free_anonymous_roles.t', 't/roles/imported_required_method.t', 't/roles/meta_role.t', 't/roles/method_aliasing_in_composition.t', 't/roles/method_exclusion_in_composition.t', 't/roles/method_modifiers.t', 't/roles/methods.t', 't/roles/more_alias_and_exclude.t', 't/roles/more_role_edge_cases.t', 't/roles/new_meta_role.t', 't/roles/overloading_combine_to_class.t', 't/roles/overloading_combine_to_instance.t', 't/roles/overloading_combine_to_role.t', 't/roles/overloading_composition_errors.t', 't/roles/overloading_remove_attributes_bug.t', 't/roles/overloading_to_class.t', 't/roles/overloading_to_instance.t', 't/roles/overloading_to_role.t', 't/roles/overriding.t', 't/roles/reinitialize_anon_role.t', 't/roles/role.t', 't/roles/role_attr_application.t', 't/roles/role_attribute_conflict.t', 't/roles/role_attrs.t', 't/roles/role_compose_requires.t', 't/roles/role_composite.t', 't/roles/role_composite_exclusion.t', 't/roles/role_composition_attributes.t', 't/roles/role_composition_conflict_detection.t', 't/roles/role_composition_errors.t', 't/roles/role_composition_method_mods.t', 't/roles/role_composition_methods.t', 't/roles/role_composition_override.t', 't/roles/role_composition_req_methods.t', 't/roles/role_conflict_detection.t', 't/roles/role_conflict_edge_cases.t', 't/roles/role_consumers.t', 't/roles/role_exclusion.t', 't/roles/role_exclusion_and_alias_bug.t', 't/roles/role_for_combination.t', 't/roles/roles_and_method_cloning.t', 't/roles/roles_and_req_method_edge_cases.t', 't/roles/roles_applied_in_create.t', 't/roles/run_time_role_composition.t', 't/roles/runtime_roles_and_attrs.t', 't/roles/runtime_roles_and_nonmoose.t', 't/roles/runtime_roles_w_params.t', 't/roles/use_base_does.t', 't/test_moose/test_moose.t', 't/test_moose/test_moose_does_ok.t', 't/test_moose/test_moose_has_attribute_ok.t', 't/test_moose/test_moose_meta_ok.t', 't/test_moose/with_immutable.t', 't/todo_tests/exception_reflects_failed_constraint.t', 't/todo_tests/immutable_n_around.t', 't/todo_tests/moose_and_threads.t', 't/todo_tests/replacing_super_methods.t', 't/todo_tests/required_role_accessors.t', 't/todo_tests/role_attr_methods_original_package.t', 't/todo_tests/role_insertion_order.t', 't/todo_tests/various_role_features.t', 't/todo_tests/wrong-inner.t', 't/type_constraints/advanced_type_creation.t', 't/type_constraints/class_subtypes.t', 't/type_constraints/class_type_constraint.t', 't/type_constraints/coerced_parameterized_types.t', 't/type_constraints/container_type_coercion.t', 't/type_constraints/container_type_constraint.t', 't/type_constraints/custom_parameterized_types.t', 't/type_constraints/custom_type_errors.t', 't/type_constraints/define_type_twice_throws.t', 't/type_constraints/duck_type_handles.t', 't/type_constraints/duck_types.t', 't/type_constraints/enum.t', 't/type_constraints/inlining.t', 't/type_constraints/match_type_operator.t', 't/type_constraints/maybe_type_constraint.t', 't/type_constraints/misc_type_tests.t', 't/type_constraints/name_conflicts.t', 't/type_constraints/normalize_type_name.t', 't/type_constraints/parameterize_from.t', 't/type_constraints/role_type_constraint.t', 't/type_constraints/subtype_auto_vivify_parent.t', 't/type_constraints/subtyping_parameterized_types.t', 't/type_constraints/subtyping_union_types.t', 't/type_constraints/throw_error.t', 't/type_constraints/type_coersion_on_lazy_attributes.t', 't/type_constraints/type_names.t', 't/type_constraints/type_notation_parser.t', 't/type_constraints/types_and_undef.t', 't/type_constraints/union_is_a_type_of.t', 't/type_constraints/union_types.t', 't/type_constraints/union_types_and_coercions.t', 't/type_constraints/util_find_type_constraint.t', 't/type_constraints/util_more_type_coercion.t', 't/type_constraints/util_std_type_constraints.t', 't/type_constraints/util_type_coercion.t', 't/type_constraints/util_type_constraints.t', 't/type_constraints/util_type_constraints_export.t', 't/type_constraints/util_type_reloading.t', 't/type_constraints/with-specio.t', 't/zzz-check-breaks.t' ); notabs_ok($_) foreach @files; done_testing; Moose-2.1604/xt/author/pod-coverage.t000644 000766 000024 00000016720 12617452415 017655 0ustar00etherstaff000000 000000 use strict; use warnings; use Test::More; use Test::Requires { 'Test::Pod::Coverage' => '1.04', # skip all if not installed }; # This is a stripped down version of all_pod_coverage_ok which lets us # vary the trustme parameter per module. my @modules = grep { !/Accessor::Native.*$/ && !/::Conflicts$/ && !/^Moose::Exception::/ } all_modules(); plan tests => scalar @modules; my %trustme = ( 'Class::MOP' => [ 'DEBUG_NO_META', 'HAVE_ISAREV', 'IS_RUNNING_ON_5_10', 'subname', 'in_global_destruction', 'check_package_cache_flag', 'load_first_existing_class', 'is_class_loaded', 'load_class', ], 'Class::MOP::Attribute' => ['process_accessors'], 'Class::MOP::Class' => [ # deprecated 'alias_method', 'compute_all_applicable_attributes', 'compute_all_applicable_methods', # unfinished feature 'add_dependent_meta_instance', 'add_meta_instance_dependencies', 'invalidate_meta_instance', 'invalidate_meta_instances', 'remove_dependent_meta_instance', 'remove_meta_instance_dependencies', 'update_meta_instance_dependencies', # effectively internal 'check_metaclass_compatibility', 'clone_instance', 'construct_class_instance', 'construct_instance', 'create_meta_instance', 'reset_package_cache_flag', 'update_package_cache_flag', 'reinitialize', # doc'd with rebless_instance 'rebless_instance_away', # deprecated 'get_attribute_map', ], 'Class::MOP::Class::Immutable::Trait' => ['.+'], 'Class::MOP::Class::Immutable::Class::MOP::Class' => ['.+'], 'Class::MOP::Deprecated' => ['.+'], 'Class::MOP::Instance' => [ qw( BUILDARGS bless_instance_structure is_dependent_on_superclasses ), ], 'Class::MOP::Instance' => [ qw( BUILDARGS bless_instance_structure is_dependent_on_superclasses ), ], 'Class::MOP::Method::Accessor' => [ qw( generate_accessor_method generate_accessor_method_inline generate_clearer_method generate_clearer_method_inline generate_predicate_method generate_predicate_method_inline generate_reader_method generate_reader_method_inline generate_writer_method generate_writer_method_inline initialize_body ) ], 'Class::MOP::Method::Constructor' => [ qw( attributes generate_constructor_method generate_constructor_method_inline initialize_body meta_instance options ) ], 'Class::MOP::Method::Generated' => [ qw( new definition_context is_inline initialize_body ) ], 'Class::MOP::MiniTrait' => ['.+'], 'Class::MOP::Mixin::AttributeCore' => ['.+'], 'Class::MOP::Mixin::HasAttributes' => ['.+'], 'Class::MOP::Mixin::HasMethods' => ['.+'], 'Class::MOP::Mixin::HasOverloads' => ['.+'], 'Class::MOP::Overload' => [ 'attach_to_class' ], 'Class::MOP::Package' => [ 'get_method_map', 'wrap_method_body' ], 'Moose' => [ 'init_meta', 'throw_error' ], 'Moose::Error::Confess' => ['new'], 'Moose::Exception' => ['BUILD'], 'Moose::Meta::Attribute' => [ qw( interpolate_class throw_error attach_to_class ) ], 'Moose::Meta::Attribute::Native::MethodProvider::Array' => ['.+'], 'Moose::Meta::Attribute::Native::MethodProvider::Bool' => ['.+'], 'Moose::Meta::Attribute::Native::MethodProvider::Code' => ['.+'], 'Moose::Meta::Attribute::Native::MethodProvider::Counter' => ['.+'], 'Moose::Meta::Attribute::Native::MethodProvider::Hash' => ['.+'], 'Moose::Meta::Attribute::Native::MethodProvider::String' => ['.+'], 'Moose::Meta::Class' => [ qw( check_metaclass_compatibility construct_instance create_error raise_error reinitialize superclasses ) ], 'Moose::Meta::Class::Immutable::Trait' => ['.+'], 'Moose::Meta::Method' => ['throw_error'], 'Moose::Meta::Method::Accessor' => [ qw( generate_accessor_method generate_accessor_method_inline generate_clearer_method generate_predicate_method generate_reader_method generate_reader_method_inline generate_writer_method generate_writer_method_inline new ) ], 'Moose::Meta::Method::Constructor' => [ qw( attributes initialize_body meta_instance new options ) ], 'Moose::Meta::Method::Destructor' => [ 'initialize_body', 'options' ], 'Moose::Meta::Method::Meta' => ['wrap'], 'Moose::Meta::Role' => [ qw( alias_method get_method_modifier_list reinitialize reset_package_cache_flag update_package_cache_flag wrap_method_body ) ], 'Moose::Meta::Mixin::AttributeCore' => ['.+'], 'Moose::Meta::Role::Composite' => [ qw( add_method get_method get_method_list has_method is_anon add_overloaded_operator get_all_overloaded_operators get_overload_fallback_value is_overloaded set_overload_fallback_value ), ], 'Moose::Object' => [ 'BUILDALL', 'DEMOLISHALL' ], 'Moose::Role' => [ qw( after around augment before extends has inner override super with init_meta ) ], 'Moose::Meta::TypeCoercion' => ['compile_type_coercion'], 'Moose::Meta::TypeCoercion::Union' => ['compile_type_coercion'], 'Moose::Meta::TypeConstraint' => [qw( compile_type_constraint inlined )], 'Moose::Meta::TypeConstraint::Class' => [qw( equals is_a_type_of is_a_subtype_of )], 'Moose::Meta::TypeConstraint::Enum' => [qw( constraint equals )], 'Moose::Meta::TypeConstraint::DuckType' => [qw( constraint equals get_message )], 'Moose::Meta::TypeConstraint::Parameterizable' => ['.+'], 'Moose::Meta::TypeConstraint::Parameterized' => ['.+'], 'Moose::Meta::TypeConstraint::Role' => [qw( equals is_a_type_of )], 'Moose::Meta::TypeConstraint::Union' => [ qw( compile_type_constraint coercion has_coercion can_be_inlined inline_environment ) ], 'Moose::Util' => ['add_method_modifier'], 'Moose::Util::MetaRole' => ['apply_metaclass_roles'], 'Moose::Util::TypeConstraints' => ['find_or_create_type_constraint'], 'Moose::Util::TypeConstraints::Builtins' => ['.+'], ); for my $module ( sort @modules ) { my $trustme = []; if ( $trustme{$module} ) { my $methods = join '|', @{ $trustme{$module} }; $trustme = [qr/^(?:$methods)$/]; } pod_coverage_ok( $module, { trustme => $trustme }, "Pod coverage for $module" ); } Moose-2.1604/xt/author/pod-spell.t000644 000766 000024 00000007112 12617452415 017174 0ustar00etherstaff000000 000000 use strict; use warnings; use Test::Spelling; my @stopwords; for () { chomp; push @stopwords, $_ unless /\A (?: \# | \s* \z)/msx; # skip comments, whitespace } add_stopwords(@stopwords); local $ENV{LC_ALL} = 'C'; set_spell_cmd('aspell list -l en'); all_pod_files_spelling_ok; __DATA__ ## personal names Aankhen Anders Aran Breunung Buels Cawley Clary Crawley Debolaz Deltac Doran Etheridge Florian Gabor Goro Goulah Hardison JT Kanat Kansai Kinyon Kinyon's Kogman Lanyon Lenz Luehrs McWhirter Moritz Pearcey Perek Piotr Prather Ragwitz Reis Rockway Roditi Rolsky Roszatycki Roszatycki's SL SawyerX Sedlacek Shlomi Signes Simula Stevan Stratman Szabo Treder Vecchi Vilain Ynon Yuval autarch backported backports blblack bluefeet brian chansen chromatic's dexter doy ewilhelm foy frodwith gphat groditi hakobe ingy jgoulah jrockway kolibrie konobi lbr merlyn mst nothingmuch perigrin phaylon rafl rindolf rjbs rlb robkinyon sartak stevan tozt wreis ## proper names AOP CLOS CPAN CentOS FOSDEM OCaml OnLAMP PDX PerlMaven SHDH SVN WebGUI ohloh osdc tw ## Moose AttributeHelpers BUILDALL BUILDARGS BankAccount BankAccount's BinaryTree CLR CheckingAccount DEMOLISHALL Debuggable JVM METACLASS Metaclass MOPs MetaModel MetaObject Metalevel MooseX Num OtherName PosInt PositiveInt RoleSummation Specio Str TypeContraints clearers composable hardcode immutabilization immutabilize introspectable metaclass metaclass's metadata metaobject metaobjects metaprogrammer metarole metaroles metatraits mixins oose ro rw AttributeIsRequired ValidationFailedForTypeConstraint ## computerese API APIs Baz Bugzilla Changelog Coercions DUCKTYPE DWIM GitHub GitHub's Haskell IRC Immutabilization Inlinable JSON Lexically Namespace O'Caml OO OOP ORM OSCON Overengineered ROLETYPE SUBCLASSES SUBTYPES Smalltalk Subclasses Subtypes TODO UNIMPORTING URI Unported Whitelist Whitepaper Wikipedia # from the Support manual talking about version numbers YY YYZZ ZZ arity arrayrefs autodelegation blog clearers codebase coercions committer committers compat continutation contrib datetimes dec decrement definedness deinitialized deprecations destructor destructors destructuring dev discoverable env eval'ing extensibility hashrefs hotspots immutabilize immutabilized immutabilizes incrementing inlinable inline inlines installable instantiation interoperable invocant invocant's irc isa kv login matcher metadata mixin mixins mortem mul munge namespace namespace's namespaced namespaces namespacing natatime # as in required-ness ness online optimizations overridable parameterizable parameterization parameterize parameterized parameterizes params pluggable plugins polymorphism prechecking prepends pu rebase rebased rebasing rebless reblesses reblessing refactored refactoring rethrows runtime serializer sigil sigils stacktrace stacktraces stateful subclass's subclassable subclasses subname subtype subtypes subtyping unblessed unexport unimporting uninitialize unordered unresolvable unsets unsettable utils whitelisted workflow workflows ## other jargon bey gey ## neologisms breakability delegatee featureful hackery hacktern undeprecate wrappee ## compound # half-assed assed # role-ish, Ruby-ish, medium-to-large-ish ish # kool-aid kool # pre-5.10 pre # vice versa versa lookup # co-maint maint ## slang C'mon might've Nuff ## things that should be in the dictionary, but are not attribute's declaratively everybody's everyone's human's indices initializers newfound reimplements reinitializes specializer unintrusive ## misspelt on purpose emali uniq #docgenerator fixLineLength getExceptionsToMessages placeCommasAndAnd shortenToEighty Moose-2.1604/xt/author/pod-syntax.t000644 000766 000024 00000000252 12617452415 017401 0ustar00etherstaff000000 000000 #!perl # This file was automatically generated by Dist::Zilla::Plugin::PodSyntaxTests. use strict; use warnings; use Test::More; use Test::Pod 1.41; all_pod_files_ok(); Moose-2.1604/xt/author/test-my-dependents.t000644 000766 000024 00000125461 12617452415 021036 0ustar00etherstaff000000 000000 use strict; use warnings; use Cwd qw( abs_path ); use Test::More; BEGIN { my $help = <<'EOF'; This test will not run unless you set MOOSE_TEST_MD to a true value. Valid values are: all Test every dist which depends on Moose except those that we know cannot be tested. This is a lot of distros (thousands). Dist::1,Dist::2,... Test the individual dists listed. MooseX Test all Moose extension distros (MooseX modules plus a few others). 1 Run the default tests. We pick 200 random dists and test them. EOF plan skip_all => $help unless $ENV{MOOSE_TEST_MD}; } use Test::Requires { 'Archive::Zip' => 0, # or else .zip dists won't be able to be installed 'Test::DependentModules' => '0.13', 'MetaCPAN::API' => '0.33', }; use Test::DependentModules qw( test_module ); use DateTime; use List::Util 1.33 qw(any); use Moose (); diag( 'Test run performed at: ' . DateTime->now . ' with Moose ' . (Moose->VERSION || 'git repo') ); $ENV{PERL_TEST_DM_LOG_DIR} = abs_path('.'); delete @ENV{ qw( AUTHOR_TESTING RELEASE_TESTING SMOKE_TESTING ) }; $ENV{ANY_MOOSE} = 'Moose'; my $mcpan = MetaCPAN::API->new; my $res = $mcpan->post( '/release/_search' => { query => { match_all => {} }, size => 5000, filter => { and => [ { or => [ { term => { 'release.dependency.module' => 'Moose' } }, { term => { 'release.dependency.module' => 'Moose::Role' } }, { term => { 'release.dependency.module' => 'Moose::Exporter' } }, { term => { 'release.dependency.module' => 'Class::MOP' } }, { term => { 'release.dependency.module' => 'MooseX::Role::Parameterized' } }, { term => { 'release.dependency.module' => 'Any::Moose' } }, ] }, { term => { 'release.status' => 'latest' } }, { term => { 'release.maturity' => 'released' } }, ] }, fields => 'distribution' } ); my @skip_prefix = qw(Acme Task Bundle); my %skip; my %todo; my $hash; for my $line () { chomp $line; next unless $line =~ /\S/; if ( $line =~ /^# (\w+)/ ) { die "Invalid action in DATA section ($1)" unless $1 eq 'SKIP' || $1 eq 'TODO'; $hash = $1 eq 'SKIP' ? \%skip : \%todo; } my ( $dist, $reason ) = $line =~ /^(\S*)\s*(?:#\s*(.*)\s*)?$/; next unless defined $dist && length $dist; $hash->{$dist} = $reason; } my %name_fix = ( 'AI-Classifier' => 'AI::Classifier::Text', 'Algorithm-DependencySolver' => 'Algorithm::DependencySolver::Solver', 'Alice' => 'Alice::HTTP::WebSocket', 'App-Foca' => 'App::Foca::Server', 'App-passmanager' => 'App::PassManager', 'App-PipeFilter' => 'App::PipeFilter::Generic', 'Bio_AssemblyImprovement' => 'Bio::AssemblyImprovement', 'Business-PaperlessTrans' => 'Business::PaperlessTrans::Client', 'BuzzSaw' => 'App::BuzzSaw', 'Constructible' => 'Constructible::Maxima', 'CTKlib' => 'CTK', 'DCOLLINS-ANN-Locals' => 'DCOLLINS::ANN::Robot', 'Dist-Zilla-Deb' => 'Dist::Zilla::Plugin::Deb::VersionFromChangelog', 'Dist-Zilla-Plugins-CJM' => 'Dist::Zilla::Plugin::TemplateCJM', 'Dist-Zilla-Plugin-TemplateFile' => 'Dist::Zilla::Plugin::TemplateFiles', 'DSL-Tiny' => 'DSL::Tiny::Role', 'Google-Directions' => 'Google::Directions::Client', 'GoogleMapsHeatmap' => 'Geo::Heatmap', 'helm' => 'Helm', 'HTML-Untemplate' => 'HTML::Linear', 'marc-moose' => 'MARC::Moose', 'mobirc' => 'App::Mobirc', 'Net-Amazon-EMR' => 'Net::Amazon::EMR::AddInstanceGroupsResult', 'OWL-Simple' => 'OWL::Simple::Class', 'Patterns-ChainOfResponsibility' => 'Patterns::ChainOfResponsibility::Application', 'PkgForge' => 'PkgForge::App', 'PkgForge-Server' => 'PkgForge::Builder', 'Pod-Elemental-Transfomer-VimHTML' => 'Pod::Elemental::Transformer::VimHTML', 'Role-Identifiable' => 'Role::Identifiable::HasIdent', 'smokebrew' => 'App::SmokeBrew', 'Treex-Parser-MSTperl' => 'Treex::Tool::Parser::MSTperl', 'v6-alpha' => 'v6', 'WebService-LOC-CongRec' => 'WebService::LOC::CongRec::Crawler', 'X11-XCB' => 'X11::XCB::Connection', 'XML-Ant-BuildFile' => 'XML::Ant::BuildFile::Project', ); my @dists = sort grep { !$skip{$_} } grep { my $dist = $_; !any { $dist =~ /^$_-/ } @skip_prefix } map { $_->{fields}{distribution} } @{ $res->{hits}{hits} }; if ( $ENV{MOOSE_TEST_MD} eq 'MooseX' ) { @dists = grep { /^(?:MooseX-|(?:Fey-ORM|KiokuDB|Bread-Board|Catalyst-Runtime|Reflex)$)/ } @dists; } elsif ( $ENV{MOOSE_TEST_MD} eq '1' ) { diag( <<'EOF' Picking 200 random dependents to test. Set MOOSE_TEST_MD=all to test all dependents or MOOSE_TEST_MD=MooseX to test extension modules only. EOF ); my %indexes; while ( keys %indexes < 200 ) { $indexes{ int rand( scalar @dists ) } = 1; } @dists = @dists[ sort keys %indexes ]; } elsif ( $ENV{MOOSE_TEST_MD} ne 'all' ) { my @chosen = split /,/, $ENV{MOOSE_TEST_MD}; my %dists = map { $_ => 1 } @dists; if (my @unknown = grep { !$dists{$_} } @chosen) { die "Unknown dists: @unknown"; } @dists = @chosen; } plan tests => scalar @dists; for my $dist (@dists) { note($dist); my $module = $dist; $module = $name_fix{$module} if exists $name_fix{$module}; if ($todo{$dist}) { my $reason = $todo{$dist}; $reason = '???' unless defined $reason; local $TODO = $reason; eval { test_module($module); 1 } or fail("Died when testing $module: $@"); } else { eval { test_module($module); 1 } or fail("Died when testing $module: $@"); } } __DATA__ # SKIP: doesn't install deps properly (test::dm bugs?) App-Benchmark-Accessors # Mojo::Base isn't installed Bot-BasicBot-Pluggable # Crypt::SaltedHash isn't installed Chart-Clicker # Layout::Manager::Compass isn't installed Chart-Weather-Forecast # Layout::Manager::Compass isn't installed Code-Statistics # MooseX::HasDefaults::RO isn't installed Connector # Config::Versioned isn't installed Context-Set # Lingua::EN::Words2Nums isn't installed DBIx-Class-DeploymentHandler # Lingua::EN::Words2Nums isn't installed DBIx-Class-Migration # Lingua::EN::Words2Nums isn't installed DBIx-Class-Migration-RunScript-Trait-AuthenPassphrase # Lingua::EN::Words2Nums isn't installed DBIx-Class-Schema-Loader # Lingua::EN::Words2Nums isn't installed DBIx-ObjectMapper # Class::Accessor::Chained::Fast isn't installed Dependencies-Searcher # ack binary isn't installed, because test::dm doesn't set up $PATH Dist-Zilla-PluginBundle-AJGB # Dist::Zilla::Plugin::KwaliteeTests isn't installed Dist-Zilla-PluginBundle-Author-BBYRD # Dist::Zilla::Plugin::ReportPhase isn't installed Dist-Zilla-PluginBundle-JQUELIN # Dist::Zilla::Plugin::CompileTests isn't installed Dist-Zilla-PluginBundle-MITHALDU # List::AllUtils isn't installed Dist-Zilla-PluginBundle-NIGELM # Dist::Zilla::Plugin::KwaliteeTests isn't installed Dist-Zilla-PluginBundle-PDONELAN # Dist::Zilla::Plugin::CompileTests isn't installed Dist-Zilla-Util-FileGenerator # MooseX::HasDefaults::RO isn't installed EBI-FGPT-FuzzyRecogniser # GO::Parser isn't installed Erlang-Parser # Parse::Yapp::Driver isn't installed Foorum # Sphinx::Search isn't installed Grimlock # DBIx::Class::EncodedColumn isn't installed Locale-Handle-Pluggable # MooseX::Types::VariantTable::Declare isn't installed Message-Passing-STOMP # Message::Passing isn't installed mobirc # HTTP::Session::State::GUID isn't installed Net-Bamboo # XML::Tidy isn't installed OpenERP-OOM # OpenERP::XMLRPC::Client isn't installed Tatsumaki-Template-Markapl # Tatsumaki::Template isn't installed Text-Tradition # Bio::Phylo::IO isn't installed Text-Tradition-Analysis # Bio::Phylo::IO isn't installed WebService-Strava # Any::URI::Escape isn't installed # SKIP: index issues (test::dm bugs?) Hopkins # can't find on cpan PostScript-Barcode # can't find on cpan # SKIP: no tests AI-ExpertSystem-Advanced # no tests API-Assembla # no tests App-mkfeyorm # no tests App-passmanager # no tests App-Scrobble # no tests Bot-Applebot # no tests Catalyst-Authentication-Credential-Facebook-OAuth2 # no tests Catalyst-Authentication-Store-Fey-ORM # no tests Catalyst-Controller-MovableType # no tests Catalyst-Model-MenuGrinder # no tests Chef # no tests Data-SearchEngine-ElasticSearch # no tests Dist-Zilla-MintingProfile-Author-ARODLAND # no tests Dist-Zilla-PluginBundle-ARODLAND # no tests Dist-Zilla-PluginBundle-Author-OLIVER # no tests Dist-Zilla-PluginBundle-NUFFIN # no tests Dist-Zilla-Plugin-DualLife # no tests Dist-Zilla-Plugin-Git-Describe # no tests Dist-Zilla-Plugin-GitFlow # no tests Dist-Zilla-Plugin-GitFmtChanges # no tests Dist-Zilla-Plugin-MetaResourcesFromGit # no tests Dist-Zilla-Plugin-ModuleBuild-OptionalXS # no tests Dist-Zilla-Plugin-Rsync # no tests Dist-Zilla-Plugin-TemplateFile # no tests Dist-Zilla-Plugin-UploadToDuckPAN # no tests Finance-Bank-SuomenVerkkomaksut # no tests Games-HotPotato # no tests IO-Storm # no tests JIRA-Client-REST # no tests Kafka-Client # no tests LWP-UserAgent-OfflineCache # no tests Markdown-Pod # no tests meon-Web # no tests MooseX-Types-DateTimeX # no tests MooseX-Types-DateTime-MoreCoercions # no tests unless DateTime::Format::DateManip is installed Net-Azure-BlobService # no tests Net-Dropbox # no tests Net-Flowdock # no tests Net-OpenStack-Attack # no tests Net-Ostrich # no tests Net-Recurly # no tests OpenDocument-Template # no tests Pod-Weaver-Section-Consumes # no tests Pod-Weaver-Section-Encoding # no tests Pod-Weaver-Section-Extends # no tests P50Tools # no tests POE-Component-Server-MySQL # no tests Prophet-Devel # no tests Random-Quantum # no tests SchemaEvolution # no tests STD # no tests Test-System # no tests Test-WWW-Mechanize-Dancer # no tests WebService-Buxfer # no tests WebService-CloudFlare-Host # no tests WWW-MenuGrinder # no tests WWW-UsePerl-Server # no tests WWW-WuFoo # no tests # SKIP: external dependencies Alien-Ditaa # runs java code Ambrosia # required mod_perl AnyEvent-MSN # requires Net::SSLeay (which requires libssl) AnyEvent-Multilog # requires multilog AnyEvent-Net-Curl-Queued # requires libcurl AnyEvent-ZeroMQ # requires zeromq installation AnyMQ-ZeroMQ # requires zeromq installation Apache2-HttpEquiv # requires apache (for mod_perl) App-Fotagger # requires sdl App-Mimosa # requires fastacmd App-PgCryobit # requires postgres installation App-SimplenoteSync # requires File::ExtAttr which requires libattr App-WIoZ # requires cairo Archive-RPM # requires cpio Bio-MLST-Check # requires makeblastdb, etc Bio-Pipeline-Comparison # requires bgzip, tabix, etc Bot-Jabbot # requires libidn Catalyst-Authentication-Store-CouchDB # requires couchdb Catalyst-Engine-Stomp # depends on alien::activemq Catalyst-Plugin-Session-Store-Memcached # requires memcached Catalyst-View-SVG-TT-Graph # requires librsvg Catalyst-View-Template-PHP # requires php Cave-Wrapper # requires cave to be installed CHI-Driver-Redis # requires redis server Crypt-Random-Source-Strong-Win32 # windows only Curses-Toolkit # requires Curses which requires ncurses library Dackup # requires ssh Dancer2-Plugin-Queue-MongoDB # requires mongo Data-Collector # requires ssh Data-Riak # requires riak Database-Migrator-mysql # requires mysql installation DBIx-MySQL-Replication-Slave # requires mysql installation DBIx-PgLink # requires postgres installation Device-SMBus # requires libi2c Device-ZyXEL-IES # SNMP requires net-snmp Dist-Zilla-Plugin-ChangelogFromGit-Debian-Sequential # requires dpkg Dist-Zilla-Plugin-Subversion # requires svn bindings Dist-Zilla-Plugin-SVK # requires svn bindings Dist-Zilla-Plugin-SvnObtain # requires svn bindings Dist-Zilla-Plugin-Upload-SCP # requires ssh Fedora-App-MaintainerTools # requires rpm to be installed Fedora-App-ReviewTool # requires koji to be installed Fuse-Template # requires libfuse Games-HotPotato # requires sdl Games-Tetris-Complete # requires threads Gapp # requires gtk2 GappX-NoticeBox # requires gtk2 GnuPG-Interface # requires gpg GoogleMapsHeatmap # requires imagemagick Graphics-DZI # requires imagemagick Graphics-Primitive-Driver-Cairo # requires cairo Graphics-Primitive-Driver-CairoPango # requires cairo helm # requires ssh HTML-Barcode-QRCode # requires libqrencode Hypatia-Chart-Clicker # requires cairo Hypatia-GraphViz2 # requires graphviz Image-Placeholder # requires gd Image-TextMode # requires gd IRC-RemoteControl # requires libssh2 JavaScript-Sprockets # requires sprocketize JavaScript-V8x-TestMoreish # requires v8 Koha-Contrib-Tamil # requires yaz K # requires kx Lighttpd-Control # requires lighttpd Lingua-TreeTagger # requires treetagger to be installed Lorem # requires cairo Math-Lsoda # requires f77 Message-Passing-PSGI # requires zeromq installation Message-Passing-ZeroMQ # requires zeromq installation MongoDBI # requires mongo MongoDB # requires mongo MongoDB-Async # requires mongo MSWord-ToHTML # requires abiword to be installed MySQL-Slurp # requires mysql Net-DBus-Skype # requires dbus Net-Route # requires route Net-SFTP-Foreign-Exceptional # depends on running ssh Net-UpYun # requires curl Net-ZooTool # requires curl Nginx-Control # requires nginx to be installed NLP-Service # requires javac Padre-Plugin-Cookbook # requires Wx Padre-Plugin-Moose # requires threaded perl Padre-Plugin-PDL # requires threaded perl Padre-Plugin-Snippet # requires threaded perl Paludis-UseCleaner # depends on cave::wrapper Pantry # requires ssh Perlanet # HTML::Tidy requires tidyp Perl-Dist-Strawberry-BuildPerl-5123 # windows only Perl-Dist-Strawberry-BuildPerl-5123 # windows only Perl-Dist-WiX-BuildPerl-5123 # windows only Perl-Dist-WiX # windows only Perl-Dist-WiX # windows only Physics-UEMColumn # requires gsl PkgForge # requires rpm PkgForge-Registry # requires rpm PkgForge-Server # requires rpm Plack-App-FakeApache # requires mod_perl POE-Component-OpenSSH # requires ssh PulseAudio # requires pulseaudio RDF-TrineX-RuleEngine-Jena # requires Jena Reflexive-ZmqSocket # requires zmq SDLx-Betweener # requires sdl SDLx-GUI # requires sdl Siebel-COM # windows only SimpleDB-Class # requires memcached SVN-Simple-Hook # requires svn SVN-Tree # requires svn Tapper-Cmd # requires ssh Tapper-MCP # depends on everything under the sun - some of which is broken Template-JavaScript # requires v8 Test-Approvals # windows only Test-DBIx-Class # requires mysql Test-Gearman # requires gearman TheSchwartz-Moosified # requires DBI::Pg ? UAV-Pilot # requires sdl WebService-SendGrid # requires curl WebService-Tesco-API # requires curl WWW-Contact # depends on curl WWW-Curl-Simple # requires curl ZeroMQ-PubSub # requires zmq ZMQ-Declare # requires zmq ZMQx-Class # requires zmq # SKIP: flaky internet tests iTransact-Lite # tests rely on internet site Unicode-Emoji-E4U # tests rely on internet site WWW-eNom # tests rely on internet site WWW-Finances-Bovespa # tests rely on internet site WWW-Vimeo-Download # tests rely on internet site WWW-YouTube-Download-Channel # tests rely on internet site # SKIP: graphical App-CPAN2Pkg # tk tests are graphical App-USBKeyCopyCon # gtk tests are graphical CatalystX-Restarter-GTK # gtk tests are graphical Forest-Tree-Viewer-Gtk2 # gtk tests are graphical Games-Pandemic # tk tests are graphical Games-RailRoad # tk tests are graphical Games-Risk # tk tests are graphical Log-Dispatch-Gtk2-Notify # gtk tests are graphical LPDS # gtk tests are graphical Periscope # gtk tests are graphical Tk-Role-Dialog # tk tests are graphical Weaving-Tablet # tk tests are graphical # SKIP: prompts (or a dep prompts) or does something else dumb AI-Nerl # pdl has weird memory errors and hangs Bio-Tradis # Bio::DB::Sam prompts in Makefile.PL Bot-Backbone # poe-loop-ev prompts Cache-Ehcache # hangs if server exists on port 8080 Cache-Memcached-Queue # Makefile.PL tries to auto-install deps manually CM-Permutation # OpenGL uses graphics in Makefile.PL Date-Biorhythm # Date::Business prompts in Makefile.PL DBIx-VersionedDDL # runs a script with /usr/bin/perl in the shbang line File-Tail-Scribe # tests hang Gearman-Driver # spews tar errors Gearman-SlotManager # tests hang IPC-AnyEvent-Gearman # tests hang Lingua-YALI # runs scripts with /usr/bin/env perl in the shbang line Net-SSH-Mechanize # the mock-ssh script it runs seems to spin endlessly POE-Component-Server-SimpleHTTP-PreFork # tests hang Test-SFTP # Term::ReadPassword prompts in tests WebService-FogBugz-XML # prompts WWW-Hashdb # test hangs, pegging cpu Zucchini # File::Rsync prompts in Makefile.PL # SKIP: broken configure Module-Install-ProvidesClass # broken Makefile.PL Nagios-Interface # broken Makefile.PL TAP-Runner # Math::Cartesian::Product is broken # TODO: failing for a reason Algorithm-KernelKMeans # mx-types-common changes broke it Alien-BWIPP # given is experimental AnyEvent-BitTorrent # broken AnyEvent-Cron # intermittent failures AnyEvent-Inotify-Simple # ??? (maybe issue with test::sweet) AnyEvent-JSONRPC # tests require recommended deps AnyEvent-Retry # mx-types-common changes broke it AnyMongo # doesn't compile App-ArchiveDevelCover # depends on nonexistent testdata::setup App-Dataninja # bad M::I install in inc/ App-Foca # pod coverage fail App-HistHub # missing deps App-iTan # given is experimental App-Magpie # deps on URPM which doesn't exist App-MediaWiki2Git # git::repository is broken App-Munchies # depends on XML::DTD App-PM-Announce # deps on WWW::UsePerl::Journal::Post which doesn't exist App-Rssfilter # given is experimental App-Services # misnamed package App-TemplateServer # broken use of types App-TemplateServer-Provider-HTML-Template # dep on app-templateserver App-TemplateServer-Provider-Mason # dep on app-templateserver App-TemplateServer-Provider-TD # dep on app-templateserver App-TimeTracker # missing dep on IO::Capture::Stdout App-Twimap # dep on Web::oEmbed::Common App-Twitch # given is experimental App-Validation-Automation # dep on Switch App-Wubot # broken Archive-BagIt # pod coverage fail Argon # missin dep on IO::Capture::Stderr Autocache # hash randomization Beagle # depends on term::readline::perl Beam-Wire-Moose # broken Bio-MAGETAB # pod coverage fail and possibly hash randomization Bio_AssemblyImprovement # broken BPM-Engine # incorrect deps Business-RO-CNP # broken Business-UPS-Tracking # given is experimental Cache-Profile # broken Catalyst-Action-Serialize-Data-Serializer # looks like changes in opcode structure Catalyst-ActionRole-BuildDBICResult # broken Catalyst-Authentication-Store-LDAP-AD-Class # pod coverage fail Catalyst-Controller-AutoAssets # broken Catalyst-Controller-Resources # broken Catalyst-Controller-SOAP # broken Catalyst-Engine-Embeddable # broken Catalyst-Model-Akismet # broken (fake key no longer works) Catalyst-Model-FormFu # missing deps Catalyst-Model-Sedna # deps on Alien-Sedna which doesn't exist Catalyst-Plugin-Continuation # undeclared dep Catalyst-Plugin-I18N-DBI # pod coverage fail Catalyst-Plugin-Session-State-Cookie # broken Catalyst-Plugin-Session-Store-TestMemcached # dep with corrupt archive Catalyst-Plugin-SwiffUploaderCookieHack # undeclared dep Catalyst-TraitFor-Component-ConfigPerSite # broken Catalyst-TraitFor-Request-PerLanguageDomains # dep on ::State::Cookie CatalystX-Declare # flaky tests (hash randomization?) CatalystX-ExtJS-Direct # broken CatalystX-ExtJS-REST # broken CatalystX-I18N # dep on ::State::Cookie CatalystX-MooseComponent # broken CatalystX-OAuth2 # deps on CatalystX::Test::MockContent, which doesn't exist CatalystX-SimpleLogin # broken CatalystX-Usul # proc::processtable doesn't load Chart-OFC2 # coerce without a coercion Cheater # parse::randgen is broken CHI-Driver-SharedMem # hash randomization Class-OWL # uses CMOP::Class without loading cmop CloudApp-REST # pod coverage fail Cogwheel # uses ancient moose apis Config-Model # broken Config-Model-Backend-Augeas # deps on Config::Model Config-Model-OpenSsh # deps on Config::Model Constructible # GD::SVG is a broken dist Constructible-Maxima # GD::SVG is a broken dist Coro-Amazon-SimpleDB # amazon::simpledb::client doesn't exist CPAN-Digger # requires DBD::SQLite CPAN-Source # missing deps Data-AMF # missing dep on YAML Data-Apache-mod_status # invalid characters in type name Data-Edit # dist is missing some modules Data-Feed # broken (only sometimes?) Data-Keys # hash randomization Data-PackageName # broken Data-Pensieve # missing deps Data-Pipeline # uses ancient moose apis Data-SCORM # pod coverage fail Data-Valve # for qw() DayDayUp # MojoX-Fixup-XHTML doesn't exist DBICx-Modeler-Generator # broken (weirdly) DBIx-Class-FormTools # hash randomization DBIx-NoSQL-Store-Manager # flaky tests (hash randomization?) DBIx-SchemaChecksum # broken Debian-Apt-PM # configure time failures Devel-Events # broken (role conflict) Dist-Zilla-Deb # pod coverage fail Dist-Zilla-Plugin-ChangelogFromGit-Debian # git::repository is broken Dist-Zilla-Plugin-CheckChangesHasContent # broken Dist-Zilla-Plugin-Git # tests fail when run in a temp dir Dist-Zilla-Plugin-LaunchpadPPA # depends on Dpkg::Changelog::Parse which doesn't exist Dist-Zilla-Plugin-PerlTidy # expects to find dzil in the path Dist-Zilla-Plugin-Pinto-Add # deps on Pinto::Common Dist-Zilla-Plugin-ProgCriticTests # broken Dist-Zilla-Plugin-Test-ReportPrereqs # broken DustyDB # uses old moose apis Dwimmer # broken ElasticSearchX-Model # hash randomization Facebook-Graph # broken FCGI-Engine # runs scripts without using $^X Fedora-Bugzilla # deps on nonexistent things Fey-Loader # broken FFmpeg-Thumbnail # undeclared dep File-Corresponding # broken File-DataClass # XML::DTD is a broken dist File-Stat-Moose # old moose apis File-Tail-Dir # intermittent fails (i think) FilmAffinity-UserRating # hash randomization Finance-Bank-SentinelBenefits-Csv401kConverter # hash randomization Form-Factory # uses old moose apis Form-Sensible # broken FormValidator-Nested # broken Frost # broken Games-Dice-Loaded # flaky tests Geometry-Primitive # coerce with no coercion Gideon # broken Git-PurePerl # for qw() Git-Release # undeclared dep on Mo Github-Score # broken tests Gitalist # broken GOBO # coerce with no coercion Google-AJAX-Library # hash randomization Google-Chart # recreating type constraints Google-Spreadsheet-Agent # pod::coverage fail Graph-Similarity # perlcritic fail Hailo # given/when is experimental Hessian-Translator # perlcritic fail Hobocamp # configure_requires needs EU::CChecker Horris # App::Horris isn't on cpan HPPPM-Demand-Management # pod::coverage fail HTML-Element-Replacer # hash randomization HTML-FormFu-ExtJS # hash randomization HTML-FormHandlerX-Field-DateTimeNatural # broken HTML-FormHandlerX-Field-URI-HTTP # broken HTML-Grabber # pod::coverage fail HTML-TreeBuilderX-ASP_NET # broken HTTP-Balancer # weird issue with proc::processtable HTTP-Engine # hash randomization HTTP-Engine-Middleware # missing dep on yaml Image-Robohash # Graphics::Magick doesn't exist JavaScript-Framework-jQuery # coerce with no coercion Jenkins-NotificationListener # missing dep on File::Read Jifty # Test::WWW::Selenium needs devel::repl jQuery-Loader # for qw() JS-YUI-Loader # broken JSON-RPC-Common # for qw() JSORB # broken Jungle # broken Kamaitachi # pod::coverage fail KiokuDB-Backend-Files # broken KiokuDB-Backend-MongoDB # pod fail LaTeX-TikZ # broken (with moose) LCFG-Build-PkgSpec # flaky tests (time zones?) Lingua-Diversity # pod fail marc-moose # broken (only sometimes?) Mac-iPhoto-Exif # smartmatch is experimental Magpie # broken Mail-Summary-Tools # DT::Format::DateManip is broken MediaWiki-USERINFO # broken Metabase-Backend-MongoDB # broken Metabase-Backend-SQL # broken (I think) Method-Signatures # doesn't like ANY_MOOSE=Moose Mildew # Regexp::Grammars is broken on 5.18 mobirc # http::engine broken MooseX-App-Cmd-Command-BashComplete # pod fail MooseX-Attribute-Prototype # uses old moose apis MooseX-AttributeHelpers # broken MooseX-Compile # broken MooseX-DBIC-Scaffold # needs unreleased sql-translator MooseX-Documenter # broken MooseX-DOM # "no Moose" unimports confess MooseX-Error-Exception-Class # metaclass compat breakage MooseX-FSM # broken MooseX-Getopt-Usage # missing dep on Test::Class MooseX-GTIN # broken (under jenkins, at least) MooseX-InlineTypes # coerce without coercion MooseX-Meta-Attribute-Index # old moose apis MooseX-Meta-Attribute-Lvalue # old moose apis MooseX-Net-API # hash randomization MooseX-Q4MLog # Queue::Q4MLog is broken MooseX-Role-XMLRPC-Client # requires LWP::Protocol::http which requires libssl MooseX-Scaffold # broken MooseX-Semantic # hash randomization MooseX-Struct # ancient moose apis MooseX-TrackDirty-Attributes # broken MooseX-Types-Parameterizable # broken MooseX-Types-Set-Object # coerce without coercion MooseX-Validation-Doctypes # _process_isa_option MooseX-WithCache # broken MouseX-Types # broken (with moose) MooseX-XSAccessor # coerce without coercion, etc MySQL-Util # pod-coverage fail Mvalve # for qw() Nagios-Passive # broken Net-APNS # broken (with moose) Net-FluidDB # broken Net-Fluidinfo # broken Net-FreshBooks-API # broken Net-Google-Blogger # broken Net-Google-FederatedLogin # broken Net-Google-PicasaWeb # broken NetHack-Item # NH::Monster::Spoiler is broken NetHack-Monster-Spoiler # broken (MX::CA issues) Net-HTTP-API # hash randomization Net-HTTP-Factual # broken Net-ISC-DHCPd # hash randomization Net-Jabber-Bot # broken Net-Journyx # broken Net-Magrathea # pod fail Net-Mollom # broken Net-Parliament # broken Net-Plurk # broken Net-Rexster-Client # pod fail Net-SSLeay-OO # broken Net-StackExchange # broken Norma # fails when trying to write to a read-only SQLite db file under jenkins, also fails when run manually NSMS-API # pod fail ODG-Record # Test::Benchmark broken OpenXML-Properties # incorrect deps Orochi # for qw() Parallel-QueueWorker # flaky test (forking issues) Parse-CPAN-Perms # flaky tests (hash randomization?) PDF-TableX # for qw() Perlbal-Control # proc::processtable doesn't load Pg-BulkCopy # hardcodes /usr/bin/perl Pinto-Common # broken Pinto-Remove # deps on Pinto::Common Pinto-Server # deps on Pinto::Common Plack-Middleware-Image-Scale # Image::Scale is broken Pod-Parser-I18N # missing dep on Data::Localize POE-Component-CPAN-Mirror-Multiplexer # broken POE-Component-DirWatch # intermittent failures POE-Component-DirWatch-Object # intermittent failures POE-Component-ResourcePool # broken POE-Component-Server-PSGI # broken deps POE-Component-Server-SimpleHTTP-PreFork # broken deps Poet # missing dep on Log::Any::Adapter::Log4perl POEx-ProxySession # broken deps POEx-PubSub # broken deps POEx-WorkerPool # broken deps PostScript-ScheduleGrid-XMLTV # XMLTV doesn't exist PRANG # broken Prophet # depends on term::readline::perl Queue-Leaky # broken Queue-Q4M # for qw() RackMan # kwalitee fail Railsish # dep on nonexistent dist RDF-Helper # for qw() RDF-Server # "no Moose" unimports confess Reaction # signatures is broken Reflexive-Role-DataMover # broken (reflex::role changes?) Reflexive-Role-TCPServer # broken (reflex::role changes?) Reflexive-Stream-Filtering # broken RPC-Any # broken RPM-Spec # coerce with no coercion RT-ClientX-GrabBugs # scalar::does doesn't specify deps properly RTDevSys # pod fail Scene-Graph # has '+attr' in roles Scrappy # hash randomization Server-Control # proc::processtable doesn't load Shipment # locale::subcountry is broken Silki # image::magick is broken SilkiX-Converter-Kwiki # file::mimeinfo expects (?-xism: SIOC # for qw() Sloth # rest::utils is broken Sque # couldn't fork server for testing SRS-EPP-Proxy # depends on xml::epp String-Blender # broken Sys-RotateBackup # broken System-Wrapper # pod coverage fail TAEB # broken TAP-Formatter-Bamboo # hash randomization TAP-Formatter-JUnit # hash randomization Tail-Tool # Getopt::Alt doesn't exist Tapper-Action # broken Tapper-CLI # sys::info::driver::linux is broken Tapper-Installer # sys::info::driver::linux is broken Tapper-MCP-MessageReceiver # sys::info::driver::linux is broken Tapper-Reports-API # sys::info::driver::linux is broken Tapper-Reports-Receiver # flaky tests (timeouts) Tapper-Testplan # sys::info::driver::linux is broken Telephone-Mnemonic-US # rpm-build-perl is broken Template-Plugin-Heritable # weird dep issues (not test::dm related) Test-A8N # broken Test-Daily # configure errors Test-HTML-Spelling # broken Test-Moose-More # coerce without coercion Test-Pockito # broken Test-WWW-Selenium-More # Test::WWW::Selenium needs devel::repl Text-Clevery # broken Text-TEI-Collate # pod fail Text-Zilla # broken Thorium # depends on Hobocamp TPath # regexp::grammars is broken on 5.18 TPath-Forester-File # regexp::grammars is broken on 5.18 TPath-Forester-Ref # regexp::grammars is broken on 5.18 TryCatch-Error # broken UnRTF # broken VCI # for qw() Verby # deps on poe::component::resourcepool W3C-SOAP # broken W3C-SOAP-WADL # broken Weather-TW # missing dep on Mojo::DOM Web-API-Mapper # broken WebNano-Controller-CRUD # broken WebService-E4SE # pod coverage fail WebService-Embedly # broken Webservice-InterMine # hash randomization WebService-LOC-CongRec # broken WebService-Mirth # broken WebService-Uptrack # perlcritic fail WebService-Yes24 # broken WiX3 # broken WSDL-Compile # flaky tests (hash randomization?) WWW-3Taps-API # pod fail WWW-Alltop # XML::SimpleObject configure fail WWW-Comix # uses ancient Moose::Policy stuff WWW-DataWiki # broken WWW-EFA # pod fail WWW-Fandango # bad dist WWW-FMyLife # broken WWW-Google-Moderator # hash randomization WWW-Google-Places # hash randomization WWW-Mechanize-Cached # tries to read from wrong build dir? WWW-Mechanize-Query # wrong deps (Mojo::DOM vs Mojo::Dom) WWW-Metalgate # Cache is broken WWW-Scramble # pod::coverage fail WWW-SearchWikipedia # hash randomization WWW-Sitemapper # broken WWW-StaticBlog # time::sofar is broken WWW-WebKit # missing configure_req on EU::PkgConfig WWW-Wookie # kwalitee fail WWW-Yahoo-Lyrics-JP # broken XIRCD # undeclared deps XML-Compare # pod fail XML-EPP # coerce without coercion XML-SRS # deps on prang XML-Writer-Compiler # broken tests YellowBot-API # pod fail YUI-Loader # hash randomization Yukki # git::repository is broken Moose-2.1604/xs/Attribute.xs000644 000766 000024 00000000341 12617452415 016121 0ustar00etherstaff000000 000000 #include "mop.h" MODULE = Class::MOP::Attribute PACKAGE = Class::MOP::Attribute PROTOTYPES: DISABLE BOOT: INSTALL_SIMPLE_READER(Attribute, associated_class); INSTALL_SIMPLE_READER(Attribute, associated_methods); Moose-2.1604/xs/AttributeCore.xs000644 000766 000024 00000001431 12617452415 016733 0ustar00etherstaff000000 000000 #include "mop.h" MODULE = Class::MOP::Mixin::AttributeCore PACKAGE = Class::MOP::Mixin::AttributeCore PROTOTYPES: DISABLE BOOT: INSTALL_SIMPLE_READER(Mixin::AttributeCore, name); INSTALL_SIMPLE_READER(Mixin::AttributeCore, accessor); INSTALL_SIMPLE_READER(Mixin::AttributeCore, reader); INSTALL_SIMPLE_READER(Mixin::AttributeCore, writer); INSTALL_SIMPLE_READER(Mixin::AttributeCore, predicate); INSTALL_SIMPLE_READER(Mixin::AttributeCore, clearer); INSTALL_SIMPLE_READER(Mixin::AttributeCore, builder); INSTALL_SIMPLE_READER(Mixin::AttributeCore, init_arg); INSTALL_SIMPLE_READER(Mixin::AttributeCore, initializer); INSTALL_SIMPLE_READER(Mixin::AttributeCore, definition_context); INSTALL_SIMPLE_READER(Mixin::AttributeCore, insertion_order); Moose-2.1604/xs/Class.xs000644 000766 000024 00000000555 12617452415 015232 0ustar00etherstaff000000 000000 #include "mop.h" MODULE = Class::MOP::Class PACKAGE = Class::MOP::Class PROTOTYPES: DISABLE BOOT: INSTALL_SIMPLE_READER(Class, instance_metaclass); INSTALL_SIMPLE_READER(Class, immutable_trait); INSTALL_SIMPLE_READER(Class, constructor_class); INSTALL_SIMPLE_READER(Class, constructor_name); INSTALL_SIMPLE_READER(Class, destructor_class); Moose-2.1604/xs/Generated.xs000644 000766 000024 00000000372 12617452415 016060 0ustar00etherstaff000000 000000 #include "mop.h" MODULE = Class::MOP::Method::Generated PACKAGE = Class::MOP::Method::Generated PROTOTYPES: DISABLE BOOT: INSTALL_SIMPLE_READER(Method::Generated, is_inline); INSTALL_SIMPLE_READER(Method::Generated, definition_context); Moose-2.1604/xs/HasAttributes.xs000644 000766 000024 00000000441 12617452415 016741 0ustar00etherstaff000000 000000 #include "mop.h" MODULE = Class::MOP::Mixin::HasAttributes PACKAGE = Class::MOP::Mixin::HasAttributes PROTOTYPES: DISABLE BOOT: INSTALL_SIMPLE_READER(Mixin::HasAttributes, attribute_metaclass); INSTALL_SIMPLE_READER_WITH_KEY(Mixin::HasAttributes, _attribute_map, attributes); Moose-2.1604/xs/HasMethods.xs000644 000766 000024 00000005306 12617452415 016223 0ustar00etherstaff000000 000000 #include "mop.h" SV *mop_method_metaclass; SV *mop_associated_metaclass; SV *mop_wrap; static void mop_update_method_map(pTHX_ HV *const stash, HV *const map) { char *method_name; I32 method_name_len; SV *method; HV *symbols; symbols = mop_get_all_package_symbols(stash, TYPE_FILTER_CODE); sv_2mortal((SV*)symbols); (void)hv_iterinit(map); while ((method = hv_iternextsv(map, &method_name, &method_name_len))) { SV *body; SV *stash_slot; if (!SvROK(method)) { continue; } if (sv_isobject(method)) { /* $method_object->body() */ body = mop_call0(aTHX_ method, KEY_FOR(body)); } else { body = method; } stash_slot = *hv_fetch(symbols, method_name, method_name_len, TRUE); if (SvROK(stash_slot) && ((CV*)SvRV(body)) == ((CV*)SvRV(stash_slot))) { continue; } /* delete $map->{$method_name} */ (void)hv_delete(map, method_name, method_name_len, G_DISCARD); } } MODULE = Class::MOP::Mixin::HasMethods PACKAGE = Class::MOP::Mixin::HasMethods PROTOTYPES: DISABLE void _method_map(self) SV *self PREINIT: HV *const obj = (HV *)SvRV(self); SV *const class_name = HeVAL( hv_fetch_ent(obj, KEY_FOR(package), 0, HASH_FOR(package)) ); HV *const stash = gv_stashsv(class_name, 0); UV current; SV *cache_flag; SV *map_ref; PPCODE: if (!stash) { mXPUSHs(newRV_noinc((SV *)newHV())); return; } current = mop_check_package_cache_flag(aTHX_ stash); cache_flag = HeVAL( hv_fetch_ent(obj, KEY_FOR(package_cache_flag), TRUE, HASH_FOR(package_cache_flag))); map_ref = HeVAL( hv_fetch_ent(obj, KEY_FOR(methods), TRUE, HASH_FOR(methods))); /* $self->{methods} does not yet exist (or got deleted) */ if ( !SvROK(map_ref) || SvTYPE(SvRV(map_ref)) != SVt_PVHV ) { SV *new_map_ref = newRV_noinc((SV *)newHV()); sv_2mortal(new_map_ref); sv_setsv(map_ref, new_map_ref); } if ( !SvOK(cache_flag) || SvUV(cache_flag) != current ) { mop_update_method_map(aTHX_ stash, (HV *)SvRV(map_ref)); sv_setuv(cache_flag, mop_check_package_cache_flag(aTHX_ stash)); /* update_cache_flag() */ } XPUSHs(map_ref); BOOT: mop_method_metaclass = newSVpvs("method_metaclass"); mop_associated_metaclass = newSVpvs("associated_metaclass"); mop_wrap = newSVpvs("wrap"); INSTALL_SIMPLE_READER(Mixin::HasMethods, method_metaclass); INSTALL_SIMPLE_READER(Mixin::HasMethods, wrapped_method_metaclass); Moose-2.1604/xs/Inlined.xs000644 000766 000024 00000000277 12617452415 015550 0ustar00etherstaff000000 000000 #include "mop.h" MODULE = Class::MOP::Method::Inlined PACKAGE = Class::MOP::Method::Inlined PROTOTYPES: DISABLE BOOT: INSTALL_SIMPLE_READER(Method::Inlined, _expected_method_class); Moose-2.1604/xs/Instance.xs000644 000766 000024 00000000250 12617452415 015721 0ustar00etherstaff000000 000000 #include "mop.h" MODULE = Class::MOP::Instance PACKAGE = Class::MOP::Instance PROTOTYPES: DISABLE BOOT: INSTALL_SIMPLE_READER(Instance, associated_metaclass); Moose-2.1604/xs/Method.xs000644 000766 000024 00000000752 12617452415 015404 0ustar00etherstaff000000 000000 #include "mop.h" MODULE = Class::MOP::Method PACKAGE = Class::MOP::Method PROTOTYPES: DISABLE BOOT: INSTALL_SIMPLE_READER(Method, name); INSTALL_SIMPLE_READER(Method, package_name); INSTALL_SIMPLE_READER(Method, body); bool is_stub(self) SV *self PREINIT: CV *const body = (CV *)SvRV( HeVAL( hv_fetch_ent((HV *)SvRV(self), KEY_FOR(body), 0, HASH_FOR(body)) ) ); CODE: RETVAL = !( CvISXSUB(body) || CvROOT(body) ); OUTPUT: RETVAL Moose-2.1604/xs/Moose.xs000644 000766 000024 00000007147 12617452415 015253 0ustar00etherstaff000000 000000 #include "EXTERN.h" #include "perl.h" #include "XSUB.h" #include "ppport.h" #include "mop.h" #ifndef MGf_COPY # define MGf_COPY 0 #endif #ifndef MGf_DUP # define MGf_DUP 0 #endif #ifndef MGf_LOCAL # define MGf_LOCAL 0 #endif STATIC int unset_export_flag (pTHX_ SV *sv, MAGIC *mg); STATIC MGVTBL export_flag_vtbl = { NULL, /* get */ unset_export_flag, /* set */ NULL, /* len */ NULL, /* clear */ NULL, /* free */ #if MGf_COPY NULL, /* copy */ #endif #if MGf_DUP NULL, /* dup */ #endif #if MGf_LOCAL NULL, /* local */ #endif }; STATIC bool export_flag_is_set (pTHX_ SV *sv) { MAGIC *mg, *moremagic; if (SvTYPE(SvRV(sv)) != SVt_PVGV) { return 0; } for (mg = SvMAGIC(SvRV(sv)); mg; mg = moremagic) { moremagic = mg->mg_moremagic; if (mg->mg_type == PERL_MAGIC_ext && mg->mg_virtual == &export_flag_vtbl) { break; } } return !!mg; } STATIC int unset_export_flag (pTHX_ SV *sv, MAGIC *mymg) { MAGIC *mg, *prevmagic = NULL, *moremagic = NULL; for (mg = SvMAGIC(sv); mg; prevmagic = mg, mg = moremagic) { moremagic = mg->mg_moremagic; if (mg == mymg) { break; } } if (!mg) { return 0; } if (prevmagic) { prevmagic->mg_moremagic = moremagic; } else { SvMAGIC_set(sv, moremagic); } mg->mg_moremagic = NULL; Safefree (mg); return 0; } #ifndef SvRXOK /* SvRXOK appeared before SVt_REGEXP did, so this implementation assumes magic * based qr//. Note re::is_regexp isn't in 5.8, hence the need for this XS. */ #define SvRXOK(sv) is_regexp(aTHX_ sv) STATIC int is_regexp (pTHX_ SV* sv) { SV* tmpsv; if (SvMAGICAL(sv)) { mg_get(sv); } if (SvROK(sv) && (tmpsv = (SV*) SvRV(sv)) && SvTYPE(tmpsv) == SVt_PVMG && (mg_find(tmpsv, PERL_MAGIC_qr))) { return TRUE; } return FALSE; } #endif XS_EXTERNAL(boot_Class__MOP); XS_EXTERNAL(boot_Class__MOP__Mixin__HasAttributes); XS_EXTERNAL(boot_Class__MOP__Mixin__HasMethods); XS_EXTERNAL(boot_Class__MOP__Package); XS_EXTERNAL(boot_Class__MOP__Mixin__AttributeCore); XS_EXTERNAL(boot_Class__MOP__Method); XS_EXTERNAL(boot_Class__MOP__Method__Inlined); XS_EXTERNAL(boot_Class__MOP__Method__Generated); XS_EXTERNAL(boot_Class__MOP__Class); XS_EXTERNAL(boot_Class__MOP__Attribute); XS_EXTERNAL(boot_Class__MOP__Instance); XS_EXTERNAL(boot_Moose__Meta__Role__Application__ToInstance); MODULE = Moose PACKAGE = Moose::Exporter PROTOTYPES: DISABLE BOOT: mop_prehash_keys(); MOP_CALL_BOOT (boot_Class__MOP); MOP_CALL_BOOT (boot_Class__MOP__Mixin__HasAttributes); MOP_CALL_BOOT (boot_Class__MOP__Mixin__HasMethods); MOP_CALL_BOOT (boot_Class__MOP__Package); MOP_CALL_BOOT (boot_Class__MOP__Mixin__AttributeCore); MOP_CALL_BOOT (boot_Class__MOP__Method); MOP_CALL_BOOT (boot_Class__MOP__Method__Inlined); MOP_CALL_BOOT (boot_Class__MOP__Method__Generated); MOP_CALL_BOOT (boot_Class__MOP__Class); MOP_CALL_BOOT (boot_Class__MOP__Attribute); MOP_CALL_BOOT (boot_Class__MOP__Instance); MOP_CALL_BOOT (boot_Moose__Meta__Role__Application__ToInstance); void _flag_as_reexport (SV *sv) CODE: sv_magicext(SvRV(sv), NULL, PERL_MAGIC_ext, &export_flag_vtbl, NULL, 0); bool _export_is_flagged (SV *sv) CODE: RETVAL = export_flag_is_set(aTHX_ sv); OUTPUT: RETVAL MODULE = Moose PACKAGE = Moose::Util::TypeConstraints::Builtins bool _RegexpRef (SV *sv=NULL) INIT: if (!items) { sv = DEFSV; } CODE: RETVAL = SvRXOK(sv); OUTPUT: RETVAL Moose-2.1604/xs/MOP.xs000644 000766 000024 00000000757 12617452415 014624 0ustar00etherstaff000000 000000 #include "mop.h" MODULE = Class::MOP PACKAGE = Class::MOP PROTOTYPES: DISABLE # use prototype here to be compatible with get_code_info from Sub::Identify void get_code_info(coderef) SV *coderef PROTOTYPE: $ PREINIT: char *pkg = NULL; char *name = NULL; PPCODE: SvGETMAGIC(coderef); if (mop_get_code_info(coderef, &pkg, &name)) { EXTEND(SP, 2); mPUSHs(newSVpv(pkg, 0)); mPUSHs(newSVpv(name, 0)); } Moose-2.1604/xs/Package.xs000644 000766 000024 00000000247 12617452415 015516 0ustar00etherstaff000000 000000 #include "mop.h" MODULE = Class::MOP::Package PACKAGE = Class::MOP::Package PROTOTYPES: DISABLE BOOT: INSTALL_SIMPLE_READER_WITH_KEY(Package, name, package); Moose-2.1604/xs/ToInstance.xs000644 000766 000024 00000003312 12617452415 016226 0ustar00etherstaff000000 000000 #include "EXTERN.h" #include "perl.h" #include "XSUB.h" static void S_reset_amagic (pTHX_ SV *rv, const bool on) { /* It is assumed that you've already turned magic on/off on rv */ SV *sva; SV *const target = SvRV (rv); /* Less 1 for the reference we've already dealt with. */ U32 how_many = SvREFCNT (target) - 1; MAGIC *mg; if (SvMAGICAL (target) && (mg = mg_find (target, PERL_MAGIC_backref))) { /* Back references also need to be found, but aren't part of the target's reference count. */ how_many += 1 + av_len ((AV *)mg->mg_obj); } if (!how_many) { /* There was only 1 reference to this object. */ return; } for (sva = PL_sv_arenaroot; sva; sva = (SV *)SvANY (sva)) { register const SV *const svend = &sva[SvREFCNT (sva)]; register SV *sv; for (sv = sva + 1; sv < svend; ++sv) { if (SvTYPE (sv) != SVTYPEMASK && ((sv->sv_flags & SVf_ROK) == SVf_ROK) && SvREFCNT (sv) && SvRV (sv) == target && sv != rv) { if (on) { SvAMAGIC_on (sv); } else { SvAMAGIC_off (sv); } if (--how_many == 0) { /* We have found them all. */ return; } } } } } MODULE = Moose::Meta::Role::Application::ToInstance PACKAGE = Moose::Meta::Role::Application::ToInstance PROTOTYPES: DISABLE void _reset_amagic (rv) SV *rv CODE: if (Gv_AMG (SvSTASH (SvRV (rv))) && !SvAMAGIC (rv)) { SvAMAGIC_on (rv); S_reset_amagic (aTHX_ rv, TRUE); } Moose-2.1604/xs/typemap000644 000766 000024 00000000764 12617452415 015215 0ustar00etherstaff000000 000000 type_filter_t T_TYPE_FILTER INPUT T_TYPE_FILTER { const char *__tMp = SvPV_nolen($arg); switch (*__tMp) { case 'C': $var = TYPE_FILTER_CODE; break; case 'A': $var = TYPE_FILTER_ARRAY; break; case 'I': $var = TYPE_FILTER_IO; break; case 'H': $var = TYPE_FILTER_HASH; break; case 'S': $var = TYPE_FILTER_SCALAR; break; default: croak(\"Unknown type %s\\n\", __tMp); } } Moose-2.1604/t/00-report-prereqs.dd000644 000766 000024 00000031610 12617452415 017136 0ustar00etherstaff000000 000000 do { my $x = { 'configure' => { 'requires' => { 'Dist::CheckConflicts' => '0.02', 'ExtUtils::CBuilder' => '0.27', 'ExtUtils::MakeMaker' => '0', 'File::Spec' => '0', 'perl' => '5.008003' } }, 'develop' => { 'requires' => { 'Algorithm::C3' => '0', 'Class::Load' => '0.07', 'DBM::Deep' => '1.003', 'Data::Visitor' => '0.26', 'DateTime' => '0', 'DateTime::Calendar::Mayan' => '0', 'DateTime::Format::MySQL' => '0', 'Declare::Constraints::Simple' => '0', 'ExtUtils::MakeMaker::Dist::Zilla::Develop' => '0', 'File::Find::Rule' => '0', 'File::Spec' => '0', 'HTTP::Headers' => '0', 'IO::File' => '0', 'IO::Handle' => '0', 'IO::String' => '0', 'IPC::Open3' => '0', 'Locale::US' => '0', 'Module::CPANTS::Analyse' => '0.92', 'Module::Refresh' => '0', 'MooseX::MarkAsMethods' => '0', 'MooseX::NonMoose' => '0', 'PadWalker' => '0', 'Params::Coerce' => '0', 'Regexp::Common' => '0', 'SUPER' => '1.10', 'Specio' => '0.10', 'Test::CPAN::Changes' => '0.19', 'Test::CPAN::Meta' => '0', 'Test::Deep' => '0', 'Test::EOL' => '0', 'Test::Inline' => '0', 'Test::Kwalitee' => '1.21', 'Test::LeakTrace' => '0', 'Test::Memory::Cycle' => '0', 'Test::Mojibake' => '0', 'Test::More' => '0.94', 'Test::NoTabs' => '0', 'Test::Output' => '0', 'Test::Pod' => '1.41', 'Test::Pod::Coverage' => '1.04', 'Test::Spelling' => '0', 'URI' => '0', 'blib' => '0' }, 'suggests' => { 'CPAN::Meta::Requirements' => '0', 'Carp' => '1.22', 'Class::Load' => '0.09', 'Class::Load::XS' => '0.01', 'Data::OptList' => '0.107', 'Devel::GlobalDestruction' => '0', 'Devel::OverloadInfo' => '0.004', 'Devel::StackTrace' => '1.33', 'Dist::Zilla' => '5', 'Dist::Zilla::Plugin::BumpVersionAfterRelease' => '0', 'Dist::Zilla::Plugin::CheckChangesHasContent' => '0', 'Dist::Zilla::Plugin::CheckVersionIncrement' => '0', 'Dist::Zilla::Plugin::ConfirmRelease' => '0', 'Dist::Zilla::Plugin::Conflicts' => '0.16', 'Dist::Zilla::Plugin::CopyFilesFromRelease' => '0', 'Dist::Zilla::Plugin::EnsurePrereqsInstalled' => '0.003', 'Dist::Zilla::Plugin::ExecDir' => '0', 'Dist::Zilla::Plugin::FileFinder::ByName' => '0', 'Dist::Zilla::Plugin::FileFinder::Filter' => '0', 'Dist::Zilla::Plugin::Git::Check' => '0', 'Dist::Zilla::Plugin::Git::CheckFor::CorrectBranch' => '0', 'Dist::Zilla::Plugin::Git::Commit' => '0', 'Dist::Zilla::Plugin::Git::Contributors' => '0', 'Dist::Zilla::Plugin::Git::Describe' => '0.004', 'Dist::Zilla::Plugin::Git::GatherDir' => '0', 'Dist::Zilla::Plugin::Git::Push' => '0', 'Dist::Zilla::Plugin::Git::Remote::Check' => '0', 'Dist::Zilla::Plugin::Git::Tag' => '0', 'Dist::Zilla::Plugin::License' => '0', 'Dist::Zilla::Plugin::MakeMaker::Awesome' => '0', 'Dist::Zilla::Plugin::Manifest' => '0', 'Dist::Zilla::Plugin::MetaConfig' => '0', 'Dist::Zilla::Plugin::MetaJSON' => '0', 'Dist::Zilla::Plugin::MetaNoIndex' => '0', 'Dist::Zilla::Plugin::MetaProvides::Package' => '1.15000002', 'Dist::Zilla::Plugin::MetaResources' => '0', 'Dist::Zilla::Plugin::MetaTests' => '0', 'Dist::Zilla::Plugin::MetaYAML' => '0', 'Dist::Zilla::Plugin::MojibakeTests' => '0', 'Dist::Zilla::Plugin::NextRelease' => '5.033', 'Dist::Zilla::Plugin::PodSyntaxTests' => '0', 'Dist::Zilla::Plugin::Prereqs' => '0', 'Dist::Zilla::Plugin::Prereqs::AuthorDeps' => '0', 'Dist::Zilla::Plugin::PromptIfStale' => '0', 'Dist::Zilla::Plugin::ReadmeAnyFromPod' => '0.142180', 'Dist::Zilla::Plugin::RewriteVersion' => '0', 'Dist::Zilla::Plugin::Run::AfterRelease' => '0', 'Dist::Zilla::Plugin::RunExtraTests' => '0', 'Dist::Zilla::Plugin::SurgicalPodWeaver' => '0.0023', 'Dist::Zilla::Plugin::Test::CPAN::Changes' => '0', 'Dist::Zilla::Plugin::Test::CheckBreaks' => '0', 'Dist::Zilla::Plugin::Test::Compile' => '2.037', 'Dist::Zilla::Plugin::Test::EOL' => '0.14', 'Dist::Zilla::Plugin::Test::Kwalitee' => '0', 'Dist::Zilla::Plugin::Test::NoTabs' => '0', 'Dist::Zilla::Plugin::Test::ReportPrereqs' => '0', 'Dist::Zilla::Plugin::TestRelease' => '0', 'Dist::Zilla::Plugin::UploadToCPAN' => '0', 'Dist::Zilla::Util::AuthorDeps' => '5.021', 'Eval::Closure' => '0.04', 'ExtUtils::CBuilder' => '0.27', 'File::Find::Rule' => '0', 'File::Spec' => '0', 'File::pushd' => '0', 'IPC::System::Simple' => '0', 'List::MoreUtils' => '0.28', 'List::Util' => '1.35', 'MRO::Compat' => '0.05', 'Module::Runtime' => '0.014', 'Module::Runtime::Conflicts' => '0.002', 'Package::DeprecationManager' => '0.11', 'Package::Stash' => '0.32', 'Package::Stash::XS' => '0.24', 'Params::Util' => '1.00', 'Path::Tiny' => '0', 'Scalar::Util' => '1.19', 'Software::License::Perl_5' => '0', 'Sub::Exporter' => '0.980', 'Sub::Identify' => '0', 'Sub::Name' => '0.05', 'Task::Weaken' => '0', 'Test::Deep' => '0', 'Test::Inline' => '0', 'Test::Inline::Extract' => '0', 'Try::Tiny' => '0.17', 'autodie' => '0', 'parent' => '0.223', 'perl' => '5.008003', 'strict' => '1.03', 'warnings' => '1.03' } }, 'runtime' => { 'requires' => { 'Carp' => '1.22', 'Class::Load' => '0.09', 'Class::Load::XS' => '0.01', 'Data::OptList' => '0.107', 'Devel::GlobalDestruction' => '0', 'Devel::OverloadInfo' => '0.004', 'Devel::StackTrace' => '1.33', 'Dist::CheckConflicts' => '0.02', 'Eval::Closure' => '0.04', 'List::MoreUtils' => '0.28', 'List::Util' => '1.35', 'MRO::Compat' => '0.05', 'Module::Runtime' => '0.014', 'Module::Runtime::Conflicts' => '0.002', 'Package::DeprecationManager' => '0.11', 'Package::Stash' => '0.32', 'Package::Stash::XS' => '0.24', 'Params::Util' => '1.00', 'Scalar::Util' => '1.19', 'Sub::Exporter' => '0.980', 'Sub::Identify' => '0', 'Sub::Name' => '0.05', 'Task::Weaken' => '0', 'Try::Tiny' => '0.17', 'parent' => '0.223', 'perl' => '5.008003', 'strict' => '1.03', 'warnings' => '1.03' }, 'suggests' => { 'Devel::PartialDump' => '0.14' } }, 'test' => { 'recommends' => { 'CPAN::Meta' => '2.120900' }, 'requires' => { 'CPAN::Meta::Check' => '0.011', 'CPAN::Meta::Requirements' => '0', 'ExtUtils::MakeMaker' => '0', 'File::Spec' => '0', 'Test::CleanNamespaces' => '0.13', 'Test::Fatal' => '0.001', 'Test::More' => '0.88', 'Test::Requires' => '0.05', 'Test::Warnings' => '0.016' } } }; $x; }Moose-2.1604/t/00-report-prereqs.t000644 000766 000024 00000013474 12617452415 017022 0ustar00etherstaff000000 000000 #!perl 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( Algorithm::C3 DBM::Deep DateTime DateTime::Calendar::Mayan DateTime::Format::MySQL Declare::Constraints::Simple Dist::CheckConflicts HTTP::Headers IO::File IO::String Locale::US Module::Refresh MooseX::NonMoose Params::Coerce Regexp::Common SUPER Test::Deep Test::DependentModules Test::LeakTrace Test::Output URI ); 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: Moose-2.1604/t/000_load.t000644 000766 000024 00000000132 12617452415 015074 0ustar00etherstaff000000 000000 use strict; use warnings; use Test::More; BEGIN { use_ok('Moose'); } done_testing; Moose-2.1604/t/attributes/000700 000766 000024 00000000000 12617452415 015571 5ustar00etherstaff000000 000000 Moose-2.1604/t/basics/000700 000766 000024 00000000000 12617452415 014647 5ustar00etherstaff000000 000000 Moose-2.1604/t/bugs/000700 000766 000024 00000000000 12617452416 014344 5ustar00etherstaff000000 000000 Moose-2.1604/t/cmop/000700 000766 000024 00000000000 12617452415 014341 5ustar00etherstaff000000 000000 Moose-2.1604/t/compat/000700 000766 000024 00000000000 12617452416 014667 5ustar00etherstaff000000 000000 Moose-2.1604/t/examples/000700 000766 000024 00000000000 12617452415 015221 5ustar00etherstaff000000 000000 Moose-2.1604/t/exceptions/000700 000766 000024 00000000000 12617452416 015565 5ustar00etherstaff000000 000000 Moose-2.1604/t/immutable/000700 000766 000024 00000000000 12617452416 015363 5ustar00etherstaff000000 000000 Moose-2.1604/t/lib/000700 000766 000024 00000000000 12617452415 014151 5ustar00etherstaff000000 000000 Moose-2.1604/t/metaclasses/000700 000766 000024 00000000000 12617452416 015710 5ustar00etherstaff000000 000000 Moose-2.1604/t/moose_util/000700 000766 000024 00000000000 12617452415 015562 5ustar00etherstaff000000 000000 Moose-2.1604/t/native_traits/000700 000766 000024 00000000000 12617452415 016257 5ustar00etherstaff000000 000000 Moose-2.1604/t/recipes/000700 000766 000024 00000000000 12617452416 015036 5ustar00etherstaff000000 000000 Moose-2.1604/t/roles/000700 000766 000024 00000000000 12617452415 014527 5ustar00etherstaff000000 000000 Moose-2.1604/t/test_moose/000700 000766 000024 00000000000 12617452415 015564 5ustar00etherstaff000000 000000 Moose-2.1604/t/todo_tests/000700 000766 000024 00000000000 12617452416 015573 5ustar00etherstaff000000 000000 Moose-2.1604/t/type_constraints/000700 000766 000024 00000000000 12617452416 017014 5ustar00etherstaff000000 000000 Moose-2.1604/t/zzz-check-breaks.t000644 000766 000024 00000006446 12617452415 016771 0ustar00etherstaff000000 000000 use strict; use warnings; # this test was generated with Dist::Zilla::Plugin::Test::CheckBreaks 0.013 use Test::More 0.88; SKIP: { eval 'require Moose::Conflicts; Moose::Conflicts->check_conflicts'; skip('no Moose::Conflicts module found', 1) if not $INC{'Moose/Conflicts.pm'}; diag $@ if $@; pass 'conflicts checked via Moose::Conflicts'; } # this data duplicates x_breaks in META.json my $breaks = { "Catalyst" => "<= 5.90049999", "Config::MVP" => "<= 2.200004", "Devel::REPL" => "<= 1.003020", "Dist::Zilla::Plugin::Git" => "<= 2.016", "Fey" => "<= 0.36", "Fey::ORM" => "<= 0.42", "File::ChangeNotify" => "<= 0.15", "HTTP::Throwable" => "<= 0.017", "KiokuDB" => "<= 0.51", "Markdent" => "<= 0.16", "Mason" => "<= 2.18", "MooseX::ABC" => "<= 0.05", "MooseX::Aliases" => "<= 0.08", "MooseX::AlwaysCoerce" => "<= 0.13", "MooseX::App" => "<= 1.22", "MooseX::Attribute::Deflator" => "<= 2.1.7", "MooseX::Attribute::Dependent" => "<= 1.1.0", "MooseX::Attribute::Prototype" => "<= 0.10", "MooseX::AttributeHelpers" => "<= 0.22", "MooseX::AttributeIndexes" => "<= 1.0.0", "MooseX::AttributeInflate" => "<= 0.02", "MooseX::CascadeClearing" => "<= 0.03", "MooseX::ClassAttribute" => "<= 0.26", "MooseX::Constructor::AllErrors" => "<= 0.021", "MooseX::Declare" => "<= 0.35", "MooseX::FollowPBP" => "<= 0.02", "MooseX::Getopt" => "<= 0.56", "MooseX::InstanceTracking" => "<= 0.04", "MooseX::LazyRequire" => "<= 0.06", "MooseX::Meta::Attribute::Index" => "<= 0.04", "MooseX::Meta::Attribute::Lvalue" => "<= 0.05", "MooseX::Method::Signatures" => "<= 0.44", "MooseX::MethodAttributes" => "<= 0.22", "MooseX::NonMoose" => "<= 0.24", "MooseX::Object::Pluggable" => "<= 0.0011", "MooseX::POE" => "<= 0.214", "MooseX::Params::Validate" => "<= 0.05", "MooseX::PrivateSetters" => "<= 0.03", "MooseX::Role::Cmd" => "<= 0.06", "MooseX::Role::Parameterized" => "<= 1.00", "MooseX::Role::WithOverloading" => "<= 0.14", "MooseX::Runnable" => "<= 0.03", "MooseX::Scaffold" => "<= 0.05", "MooseX::SemiAffordanceAccessor" => "<= 0.05", "MooseX::SetOnce" => "<= 0.100473", "MooseX::Singleton" => "<= 0.25", "MooseX::SlurpyConstructor" => "<= 1.1", "MooseX::Storage" => "<= 0.42", "MooseX::StrictConstructor" => "<= 0.12", "MooseX::Traits" => "<= 0.11", "MooseX::Types" => "<= 0.19", "MooseX::Types::Parameterizable" => "<= 0.05", "MooseX::Types::Set::Object" => "<= 0.03", "MooseX::Types::Signal" => "<= 1.101930", "MooseX::UndefTolerant" => "<= 0.11", "PRANG" => "<= 0.14", "Pod::Elemental" => "<= 0.093280", "Pod::Weaver" => "<= 3.101638", "Reaction" => "<= 0.002003", "Test::Able" => "<= 0.10", "Test::CleanNamespaces" => "<= 0.03", "Test::Moose::More" => "<= 0.022", "Test::TempDir" => "<= 0.05", "Throwable" => "<= 0.102080", "namespace::autoclean" => "<= 0.08" }; use CPAN::Meta::Requirements; my $reqs = CPAN::Meta::Requirements->new; $reqs->add_string_requirement($_, $breaks->{$_}) foreach keys %$breaks; use CPAN::Meta::Check 0.011 'check_requirements'; our $result = check_requirements($reqs, 'conflicts'); if (my @breaks = grep { defined $result->{$_} } keys %$result) { diag 'Breakages found with Moose:'; diag "$result->{$_}" for sort @breaks; diag "\n", 'You should now update these modules!'; } done_testing; Moose-2.1604/t/type_constraints/advanced_type_creation.t000644 000766 000024 00000010113 12617452415 023700 0ustar00etherstaff000000 000000 use strict; use warnings; use Test::More; use Moose::Util::TypeConstraints; use Moose::Meta::TypeConstraint::Parameterized; my $r = Moose::Util::TypeConstraints->get_type_constraint_registry; ## Containers in unions ... # Array of Ints or Strings my $array_of_ints_or_strings = Moose::Util::TypeConstraints::create_parameterized_type_constraint('ArrayRef[Int|Str]'); isa_ok($array_of_ints_or_strings, 'Moose::Meta::TypeConstraint::Parameterized'); ok($array_of_ints_or_strings->check([ 1, 'two', 3 ]), '... this passed the type check'); ok($array_of_ints_or_strings->check([ 1, 2, 3 ]), '... this passed the type check'); ok($array_of_ints_or_strings->check([ 'one', 'two', 'three' ]), '... this passed the type check'); ok(!$array_of_ints_or_strings->check([ 1, [], 'three' ]), '... this didnt pass the type check'); $r->add_type_constraint($array_of_ints_or_strings); # Array of Ints or HashRef my $array_of_ints_or_hash_ref = Moose::Util::TypeConstraints::create_parameterized_type_constraint('ArrayRef[Int | HashRef]'); isa_ok($array_of_ints_or_hash_ref, 'Moose::Meta::TypeConstraint::Parameterized'); ok($array_of_ints_or_hash_ref->check([ 1, {}, 3 ]), '... this passed the type check'); ok($array_of_ints_or_hash_ref->check([ 1, 2, 3 ]), '... this passed the type check'); ok($array_of_ints_or_hash_ref->check([ {}, {}, {} ]), '... this passed the type check'); ok(!$array_of_ints_or_hash_ref->check([ {}, [], 3 ]), '... this didnt pass the type check'); $r->add_type_constraint($array_of_ints_or_hash_ref); # union of Arrays of Str | Int or Arrays of Int | Hash # we can't build this using the simplistic parser # we have, so we have to do it by hand - SL my $pure_insanity = Moose::Util::TypeConstraints::create_type_constraint_union('ArrayRef[Int|Str] | ArrayRef[Int | HashRef]'); isa_ok($pure_insanity, 'Moose::Meta::TypeConstraint::Union'); ok($pure_insanity->check([ 1, {}, 3 ]), '... this passed the type check'); ok($pure_insanity->check([ 1, 'Str', 3 ]), '... this passed the type check'); ok(!$pure_insanity->check([ 1, {}, 'foo' ]), '... this didnt pass the type check'); ok(!$pure_insanity->check([ [], {}, 1 ]), '... this didnt pass the type check'); ## Nested Containers ... # Array of Ints my $array_of_ints = Moose::Util::TypeConstraints::create_parameterized_type_constraint('ArrayRef[Int]'); isa_ok($array_of_ints, 'Moose::Meta::TypeConstraint::Parameterized'); isa_ok($array_of_ints, 'Moose::Meta::TypeConstraint'); ok($array_of_ints->check([ 1, 2, 3, 4 ]), '... [ 1, 2, 3, 4 ] passed successfully'); ok(!$array_of_ints->check([qw/foo bar baz/]), '... [qw/foo bar baz/] failed successfully'); ok(!$array_of_ints->check([ 1, 2, 3, qw/foo bar/]), '... [ 1, 2, 3, qw/foo bar/] failed successfully'); ok(!$array_of_ints->check(1), '... 1 failed successfully'); ok(!$array_of_ints->check({}), '... {} failed successfully'); ok(!$array_of_ints->check(sub { () }), '... sub { () } failed successfully'); # Array of Array of Ints my $array_of_array_of_ints = Moose::Util::TypeConstraints::create_parameterized_type_constraint('ArrayRef[ArrayRef[Int]]'); isa_ok($array_of_array_of_ints, 'Moose::Meta::TypeConstraint::Parameterized'); isa_ok($array_of_array_of_ints, 'Moose::Meta::TypeConstraint'); ok($array_of_array_of_ints->check( [[ 1, 2, 3 ], [ 4, 5, 6 ]] ), '... [[ 1, 2, 3 ], [ 4, 5, 6 ]] passed successfully'); ok(!$array_of_array_of_ints->check( [[ 1, 2, 3 ], [ qw/foo bar/ ]] ), '... [[ 1, 2, 3 ], [ qw/foo bar/ ]] failed successfully'); # Array of Array of Array of Ints my $array_of_array_of_array_of_ints = Moose::Util::TypeConstraints::create_parameterized_type_constraint('ArrayRef[ArrayRef[ArrayRef[Int]]]'); isa_ok($array_of_array_of_array_of_ints, 'Moose::Meta::TypeConstraint::Parameterized'); isa_ok($array_of_array_of_array_of_ints, 'Moose::Meta::TypeConstraint'); ok($array_of_array_of_array_of_ints->check( [[[ 1, 2, 3 ], [ 4, 5, 6 ]], [[ 7, 8, 9 ]]] ), '... [[[ 1, 2, 3 ], [ 4, 5, 6 ]], [[ 7, 8, 9 ]]] passed successfully'); ok(!$array_of_array_of_array_of_ints->check( [[[ 1, 2, 3 ]], [[ qw/foo bar/ ]]] ), '... [[[ 1, 2, 3 ]], [[ qw/foo bar/ ]]] failed successfully'); done_testing; Moose-2.1604/t/type_constraints/class_subtypes.t000644 000766 000024 00000006213 12617452415 022257 0ustar00etherstaff000000 000000 use strict; use warnings; use Test::More; use Test::Fatal; use Moose::Util::TypeConstraints; use Moose::Meta::TypeConstraint; ## Create a subclass with a custom method { package Test::Moose::Meta::TypeConstraint::AnySubType; use Moose; extends 'Moose::Meta::TypeConstraint'; sub my_custom_method { return 1; } } my $Int = find_type_constraint('Int'); ok $Int, 'Got a good type constraint'; my $parent = Test::Moose::Meta::TypeConstraint::AnySubType->new({ name => "Test::Moose::Meta::TypeConstraint::AnySubType" , parent => $Int, }); ok $parent, 'Created type constraint'; ok $parent->check(1), 'Correctly passed'; ok ! $parent->check('a'), 'correctly failed'; ok $parent->my_custom_method, 'found the custom method'; my $subtype1 = subtype 'another_subtype' => as $parent; ok $subtype1, 'Created type constraint'; ok $subtype1->check(1), 'Correctly passed'; ok ! $subtype1->check('a'), 'correctly failed'; ok $subtype1->my_custom_method, 'found the custom method'; my $subtype2 = subtype 'another_subtype' => as $subtype1 => where { $_ < 10 }; ok $subtype2, 'Created type constraint'; ok $subtype2->check(1), 'Correctly passed'; ok ! $subtype2->check('a'), 'correctly failed'; ok ! $subtype2->check(100), 'correctly failed'; ok $subtype2->my_custom_method, 'found the custom method'; { package Foo; use Moose; } { package Bar; use Moose; extends 'Foo'; } { package Baz; use Moose; } my $foo = class_type 'Foo'; my $isa_foo = subtype 'IsaFoo' => as $foo; ok $isa_foo, 'Created subtype of Foo type'; ok $isa_foo->check( Foo->new ), 'Foo passes check'; ok $isa_foo->check( Bar->new ), 'Bar passes check'; ok ! $isa_foo->check( Baz->new ), 'Baz does not pass check'; like $foo->get_message( Baz->new ), qr/^Validation failed for 'Foo' with value .*Baz.* \(not isa Foo\)/, 'Better validation message'; # Maybe in the future this *should* inherit? like $isa_foo->get_message( Baz->new ), qr/^Validation failed for 'IsaFoo' with value .*Baz.*/, "Subtypes do not automatically inherit parent type's message"; # Implicit types { package Quux; use Moose; has age => ( isa => 'Positive', is => 'bare', ); } like( exception { Quux->new(age => 3) }, qr/^Attribute \(age\) does not pass the type constraint because: Validation failed for 'Positive' with value 3 \(not isa Positive\)/ ); is( exception { Quux->new(age => (bless {}, 'Positive')); }, undef ); eval " package Positive; use Moose; "; like( exception { Quux->new(age => 3) }, qr/^Attribute \(age\) does not pass the type constraint because: Validation failed for 'Positive' with value 3 \(not isa Positive\)/ ); is( exception { Quux->new(age => Positive->new) }, undef ); class_type 'Negative' => message { "$_ is not a Negative Nancy" }; { package Quux::Ier; use Moose; has age => ( isa => 'Negative', is => 'bare', ); } like( exception { Quux::Ier->new(age => 3) }, qr/^Attribute \(age\) does not pass the type constraint because: 3 is not a Negative Nancy / ); is( exception { Quux::Ier->new(age => (bless {}, 'Negative')) }, undef ); done_testing; Moose-2.1604/t/type_constraints/class_type_constraint.t000644 000766 000024 00000010505 12617452415 023625 0ustar00etherstaff000000 000000 use strict; use warnings; use Test::More; use Test::Fatal; use Moose::Util::TypeConstraints; { package Gorch; use Moose; package Bar; use Moose; package Foo; use Moose; extends qw(Bar Gorch); } is( exception { class_type 'Beep' }, undef, 'class_type keyword works' ); is( exception { class_type('Boop', message { "${_} is not a Boop" }) }, undef, 'class_type keywork works with message' ); { my $type = find_type_constraint("Foo"); is( $type->class, "Foo", "class attribute" ); ok( !$type->is_subtype_of('Foo'), "Foo is not subtype of Foo" ); ok( !$type->is_subtype_of($type), '$foo_type is not subtype of $foo_type' ); ok( $type->is_subtype_of("Gorch"), "subtype of gorch" ); ok( $type->is_subtype_of("Bar"), "subtype of bar" ); ok( $type->is_subtype_of("Object"), "subtype of Object" ); ok( !$type->is_subtype_of("ThisTypeDoesNotExist"), "not subtype of undefined type" ); ok( !$type->is_a_type_of("ThisTypeDoesNotExist"), "not type of undefined type" ); ok( find_type_constraint("Bar")->check(Foo->new), "Foo passes Bar" ); ok( find_type_constraint("Bar")->check(Bar->new), "Bar passes Bar" ); ok( !find_type_constraint("Gorch")->check(Bar->new), "but Bar doesn't pass Gorch"); ok( find_type_constraint("Beep")->check( bless {} => 'Beep' ), "Beep passes Beep" ); my $boop = find_type_constraint("Boop"); ok( $boop->has_message, 'Boop has a message'); my $error = $boop->get_message(Foo->new); like( $error, qr/is not a Boop/, 'boop gives correct error message'); ok( $type->equals($type), "equals self" ); ok( $type->equals(Moose::Meta::TypeConstraint::Class->new( name => "__ANON__", class => "Foo" )), "equals anon constraint of same value" ); ok( $type->equals(Moose::Meta::TypeConstraint::Class->new( name => "Oink", class => "Foo" )), "equals differently named constraint of same value" ); ok( !$type->equals(Moose::Meta::TypeConstraint::Class->new( name => "__ANON__", class => "Bar" )), "doesn't equal other anon constraint" ); ok( $type->is_subtype_of(Moose::Meta::TypeConstraint::Class->new( name => "__ANON__", class => "Bar" )), "subtype of other anon constraint" ); } { is( exception { class_type 'FooType', { class => 'Foo' } }, undef, 'class_type keyword with custom type name' ); my $type = find_type_constraint('FooType'); is( $type->class, 'Foo', "class attribute" ); ok( !$type->is_subtype_of('Foo'), "FooType is not subtype of Foo" ); ok( !$type->is_subtype_of($type), '$foo_type is not subtype of $foo_type' ); } { package Parent; sub parent { } } { package Child; use parent -norequire => 'Parent'; } { my $parent = Moose::Meta::TypeConstraint::Class->new( name => 'Parent', class => 'Parent', ); ok($parent->is_a_type_of('Parent')); ok(!$parent->is_subtype_of('Parent')); ok($parent->is_a_type_of($parent)); ok(!$parent->is_subtype_of($parent)); my $child = Moose::Meta::TypeConstraint::Class->new( name => 'Child', class => 'Child', ); ok($child->is_a_type_of('Child')); ok(!$child->is_subtype_of('Child')); ok($child->is_a_type_of($child)); ok(!$child->is_subtype_of($child)); ok($child->is_a_type_of('Parent')); ok($child->is_subtype_of('Parent')); ok($child->is_a_type_of($parent)); ok($child->is_subtype_of($parent)); } { my $type; is( exception { $type = class_type 'MyExampleClass' }, undef, 'Make initial class_type' ); coerce 'MyExampleClass', from 'Str', via { bless {}, 'MyExampleClass' }; # We test class_type keeping the existing type (not making a new one) here. is( exception { is(class_type('MyExampleClass'), $type, 're-running class_type gives same type') }, undef, 'No exception making duplicate class_type' );; # Next define a class which needs this type and it's original coercion # Note this has to be after the 2nd class_type call to test the bug as M::M::Attribute grabs # the type constraint which is there at the time the attribute decleration runs. { package HoldsExample; use Moose; has foo => ( isa => 'MyExampleClass', is => 'ro', coerce => 1, required => 1 ); no Moose; } is( exception { isa_ok(HoldsExample->new(foo => "bar")->foo, 'MyExampleClass') }, undef, 'class_type coercion works' ); } done_testing; Moose-2.1604/t/type_constraints/coerced_parameterized_types.t000644 000766 000024 00000003330 12617452416 024756 0ustar00etherstaff000000 000000 use strict; use warnings; use Test::More; use Test::Fatal; use Moose::Util::TypeConstraints; use Moose::Meta::TypeConstraint::Parameterized; BEGIN { package MyList; sub new { my $class = shift; bless { items => \@_ }, $class; } sub items { my $self = shift; return @{ $self->{items} }; } } subtype 'MyList' => as 'Object' => where { $_->isa('MyList') }; is( exception { coerce 'ArrayRef' => from 'MyList' => via { [ $_->items ] } }, undef, '... created the coercion okay' ); my $mylist = Moose::Util::TypeConstraints::find_or_parse_type_constraint('MyList[Int]'); ok($mylist->check(MyList->new(10, 20, 30)), '... validated it correctly (pass)'); ok(!$mylist->check(MyList->new(10, "two")), '... validated it correctly (fail)'); ok(!$mylist->check([10]), '... validated it correctly (fail)'); subtype 'EvenList' => as 'MyList' => where { $_->items % 2 == 0 }; # XXX: get this to work *without* the declaration. I suspect it'll be a new # method in Moose::Meta::TypeCoercion that will look at the parents of the # coerced type as well. but will that be too "action at a distance"-ey? is( exception { coerce 'ArrayRef' => from 'EvenList' => via { [ $_->items ] } }, undef, '... created the coercion okay' ); my $evenlist = Moose::Util::TypeConstraints::find_or_parse_type_constraint('EvenList[Int]'); ok(!$evenlist->check(MyList->new(10, 20, 30)), '... validated it correctly (fail)'); ok($evenlist->check(MyList->new(10, 20, 30, 40)), '... validated it correctly (pass)'); ok(!$evenlist->check(MyList->new(10, "two")), '... validated it correctly (fail)'); ok(!$evenlist->check([10, 20]), '... validated it correctly (fail)'); done_testing; Moose-2.1604/t/type_constraints/container_type_coercion.t000644 000766 000024 00000003204 12617452415 024115 0ustar00etherstaff000000 000000 use strict; use warnings; use Test::More; use Moose::Util::TypeConstraints; use Moose::Meta::TypeConstraint::Parameterized; my $r = Moose::Util::TypeConstraints->get_type_constraint_registry; # Array of Ints my $array_of_ints = Moose::Meta::TypeConstraint::Parameterized->new( name => 'ArrayRef[Int]', parent => find_type_constraint('ArrayRef'), type_parameter => find_type_constraint('Int'), ); isa_ok($array_of_ints, 'Moose::Meta::TypeConstraint::Parameterized'); isa_ok($array_of_ints, 'Moose::Meta::TypeConstraint'); $r->add_type_constraint($array_of_ints); is(find_type_constraint('ArrayRef[Int]'), $array_of_ints, '... found the type we just added'); # Hash of Ints my $hash_of_ints = Moose::Meta::TypeConstraint::Parameterized->new( name => 'HashRef[Int]', parent => find_type_constraint('HashRef'), type_parameter => find_type_constraint('Int'), ); isa_ok($hash_of_ints, 'Moose::Meta::TypeConstraint::Parameterized'); isa_ok($hash_of_ints, 'Moose::Meta::TypeConstraint'); $r->add_type_constraint($hash_of_ints); is(find_type_constraint('HashRef[Int]'), $hash_of_ints, '... found the type we just added'); ## now attempt a coercion { package Foo; use Moose; use Moose::Util::TypeConstraints; coerce 'ArrayRef[Int]' => from 'HashRef[Int]' => via { [ values %$_ ] }; has 'bar' => ( is => 'ro', isa => 'ArrayRef[Int]', coerce => 1, ); } my $foo = Foo->new(bar => { one => 1, two => 2, three => 3 }); isa_ok($foo, 'Foo'); is_deeply([ sort @{$foo->bar} ], [ 1, 2, 3 ], '... our coercion worked!'); done_testing; Moose-2.1604/t/type_constraints/container_type_constraint.t000644 000766 000024 00000005461 12617452415 024507 0ustar00etherstaff000000 000000 use strict; use warnings; use Test::More; use Moose::Util::TypeConstraints; use Moose::Meta::TypeConstraint::Parameterized; # Array of Ints my $array_of_ints = Moose::Meta::TypeConstraint::Parameterized->new( name => 'ArrayRef[Int]', parent => find_type_constraint('ArrayRef'), type_parameter => find_type_constraint('Int'), ); isa_ok($array_of_ints, 'Moose::Meta::TypeConstraint::Parameterized'); isa_ok($array_of_ints, 'Moose::Meta::TypeConstraint'); ok($array_of_ints->check([ 1, 2, 3, 4 ]), '... [ 1, 2, 3, 4 ] passed successfully'); ok(!$array_of_ints->check([qw/foo bar baz/]), '... [qw/foo bar baz/] failed successfully'); ok(!$array_of_ints->check([ 1, 2, 3, qw/foo bar/]), '... [ 1, 2, 3, qw/foo bar/] failed successfully'); ok(!$array_of_ints->check(1), '... 1 failed successfully'); ok(!$array_of_ints->check({}), '... {} failed successfully'); ok(!$array_of_ints->check(sub { () }), '... sub { () } failed successfully'); # Hash of Ints my $hash_of_ints = Moose::Meta::TypeConstraint::Parameterized->new( name => 'HashRef[Int]', parent => find_type_constraint('HashRef'), type_parameter => find_type_constraint('Int'), ); isa_ok($hash_of_ints, 'Moose::Meta::TypeConstraint::Parameterized'); isa_ok($hash_of_ints, 'Moose::Meta::TypeConstraint'); ok($hash_of_ints->check({ one => 1, two => 2, three => 3 }), '... { one => 1, two => 2, three => 3 } passed successfully'); ok(!$hash_of_ints->check({ 1 => 'one', 2 => 'two', 3 => 'three' }), '... { 1 => one, 2 => two, 3 => three } failed successfully'); ok(!$hash_of_ints->check({ 1 => 'one', 2 => 'two', three => 3 }), '... { 1 => one, 2 => two, three => 3 } failed successfully'); ok(!$hash_of_ints->check(1), '... 1 failed successfully'); ok(!$hash_of_ints->check([]), '... [] failed successfully'); ok(!$hash_of_ints->check(sub { () }), '... sub { () } failed successfully'); # Array of Array of Ints my $array_of_array_of_ints = Moose::Meta::TypeConstraint::Parameterized->new( name => 'ArrayRef[ArrayRef[Int]]', parent => find_type_constraint('ArrayRef'), type_parameter => $array_of_ints, ); isa_ok($array_of_array_of_ints, 'Moose::Meta::TypeConstraint::Parameterized'); isa_ok($array_of_array_of_ints, 'Moose::Meta::TypeConstraint'); ok($array_of_array_of_ints->check( [[ 1, 2, 3 ], [ 4, 5, 6 ]] ), '... [[ 1, 2, 3 ], [ 4, 5, 6 ]] passed successfully'); ok(!$array_of_array_of_ints->check( [[ 1, 2, 3 ], [ qw/foo bar/ ]] ), '... [[ 1, 2, 3 ], [ qw/foo bar/ ]] failed successfully'); { my $anon_type = Moose::Util::TypeConstraints::find_or_parse_type_constraint('ArrayRef[Foo]'); isa_ok( $anon_type, 'Moose::Meta::TypeConstraint::Parameterized' ); my $param_type = $anon_type->type_parameter; isa_ok( $param_type, 'Moose::Meta::TypeConstraint::Class' ); } done_testing; Moose-2.1604/t/type_constraints/custom_parameterized_types.t000644 000766 000024 00000006175 12617452415 024675 0ustar00etherstaff000000 000000 use strict; use warnings; use Test::More; use Test::Fatal; use Moose::Util::TypeConstraints; use Moose::Meta::TypeConstraint::Parameterized; is( exception { subtype 'AlphaKeyHash' => as 'HashRef' => where { # no keys match non-alpha (grep { /[^a-zA-Z]/ } keys %$_) == 0 }; }, undef, '... created the subtype special okay' ); is( exception { subtype 'Trihash' => as 'AlphaKeyHash' => where { keys(%$_) == 3 }; }, undef, '... created the subtype special okay' ); is( exception { subtype 'Noncon' => as 'Item'; }, undef, '... created the subtype special okay' ); { my $t = find_type_constraint('AlphaKeyHash'); isa_ok($t, 'Moose::Meta::TypeConstraint'); is($t->name, 'AlphaKeyHash', '... name is correct'); my $p = $t->parent; isa_ok($p, 'Moose::Meta::TypeConstraint'); is($p->name, 'HashRef', '... parent name is correct'); ok($t->check({ one => 1, two => 2 }), '... validated it correctly'); ok(!$t->check({ one1 => 1, two2 => 2 }), '... validated it correctly'); ok( $t->equals($t), "equals to self" ); ok( !$t->equals($t->parent), "not equal to parent" ); } my $hoi = Moose::Util::TypeConstraints::find_or_parse_type_constraint('AlphaKeyHash[Int]'); ok($hoi->check({ one => 1, two => 2 }), '... validated it correctly'); ok(!$hoi->check({ one1 => 1, two2 => 2 }), '... validated it correctly'); ok(!$hoi->check({ one => 'uno', two => 'dos' }), '... validated it correctly'); ok(!$hoi->check({ one1 => 'un', two2 => 'deux' }), '... validated it correctly'); ok( $hoi->equals($hoi), "equals to self" ); ok( !$hoi->equals($hoi->parent), "equals to self" ); ok( !$hoi->equals(find_type_constraint('AlphaKeyHash')), "not equal to unparametrized self" ); ok( $hoi->equals( Moose::Meta::TypeConstraint::Parameterized->new( name => "Blah", parent => find_type_constraint("AlphaKeyHash"), type_parameter => find_type_constraint("Int") ) ), "equal to clone" ); ok( !$hoi->equals( Moose::Meta::TypeConstraint::Parameterized->new( name => "Oink", parent => find_type_constraint("AlphaKeyHash"), type_parameter => find_type_constraint("Str") ) ), "not equal to different parameter" ); my $th = Moose::Util::TypeConstraints::find_or_parse_type_constraint('Trihash[Bool]'); ok(!$th->check({ one => 1, two => 1 }), '... validated it correctly'); ok($th->check({ one => 1, two => 0, three => 1 }), '... validated it correctly'); ok(!$th->check({ one => 1, two => 2, three => 1 }), '... validated it correctly'); ok(!$th->check({foo1 => 1, bar2 => 0, baz3 => 1}), '... validated it correctly'); isnt( exception { Moose::Meta::TypeConstraint::Parameterized->new( name => 'Str[Int]', parent => find_type_constraint('Str'), type_parameter => find_type_constraint('Int'), ); }, undef, 'non-containers cannot be parameterized' ); isnt( exception { Moose::Meta::TypeConstraint::Parameterized->new( name => 'Noncon[Int]', parent => find_type_constraint('Noncon'), type_parameter => find_type_constraint('Int'), ); }, undef, 'non-containers cannot be parameterized' ); done_testing; Moose-2.1604/t/type_constraints/custom_type_errors.t000644 000766 000024 00000003277 12617452415 023172 0ustar00etherstaff000000 000000 use strict; use warnings; use Test::More; use Test::Fatal; { package Animal; use Moose; use Moose::Util::TypeConstraints; subtype 'Natural' => as 'Int' => where { $_ > 0 } => message {"This number ($_) is not a positive integer!"}; subtype 'NaturalLessThanTen' => as 'Natural' => where { $_ < 10 } => message {"This number ($_) is not less than ten!"}; has leg_count => ( is => 'rw', isa => 'NaturalLessThanTen', lazy => 1, default => 0, ); } is( exception { my $goat = Animal->new( leg_count => 4 ) }, undef, '... no errors thrown, value is good' ); is( exception { my $spider = Animal->new( leg_count => 8 ) }, undef, '... no errors thrown, value is good' ); like( exception { my $fern = Animal->new( leg_count => 0 ) }, qr/This number \(0\) is not less than ten!/, 'gave custom supertype error message on new' ); like( exception { my $centipede = Animal->new( leg_count => 30 ) }, qr/This number \(30\) is not less than ten!/, 'gave custom subtype error message on new' ); my $chimera; is( exception { $chimera = Animal->new( leg_count => 4 ) }, undef, '... no errors thrown, value is good' ); like( exception { $chimera->leg_count(0) }, qr/This number \(0\) is not less than ten!/, 'gave custom supertype error message on set to 0' ); like( exception { $chimera->leg_count(16) }, qr/This number \(16\) is not less than ten!/, 'gave custom subtype error message on set to 16' ); my $gimp = eval { Animal->new() }; is( $@, '', '... no errors thrown, value is good' ); like( exception { $gimp->leg_count }, qr/This number \(0\) is not less than ten!/, 'gave custom supertype error message on lazy set to 0' ); done_testing; Moose-2.1604/t/type_constraints/define_type_twice_throws.t000644 000766 000024 00000000702 12617452415 024305 0ustar00etherstaff000000 000000 use strict; use warnings; use Test::More; use Test::Fatal; use Moose::Util::TypeConstraints; { package Some::Class; use Moose::Util::TypeConstraints; subtype 'MySubType' => as 'Int' => where { 1 }; } like( exception { package Some::Other::Class; use Moose::Util::TypeConstraints; subtype 'MySubType' => as 'Int' => where { 1 }; }, qr/cannot be created again/, 'Trying to create same type twice throws' ); done_testing; Moose-2.1604/t/type_constraints/duck_type_handles.t000644 000766 000024 00000001306 12617452415 022677 0ustar00etherstaff000000 000000 use strict; use warnings; use Test::More; my @phonograph; { package Duck; use Moose; sub walk { push @phonograph, 'footsteps', } sub quack { push @phonograph, 'quack'; } package Swan; use Moose; sub honk { push @phonograph, 'honk'; } package DucktypeTest; use Moose; use Moose::Util::TypeConstraints; my $ducktype = duck_type 'DuckType' => [qw(walk quack)]; has duck => ( isa => $ducktype, handles => $ducktype, ); } my $t = DucktypeTest->new(duck => Duck->new); $t->quack; is_deeply([splice @phonograph], ['quack']); $t->walk; is_deeply([splice @phonograph], ['footsteps']); done_testing; Moose-2.1604/t/type_constraints/duck_types.t000644 000766 000024 00000003471 12617452415 021371 0ustar00etherstaff000000 000000 use strict; use warnings; use Test::More; use Test::Fatal; { package Duck; use Moose; sub quack { } } { package Swan; use Moose; sub honk { } } { package RubberDuck; use Moose; sub quack { } } { package DucktypeTest; use Moose; use Moose::Util::TypeConstraints; duck_type 'DuckType' => [qw(quack)]; duck_type 'SwanType' => [qw(honk)]; has duck => ( isa => 'DuckType', is => 'ro', lazy_build => 1, ); sub _build_duck { Duck->new } has swan => ( isa => duck_type( [qw(honk)] ), is => 'ro', ); has other_swan => ( isa => 'SwanType', is => 'ro', ); } # try giving it a duck is( exception { DucktypeTest->new( duck => Duck->new ) }, undef, 'the Duck lives okay' ); # try giving it a swan which is like a duck, but not close enough like( exception { DucktypeTest->new( duck => Swan->new ) }, qr/Swan is missing methods 'quack'/, "the Swan doesn't quack" ); # try giving it a rubber RubberDuckey is( exception { DucktypeTest->new( swan => Swan->new ) }, undef, 'but a Swan can honk' ); # try giving it a rubber RubberDuckey is( exception { DucktypeTest->new( duck => RubberDuck->new ) }, undef, 'the RubberDuck lives okay' ); # try with the other constraint form is( exception { DucktypeTest->new( other_swan => Swan->new ) }, undef, 'but a Swan can honk' ); my $re = qr/Validation failed for 'DuckType' with value/; like( exception { DucktypeTest->new( duck => undef ) }, $re, 'Exception for undef' ); like( exception { DucktypeTest->new( duck => [] ) }, $re, 'Exception for arrayref' ); like( exception { DucktypeTest->new( duck => {} ) }, $re, 'Exception for hashref' ); like( exception { DucktypeTest->new( duck => \'foo' ) }, $re, 'Exception for scalar ref' ); done_testing; Moose-2.1604/t/type_constraints/enum.t000644 000766 000024 00000006217 12617452415 020164 0ustar00etherstaff000000 000000 use strict; use warnings; use Test::More; use Test::Fatal; use Scalar::Util (); use Moose::Util::TypeConstraints; enum Letter => ['a'..'z', 'A'..'Z']; enum Language => ['Perl 5', 'Perl 6', 'PASM', 'PIR']; # any others? ;) enum Metacharacter => ['*', '+', '?', '.', '|', '(', ')', '[', ']', '\\']; my @valid_letters = ('a'..'z', 'A'..'Z'); my @invalid_letters = qw/ab abc abcd/; push @invalid_letters, qw/0 4 9 ~ @ $ %/; push @invalid_letters, qw/l33t st3v4n 3num/; my @valid_languages = ('Perl 5', 'Perl 6', 'PASM', 'PIR'); my @invalid_languages = ('perl 5', 'Python', 'Ruby', 'Perl 666', 'PASM++'); # note that "perl 5" is invalid because case now matters my @valid_metacharacters = (qw/* + ? . | ( ) [ ] /, '\\'); my @invalid_metacharacters = qw/< > & % $ @ ! ~ `/; push @invalid_metacharacters, qw/.* fish(sticks)? atreides/; push @invalid_metacharacters, '^1?$|^(11+?)\1+$'; Moose::Util::TypeConstraints->export_type_constraints_as_functions(); ok(Letter($_), "'$_' is a letter") for @valid_letters; ok(!Letter($_), "'$_' is not a letter") for @invalid_letters; ok(Language($_), "'$_' is a language") for @valid_languages; ok(!Language($_), "'$_' is not a language") for @invalid_languages; ok(Metacharacter($_), "'$_' is a metacharacter") for @valid_metacharacters; ok(!Metacharacter($_), "'$_' is not a metacharacter") for @invalid_metacharacters; # check anon enums my $anon_enum = enum \@valid_languages; isa_ok($anon_enum, 'Moose::Meta::TypeConstraint'); is($anon_enum->name, '__ANON__', '... got the right name'); is($anon_enum->parent->name, 'Str', '... got the right parent name'); ok($anon_enum->check($_), "'$_' is a language") for @valid_languages; ok( !$anon_enum->equals( enum [qw(foo bar)] ), "doesn't equal a diff enum" ); ok( $anon_enum->equals( $anon_enum ), "equals itself" ); ok( $anon_enum->equals( enum \@valid_languages ), "equals duplicate" ); ok( !$anon_enum->is_subtype_of('Object'), 'enum not a subtype of Object'); ok( !$anon_enum->is_a_type_of('Object'), 'enum not type of Object'); ok( !$anon_enum->is_subtype_of('ThisTypeDoesNotExist'), 'enum not a subtype of nonexistant type'); ok( !$anon_enum->is_a_type_of('ThisTypeDoesNotExist'), 'enum not type of nonexistant type'); # validation like( exception { Moose::Meta::TypeConstraint::Enum->new(name => 'ZeroValues', values => []) }, qr/You must have at least one value to enumerate through/ ); is( exception { Moose::Meta::TypeConstraint::Enum->new(name => 'OneValue', values => [ 'a' ]) }, undef); like( exception { Moose::Meta::TypeConstraint::Enum->new(name => 'ReferenceInEnum', values => [ 'a', {} ]) }, qr/Enum values must be strings, not 'HASH\(0x\w+\)'/ ); like( exception { Moose::Meta::TypeConstraint::Enum->new(name => 'UndefInEnum', values => [ 'a', undef ]) }, qr/Enum values must be strings, not undef/ ); like( exception { package Foo; use Moose; use Moose::Util::TypeConstraints; has error => ( is => 'ro', isa => enum ['a', 'aa', 'aaa'], # should be parenthesized! default => 'aa', ); }, qr/enum called with an array reference and additional arguments\. Did you mean to parenthesize the enum call's parameters\?/ ); done_testing; Moose-2.1604/t/type_constraints/inlining.t000644 000766 000024 00000013134 12617452415 021023 0ustar00etherstaff000000 000000 use strict; use warnings; use Test::Fatal; use Test::More; use List::Util 1.33 (); use Moose::Util::TypeConstraints; #<<< subtype 'Inlinable', as 'Str', where { $_ !~ /Q/ }, inline_as { "defined $_[1] && ! ref $_[1] && $_[1] !~ /Q/" }; subtype 'NotInlinable', as 'Str', where { $_ !~ /Q/ }; #>>> my $inlinable = find_type_constraint('Inlinable'); my $not_inlinable = find_type_constraint('NotInlinable'); { ok( $inlinable->can_be_inlined, 'Inlinable returns true for can_be_inlined' ); is( $inlinable->_inline_check('$foo'), '( do { defined $foo && ! ref $foo && $foo !~ /Q/ } )', 'got expected inline code for Inlinable constraint' ); ok( !$not_inlinable->can_be_inlined, 'NotInlinable returns false for can_be_inlined' ); like( exception { $not_inlinable->_inline_check('$foo') }, qr/Cannot inline a type constraint check for NotInlinable/, 'threw an exception when asking for inlinable code from type which cannot be inlined' ); } { my $aofi = Moose::Util::TypeConstraints::find_or_create_type_constraint( 'ArrayRef[Inlinable]'); ok( $aofi->can_be_inlined, 'ArrayRef[Inlinable] returns true for can_be_inlined' ); is( $aofi->_inline_check('$foo'), q{( do { do {my $check = $foo;ref($check) eq "ARRAY" && &List::Util::all(sub { ( do { defined $_ && ! ref $_ && $_ !~ /Q/ } ) }, @{$check})} } )}, 'got expected inline code for ArrayRef[Inlinable] constraint' ); my $aofni = Moose::Util::TypeConstraints::find_or_create_type_constraint( 'ArrayRef[NotInlinable]'); ok( !$aofni->can_be_inlined, 'ArrayRef[NotInlinable] returns false for can_be_inlined' ); } subtype 'ArrayOfInlinable', as 'ArrayRef[Inlinable]'; subtype 'ArrayOfNotInlinable', as 'ArrayRef[NotInlinable]'; { my $aofi = Moose::Util::TypeConstraints::find_or_create_type_constraint( 'ArrayOfInlinable'); ok( $aofi->can_be_inlined, 'ArrayOfInlinable returns true for can_be_inlined' ); is( $aofi->_inline_check('$foo'), q{( do { do {my $check = $foo;ref($check) eq "ARRAY" && &List::Util::all(sub { ( do { defined $_ && ! ref $_ && $_ !~ /Q/ } ) }, @{$check})} } )}, 'got expected inline code for ArrayOfInlinable constraint' ); my $aofni = Moose::Util::TypeConstraints::find_or_create_type_constraint( 'ArrayOfNotInlinable'); ok( !$aofni->can_be_inlined, 'ArrayOfNotInlinable returns false for can_be_inlined' ); } { my $hoaofi = Moose::Util::TypeConstraints::find_or_create_type_constraint( 'HashRef[ArrayRef[Inlinable]]'); ok( $hoaofi->can_be_inlined, 'HashRef[ArrayRef[Inlinable]] returns true for can_be_inlined' ); is( $hoaofi->_inline_check('$foo'), q{( do { do {my $check = $foo;ref($check) eq "HASH" && &List::Util::all(sub { ( do { do {my $check = $_;ref($check) eq "ARRAY" && &List::Util::all(sub { ( do { defined $_ && ! ref $_ && $_ !~ /Q/ } ) }, @{$check})} } ) }, values %{$check})} } )}, 'got expected inline code for HashRef[ArrayRef[Inlinable]] constraint' ); my $hoaofni = Moose::Util::TypeConstraints::find_or_create_type_constraint( 'HashRef[ArrayRef[NotInlinable]]'); ok( !$hoaofni->can_be_inlined, 'HashRef[ArrayRef[NotInlinable]] returns false for can_be_inlined' ); } { my $iunion = Moose::Util::TypeConstraints::find_or_create_type_constraint( 'Inlinable | Object'); ok( $iunion->can_be_inlined, 'Inlinable | Object returns true for can_be_inlined' ); is( $iunion->_inline_check('$foo'), '((( do { defined $foo && ! ref $foo && $foo !~ /Q/ } )) || (( do { Scalar::Util::blessed($foo) } )))', 'got expected inline code for Inlinable | Object constraint' ); my $niunion = Moose::Util::TypeConstraints::find_or_create_type_constraint( 'NotInlinable | Object'); ok( !$niunion->can_be_inlined, 'NotInlinable | Object returns false for can_be_inlined' ); } { my $iunion = Moose::Util::TypeConstraints::find_or_create_type_constraint( 'Object | Inlinable'); ok( $iunion->can_be_inlined, 'Object | Inlinable returns true for can_be_inlined' ); is( $iunion->_inline_check('$foo'), '((( do { Scalar::Util::blessed($foo) } )) || (( do { defined $foo && ! ref $foo && $foo !~ /Q/ } )))', 'got expected inline code for Object | Inlinable constraint' ); my $niunion = Moose::Util::TypeConstraints::find_or_create_type_constraint( 'Object | NotInlinable'); ok( !$niunion->can_be_inlined, 'Object | NotInlinable returns false for can_be_inlined' ); } { my $iunion = Moose::Util::TypeConstraints::find_or_create_type_constraint( 'Object | Inlinable | CodeRef'); ok( $iunion->can_be_inlined, 'Object | Inlinable | CodeRef returns true for can_be_inlined' ); is( $iunion->_inline_check('$foo'), q{((( do { Scalar::Util::blessed($foo) } )) || (( do { defined $foo && ! ref $foo && $foo !~ /Q/ } )) || (( do { ref($foo) eq "CODE" } )))}, 'got expected inline code for Object | Inlinable | CodeRef constraint' ); my $niunion = Moose::Util::TypeConstraints::find_or_create_type_constraint( 'Object | NotInlinable | CodeRef'); ok( !$niunion->can_be_inlined, 'Object | NotInlinable | CodeRef returns false for can_be_inlined' ); } done_testing; Moose-2.1604/t/type_constraints/match_type_operator.t000644 000766 000024 00000014576 12617452415 023277 0ustar00etherstaff000000 000000 use strict; use warnings; use Test::More; use Test::Fatal; use Moose::Util::TypeConstraints; # some simple type dispatching ... subtype 'Null' => as 'ArrayRef' => where { scalar @{$_} == 0 }; sub head { match_on_type @_ => Null => sub { die "Cannot get the head of Null" }, ArrayRef => sub { $_->[0] }; } sub tail { match_on_type @_ => Null => sub { die "Cannot get the tail of Null" }, ArrayRef => sub { [ @{ $_ }[ 1 .. $#{ $_ } ] ] }; } sub len { match_on_type @_ => Null => sub { 0 }, ArrayRef => sub { len( tail( $_ ) ) + 1 }; } sub rev { match_on_type @_ => Null => sub { [] }, ArrayRef => sub { [ @{ rev( tail( $_ ) ) }, head( $_ ) ] }; } is( len( [] ), 0, '... got the right length'); is( len( [ 1 ] ), 1, '... got the right length'); is( len( [ 1 .. 5 ] ), 5, '... got the right length'); is( len( [ 1 .. 50 ] ), 50, '... got the right length'); is_deeply( rev( [ 1 .. 5 ] ), [ reverse 1 .. 5 ], '... got the right reversed value' ); # break down a Maybe Type ... sub break_it_down { match_on_type shift, 'Maybe[Str]' => sub { match_on_type $_ => 'Undef' => sub { 'undef' }, 'Str' => sub { $_ } }, sub { 'default' } } is( break_it_down( 'FOO' ), 'FOO', '... got the right value'); is( break_it_down( [] ), 'default', '... got the right value'); is( break_it_down( undef ), 'undef', '... got the right value'); is( break_it_down(), 'undef', '... got the right value'); # checking against enum types enum RGB => [qw[ red green blue ]]; enum CMYK => [qw[ cyan magenta yellow black ]]; sub is_acceptable_color { match_on_type shift, 'RGB' => sub { 'RGB' }, 'CMYK' => sub { 'CMYK' }, sub { die "bad color $_" }; } is( is_acceptable_color( 'blue' ), 'RGB', '... got the right value'); is( is_acceptable_color( 'green' ), 'RGB', '... got the right value'); is( is_acceptable_color( 'red' ), 'RGB', '... got the right value'); is( is_acceptable_color( 'cyan' ), 'CMYK', '... got the right value'); is( is_acceptable_color( 'magenta' ), 'CMYK', '... got the right value'); is( is_acceptable_color( 'yellow' ), 'CMYK', '... got the right value'); is( is_acceptable_color( 'black' ), 'CMYK', '... got the right value'); isnt( exception { is_acceptable_color( 'orange' ) }, undef, '... got the exception' ); ## using it in an OO context { package LinkedList; use Moose; use Moose::Util::TypeConstraints; has 'next' => ( is => 'ro', isa => __PACKAGE__, lazy => 1, default => sub { __PACKAGE__->new }, predicate => 'has_next' ); sub pprint { my $list = shift; match_on_type $list => subtype( as 'LinkedList', where { ! $_->has_next } ) => sub { '[]' }, 'LinkedList' => sub { '[' . $_->next->pprint . ']' }; } } my $l = LinkedList->new; is($l->pprint, '[]', '... got the right pprint'); $l->next; is($l->pprint, '[[]]', '... got the right pprint'); $l->next->next; is($l->pprint, '[[[]]]', '... got the right pprint'); $l->next->next->next; is($l->pprint, '[[[[]]]]', '... got the right pprint'); # basic data dumper { package Foo; use Moose; sub to_string { 'Foo()' } } use B; sub ppprint { my $x = shift; match_on_type $x => HashRef => sub { my $hash = shift; '{ ' . (join ", " => map { $_ . ' => ' . ppprint( $hash->{ $_ } ) } sort keys %$hash ) . ' }' }, ArrayRef => sub { my $array = shift; '[ ' . (join ", " => map { ppprint( $_ ) } @$array ) . ' ]' }, CodeRef => sub { 'sub { ... }' }, RegexpRef => sub { 'qr/' . $_ . '/' }, GlobRef => sub { '*' . B::svref_2object($_)->NAME }, Object => sub { $_->can('to_string') ? $_->to_string : $_ }, ScalarRef => sub { '\\' . ppprint( ${$_} ) }, Num => sub { $_ }, Str => sub { '"'. $_ . '"' }, Undef => sub { 'undef' }, => sub { die "I don't know what $_ is" }; } # The stringification of qr// has changed in 5.13.5+ my $re_prefix = qr/x/ =~ /\(\?\^/ ? '(?^:' :'(?-xism:'; is( ppprint( { one => [ 1, 2, "three", 4, "five", \(my $x = "six") ], two => undef, three => sub { "OH HAI" }, four => qr/.*?/, five => \*ppprint, six => Foo->new, } ), qq~{ five => *ppprint, four => qr/$re_prefix.*?)/, one => [ 1, 2, "three", 4, "five", \\"six" ], six => Foo(), three => sub { ... }, two => undef }~, '... got the right pretty printed values' ); # simple JSON serializer sub to_json { my $x = shift; match_on_type $x => HashRef => sub { my $hash = shift; '{ ' . (join ", " => map { '"' . $_ . '" : ' . to_json( $hash->{ $_ } ) } sort keys %$hash ) . ' }' }, ArrayRef => sub { my $array = shift; '[ ' . (join ", " => map { to_json( $_ ) } @$array ) . ' ]' }, Num => sub { $_ }, Str => sub { '"'. $_ . '"' }, Undef => sub { 'null' }, => sub { die "$_ is not acceptable json type" }; } is( to_json( { one => 1, two => 2 } ), '{ "one" : 1, "two" : 2 }', '... got our valid JSON' ); is( to_json( { one => [ 1, 2, 3, 4 ], two => undef, three => "Hello World" } ), '{ "one" : [ 1, 2, 3, 4 ], "three" : "Hello World", "two" : null }', '... got our valid JSON' ); # some error cases sub not_enough_matches { my $x = shift; match_on_type $x => Undef => sub { 'hello undef world' }, CodeRef => sub { $_->('Hello code ref world') }; } like( exception { not_enough_matches( [] ) }, qr/No cases matched for /, '... not enough matches' ); done_testing; Moose-2.1604/t/type_constraints/maybe_type_constraint.t000644 000766 000024 00000007420 12617452415 023617 0ustar00etherstaff000000 000000 use strict; use warnings; use Test::More; use Test::Fatal; use Moose::Util::TypeConstraints; my $type = Moose::Util::TypeConstraints::find_or_parse_type_constraint('Maybe[Int]'); isa_ok($type, 'Moose::Meta::TypeConstraint'); isa_ok($type, 'Moose::Meta::TypeConstraint::Parameterized'); ok( $type->equals($type), "equals self" ); ok( !$type->equals($type->parent), "not equal to parent" ); ok( !$type->equals(find_type_constraint("Maybe")), "not equal to Maybe" ); ok( $type->parent->equals(find_type_constraint("Maybe")), "parent is Maybe" ); ok( $type->equals( Moose::Meta::TypeConstraint::Parameterized->new( name => "__ANON__", parent => find_type_constraint("Maybe"), type_parameter => find_type_constraint("Int") ) ), "equal to clone" ); ok( !$type->equals( Moose::Meta::TypeConstraint::Parameterized->new( name => "__ANON__", parent => find_type_constraint("Maybe"), type_parameter => find_type_constraint("Str") ) ), "not equal to clone with diff param" ); ok( !$type->equals( Moose::Util::TypeConstraints::find_or_parse_type_constraint('Maybe[Str]') ), "not equal to declarative version of diff param" ); ok($type->check(10), '... checked type correctly (pass)'); ok($type->check(undef), '... checked type correctly (pass)'); ok(!$type->check('Hello World'), '... checked type correctly (fail)'); ok(!$type->check([]), '... checked type correctly (fail)'); { package Bar; use Moose; package Foo; use Moose; use Moose::Util::TypeConstraints; has 'arr' => (is => 'rw', isa => 'Maybe[ArrayRef]', required => 1); has 'bar' => (is => 'rw', isa => class_type('Bar')); has 'maybe_bar' => (is => 'rw', isa => maybe_type(class_type('Bar'))); } is( exception { Foo->new(arr => [], bar => Bar->new); }, undef, '... Bar->new isa Bar' ); isnt( exception { Foo->new(arr => [], bar => undef); }, undef, '... undef isnta Bar' ); is( exception { Foo->new(arr => [], maybe_bar => Bar->new); }, undef, '... Bar->new isa maybe(Bar)' ); is( exception { Foo->new(arr => [], maybe_bar => undef); }, undef, '... undef isa maybe(Bar)' ); isnt( exception { Foo->new(arr => [], maybe_bar => 1); }, undef, '... 1 isnta maybe(Bar)' ); is( exception { Foo->new(arr => []); }, undef, '... it worked!' ); is( exception { Foo->new(arr => undef); }, undef, '... it worked!' ); isnt( exception { Foo->new(arr => 100); }, undef, '... failed the type check' ); isnt( exception { Foo->new(arr => 'hello world'); }, undef, '... failed the type check' ); { package Test::MooseX::Types::Maybe; use Moose; has 'Maybe_Int' => (is=>'rw', isa=>'Maybe[Int]'); has 'Maybe_ArrayRef' => (is=>'rw', isa=>'Maybe[ArrayRef]'); has 'Maybe_HashRef' => (is=>'rw', isa=>'Maybe[HashRef]'); has 'Maybe_ArrayRefInt' => (is=>'rw', isa=>'Maybe[ArrayRef[Int]]'); has 'Maybe_HashRefInt' => (is=>'rw', isa=>'Maybe[HashRef[Int]]'); } ok my $obj = Test::MooseX::Types::Maybe->new => 'Create good test object'; ## Maybe[Int] ok my $Maybe_Int = Moose::Util::TypeConstraints::find_or_parse_type_constraint('Maybe[Int]') => 'made TC Maybe[Int]'; ok $Maybe_Int->check(1) => 'passed (1)'; ok $obj->Maybe_Int(1) => 'assigned (1)'; ok $Maybe_Int->check() => 'passed ()'; ok $obj->Maybe_Int() => 'assigned ()'; ok $Maybe_Int->check(0) => 'passed (0)'; ok defined $obj->Maybe_Int(0) => 'assigned (0)'; ok $Maybe_Int->check(undef) => 'passed (undef)'; ok sub {$obj->Maybe_Int(undef); 1}->() => 'assigned (undef)'; ok !$Maybe_Int->check("") => 'failed ("")'; like( exception { $obj->Maybe_Int("") }, qr/Attribute \(Maybe_Int\) does not pass the type constraint/, 'failed assigned ("")' ); ok !$Maybe_Int->check("a") => 'failed ("a")'; like( exception { $obj->Maybe_Int("a") }, qr/Attribute \(Maybe_Int\) does not pass the type constraint/, 'failed assigned ("a")' ); done_testing; Moose-2.1604/t/type_constraints/misc_type_tests.t000644 000766 000024 00000003772 12617452415 022441 0ustar00etherstaff000000 000000 use strict; use warnings; use Test::More; use Test::Fatal; use Scalar::Util qw(refaddr); use Moose::Util::TypeConstraints; # subtype 'aliasing' ... is( exception { subtype 'Numb3rs' => as 'Num'; }, undef, '... create bare subtype fine' ); my $numb3rs = find_type_constraint('Numb3rs'); isa_ok($numb3rs, 'Moose::Meta::TypeConstraint'); # subtype with unions { package Test::Moose::Meta::TypeConstraint::Union; use overload '""' => sub {'Broken|Test'}, fallback => 1; use Moose; extends 'Moose::Meta::TypeConstraint'; } my $dummy_instance = Test::Moose::Meta::TypeConstraint::Union->new; ok $dummy_instance => "Created Instance"; isa_ok $dummy_instance, 'Test::Moose::Meta::TypeConstraint::Union' => 'isa correct type'; is "$dummy_instance", "Broken|Test" => 'Got expected stringification result'; my $subtype1 = subtype 'New1' => as $dummy_instance; ok $subtype1 => 'made a subtype from our type object'; my $subtype2 = subtype 'New2' => as $subtype1; ok $subtype2 => 'made a subtype of our subtype'; # assert_valid { my $type = find_type_constraint('Num'); my $ok_1 = eval { $type->assert_valid(1); }; ok($ok_1, "we can assert_valid that 1 is of type $type"); my $ok_2 = eval { $type->assert_valid('foo'); }; my $error = $@; ok(! $ok_2, "'foo' is not of type $type"); like( $error, qr{validation failed for .\Q$type\E.}i, "correct error thrown" ); } { for my $t (qw(Bar Foo)) { my $tc = Moose::Meta::TypeConstraint->new({ name => $t, }); Moose::Util::TypeConstraints::register_type_constraint($tc); } my $foo = Moose::Util::TypeConstraints::find_type_constraint('Foo'); my $bar = Moose::Util::TypeConstraints::find_type_constraint('Bar'); ok(!$foo->equals($bar), "Foo type is not equal to Bar type"); ok( $foo->equals($foo), "Foo equals Foo"); ok( 0+$foo == refaddr($foo), "overloading works"); } ok $subtype1, "type constraint boolean overload works"; done_testing; Moose-2.1604/t/type_constraints/name_conflicts.t000644 000766 000024 00000006467 12617452415 022213 0ustar00etherstaff000000 000000 use strict; use warnings; use Test::More; use Test::Fatal; use Moose::Util::TypeConstraints; { package Types; use Moose::Util::TypeConstraints; type 'Foo1'; subtype 'Foo2', as 'Str'; class_type 'Foo3'; role_type 'Foo4'; { package Foo5; use Moose; } { package Foo6; use Moose::Role; } { package IsaAttr; use Moose; has foo => (is => 'ro', isa => 'Foo7'); } { package DoesAttr; use Moose; has foo => (is => 'ro', does => 'Foo8'); } } { my $anon = 0; my @checks = ( [1, sub { type $_[0] }, 'type'], [1, sub { subtype $_[0], as 'Str' }, 'subtype'], [1, sub { class_type $_[0] }, 'class_type'], [1, sub { role_type $_[0] }, 'role_type'], # should these two die? [0, sub { eval "package $_[0]; use Moose; 1" || die $@ }, 'use Moose'], [0, sub { eval "package $_[0]; use Moose::Role; 1" || die $@ }, 'use Moose::Role'], [0, sub { $anon++; eval < (is => 'ro', isa => '$_[0]'); 1 CLASS }, 'isa => "Thing"'], [0, sub { $anon++; eval < (is => 'ro', does => '$_[0]'); 1 CLASS }, 'does => "Thing"'], ); sub check_conflicts { my ($type_name) = @_; my $type = find_type_constraint($type_name); for my $check (@checks) { my ($should_fail, $code, $desc) = @$check; $should_fail = 0 if overriding_with_equivalent_type($type, $desc); unload_class($type_name); if ($should_fail) { like( exception { $code->($type_name) }, qr/^The type constraint '$type_name' has already been created in [\w:]+ and cannot be created again in [\w:]+/, "trying to override $type_name via '$desc' should die" ); } else { is( exception { $code->($type_name) }, undef, "trying to override $type_name via '$desc' should do nothing" ); } is($type, find_type_constraint($type_name), "type didn't change"); } } sub unload_class { my ($class) = @_; my $meta = Class::MOP::class_of($class); return unless $meta; $meta->add_package_symbol('@ISA', []); $meta->remove_package_symbol('&'.$_) for $meta->list_all_package_symbols('CODE'); undef $meta; Class::MOP::remove_metaclass_by_name($class); } sub overriding_with_equivalent_type { my ($type, $desc) = @_; if ($type->isa('Moose::Meta::TypeConstraint::Class')) { return 1 if $desc eq 'use Moose' || $desc eq 'class_type' || $desc eq 'isa => "Thing"'; } if ($type->isa('Moose::Meta::TypeConstraint::Role')) { return 1 if $desc eq 'use Moose::Role' || $desc eq 'role_type' || $desc eq 'does => "Thing"'; } return; } } { check_conflicts($_) for map { "Foo$_" } 1..8; } done_testing; Moose-2.1604/t/type_constraints/normalize_type_name.t000644 000766 000024 00000011123 12617452415 023251 0ustar00etherstaff000000 000000 use strict; use warnings; use Test::More; use Moose::Util::TypeConstraints; ## First, we check that the new regex parsing works ok Moose::Util::TypeConstraints::_detect_parameterized_type_constraint( 'ArrayRef[Str]') => 'detected correctly'; is_deeply [ Moose::Util::TypeConstraints::_parse_parameterized_type_constraint( 'ArrayRef[Str]') ], [ "ArrayRef", "Str" ] => 'Correctly parsed ArrayRef[Str]'; ok Moose::Util::TypeConstraints::_detect_parameterized_type_constraint( 'ArrayRef[Str ]') => 'detected correctly'; is_deeply [ Moose::Util::TypeConstraints::_parse_parameterized_type_constraint( 'ArrayRef[Str ]') ], [ "ArrayRef", "Str" ] => 'Correctly parsed ArrayRef[Str ]'; ok Moose::Util::TypeConstraints::_detect_parameterized_type_constraint( 'ArrayRef[ Str]') => 'detected correctly'; is_deeply [ Moose::Util::TypeConstraints::_parse_parameterized_type_constraint( 'ArrayRef[ Str]') ], [ "ArrayRef", "Str" ] => 'Correctly parsed ArrayRef[ Str]'; ok Moose::Util::TypeConstraints::_detect_parameterized_type_constraint( 'ArrayRef[ Str ]') => 'detected correctly'; is_deeply [ Moose::Util::TypeConstraints::_parse_parameterized_type_constraint( 'ArrayRef[ Str ]') ], [ "ArrayRef", "Str" ] => 'Correctly parsed ArrayRef[ Str ]'; ok Moose::Util::TypeConstraints::_detect_parameterized_type_constraint( 'ArrayRef[ HashRef[Int] ]') => 'detected correctly'; is_deeply [ Moose::Util::TypeConstraints::_parse_parameterized_type_constraint( 'ArrayRef[ HashRef[Int] ]') ], [ "ArrayRef", "HashRef[Int]" ] => 'Correctly parsed ArrayRef[ HashRef[Int] ]'; ok Moose::Util::TypeConstraints::_detect_parameterized_type_constraint( 'ArrayRef[ HashRef[Int ] ]') => 'detected correctly'; is_deeply [ Moose::Util::TypeConstraints::_parse_parameterized_type_constraint( 'ArrayRef[ HashRef[Int ] ]') ], [ "ArrayRef", "HashRef[Int ]" ] => 'Correctly parsed ArrayRef[ HashRef[Int ] ]'; ok Moose::Util::TypeConstraints::_detect_parameterized_type_constraint( 'ArrayRef[Int|Str]') => 'detected correctly'; is_deeply [ Moose::Util::TypeConstraints::_parse_parameterized_type_constraint( 'ArrayRef[Int|Str]') ], [ "ArrayRef", "Int|Str" ] => 'Correctly parsed ArrayRef[Int|Str]'; ok Moose::Util::TypeConstraints::_detect_parameterized_type_constraint( 'ArrayRef[ArrayRef[Int]|Str]') => 'detected correctly'; is_deeply [ Moose::Util::TypeConstraints::_parse_parameterized_type_constraint( 'ArrayRef[ArrayRef[Int]|Str]') ], [ "ArrayRef", "ArrayRef[Int]|Str" ] => 'Correctly parsed ArrayRef[ArrayRef[Int]|Str]'; ## creating names via subtype ok my $r = Moose::Util::TypeConstraints->get_type_constraint_registry => 'Got registry object'; ok my $subtype_a1 = subtype( 'subtype_a1' => as 'HashRef[Int]' ), => 'created subtype_a1'; ok my $subtype_a2 = subtype( 'subtype_a2' => as 'HashRef[ Int]' ), => 'created subtype_a2'; ok my $subtype_a3 = subtype( 'subtype_a2' => as 'HashRef[Int ]' ), => 'created subtype_a2'; ok my $subtype_a4 = subtype( 'subtype_a2' => as 'HashRef[ Int ]' ), => 'created subtype_a2'; is $subtype_a1->parent->name, $subtype_a2->parent->name => 'names match'; is $subtype_a1->parent->name, $subtype_a3->parent->name => 'names match'; is $subtype_a1->parent->name, $subtype_a4->parent->name => 'names match'; ok my $subtype_b1 = subtype( 'subtype_b1' => as 'HashRef[Int|Str]' ), => 'created subtype_b1'; ok my $subtype_b2 = subtype( 'subtype_b2' => as 'HashRef[Int | Str]' ), => 'created subtype_b2'; ok my $subtype_b3 = subtype( 'subtype_b3' => as 'HashRef[Str|Int]' ), => 'created subtype_b3'; is $subtype_b1->parent->name, $subtype_b2->parent->name => 'names match'; is $subtype_b1->parent->name, $subtype_b3->parent->name => 'names match'; is $subtype_b2->parent->name, $subtype_b3->parent->name => 'names match'; ## testing via add_constraint ok my $union1 = Moose::Util::TypeConstraints::create_type_constraint_union( 'ArrayRef[Int|Str] | ArrayRef[Int | HashRef]') => 'Created Union1'; ok my $union2 = Moose::Util::TypeConstraints::create_type_constraint_union( 'ArrayRef[ Int|Str] | ArrayRef[Int | HashRef]') => 'Created Union2'; ok my $union3 = Moose::Util::TypeConstraints::create_type_constraint_union( 'ArrayRef[Int |Str ] | ArrayRef[Int | HashRef ]') => 'Created Union3'; is $union1->name, $union2->name, 'names match'; is $union1->name, $union3->name, 'names match'; is $union2->name, $union3->name, 'names match'; done_testing; Moose-2.1604/t/type_constraints/parameterize_from.t000644 000766 000024 00000004321 12617452415 022725 0ustar00etherstaff000000 000000 use strict; use warnings; use Test::More; use Test::Fatal; use Moose::Util::TypeConstraints; # testing the parameterize method { my $parameterizable = subtype 'parameterizable_hashref', as 'HashRef'; my $parameterized = subtype 'parameterized_hashref', as 'HashRef[Int]'; my $int = Moose::Util::TypeConstraints::find_type_constraint('Int'); my $from_parameterizable = $parameterizable->parameterize($int); isa_ok $parameterizable, 'Moose::Meta::TypeConstraint::Parameterizable', => 'Got expected type instance'; package Test::Moose::Meta::TypeConstraint::Parameterizable; use Moose; has parameterizable => ( is => 'rw', isa => $parameterizable ); has parameterized => ( is => 'rw', isa => $parameterized ); has from_parameterizable => ( is => 'rw', isa => $from_parameterizable ); } # Create and check a dummy object ok my $params = Test::Moose::Meta::TypeConstraint::Parameterizable->new() => 'Create Dummy object for testing'; isa_ok $params, 'Test::Moose::Meta::TypeConstraint::Parameterizable' => 'isa correct type'; # test parameterizable is( exception { $params->parameterizable( { a => 'Hello', b => 'World' } ); }, undef, 'No problem setting parameterizable' ); is_deeply $params->parameterizable, { a => 'Hello', b => 'World' } => 'Got expected values'; # test parameterized is( exception { $params->parameterized( { a => 1, b => 2 } ); }, undef, 'No problem setting parameterized' ); is_deeply $params->parameterized, { a => 1, b => 2 } => 'Got expected values'; like( exception { $params->parameterized( { a => 'Hello', b => 'World' } ); }, qr/Attribute \(parameterized\) does not pass the type constraint/, 'parameterized throws expected error' ); # test from_parameterizable is( exception { $params->from_parameterizable( { a => 1, b => 2 } ); }, undef, 'No problem setting from_parameterizable' ); is_deeply $params->from_parameterizable, { a => 1, b => 2 } => 'Got expected values'; like( exception { $params->from_parameterizable( { a => 'Hello', b => 'World' } ); }, qr/Attribute \(from_parameterizable\) does not pass the type constraint/, 'from_parameterizable throws expected error' ); done_testing; Moose-2.1604/t/type_constraints/role_type_constraint.t000644 000766 000024 00000004620 12617452415 023462 0ustar00etherstaff000000 000000 use strict; use warnings; use Test::More; use Test::Fatal; use Moose::Util::TypeConstraints; { package Gorch; use Moose::Role; package Bar; use Moose::Role; package Foo; use Moose::Role; with qw(Bar Gorch); package FooC; use Moose; with qw(Foo); package BarC; use Moose; with qw(Bar); } is( exception { role_type('Boop', message { "${_} is not a Boop" }) }, undef, 'role_type keywork works with message' ); my $type = find_type_constraint("Foo"); is( $type->role, "Foo", "role attribute" ); ok( $type->is_subtype_of("Gorch"), "subtype of gorch" ); ok( $type->is_subtype_of("Bar"), "subtype of bar" ); ok( $type->is_subtype_of("Object"), "subtype of Object" ); ok( !$type->is_subtype_of("ThisTypeDoesNotExist"), "not subtype of unknown type name" ); ok( !$type->is_a_type_of("ThisTypeDoesNotExist"), "not type of unknown type name" ); ok( find_type_constraint("Bar")->check(FooC->new), "Foo passes Bar" ); ok( find_type_constraint("Bar")->check(BarC->new), "Bar passes Bar" ); ok( !find_type_constraint("Gorch")->check(BarC->new), "but Bar doesn't pass Gorch"); my $boop = find_type_constraint("Boop"); ok( $boop->has_message, 'Boop has a message'); my $error = $boop->get_message(FooC->new); like( $error, qr/is not a Boop/, 'boop gives correct error message'); ok( $type->equals($type), "equals self" ); ok( $type->equals(Moose::Meta::TypeConstraint::Role->new( name => "__ANON__", role => "Foo" )), "equals anon constraint of same value" ); ok( $type->equals(Moose::Meta::TypeConstraint::Role->new( name => "Oink", role => "Foo" )), "equals differently named constraint of same value" ); ok( !$type->equals(Moose::Meta::TypeConstraint::Role->new( name => "__ANON__", role => "Bar" )), "doesn't equal other anon constraint" ); ok( $type->is_subtype_of(Moose::Meta::TypeConstraint::Role->new( name => "__ANON__", role => "Bar" )), "subtype of other anon constraint" ); { # See block comment in t/type_constraints/class_type_constraint.t my $type; is( exception { $type = role_type 'MyExampleRole' }, undef, 'Make initial role_type' ); is( exception { is(role_type('MyExampleRole'), $type, 're-running role_type gives same type') }, undef, 'No exception making duplicate role_type' );; is( exception { ok( ! $type->is_subtype_of('Bar'), 'MyExampleRole is not a subtype of Bar' ) }, undef, 'No exception for is_subtype_of undefined role' ); } done_testing; Moose-2.1604/t/type_constraints/subtype_auto_vivify_parent.t000644 000766 000024 00000001117 12617452415 024702 0ustar00etherstaff000000 000000 use strict; use warnings; use Test::More; use Moose::Util::TypeConstraints; { package Foo; sub new { my $class = shift; return bless {@_}, $class; } } subtype 'FooWithSize' => as 'Foo' => where { $_[0]->{size} }; my $type = find_type_constraint('FooWithSize'); ok( $type, 'made a FooWithSize constraint' ); ok( $type->parent, 'type has a parent type' ); is( $type->parent->name, 'Foo', 'parent type is Foo' ); isa_ok( $type->parent, 'Moose::Meta::TypeConstraint::Class', 'parent type constraint is a class type' ); done_testing; Moose-2.1604/t/type_constraints/subtyping_parameterized_types.t000644 000766 000024 00000010173 12617452416 025401 0ustar00etherstaff000000 000000 use strict; use warnings; use Test::More; use Test::Fatal; use Moose::Util::TypeConstraints; is( exception { subtype 'MySpecialHash' => as 'HashRef[Int]'; }, undef, '... created the subtype special okay' ); { my $t = find_type_constraint('MySpecialHash'); isa_ok($t, 'Moose::Meta::TypeConstraint'); is($t->name, 'MySpecialHash', '... name is correct'); my $p = $t->parent; isa_ok($p, 'Moose::Meta::TypeConstraint::Parameterized'); isa_ok($p, 'Moose::Meta::TypeConstraint'); is($p->name, 'HashRef[Int]', '... parent name is correct'); ok($t->check({ one => 1, two => 2 }), '... validated {one=>1, two=>2} correctly'); ok(!$t->check({ one => "ONE", two => "TWO" }), '... validated it correctly'); ok( $t->equals($t), "equals to self" ); ok( !$t->equals( $t->parent ), "not equal to parent" ); ok( $t->parent->equals( $t->parent ), "parent equals to self" ); ok( !$t->is_a_type_of("ThisTypeDoesNotExist"), "not a non existant type" ); ok( !$t->is_subtype_of("ThisTypeDoesNotExist"), "not a subtype of a non existant type" ); } is( exception { subtype 'MySpecialHashExtended' => as 'HashRef[Int]' => where { # all values are less then 10 (scalar grep { $_ < 10 } values %{$_}) ? 1 : undef }; }, undef, '... created the subtype special okay' ); { my $t = find_type_constraint('MySpecialHashExtended'); isa_ok($t, 'Moose::Meta::TypeConstraint'); is($t->name, 'MySpecialHashExtended', '... name is correct'); my $p = $t->parent; isa_ok($p, 'Moose::Meta::TypeConstraint::Parameterized'); isa_ok($p, 'Moose::Meta::TypeConstraint'); is($p->name, 'HashRef[Int]', '... parent name is correct'); ok($t->check({ one => 1, two => 2 }), '... validated it correctly'); ok(!$t->check({ zero => 10, one => 11, two => 12 }), '... validated { zero => 10, one => 11, two => 12 } correctly'); ok(!$t->check({ one => "ONE", two => "TWO" }), '... validated it correctly'); } is( exception { subtype 'MyNonSpecialHash' => as "HashRef" => where { keys %$_ == 3 }; }, undef ); { my $t = find_type_constraint('MyNonSpecialHash'); isa_ok($t, 'Moose::Meta::TypeConstraint'); isa_ok($t, 'Moose::Meta::TypeConstraint::Parameterizable'); ok( $t->check({ one => 1, two => "foo", three => [] }), "validated" ); ok( !$t->check({ one => 1 }), "failed" ); } { my $t = Moose::Util::TypeConstraints::find_or_parse_type_constraint('MyNonSpecialHash[Int]'); isa_ok($t, 'Moose::Meta::TypeConstraint'); ok( $t->check({ one => 1, two => 2, three => 3 }), "validated" ); ok( !$t->check({ one => 1, two => "foo", three => [] }), "failed" ); ok( !$t->check({ one => 1 }), "failed" ); } { ## Because to throw errors in M:M:Parameterizable needs Moose loaded in ## order to throw errors. In theory the use Moose belongs to that class ## but when I put it there causes all sorts or trouble. In theory this is ## never a real problem since you are likely to use Moose somewhere when you ## are creating type constraints. use Moose (); my $MyArrayRefInt = subtype 'MyArrayRefInt', as 'ArrayRef[Int]'; my $BiggerInt = subtype 'BiggerInt', as 'Int', where {$_>10}; my $SubOfMyArrayRef = subtype 'SubOfMyArrayRef', as 'MyArrayRefInt[BiggerInt]'; ok $MyArrayRefInt->check([1,2,3]), '[1,2,3] is okay'; ok ! $MyArrayRefInt->check(["a","b"]), '["a","b"] is not'; ok $BiggerInt->check(100), '100 is big enough'; ok ! $BiggerInt->check(5), '5 is big enough'; ok $SubOfMyArrayRef->check([15,20,25]), '[15,20,25] is a bunch of big ints'; ok ! $SubOfMyArrayRef->check([15,5,25]), '[15,5,25] is NOT a bunch of big ints'; like( exception { my $SubOfMyArrayRef = subtype 'SubSubOfMyArrayRef', as 'SubOfMyArrayRef[Str]'; }, qr/Str is not a subtype of BiggerInt/, 'Failed to parameterize with a bad type parameter' ); } { my $RefToInt = subtype as 'ScalarRef[Int]'; ok $RefToInt->check(\1), '\1 is okay'; ok !$RefToInt->check(1), '1 is not'; ok !$RefToInt->check(\"foo"), '\"foo" is not'; } done_testing; Moose-2.1604/t/type_constraints/subtyping_union_types.t000644 000766 000024 00000005531 12617452415 023676 0ustar00etherstaff000000 000000 use strict; use warnings; use Test::More; use Test::Fatal; use Moose::Util::TypeConstraints; is( exception { subtype 'MyCollections' => as 'ArrayRef | HashRef'; }, undef, '... created the subtype special okay' ); { my $t = find_type_constraint('MyCollections'); isa_ok($t, 'Moose::Meta::TypeConstraint'); is($t->name, 'MyCollections', '... name is correct'); my $p = $t->parent; isa_ok($p, 'Moose::Meta::TypeConstraint::Union'); isa_ok($p, 'Moose::Meta::TypeConstraint'); is($p->name, 'ArrayRef|HashRef', '... parent name is correct'); ok($t->check([]), '... validated it correctly'); ok($t->check({}), '... validated it correctly'); ok(!$t->check(1), '... validated it correctly'); } is( exception { subtype 'MyCollectionsExtended' => as 'ArrayRef|HashRef' => where { if (ref($_) eq 'ARRAY') { return if scalar(@$_) < 2; } elsif (ref($_) eq 'HASH') { return if scalar(keys(%$_)) < 2; } 1; }; }, undef, '... created the subtype special okay' ); { my $t = find_type_constraint('MyCollectionsExtended'); isa_ok($t, 'Moose::Meta::TypeConstraint'); is($t->name, 'MyCollectionsExtended', '... name is correct'); my $p = $t->parent; isa_ok($p, 'Moose::Meta::TypeConstraint::Union'); isa_ok($p, 'Moose::Meta::TypeConstraint'); is($p->name, 'ArrayRef|HashRef', '... parent name is correct'); ok(!$t->check([]), '... validated it correctly'); ok($t->check([1, 2]), '... validated it correctly'); ok(!$t->check({}), '... validated it correctly'); ok($t->check({ one => 1, two => 2 }), '... validated it correctly'); ok(!$t->check(1), '... validated it correctly'); } { my $union = Moose::Util::TypeConstraints::find_or_create_type_constraint('Int|ArrayRef[Int]'); subtype 'UnionSub', as 'Int|ArrayRef[Int]'; my $subtype = find_type_constraint('UnionSub'); ok( !$union->is_a_type_of('Ref'), 'Int|ArrayRef[Int] is not a type of Ref' ); ok( !$subtype->is_a_type_of('Ref'), 'subtype of Int|ArrayRef[Int] is not a type of Ref' ); ok( $union->is_a_type_of('Defined'), 'Int|ArrayRef[Int] is a type of Defined' ); ok( $subtype->is_a_type_of('Defined'), 'subtype of Int|ArrayRef[Int] is a type of Defined' ); ok( !$union->is_subtype_of('Ref'), 'Int|ArrayRef[Int] is not a subtype of Ref' ); ok( !$subtype->is_subtype_of('Ref'), 'subtype of Int|ArrayRef[Int] is not a subtype of Ref' ); ok( $union->is_subtype_of('Defined'), 'Int|ArrayRef[Int] is a subtype of Defined' ); ok( $subtype->is_subtype_of('Defined'), 'subtype of Int|ArrayRef[Int] is a subtype of Defined' ); } done_testing; Moose-2.1604/t/type_constraints/throw_error.t000644 000766 000024 00000000474 12617452415 021573 0ustar00etherstaff000000 000000 use strict; use warnings; use Test::More; use Moose::Util::TypeConstraints; eval { Moose::Util::TypeConstraints::create_type_constraint_union() }; like( $@, qr/\QYou must pass in at least 2 type names to make a union/, 'can throw a proper error without Moose being loaded by the caller' ); done_testing; Moose-2.1604/t/type_constraints/type_coersion_on_lazy_attributes.t000644 000766 000024 00000001235 12617452416 026077 0ustar00etherstaff000000 000000 use strict; use warnings; use Test::More; { package SomeClass; use Moose; use Moose::Util::TypeConstraints; subtype 'DigitSix' => as 'Num' => where { /^6$/ }; subtype 'TextSix' => as 'Str' => where { /Six/i }; coerce 'TextSix' => from 'DigitSix' => via { confess("Cannot live without 6 ($_)") unless /^6$/; 'Six' }; has foo => ( is => 'ro', isa => 'TextSix', coerce => 1, default => 6, lazy => 1 ); } my $attr = SomeClass->meta->get_attribute('foo'); is($attr->get_value(SomeClass->new()), 'Six'); is(SomeClass->new()->foo, 'Six'); done_testing; Moose-2.1604/t/type_constraints/type_names.t000644 000766 000024 00000002605 12617452415 021361 0ustar00etherstaff000000 000000 use strict; use warnings; use Test::More; use Test::Fatal; use Moose::Meta::TypeConstraint; use Moose::Util::TypeConstraints; TODO: { local $TODO = 'type names are not validated in the TC metaclass'; # Test written in this way to avoid a warning from like(undef, qr...); # -- rjbs, 2010-10-25 my $error = exception { Moose::Meta::TypeConstraint->new( name => 'Foo-Bar' ) }; if (defined $error) { like( $error, qr/contains invalid characters/, 'Type names cannot contain a dash', ); } else { fail("Type names cannot contain a dash"); } } is( exception { Moose::Meta::TypeConstraint->new( name => 'Foo.Bar::Baz' ) }, undef, 'Type names can contain periods and colons' ); like( exception { subtype 'Foo-Baz' => as 'Item' }, qr/contains invalid characters/, 'Type names cannot contain a dash (via subtype sugar)' ); is( exception { subtype 'Foo.Bar::Baz' => as 'Item' }, undef, 'Type names can contain periods and colons (via subtype sugar)' ); is( Moose::Util::TypeConstraints::find_or_parse_type_constraint('ArrayRef[In-valid]'), undef, 'find_or_parse_type_constraint returns undef on an invalid name' ); is( Moose::Util::TypeConstraints::find_or_parse_type_constraint('ArrayRef[Va.lid]'), 'ArrayRef[Va.lid]', 'find_or_parse_type_constraint returns name for valid name' ); done_testing; Moose-2.1604/t/type_constraints/type_notation_parser.t000644 000766 000024 00000006442 12617452415 023470 0ustar00etherstaff000000 000000 use strict; use warnings; use Test::More; use Moose::Util::TypeConstraints; =pod This is a good candidate for LectroTest Volunteers welcome :) =cut ## check the containers ok(Moose::Util::TypeConstraints::_detect_parameterized_type_constraint($_), '... this correctly detected a container (' . $_ . ')') for ( 'ArrayRef[Foo]', 'ArrayRef[Foo | Int]', 'ArrayRef[ArrayRef[Int]]', 'ArrayRef[ArrayRef[Int | Foo]]', 'ArrayRef[ArrayRef[Int|Str]]', ); ok(!Moose::Util::TypeConstraints::_detect_parameterized_type_constraint($_), '... this correctly detected a non-container (' . $_ . ')') for ( 'ArrayRef[]', 'ArrayRef[Foo]Bar', ); { my %split_tests = ( 'ArrayRef[Foo]' => [ 'ArrayRef', 'Foo' ], 'ArrayRef[Foo | Int]' => [ 'ArrayRef', 'Foo | Int' ], 'ArrayRef[Foo|Int]' => [ 'ArrayRef', 'Foo|Int' ], # these will get processed with recusion, # so we only need to detect it once 'ArrayRef[ArrayRef[Int]]' => [ 'ArrayRef', 'ArrayRef[Int]' ], 'ArrayRef[ArrayRef[Int | Foo]]' => [ 'ArrayRef', 'ArrayRef[Int | Foo]' ], 'ArrayRef[ArrayRef[Int|Str]]' => [ 'ArrayRef', 'ArrayRef[Int|Str]' ], ); is_deeply( [ Moose::Util::TypeConstraints::_parse_parameterized_type_constraint($_) ], $split_tests{$_}, '... this correctly split the container (' . $_ . ')' ) for keys %split_tests; } ## now for the unions ok(Moose::Util::TypeConstraints::_detect_type_constraint_union($_), '... this correctly detected union (' . $_ . ')') for ( 'Int | Str', 'Int|Str', 'ArrayRef[Foo] | Int', 'ArrayRef[Foo]|Int', 'Int | ArrayRef[Foo]', 'Int|ArrayRef[Foo]', 'ArrayRef[Foo | Int] | Str', 'ArrayRef[Foo|Int]|Str', 'Str | ArrayRef[Foo | Int]', 'Str|ArrayRef[Foo|Int]', 'Some|Silly|Name|With|Pipes | Int', 'Some|Silly|Name|With|Pipes|Int', ); ok(!Moose::Util::TypeConstraints::_detect_type_constraint_union($_), '... this correctly detected a non-union (' . $_ . ')') for ( 'Int', 'ArrayRef[Foo | Int]', 'ArrayRef[Foo|Int]', ); { my %split_tests = ( 'Int | Str' => [ 'Int', 'Str' ], 'Int|Str' => [ 'Int', 'Str' ], 'ArrayRef[Foo] | Int' => [ 'ArrayRef[Foo]', 'Int' ], 'ArrayRef[Foo]|Int' => [ 'ArrayRef[Foo]', 'Int' ], 'Int | ArrayRef[Foo]' => [ 'Int', 'ArrayRef[Foo]' ], 'Int|ArrayRef[Foo]' => [ 'Int', 'ArrayRef[Foo]' ], 'ArrayRef[Foo | Int] | Str' => [ 'ArrayRef[Foo | Int]', 'Str' ], 'ArrayRef[Foo|Int]|Str' => [ 'ArrayRef[Foo|Int]', 'Str' ], 'Str | ArrayRef[Foo | Int]' => [ 'Str', 'ArrayRef[Foo | Int]' ], 'Str|ArrayRef[Foo|Int]' => [ 'Str', 'ArrayRef[Foo|Int]' ], 'Some|Silly|Name|With|Pipes | Int' => [ 'Some', 'Silly', 'Name', 'With', 'Pipes', 'Int' ], 'Some|Silly|Name|With|Pipes|Int' => [ 'Some', 'Silly', 'Name', 'With', 'Pipes', 'Int' ], ); is_deeply( [ Moose::Util::TypeConstraints::_parse_type_constraint_union($_) ], $split_tests{$_}, '... this correctly split the union (' . $_ . ')' ) for keys %split_tests; } done_testing; Moose-2.1604/t/type_constraints/types_and_undef.t000644 000766 000024 00000011357 12617452415 022370 0ustar00etherstaff000000 000000 use strict; use warnings; use Test::More; use Test::Fatal; { package Foo; use Moose; use Moose::Util::TypeConstraints; use Scalar::Util (); type Number => where { defined($_) && !ref($_) && Scalar::Util::looks_like_number($_) }; type String => where { defined($_) && !ref($_) && !Scalar::Util::looks_like_number($_) }; has vUndef => ( is => 'rw', isa => 'Undef' ); has vDefined => ( is => 'rw', isa => 'Defined' ); has vInt => ( is => 'rw', isa => 'Int' ); has vNumber => ( is => 'rw', isa => 'Number' ); has vStr => ( is => 'rw', isa => 'Str' ); has vString => ( is => 'rw', isa => 'String' ); has v_lazy_Undef => ( is => 'rw', lazy => 1, default => sub { undef }, isa => 'Undef' ); has v_lazy_Defined => ( is => 'rw', lazy => 1, default => sub { undef }, isa => 'Defined' ); has v_lazy_Int => ( is => 'rw', lazy => 1, default => sub { undef }, isa => 'Int' ); has v_lazy_Number => ( is => 'rw', lazy => 1, default => sub { undef }, isa => 'Number' ); has v_lazy_Str => ( is => 'rw', lazy => 1, default => sub { undef }, isa => 'Str' ); has v_lazy_String => ( is => 'rw', lazy => 1, default => sub { undef }, isa => 'String' ); } # EXPORT TYPE CONSTRAINTS # Moose::Util::TypeConstraints->export_type_constraints_as_functions; ok( Undef(undef), '... undef is a Undef'); ok(!Defined(undef), '... undef is NOT a Defined'); ok(!Int(undef), '... undef is NOT an Int'); ok(!Number(undef), '... undef is NOT a Number'); ok(!Str(undef), '... undef is NOT a Str'); ok(!String(undef), '... undef is NOT a String'); ok(!Undef(5), '... 5 is a NOT a Undef'); ok(Defined(5), '... 5 is a Defined'); ok(Int(5), '... 5 is an Int'); ok(Number(5), '... 5 is a Number'); ok(Str(5), '... 5 is a Str'); ok(!String(5), '... 5 is NOT a String'); ok(!Undef(0.5), '... 0.5 is a NOT a Undef'); ok(Defined(0.5), '... 0.5 is a Defined'); ok(!Int(0.5), '... 0.5 is NOT an Int'); ok(Number(0.5), '... 0.5 is a Number'); ok(Str(0.5), '... 0.5 is a Str'); ok(!String(0.5), '... 0.5 is NOT a String'); ok(!Undef('Foo'), '... "Foo" is NOT a Undef'); ok(Defined('Foo'), '... "Foo" is a Defined'); ok(!Int('Foo'), '... "Foo" is NOT an Int'); ok(!Number('Foo'), '... "Foo" is NOT a Number'); ok(Str('Foo'), '... "Foo" is a Str'); ok(String('Foo'), '... "Foo" is a String'); my $foo = Foo->new; is( exception { $foo->vUndef(undef) }, undef, '... undef is a Foo->Undef' ); isnt( exception { $foo->vDefined(undef) }, undef, '... undef is NOT a Foo->Defined' ); isnt( exception { $foo->vInt(undef) }, undef, '... undef is NOT a Foo->Int' ); isnt( exception { $foo->vNumber(undef) }, undef, '... undef is NOT a Foo->Number' ); isnt( exception { $foo->vStr(undef) }, undef, '... undef is NOT a Foo->Str' ); isnt( exception { $foo->vString(undef) }, undef, '... undef is NOT a Foo->String' ); isnt( exception { $foo->vUndef(5) }, undef, '... 5 is NOT a Foo->Undef' ); is( exception { $foo->vDefined(5) }, undef, '... 5 is a Foo->Defined' ); is( exception { $foo->vInt(5) }, undef, '... 5 is a Foo->Int' ); is( exception { $foo->vNumber(5) }, undef, '... 5 is a Foo->Number' ); is( exception { $foo->vStr(5) }, undef, '... 5 is a Foo->Str' ); isnt( exception { $foo->vString(5) }, undef, '... 5 is NOT a Foo->String' ); isnt( exception { $foo->vUndef(0.5) }, undef, '... 0.5 is NOT a Foo->Undef' ); is( exception { $foo->vDefined(0.5) }, undef, '... 0.5 is a Foo->Defined' ); isnt( exception { $foo->vInt(0.5) }, undef, '... 0.5 is NOT a Foo->Int' ); is( exception { $foo->vNumber(0.5) }, undef, '... 0.5 is a Foo->Number' ); is( exception { $foo->vStr(0.5) }, undef, '... 0.5 is a Foo->Str' ); isnt( exception { $foo->vString(0.5) }, undef, '... 0.5 is NOT a Foo->String' ); isnt( exception { $foo->vUndef('Foo') }, undef, '... "Foo" is NOT a Foo->Undef' ); is( exception { $foo->vDefined('Foo') }, undef, '... "Foo" is a Foo->Defined' ); isnt( exception { $foo->vInt('Foo') }, undef, '... "Foo" is NOT a Foo->Int' ); isnt( exception { $foo->vNumber('Foo') }, undef, '... "Foo" is NOT a Foo->Number' ); is( exception { $foo->vStr('Foo') }, undef, '... "Foo" is a Foo->Str' ); is( exception { $foo->vString('Foo') }, undef, '... "Foo" is a Foo->String' ); # the lazy tests is( exception { $foo->v_lazy_Undef() }, undef, '... undef is a Foo->Undef' ); isnt( exception { $foo->v_lazy_Defined() }, undef, '... undef is NOT a Foo->Defined' ); isnt( exception { $foo->v_lazy_Int() }, undef, '... undef is NOT a Foo->Int' ); isnt( exception { $foo->v_lazy_Number() }, undef, '... undef is NOT a Foo->Number' ); isnt( exception { $foo->v_lazy_Str() }, undef, '... undef is NOT a Foo->Str' ); isnt( exception { $foo->v_lazy_String() }, undef, '... undef is NOT a Foo->String' ); done_testing; Moose-2.1604/t/type_constraints/union_is_a_type_of.t000644 000766 000024 00000002373 12617452415 023067 0ustar00etherstaff000000 000000 use strict; use warnings; use Test::Fatal; use Test::More; use Moose::Util::TypeConstraints 'find_type_constraint'; use Moose::Meta::TypeConstraint::Union; my ( $item, $int, $classname, $num ) = map { find_type_constraint($_) } qw{Item Int ClassName Num}; ok( $int->is_subtype_of($item), 'Int is subtype of Item' ); ok( $classname->is_subtype_of($item), 'ClassName is subtype of Item' ); ok( ( not $int->is_subtype_of($classname) ), 'Int is not subtype of ClassName' ); ok( ( not $classname->is_subtype_of($int) ), 'ClassName is not subtype of Int' ); my $union = Moose::Meta::TypeConstraint::Union->new( type_constraints => [ $int, $classname ] ); my @domain_values = qw( 85439 Moose::Meta::TypeConstraint ); is( exception { $union->assert_valid($_) }, undef, qq{Union accepts "$_".} ) for @domain_values; ok( $union->is_subtype_of( find_type_constraint($_) ), "Int|ClassName is a subtype of $_" ) for qw{Item Defined Value Str}; ok( ( not $union->is_subtype_of( find_type_constraint($_) ) ), "Int|ClassName is not a subtype of $_" ) for qw{Num Int ClassName}; ok( ( not $union->is_a_type_of( find_type_constraint($_) ) ), "Int|ClassName is not a type of $_" ) for qw{Int ClassName}; done_testing; Moose-2.1604/t/type_constraints/union_types.t000644 000766 000024 00000012456 12617452415 021576 0ustar00etherstaff000000 000000 use strict; use warnings; use Test::More; use Moose::Util::TypeConstraints; my $Str = find_type_constraint('Str'); isa_ok( $Str, 'Moose::Meta::TypeConstraint' ); my $Undef = find_type_constraint('Undef'); isa_ok( $Undef, 'Moose::Meta::TypeConstraint' ); ok( !$Str->check(undef), '... Str cannot accept an Undef value' ); ok( $Str->check('String'), '... Str can accept an String value' ); ok( !$Undef->check('String'), '... Undef cannot accept an Str value' ); ok( $Undef->check(undef), '... Undef can accept an Undef value' ); my $Str_or_Undef = Moose::Meta::TypeConstraint::Union->new( type_constraints => [ $Str, $Undef ] ); isa_ok( $Str_or_Undef, 'Moose::Meta::TypeConstraint::Union' ); ok( $Str_or_Undef->check(undef), '... (Str | Undef) can accept an Undef value' ); ok( $Str_or_Undef->check('String'), '... (Str | Undef) can accept a String value' ); ok( !$Str_or_Undef->is_a_type_of($Str), "not a subtype of Str" ); ok( !$Str_or_Undef->is_a_type_of($Undef), "not a subtype of Undef" ); cmp_ok( $Str_or_Undef->find_type_for('String'), 'eq', 'Str', 'find_type_for Str' ); cmp_ok( $Str_or_Undef->find_type_for(undef), 'eq', 'Undef', 'find_type_for Undef' ); ok( !defined( $Str_or_Undef->find_type_for( sub { } ) ), 'no find_type_for CodeRef' ); ok( !$Str_or_Undef->equals($Str), "not equal to Str" ); ok( $Str_or_Undef->equals($Str_or_Undef), "equal to self" ); ok( $Str_or_Undef->equals( Moose::Meta::TypeConstraint::Union->new( type_constraints => [ $Str, $Undef ] ) ), "equal to clone" ); ok( $Str_or_Undef->equals( Moose::Meta::TypeConstraint::Union->new( type_constraints => [ $Undef, $Str ] ) ), "equal to reversed clone" ); ok( !$Str_or_Undef->is_a_type_of("ThisTypeDoesNotExist"), "not type of non existent type" ); ok( !$Str_or_Undef->is_subtype_of("ThisTypeDoesNotExist"), "not subtype of non existent type" ); is( $Str_or_Undef->parent, find_type_constraint('Item'), 'parent of Str|Undef is Item' ); is_deeply( [$Str_or_Undef->parents], [find_type_constraint('Item')], 'parents of Str|Undef is Item' ); # another .... my $ArrayRef = find_type_constraint('ArrayRef'); isa_ok( $ArrayRef, 'Moose::Meta::TypeConstraint' ); my $HashRef = find_type_constraint('HashRef'); isa_ok( $HashRef, 'Moose::Meta::TypeConstraint' ); ok( $ArrayRef->check( [] ), '... ArrayRef can accept an [] value' ); ok( !$ArrayRef->check( {} ), '... ArrayRef cannot accept an {} value' ); ok( $HashRef->check( {} ), '... HashRef can accept an {} value' ); ok( !$HashRef->check( [] ), '... HashRef cannot accept an [] value' ); my $ArrayRef_or_HashRef = Moose::Meta::TypeConstraint::Union->new( type_constraints => [ $ArrayRef, $HashRef ] ); isa_ok( $ArrayRef_or_HashRef, 'Moose::Meta::TypeConstraint::Union' ); ok( $ArrayRef_or_HashRef->check( [] ), '... (ArrayRef | HashRef) can accept []' ); ok( $ArrayRef_or_HashRef->check( {} ), '... (ArrayRef | HashRef) can accept {}' ); ok( !$ArrayRef_or_HashRef->check( \( my $var1 ) ), '... (ArrayRef | HashRef) cannot accept scalar refs' ); ok( !$ArrayRef_or_HashRef->check( sub { } ), '... (ArrayRef | HashRef) cannot accept code refs' ); ok( !$ArrayRef_or_HashRef->check(50), '... (ArrayRef | HashRef) cannot accept Numbers' ); diag $ArrayRef_or_HashRef->validate( [] ); ok( !defined( $ArrayRef_or_HashRef->validate( [] ) ), '... (ArrayRef | HashRef) can accept []' ); ok( !defined( $ArrayRef_or_HashRef->validate( {} ) ), '... (ArrayRef | HashRef) can accept {}' ); like( $ArrayRef_or_HashRef->validate( \( my $var2 ) ), qr/Validation failed for \'ArrayRef\' with value .+ and Validation failed for \'HashRef\' with value .+ in \(ArrayRef\|HashRef\)/, '... (ArrayRef | HashRef) cannot accept scalar refs' ); like( $ArrayRef_or_HashRef->validate( sub { } ), qr/Validation failed for \'ArrayRef\' with value .+ and Validation failed for \'HashRef\' with value .+ in \(ArrayRef\|HashRef\)/, '... (ArrayRef | HashRef) cannot accept code refs' ); is( $ArrayRef_or_HashRef->validate(50), 'Validation failed for \'ArrayRef\' with value 50 and Validation failed for \'HashRef\' with value 50 in (ArrayRef|HashRef)', '... (ArrayRef | HashRef) cannot accept Numbers' ); is( $ArrayRef_or_HashRef->parent, find_type_constraint('Ref'), 'parent of ArrayRef|HashRef is Ref' ); my $double_union = Moose::Meta::TypeConstraint::Union->new( type_constraints => [ $Str_or_Undef, $ArrayRef_or_HashRef ] ); is( $double_union->parent, find_type_constraint('Item'), 'parent of (Str|Undef)|(ArrayRef|HashRef) is Item' ); ok( $double_union->is_subtype_of('Item'), '(Str|Undef)|(ArrayRef|HashRef) is a subtype of Item' ); ok( $double_union->is_a_type_of('Item'), '(Str|Undef)|(ArrayRef|HashRef) is a type of Item' ); ok( !$double_union->is_a_type_of('Str'), '(Str|Undef)|(ArrayRef|HashRef) is not a type of Str' ); type 'SomeType', where { 1 }; type 'OtherType', where { 1 }; my $parentless_union = Moose::Meta::TypeConstraint::Union->new( type_constraints => [ find_type_constraint('SomeType'), find_type_constraint('OtherType'), ], ); is($parentless_union->parent, undef, "no common ancestor gives undef parent"); done_testing; Moose-2.1604/t/type_constraints/union_types_and_coercions.t000644 000766 000024 00000010415 12617452415 024455 0ustar00etherstaff000000 000000 use strict; use warnings; use Test::More; use Test::Fatal; use Test::Requires qw(IO::String IO::File); # skip all if not installed { package Email::Moose; use Moose; use Moose::Util::TypeConstraints; use IO::String; our $VERSION = '0.01'; # create subtype for IO::String subtype 'IO::String' => as 'Object' => where { $_->isa('IO::String') }; coerce 'IO::String' => from 'Str' => via { IO::String->new($_) }, => from 'ScalarRef', => via { IO::String->new($_) }; # create subtype for IO::File subtype 'IO::File' => as 'Object' => where { $_->isa('IO::File') }; coerce 'IO::File' => from 'FileHandle' => via { bless $_, 'IO::File' }; # create the alias subtype 'IO::StringOrFile' => as 'IO::String | IO::File'; # attributes has 'raw_body' => ( is => 'rw', isa => 'IO::StringOrFile', coerce => 1, default => sub { IO::String->new() }, ); sub as_string { my ($self) = @_; my $fh = $self->raw_body(); return do { local $/; <$fh> }; } } { my $email = Email::Moose->new; isa_ok($email, 'Email::Moose'); isa_ok($email->raw_body, 'IO::String'); is($email->as_string, undef, '... got correct empty string'); } { my $email = Email::Moose->new(raw_body => '... this is my body ...'); isa_ok($email, 'Email::Moose'); isa_ok($email->raw_body, 'IO::String'); is($email->as_string, '... this is my body ...', '... got correct string'); is( exception { $email->raw_body('... this is the next body ...'); }, undef, '... this will coerce correctly' ); isa_ok($email->raw_body, 'IO::String'); is($email->as_string, '... this is the next body ...', '... got correct string'); } { my $str = '... this is my body (ref) ...'; my $email = Email::Moose->new(raw_body => \$str); isa_ok($email, 'Email::Moose'); isa_ok($email->raw_body, 'IO::String'); is($email->as_string, $str, '... got correct string'); my $str2 = '... this is the next body (ref) ...'; is( exception { $email->raw_body(\$str2); }, undef, '... this will coerce correctly' ); isa_ok($email->raw_body, 'IO::String'); is($email->as_string, $str2, '... got correct string'); } { my $io_str = IO::String->new('... this is my body (IO::String) ...'); my $email = Email::Moose->new(raw_body => $io_str); isa_ok($email, 'Email::Moose'); isa_ok($email->raw_body, 'IO::String'); is($email->raw_body, $io_str, '... and it is the one we expected'); is($email->as_string, '... this is my body (IO::String) ...', '... got correct string'); my $io_str2 = IO::String->new('... this is the next body (IO::String) ...'); is( exception { $email->raw_body($io_str2); }, undef, '... this will coerce correctly' ); isa_ok($email->raw_body, 'IO::String'); is($email->raw_body, $io_str2, '... and it is the one we expected'); is($email->as_string, '... this is the next body (IO::String) ...', '... got correct string'); } { my $fh; open($fh, '<', $0) || die "Could not open $0"; my $email = Email::Moose->new(raw_body => $fh); isa_ok($email, 'Email::Moose'); isa_ok($email->raw_body, 'IO::File'); close($fh); } { my $fh = IO::File->new($0); my $email = Email::Moose->new(raw_body => $fh); isa_ok($email, 'Email::Moose'); isa_ok($email->raw_body, 'IO::File'); is($email->raw_body, $fh, '... and it is the one we expected'); } { package Foo; use Moose; use Moose::Util::TypeConstraints; subtype 'Coerced' => as 'ArrayRef'; coerce 'Coerced' => from 'Value' => via { [ $_ ] }; has carray => ( is => 'ro', isa => 'Coerced | Coerced', coerce => 1, ); } { my $foo; is( exception { $foo = Foo->new( carray => 1 ) }, undef, 'Can pass non-ref value for carray' ); is_deeply( $foo->carray, [1], 'carray was coerced to an array ref' ); like( exception { Foo->new( carray => {} ) }, qr/\QValidation failed for 'Coerced|Coerced' with value \E(?!undef)/, 'Cannot pass a hash ref for carray attribute, and hash ref is not coerced to an undef' ); } done_testing; Moose-2.1604/t/type_constraints/util_find_type_constraint.t000644 000766 000024 00000001155 12617452415 024476 0ustar00etherstaff000000 000000 use strict; use warnings; use Test::More; use Moose::Util::TypeConstraints; foreach my $type_name (qw( Any Item Bool Undef Defined Value Num Int Str Ref ScalarRef ArrayRef HashRef CodeRef RegexpRef Object )) { is(find_type_constraint($type_name)->name, $type_name, '... got the right name for ' . $type_name); } # TODO: # add tests for is_subtype_of which confirm the hierarchy done_testing; Moose-2.1604/t/type_constraints/util_more_type_coercion.t000644 000766 000024 00000007002 12617452415 024132 0ustar00etherstaff000000 000000 use strict; use warnings; use Test::More; use Test::Fatal; { package HTTPHeader; use Moose; use Moose::Util::TypeConstraints; coerce 'HTTPHeader' => from ArrayRef => via { HTTPHeader->new(array => $_[0]) }; coerce 'HTTPHeader' => from HashRef => via { HTTPHeader->new(hash => $_[0]) }; has 'array' => (is => 'ro'); has 'hash' => (is => 'ro'); package Engine; use strict; use warnings; use Moose; has 'header' => (is => 'rw', isa => 'HTTPHeader', coerce => 1); } { my $engine = Engine->new(); isa_ok($engine, 'Engine'); # try with arrays is( exception { $engine->header([ 1, 2, 3 ]); }, undef, '... type was coerced without incident' ); isa_ok($engine->header, 'HTTPHeader'); is_deeply( $engine->header->array, [ 1, 2, 3 ], '... got the right array value of the header'); ok(!defined($engine->header->hash), '... no hash value set'); # try with hash is( exception { $engine->header({ one => 1, two => 2, three => 3 }); }, undef, '... type was coerced without incident' ); isa_ok($engine->header, 'HTTPHeader'); is_deeply( $engine->header->hash, { one => 1, two => 2, three => 3 }, '... got the right hash value of the header'); ok(!defined($engine->header->array), '... no array value set'); isnt( exception { $engine->header("Foo"); }, undef, '... dies with the wrong type, even after coercion' ); is( exception { $engine->header(HTTPHeader->new); }, undef, '... lives with the right type, even after coercion' ); } { my $engine = Engine->new(header => [ 1, 2, 3 ]); isa_ok($engine, 'Engine'); isa_ok($engine->header, 'HTTPHeader'); is_deeply( $engine->header->array, [ 1, 2, 3 ], '... got the right array value of the header'); ok(!defined($engine->header->hash), '... no hash value set'); } { my $engine = Engine->new(header => { one => 1, two => 2, three => 3 }); isa_ok($engine, 'Engine'); isa_ok($engine->header, 'HTTPHeader'); is_deeply( $engine->header->hash, { one => 1, two => 2, three => 3 }, '... got the right hash value of the header'); ok(!defined($engine->header->array), '... no array value set'); } { my $engine = Engine->new(header => HTTPHeader->new()); isa_ok($engine, 'Engine'); isa_ok($engine->header, 'HTTPHeader'); ok(!defined($engine->header->hash), '... no hash value set'); ok(!defined($engine->header->array), '... no array value set'); } isnt( exception { Engine->new(header => 'Foo'); }, undef, '... dies correctly with bad params' ); isnt( exception { Engine->new(header => \(my $var)); }, undef, '... dies correctly with bad params' ); { my $tc = Moose::Util::TypeConstraints::find_type_constraint('HTTPHeader'); isa_ok($tc, 'Moose::Meta::TypeConstraint', 'HTTPHeader TC'); my $from_aref = $tc->assert_coerce([ 1, 2, 3 ]); isa_ok($from_aref, 'HTTPHeader', 'assert_coerce from aref to HTTPHeader'); is_deeply($from_aref->array, [ 1, 2, 3 ], '...and has the right guts'); my $from_href = $tc->assert_coerce({ a => 1 }); isa_ok($from_href, 'HTTPHeader', 'assert_coerce from href to HTTPHeader'); is_deeply($from_href->hash, { a => 1 }, '...and has the right guts'); like( exception { $tc->assert_coerce('total garbage') }, qr/Validation failed for .HTTPHeader./, "assert_coerce throws if result is not acceptable" ); } done_testing; Moose-2.1604/t/type_constraints/util_std_type_constraints.t000644 000766 000024 00000070101 12617452415 024530 0ustar00etherstaff000000 000000 use strict; use warnings; use Test::Fatal; use Test::More; use Eval::Closure; use IO::File; use Moose::Util::TypeConstraints; use Scalar::Util qw( blessed openhandle ); my $ZERO = 0; my $ONE = 1; my $INT = 100; my $NEG_INT = -100; my $NUM = 42.42; my $NEG_NUM = -42.42; my $EMPTY_STRING = q{}; my $STRING = 'foo'; my $NUM_IN_STRING = 'has 42 in it'; my $INT_WITH_NL1 = "1\n"; my $INT_WITH_NL2 = "\n1"; my $SCALAR_REF = \( my $var ); my $SCALAR_REF_REF = \$SCALAR_REF; my $ARRAY_REF = []; my $HASH_REF = {}; my $CODE_REF = sub { }; my $GLOB = do { no warnings 'once'; *GLOB_REF }; my $GLOB_REF = \$GLOB; open my $FH, '<', $0 or die "Could not open $0 for the test"; my $FH_OBJECT = IO::File->new( $0, 'r' ) or die "Could not open $0 for the test"; my $REGEX = qr/../; my $REGEX_OBJ = bless qr/../, 'BlessedQR'; my $FAKE_REGEX = bless {}, 'Regexp'; my $OBJECT = bless {}, 'Foo'; my $UNDEF = undef; { package Thing; sub foo { } } my $CLASS_NAME = 'Thing'; { package Role; use Moose::Role; sub foo { } } my $ROLE_NAME = 'Role'; my %tests = ( Any => { accept => [ $ZERO, $ONE, $INT, $NEG_INT, $NUM, $NEG_NUM, $EMPTY_STRING, $STRING, $NUM_IN_STRING, $INT_WITH_NL1, $INT_WITH_NL2, $SCALAR_REF, $SCALAR_REF_REF, $ARRAY_REF, $HASH_REF, $CODE_REF, $GLOB, $GLOB_REF, $FH, $FH_OBJECT, $REGEX, $REGEX_OBJ, $FAKE_REGEX, $OBJECT, $UNDEF, ], }, Item => { accept => [ $ZERO, $ONE, $INT, $NEG_INT, $NUM, $NEG_NUM, $EMPTY_STRING, $STRING, $NUM_IN_STRING, $INT_WITH_NL1, $INT_WITH_NL2, $SCALAR_REF, $SCALAR_REF_REF, $ARRAY_REF, $HASH_REF, $CODE_REF, $GLOB, $GLOB_REF, $FH, $FH_OBJECT, $REGEX, $REGEX_OBJ, $FAKE_REGEX, $OBJECT, $UNDEF, ], }, Defined => { accept => [ $ZERO, $ONE, $INT, $NEG_INT, $NUM, $NEG_NUM, $EMPTY_STRING, $STRING, $NUM_IN_STRING, $INT_WITH_NL1, $INT_WITH_NL2, $SCALAR_REF, $SCALAR_REF_REF, $ARRAY_REF, $HASH_REF, $CODE_REF, $GLOB, $GLOB_REF, $FH, $FH_OBJECT, $REGEX, $REGEX_OBJ, $FAKE_REGEX, $OBJECT, ], reject => [ $UNDEF, ], }, Undef => { accept => [ $UNDEF, ], reject => [ $ZERO, $ONE, $INT, $NEG_INT, $NUM, $NEG_NUM, $EMPTY_STRING, $STRING, $NUM_IN_STRING, $INT_WITH_NL1, $INT_WITH_NL2, $SCALAR_REF, $SCALAR_REF_REF, $ARRAY_REF, $HASH_REF, $CODE_REF, $GLOB, $GLOB_REF, $FH, $FH_OBJECT, $REGEX, $REGEX_OBJ, $FAKE_REGEX, $OBJECT, ], }, Bool => { accept => [ $ZERO, $ONE, $EMPTY_STRING, $UNDEF, ], reject => [ $INT, $NEG_INT, $NUM, $NEG_NUM, $STRING, $NUM_IN_STRING, $INT_WITH_NL1, $INT_WITH_NL2, $SCALAR_REF, $SCALAR_REF_REF, $ARRAY_REF, $HASH_REF, $CODE_REF, $GLOB, $GLOB_REF, $FH, $FH_OBJECT, $REGEX, $REGEX_OBJ, $FAKE_REGEX, $OBJECT, ], }, Maybe => { accept => [ $ZERO, $ONE, $INT, $NEG_INT, $NUM, $NEG_NUM, $EMPTY_STRING, $STRING, $NUM_IN_STRING, $INT_WITH_NL1, $INT_WITH_NL2, $SCALAR_REF, $SCALAR_REF_REF, $ARRAY_REF, $HASH_REF, $CODE_REF, $GLOB, $GLOB_REF, $FH, $FH_OBJECT, $REGEX, $REGEX_OBJ, $FAKE_REGEX, $OBJECT, $UNDEF, ], }, Value => { accept => [ $ZERO, $ONE, $INT, $NEG_INT, $NUM, $NEG_NUM, $EMPTY_STRING, $STRING, $NUM_IN_STRING, $INT_WITH_NL1, $INT_WITH_NL2, $GLOB, ], reject => [ $SCALAR_REF, $SCALAR_REF_REF, $ARRAY_REF, $HASH_REF, $CODE_REF, $GLOB_REF, $FH, $FH_OBJECT, $REGEX, $REGEX_OBJ, $FAKE_REGEX, $OBJECT, $UNDEF, ], }, Ref => { accept => [ $SCALAR_REF, $SCALAR_REF_REF, $ARRAY_REF, $HASH_REF, $CODE_REF, $GLOB_REF, $FH, $FH_OBJECT, $REGEX, $REGEX_OBJ, $FAKE_REGEX, $OBJECT, ], reject => [ $ZERO, $ONE, $INT, $NEG_INT, $NUM, $NEG_NUM, $EMPTY_STRING, $STRING, $NUM_IN_STRING, $INT_WITH_NL1, $INT_WITH_NL2, $GLOB, $UNDEF, ], }, Num => { accept => [ $ZERO, $ONE, $INT, $NEG_INT, $NUM, $NEG_NUM, ], reject => [ $EMPTY_STRING, $STRING, $NUM_IN_STRING, $SCALAR_REF, $SCALAR_REF_REF, $ARRAY_REF, $HASH_REF, $CODE_REF, $GLOB, $GLOB_REF, $FH, $FH_OBJECT, $REGEX, $REGEX_OBJ, $FAKE_REGEX, $OBJECT, $UNDEF, $INT_WITH_NL1, $INT_WITH_NL2, ], }, Int => { accept => [ $ZERO, $ONE, $INT, $NEG_INT, ], reject => [ $NUM, $NEG_NUM, $EMPTY_STRING, $STRING, $NUM_IN_STRING, $INT_WITH_NL1, $INT_WITH_NL2, $SCALAR_REF, $SCALAR_REF_REF, $ARRAY_REF, $HASH_REF, $CODE_REF, $GLOB, $GLOB_REF, $FH, $FH_OBJECT, $REGEX, $REGEX_OBJ, $FAKE_REGEX, $OBJECT, $UNDEF, ], }, Str => { accept => [ $ZERO, $ONE, $INT, $NEG_INT, $NUM, $NEG_NUM, $EMPTY_STRING, $STRING, $NUM_IN_STRING, $INT_WITH_NL1, $INT_WITH_NL2, ], reject => [ $SCALAR_REF, $SCALAR_REF_REF, $ARRAY_REF, $HASH_REF, $CODE_REF, $GLOB, $GLOB_REF, $FH, $FH_OBJECT, $REGEX, $REGEX_OBJ, $FAKE_REGEX, $OBJECT, $UNDEF, ], }, ScalarRef => { accept => [ $SCALAR_REF, $SCALAR_REF_REF, ], reject => [ $ZERO, $ONE, $INT, $NEG_INT, $NUM, $NEG_NUM, $EMPTY_STRING, $STRING, $NUM_IN_STRING, $INT_WITH_NL1, $INT_WITH_NL2, $ARRAY_REF, $HASH_REF, $CODE_REF, $GLOB, $GLOB_REF, $FH, $FH_OBJECT, $REGEX, $REGEX_OBJ, $FAKE_REGEX, $OBJECT, $UNDEF, ], }, ArrayRef => { accept => [ $ARRAY_REF, ], reject => [ $ZERO, $ONE, $INT, $NEG_INT, $NUM, $NEG_NUM, $EMPTY_STRING, $STRING, $NUM_IN_STRING, $INT_WITH_NL1, $INT_WITH_NL2, $SCALAR_REF, $SCALAR_REF_REF, $HASH_REF, $CODE_REF, $GLOB, $GLOB_REF, $FH, $FH_OBJECT, $REGEX, $REGEX_OBJ, $FAKE_REGEX, $OBJECT, $UNDEF, ], }, HashRef => { accept => [ $HASH_REF, ], reject => [ $ZERO, $ONE, $INT, $NEG_INT, $NUM, $NEG_NUM, $EMPTY_STRING, $STRING, $NUM_IN_STRING, $INT_WITH_NL1, $INT_WITH_NL2, $SCALAR_REF, $SCALAR_REF_REF, $ARRAY_REF, $CODE_REF, $GLOB, $GLOB_REF, $FH, $FH_OBJECT, $REGEX, $REGEX_OBJ, $FAKE_REGEX, $OBJECT, $UNDEF, ], }, CodeRef => { accept => [ $CODE_REF, ], reject => [ $ZERO, $ONE, $INT, $NEG_INT, $NUM, $NEG_NUM, $EMPTY_STRING, $STRING, $NUM_IN_STRING, $INT_WITH_NL1, $INT_WITH_NL2, $SCALAR_REF, $SCALAR_REF_REF, $ARRAY_REF, $HASH_REF, $GLOB, $GLOB_REF, $FH, $FH_OBJECT, $REGEX, $REGEX_OBJ, $FAKE_REGEX, $OBJECT, $UNDEF, ], }, RegexpRef => { accept => [ $REGEX, $REGEX_OBJ, ], reject => [ $ZERO, $ONE, $INT, $NEG_INT, $NUM, $NEG_NUM, $EMPTY_STRING, $STRING, $NUM_IN_STRING, $INT_WITH_NL1, $INT_WITH_NL2, $SCALAR_REF, $SCALAR_REF_REF, $ARRAY_REF, $HASH_REF, $CODE_REF, $GLOB, $GLOB_REF, $FH, $FH_OBJECT, $OBJECT, $UNDEF, $FAKE_REGEX, ], }, GlobRef => { accept => [ $GLOB_REF, $FH, ], reject => [ $ZERO, $ONE, $INT, $NEG_INT, $NUM, $NEG_NUM, $EMPTY_STRING, $STRING, $NUM_IN_STRING, $INT_WITH_NL1, $INT_WITH_NL2, $SCALAR_REF, $SCALAR_REF_REF, $ARRAY_REF, $HASH_REF, $CODE_REF, $GLOB, $FH_OBJECT, $OBJECT, $REGEX, $REGEX_OBJ, $FAKE_REGEX, $UNDEF, ], }, FileHandle => { accept => [ $FH, $FH_OBJECT, ], reject => [ $ZERO, $ONE, $INT, $NEG_INT, $NUM, $NEG_NUM, $EMPTY_STRING, $STRING, $NUM_IN_STRING, $INT_WITH_NL1, $INT_WITH_NL2, $SCALAR_REF, $SCALAR_REF_REF, $ARRAY_REF, $HASH_REF, $CODE_REF, $GLOB, $GLOB_REF, $OBJECT, $REGEX, $REGEX_OBJ, $FAKE_REGEX, $UNDEF, ], }, Object => { accept => [ $FH_OBJECT, $REGEX, $REGEX_OBJ, $FAKE_REGEX, $OBJECT, ], reject => [ $ZERO, $ONE, $INT, $NEG_INT, $NUM, $NEG_NUM, $EMPTY_STRING, $STRING, $NUM_IN_STRING, $INT_WITH_NL1, $INT_WITH_NL2, $SCALAR_REF, $SCALAR_REF_REF, $ARRAY_REF, $HASH_REF, $CODE_REF, $GLOB, $GLOB_REF, $FH, $UNDEF, ], }, ClassName => { accept => [ $CLASS_NAME, $ROLE_NAME, ], reject => [ $ZERO, $ONE, $INT, $NEG_INT, $NUM, $NEG_NUM, $EMPTY_STRING, $STRING, $NUM_IN_STRING, $INT_WITH_NL1, $INT_WITH_NL2, $SCALAR_REF, $SCALAR_REF_REF, $ARRAY_REF, $HASH_REF, $CODE_REF, $GLOB, $GLOB_REF, $FH, $FH_OBJECT, $REGEX, $REGEX_OBJ, $FAKE_REGEX, $OBJECT, $UNDEF, ], }, RoleName => { accept => [ $ROLE_NAME, ], reject => [ $CLASS_NAME, $ZERO, $ONE, $INT, $NEG_INT, $NUM, $NEG_NUM, $EMPTY_STRING, $STRING, $NUM_IN_STRING, $INT_WITH_NL1, $INT_WITH_NL2, $SCALAR_REF, $SCALAR_REF_REF, $ARRAY_REF, $HASH_REF, $CODE_REF, $GLOB, $GLOB_REF, $FH, $FH_OBJECT, $REGEX, $REGEX_OBJ, $FAKE_REGEX, $OBJECT, $UNDEF, ], }, ); for my $name ( sort keys %tests ) { test_constraint( $name, $tests{$name} ); test_constraint( Moose::Util::TypeConstraints::find_or_create_type_constraint( "$name|$name"), $tests{$name} ); } my %substr_test_str = ( ClassName => 'x' . $CLASS_NAME, RoleName => 'x' . $ROLE_NAME, ); # We need to test that the Str constraint (and types that derive from it) # accept the return val of substr() - which means passing that return val # directly to the checking code foreach my $type_name (qw(Str Num Int ClassName RoleName)) { my $str = $substr_test_str{$type_name} || '123456789'; my $type = Moose::Util::TypeConstraints::find_type_constraint($type_name); my $unoptimized = $type->has_parent ? $type->_compile_subtype( $type->constraint ) : $type->_compile_type( $type->constraint ); my $inlined; { $inlined = eval_closure( source => 'sub { ( ' . $type->_inline_check('$_[0]') . ' ) }', ); } ok( $type->check( substr( $str, 1, 5 ) ), $type_name . ' accepts return val from substr using ->check' ); ok( $unoptimized->( substr( $str, 1, 5 ) ), $type_name . ' accepts return val from substr using unoptimized constraint' ); ok( $inlined->( substr( $str, 1, 5 ) ), $type_name . ' accepts return val from substr using inlined constraint' ); # only Str accepts empty strings. next unless $type_name eq 'Str'; ok( $type->check( substr( $str, 0, 0 ) ), $type_name . ' accepts empty return val from substr using ->check' ); ok( $unoptimized->( substr( $str, 0, 0 ) ), $type_name . ' accepts empty return val from substr using unoptimized constraint' ); ok( $inlined->( substr( $str, 0, 0 ) ), $type_name . ' accepts empty return val from substr using inlined constraint' ); } { my $class_tc = class_type('Thing'); test_constraint( $class_tc, { accept => [ ( bless {}, 'Thing' ), ], reject => [ 'Thing', $ZERO, $ONE, $INT, $NEG_INT, $NUM, $NEG_NUM, $EMPTY_STRING, $STRING, $NUM_IN_STRING, $INT_WITH_NL1, $INT_WITH_NL2, $SCALAR_REF, $SCALAR_REF_REF, $ARRAY_REF, $HASH_REF, $CODE_REF, $GLOB, $GLOB_REF, $FH, $FH_OBJECT, $REGEX, $REGEX_OBJ, $FAKE_REGEX, $OBJECT, $UNDEF, ], } ); } { package Duck; sub quack { } sub flap { } } { package DuckLike; sub quack { } sub flap { } } { package Bird; sub flap { } } { my @methods = qw( quack flap ); duck_type 'Duck' => \@methods; test_constraint( 'Duck', { accept => [ ( bless {}, 'Duck' ), ( bless {}, 'DuckLike' ), ], reject => [ $ZERO, $ONE, $INT, $NEG_INT, $NUM, $NEG_NUM, $EMPTY_STRING, $STRING, $NUM_IN_STRING, $INT_WITH_NL1, $INT_WITH_NL2, $SCALAR_REF, $SCALAR_REF_REF, $ARRAY_REF, $HASH_REF, $CODE_REF, $GLOB, $GLOB_REF, $FH, $FH_OBJECT, $REGEX, $REGEX_OBJ, $FAKE_REGEX, $OBJECT, ( bless {}, 'Bird' ), $UNDEF, ], } ); } { my @allowed = qw( bar baz quux ); enum 'Enumerated' => \@allowed; test_constraint( 'Enumerated', { accept => \@allowed, reject => [ $ZERO, $ONE, $INT, $NEG_INT, $NUM, $NEG_NUM, $EMPTY_STRING, $STRING, $NUM_IN_STRING, $INT_WITH_NL1, $INT_WITH_NL2, $SCALAR_REF, $SCALAR_REF_REF, $ARRAY_REF, $HASH_REF, $CODE_REF, $GLOB, $GLOB_REF, $FH, $FH_OBJECT, $REGEX, $REGEX_OBJ, $FAKE_REGEX, $OBJECT, $UNDEF, ], } ); } { my $union = Moose::Meta::TypeConstraint::Union->new( type_constraints => [ find_type_constraint('Int'), find_type_constraint('Object'), ], ); test_constraint( $union, { accept => [ $ZERO, $ONE, $INT, $NEG_INT, $FH_OBJECT, $REGEX, $REGEX_OBJ, $FAKE_REGEX, $OBJECT, ], reject => [ $NUM, $NEG_NUM, $EMPTY_STRING, $STRING, $NUM_IN_STRING, $INT_WITH_NL1, $INT_WITH_NL2, $SCALAR_REF, $SCALAR_REF_REF, $ARRAY_REF, $HASH_REF, $CODE_REF, $GLOB, $GLOB_REF, $FH, $UNDEF, ], } ); } { note 'Anonymous Union Test'; my $union = union(['Int','Object']); test_constraint( $union, { accept => [ $ZERO, $ONE, $INT, $NEG_INT, $FH_OBJECT, $REGEX, $REGEX_OBJ, $FAKE_REGEX, $OBJECT, ], reject => [ $NUM, $NEG_NUM, $EMPTY_STRING, $STRING, $NUM_IN_STRING, $INT_WITH_NL1, $INT_WITH_NL2, $SCALAR_REF, $SCALAR_REF_REF, $ARRAY_REF, $HASH_REF, $CODE_REF, $GLOB, $GLOB_REF, $FH, $UNDEF, ], } ); } { note 'Named Union Test'; union 'NamedUnion' => ['Int','Object']; test_constraint( 'NamedUnion', { accept => [ $ZERO, $ONE, $INT, $NEG_INT, $FH_OBJECT, $REGEX, $REGEX_OBJ, $FAKE_REGEX, $OBJECT, ], reject => [ $NUM, $NEG_NUM, $EMPTY_STRING, $STRING, $NUM_IN_STRING, $INT_WITH_NL1, $INT_WITH_NL2, $SCALAR_REF, $SCALAR_REF_REF, $ARRAY_REF, $HASH_REF, $CODE_REF, $GLOB, $GLOB_REF, $FH, $UNDEF, ], } ); } { note 'Combined Union Test'; my $union = union( [ 'Int', enum( [qw[ red green blue ]] ) ] ); test_constraint( $union, { accept => [ $ZERO, $ONE, $INT, $NEG_INT, 'red', 'green', 'blue', ], reject => [ 'yellow', 'pink', $FH_OBJECT, $REGEX, $REGEX_OBJ, $FAKE_REGEX, $OBJECT, $NUM, $NEG_NUM, $EMPTY_STRING, $STRING, $NUM_IN_STRING, $INT_WITH_NL1, $INT_WITH_NL2, $SCALAR_REF, $SCALAR_REF_REF, $ARRAY_REF, $HASH_REF, $CODE_REF, $GLOB, $GLOB_REF, $FH, $UNDEF, ], } ); } { enum 'Enum1' => ['a', 'b']; enum 'Enum2' => ['x', 'y']; subtype 'EnumUnion', as 'Enum1 | Enum2'; test_constraint( 'EnumUnion', { accept => [qw( a b x y )], reject => [ $ZERO, $ONE, $INT, $NEG_INT, $NUM, $NEG_NUM, $EMPTY_STRING, $STRING, $NUM_IN_STRING, $INT_WITH_NL1, $INT_WITH_NL2, $SCALAR_REF, $SCALAR_REF_REF, $ARRAY_REF, $HASH_REF, $CODE_REF, $GLOB, $GLOB_REF, $FH, $FH_OBJECT, $REGEX, $REGEX_OBJ, $FAKE_REGEX, $OBJECT, $UNDEF, ], } ); } { package DoesRole; use Moose; with 'Role'; } # Test how $_ is used in XS implementation { local $_ = qr/./; ok( Moose::Util::TypeConstraints::Builtins::_RegexpRef(), '$_ is RegexpRef' ); ok( !Moose::Util::TypeConstraints::Builtins::_RegexpRef(1), '$_ is not read when param provided' ); $_ = bless qr/./, 'Blessed'; ok( Moose::Util::TypeConstraints::Builtins::_RegexpRef(), '$_ is RegexpRef' ); $_ = 42; ok( !Moose::Util::TypeConstraints::Builtins::_RegexpRef(), '$_ is not RegexpRef' ); ok( Moose::Util::TypeConstraints::Builtins::_RegexpRef(qr/./), '$_ is not read when param provided' ); } close $FH or warn "Could not close the filehandle $0 for test"; $FH_OBJECT->close or warn "Could not close the filehandle $0 for test"; done_testing; sub test_constraint { my $type = shift; my $tests = shift; local $Test::Builder::Level = $Test::Builder::Level + 1; unless ( blessed $type ) { $type = Moose::Util::TypeConstraints::find_type_constraint($type) or BAIL_OUT("No such type $type!"); } my $name = $type->name; my $unoptimized = $type->has_parent ? $type->_compile_subtype( $type->constraint ) : $type->_compile_type( $type->constraint ); my $inlined; if ( $type->can_be_inlined ) { $inlined = eval_closure( source => 'sub { ( ' . $type->_inline_check('$_[0]') . ' ) }', environment => $type->inline_environment, ); } my $class = Moose::Meta::Class->create_anon( superclasses => ['Moose::Object'], ); $class->add_attribute( simple => ( is => 'ro', isa => $type, ) ); $class->add_attribute( collection => ( traits => ['Array'], isa => 'ArrayRef[' . $type->name . ']', default => sub { [] }, handles => { add_to_collection => 'push' }, ) ); my $anon_class = $class->name; for my $accept ( @{ $tests->{accept} || [] } ) { my $described = describe($accept); ok( $type->check($accept), "$name accepts $described using ->check" ); ok( $unoptimized->($accept), "$name accepts $described using unoptimized constraint" ); if ($inlined) { ok( $inlined->($accept), "$name accepts $described using inlined constraint" ); } is( exception { $anon_class->new( simple => $accept ); }, undef, "no exception passing $described to constructor with $name" ); is( exception { $anon_class->new()->add_to_collection($accept); }, undef, "no exception passing $described to native trait push method with $name" ); } for my $reject ( @{ $tests->{reject} || [] } ) { my $described = describe($reject); ok( !$type->check($reject), "$name rejects $described using ->check" ); ok( !$unoptimized->($reject), "$name rejects $described using unoptimized constraint" ); if ($inlined) { ok( !$inlined->($reject), "$name rejects $described using inlined constraint" ); } ok( exception { $anon_class->new( simple => $reject ); }, "got exception passing $described to constructor with $name" ); ok( exception { $anon_class->new()->add_to_collection($reject); }, "got exception passing $described to native trait push method with $name" ); } } sub describe { my $val = shift; return 'undef' unless defined $val; if ( !ref $val ) { return q{''} if $val eq q{}; $val =~ s/\n/\\n/g; return $val; } return 'open filehandle' if openhandle $val && !blessed $val; return blessed $val ? ( ref $val ) . ' object' : ( ref $val ) . ' reference'; } Moose-2.1604/t/type_constraints/util_type_coercion.t000644 000766 000024 00000004650 12617452415 023116 0ustar00etherstaff000000 000000 use strict; use warnings; use Test::More; use Test::Fatal; use Moose::Util::TypeConstraints; { package HTTPHeader; use Moose; has 'array' => (is => 'ro'); has 'hash' => (is => 'ro'); } subtype Header => => as Object => where { $_->isa('HTTPHeader') }; coerce Header => from ArrayRef => via { HTTPHeader->new(array => $_[0]) } => from HashRef => via { HTTPHeader->new(hash => $_[0]) }; Moose::Util::TypeConstraints->export_type_constraints_as_functions(); my $header = HTTPHeader->new(); isa_ok($header, 'HTTPHeader'); ok(Header($header), '... this passed the type test'); ok(!Header([]), '... this did not pass the type test'); ok(!Header({}), '... this did not pass the type test'); my $anon_type = subtype Object => where { $_->isa('HTTPHeader') }; is( exception { coerce $anon_type => from ArrayRef => via { HTTPHeader->new(array => $_[0]) } => from HashRef => via { HTTPHeader->new(hash => $_[0]) }; }, undef, 'coercion of anonymous subtype succeeds' ); foreach my $coercion ( find_type_constraint('Header')->coercion, $anon_type->coercion ) { isa_ok($coercion, 'Moose::Meta::TypeCoercion'); { my $coerced = $coercion->coerce([ 1, 2, 3 ]); isa_ok($coerced, 'HTTPHeader'); is_deeply( $coerced->array(), [ 1, 2, 3 ], '... got the right array'); is($coerced->hash(), undef, '... nothing assigned to the hash'); } { my $coerced = $coercion->coerce({ one => 1, two => 2, three => 3 }); isa_ok($coerced, 'HTTPHeader'); is_deeply( $coerced->hash(), { one => 1, two => 2, three => 3 }, '... got the right hash'); is($coerced->array(), undef, '... nothing assigned to the array'); } { my $scalar_ref = \(my $var); my $coerced = $coercion->coerce($scalar_ref); is($coerced, $scalar_ref, '... got back what we put in'); } { my $coerced = $coercion->coerce("Foo"); is($coerced, "Foo", '... got back what we put in'); } } subtype 'StrWithTrailingX' => as 'Str' => where { /X$/ }; coerce 'StrWithTrailingX' => from 'Str' => via { $_ . 'X' }; my $tc = find_type_constraint('StrWithTrailingX'); is($tc->coerce("foo"), "fooX", "coerce when needed"); is($tc->coerce("fooX"), "fooX", "do not coerce when unneeded"); done_testing; Moose-2.1604/t/type_constraints/util_type_constraints.t000644 000766 000024 00000020203 12617452415 023654 0ustar00etherstaff000000 000000 use strict; use warnings; use Test::More; use Test::Fatal; use Scalar::Util (); use Moose::Util::TypeConstraints; type Number => where { Scalar::Util::looks_like_number($_) }; type String => where { !ref($_) && !Number($_) } => message { "This is not a string ($_)" }; subtype Natural => as Number => where { $_ > 0 }; subtype NaturalLessThanTen => as Natural => where { $_ < 10 } => message { "The number '$_' is not less than 10" }; Moose::Util::TypeConstraints->export_type_constraints_as_functions(); ok(Number(5), '... this is a Num'); ok(!defined(Number('Foo')), '... this is not a Num'); { my $number_tc = Moose::Util::TypeConstraints::find_type_constraint('Number'); is("$number_tc", 'Number', '... type constraint stringifies to name'); } ok(String('Foo'), '... this is a Str'); ok(!defined(String(5)), '... this is not a Str'); ok(Natural(5), '... this is a Natural'); is(Natural(-5), undef, '... this is not a Natural'); is(Natural('Foo'), undef, '... this is not a Natural'); ok(NaturalLessThanTen(5), '... this is a NaturalLessThanTen'); is(NaturalLessThanTen(12), undef, '... this is not a NaturalLessThanTen'); is(NaturalLessThanTen(-5), undef, '... this is not a NaturalLessThanTen'); is(NaturalLessThanTen('Foo'), undef, '... this is not a NaturalLessThanTen'); # anon sub-typing my $negative = subtype Number => where { $_ < 0 }; ok(defined $negative, '... got a value back from negative'); isa_ok($negative, 'Moose::Meta::TypeConstraint'); ok($negative->check(-5), '... this is a negative number'); ok(!defined($negative->check(5)), '... this is not a negative number'); is($negative->check('Foo'), undef, '... this is not a negative number'); ok($negative->is_subtype_of('Number'), '... $negative is a subtype of Number'); ok(!$negative->is_subtype_of('String'), '... $negative is not a subtype of String'); my $negative2 = subtype Number => where { $_ < 0 } => message {"$_ is not a negative number"}; ok(defined $negative2, '... got a value back from negative'); isa_ok($negative2, 'Moose::Meta::TypeConstraint'); ok($negative2->check(-5), '... this is a negative number'); ok(!defined($negative2->check(5)), '... this is not a negative number'); is($negative2->check('Foo'), undef, '... this is not a negative number'); ok($negative2->is_subtype_of('Number'), '... $negative2 is a subtype of Number'); ok(!$negative2->is_subtype_of('String'), '... $negative is not a subtype of String'); ok($negative2->has_message, '... it has a message'); is($negative2->validate(2), '2 is not a negative number', '... validated unsuccessfully (got error)'); # check some meta-details my $natural_less_than_ten = find_type_constraint('NaturalLessThanTen'); isa_ok($natural_less_than_ten, 'Moose::Meta::TypeConstraint'); ok($natural_less_than_ten->is_subtype_of('Natural'), '... NaturalLessThanTen is subtype of Natural'); ok($natural_less_than_ten->is_subtype_of('Number'), '... NaturalLessThanTen is subtype of Number'); ok(!$natural_less_than_ten->is_subtype_of('String'), '... NaturalLessThanTen is not subtype of String'); ok($natural_less_than_ten->has_message, '... it has a message'); ok(!defined($natural_less_than_ten->validate(5)), '... validated successfully (no error)'); is($natural_less_than_ten->validate(15), "The number '15' is not less than 10", '... validated unsuccessfully (got error)'); my $natural = find_type_constraint('Natural'); isa_ok($natural, 'Moose::Meta::TypeConstraint'); ok($natural->is_subtype_of('Number'), '... Natural is a subtype of Number'); ok(!$natural->is_subtype_of('String'), '... Natural is not a subtype of String'); ok(!$natural->has_message, '... it does not have a message'); ok(!defined($natural->validate(5)), '... validated successfully (no error)'); is($natural->validate(-5), "Validation failed for 'Natural' with value -5", '... validated unsuccessfully (got error)'); my $string = find_type_constraint('String'); isa_ok($string, 'Moose::Meta::TypeConstraint'); ok($string->has_message, '... it does have a message'); ok(!defined($string->validate("Five")), '... validated successfully (no error)'); is($string->validate(5), "This is not a string (5)", '... validated unsuccessfully (got error)'); is( exception { Moose::Meta::Attribute->new('bob', isa => 'Spong') }, undef, 'meta-attr construction ok even when type constraint utils loaded first' ); # Test type constraint predicate return values. foreach my $predicate (qw/equals is_subtype_of is_a_type_of/) { ok( !defined $string->$predicate('DoesNotExist'), "$predicate predicate returns undef for non existant constraint"); } # Test adding things which don't look like types to the registry throws an exception my $r = Moose::Util::TypeConstraints->get_type_constraint_registry; like( exception {$r->add_type_constraint()}, qr/not a valid type constraint/, '->add_type_constraint(undef) throws' ); like( exception {$r->add_type_constraint('foo')}, qr/not a valid type constraint/, '->add_type_constraint("foo") throws' ); like( exception {$r->add_type_constraint(bless {}, 'SomeClass')}, qr/not a valid type constraint/, '->add_type_constraint(SomeClass->new) throws' ); # Test some specific things that in the past did not work, # specifically weird variations on anon subtypes. { my $subtype = subtype as 'Str'; isa_ok( $subtype, 'Moose::Meta::TypeConstraint', 'got an anon subtype' ); is( $subtype->parent->name, 'Str', 'parent is Str' ); # This test sucks but is the best we can do is( $subtype->constraint->(), 1, 'subtype has the null constraint' ); ok( ! $subtype->has_message, 'subtype has no message' ); } { my $subtype = subtype as 'ArrayRef[Num|Str]'; isa_ok( $subtype, 'Moose::Meta::TypeConstraint', 'got an anon subtype' ); is( $subtype->parent->name, 'ArrayRef[Num|Str]', 'parent is ArrayRef[Num|Str]' ); ok( ! $subtype->has_message, 'subtype has no message' ); } { my $subtype = subtype 'ArrayRef[Num|Str]' => message { 'foo' }; isa_ok( $subtype, 'Moose::Meta::TypeConstraint', 'got an anon subtype' ); is( $subtype->parent->name, 'ArrayRef[Num|Str]', 'parent is ArrayRef[Num|Str]' ); ok( $subtype->has_message, 'subtype does have a message' ); } # alternative sugar-less calling style which is documented as legit: { my $subtype = subtype( 'MyStr', { as => 'Str' } ); isa_ok( $subtype, 'Moose::Meta::TypeConstraint', 'got a subtype' ); is( $subtype->name, 'MyStr', 'name is MyStr' ); is( $subtype->parent->name, 'Str', 'parent is Str' ); } { my $subtype = subtype( { as => 'Str' } ); isa_ok( $subtype, 'Moose::Meta::TypeConstraint', 'got a subtype' ); is( $subtype->name, '__ANON__', 'name is __ANON__' ); is( $subtype->parent->name, 'Str', 'parent is Str' ); } { my $subtype = subtype( { as => 'Str', where => sub { /X/ } } ); isa_ok( $subtype, 'Moose::Meta::TypeConstraint', 'got a subtype' ); is( $subtype->name, '__ANON__', 'name is __ANON__' ); is( $subtype->parent->name, 'Str', 'parent is Str' ); ok( $subtype->check('FooX'), 'constraint accepts FooX' ); ok( ! $subtype->check('Foo'), 'constraint reject Foo' ); } { like( exception { subtype 'Foo' }, qr/cannot consist solely of a name/, 'Cannot call subtype with a single string argument' ); } { my $subtype = subtype( { as => 'Num' } ); isa_ok( $subtype, 'Moose::Meta::TypeConstraint', 'got a subtype' ); my @rejects = ( 'nan', 'inf', 'infinity', 'Infinity', 'NaN', 'INF', ' 1234 ', ' 123.44 ', ' 13e7 ', 'hello', "1e3\n", "52563\n", "123.4\n", '0.', "0 but true", undef ); my @accepts = ( '123', '123.4367', '3322', '13e7', '0', '0.0', '.0', .0, 0.0, 123, 13e6, 123.4367, 10.5 ); for( @rejects ) { my $printable = defined $_ ? $_ : "(undef)"; ok( !$subtype->check($_), "constraint rejects $printable" ) } ok( $subtype->check($_), "constraint accepts $_" ) for @accepts; } done_testing; Moose-2.1604/t/type_constraints/util_type_constraints_export.t000644 000766 000024 00000001127 12617452416 025262 0ustar00etherstaff000000 000000 use strict; use warnings; use Test::More; { package Foo; use Moose::Util::TypeConstraints; eval { type MyRef => where { ref($_) }; }; ::ok( !$@, '... successfully exported &type to Foo package' ); eval { subtype MyArrayRef => as MyRef => where { ref($_) eq 'ARRAY' }; }; ::ok( !$@, '... successfully exported &subtype to Foo package' ); Moose::Util::TypeConstraints->export_type_constraints_as_functions(); ::ok( MyRef( {} ), '... Ref worked correctly' ); ::ok( MyArrayRef( [] ), '... ArrayRef worked correctly' ); } done_testing; Moose-2.1604/t/type_constraints/util_type_reloading.t000644 000766 000024 00000000714 12617452415 023256 0ustar00etherstaff000000 000000 use strict; use warnings; use lib 't/lib'; use Test::More; $SIG{__WARN__} = sub { 0 }; eval { require Foo; }; ok(!$@, '... loaded Foo successfully') || diag $@; delete $INC{'Foo.pm'}; eval { require Foo; }; ok(!$@, '... re-loaded Foo successfully') || diag $@; eval { require Bar; }; ok(!$@, '... loaded Bar successfully') || diag $@; delete $INC{'Bar.pm'}; eval { require Bar; }; ok(!$@, '... re-loaded Bar successfully') || diag $@; done_testing; Moose-2.1604/t/type_constraints/with-specio.t000644 000766 000024 00000012552 12617452415 021452 0ustar00etherstaff000000 000000 use strict; use warnings; use Test::Fatal; use Test::Moose qw( with_immutable ); use Test::More; BEGIN { plan skip_all => 'These tests requires Specio, which requires perl 5.010' unless $] >= 5.010; } use Test::Requires { 'Specio::Declare' => '0.10', 'Specio::Library::Builtins' => '0.10', }; { package Foo; use Moose; use Specio::Library::Builtins; has int => ( is => 'ro', isa => t('Int'), ); has array_of_ints => ( is => 'ro', isa => t( 'ArrayRef', of => t('Int') ), ); has hash_of_ints => ( is => 'ro', isa => t( 'HashRef', of => t('Int') ), ); } with_immutable( sub { my $is_immutable = shift; subtest( 'Foo class' . ( $is_immutable ? ' (immutable)' : q{} ), sub { is( exception { Foo->new( int => 42 ) }, undef, '42 is an acceptable int' ); like( exception { Foo->new( int => 42.4 ) }, qr/does not pass the type constraint.+for type named Int/, '42.4 is not an acceptable int' ); is( exception { Foo->new( array_of_ints => [ 42, 84 ] ) }, undef, '[ 42, 84 ] is an acceptable array of ints' ); like( exception { Foo->new( array_of_ints => [ 42.4, 84 ] ) }, qr/does not pass the type constraint.+for anonymous type/, '[ 42.4, 84 ] is an acceptable array of ints' ); is( exception { Foo->new( hash_of_ints => { foo => 42, bar => 84 } ); }, undef, '{ foo => 42, bar => 84 } is an acceptable array of ints' ); like( exception { Foo->new( hash_of_ints => { foo => 42.4, bar => 84 } ); }, qr/does not pass the type constraint.+for anonymous type/, '{ foo => 42.4, bar => 84 } is an acceptable array of ints' ); } ); }, 'Foo' ); { package Bar; use Moose; use Specio::Declare; use Specio::Library::Builtins; my $array_of_ints = anon( parent => t( 'ArrayRef', of => t('Int') ) ); coerce( $array_of_ints, from => t('Int'), using => sub { return [ $_[0] ]; } ); has array_of_ints => ( is => 'ro', isa => $array_of_ints, coerce => 1, ); my $hash_of_ints = anon( parent => t( 'HashRef', of => t('Int') ) ); coerce( $hash_of_ints, from => t('Int'), using => sub { return { foo => $_[0] }; } ); has hash_of_ints => ( is => 'ro', isa => $hash_of_ints, coerce => 1, ); } with_immutable( sub { my $is_immutable = shift; subtest( 'Bar class' . ( $is_immutable ? ' (immutable)' : q{} ), sub { is( exception { Bar->new( array_of_ints => [ 42, 84 ] ) }, undef, '[ 42, 84 ] is an acceptable array of ints' ); like( exception { Bar->new( array_of_ints => [ 42.4, 84 ] ) }, qr/does not pass the type constraint.+for anonymous type/, '[ 42.4, 84 ] is an acceptable array of ints' ); { my $bar; is( exception { $bar = Bar->new( array_of_ints => 42 ) }, undef, '42 is an acceptable array of ints with coercion' ); is_deeply( $bar->array_of_ints(), [42], 'int is coerced to single element arrayref' ); } is( exception { Bar->new( hash_of_ints => { foo => 42, bar => 84 } ); }, undef, '{ foo => 42, bar => 84 } is an acceptable array of ints' ); like( exception { Bar->new( hash_of_ints => { foo => 42.4, bar => 84 } ); }, qr/does not pass the type constraint.+for anonymous type/, '{ foo => 42.4, bar => 84 } is an acceptable array of ints' ); { my $bar; is( exception { $bar = Bar->new( hash_of_ints => 42 ) }, undef, '42 is an acceptable hash of ints with coercion' ); is_deeply( $bar->hash_of_ints(), { foo => 42 }, 'int is coerced to single element hashref' ); } } ); }, 'Bar' ); done_testing(); Moose-2.1604/t/todo_tests/exception_reflects_failed_constraint.t000644 000766 000024 00000001452 12617452416 025431 0ustar00etherstaff000000 000000 use strict; use warnings; # In the case where a child type constraint's parent constraint fails, # the exception should reference the parent type constraint that actually # failed instead of always referencing the child'd type constraint use Test::More; use Test::Fatal; use Moose::Util::TypeConstraints; is( exception { subtype 'ParentConstraint' => as 'Str' => where {0}; }, undef, 'specified parent type constraint' ); my $tc; is( exception { $tc = subtype 'ChildConstraint' => as 'ParentConstraint' => where {1}; }, undef, 'specified child type constraint' ); { my $errmsg = $tc->validate(); TODO: { local $TODO = 'Not yet supported'; ok($errmsg !~ /Validation failed for 'ChildConstraint'/, 'exception references failing parent constraint'); }; } done_testing; Moose-2.1604/t/todo_tests/immutable_n_around.t000644 000766 000024 00000002233 12617452415 021635 0ustar00etherstaff000000 000000 use strict; use warnings; use Test::More; # if make_immutable is removed from the following code the tests pass { package Foo; use Moose; has foo => ( is => "ro" ); package Bar; use Moose; extends qw(Foo); around new => sub { my $next = shift; my ( $self, @args ) = @_; $self->$next( foo => 42 ); }; package Gorch; use Moose; extends qw(Bar); package Zoink; use Moose; extends qw(Gorch); } my @classes = qw(Foo Bar Gorch Zoink); tests: { is( Foo->new->foo, undef, "base class (" . (Foo->meta->is_immutable ? "immutable" : "mutable") . ")" ); is( Bar->new->foo, 42, "around new called on Bar->new (" . (Bar->meta->is_immutable ? "immutable" : "mutable") . ")" ); is( Gorch->new->foo, 42, "around new called on Gorch->new (" . (Gorch->meta->is_immutable ? "immutable" : "mutable") . ")" ); is( Zoink->new->foo, 42, "around new called Zoink->new (" . (Zoink->meta->is_immutable ? "immutable" : "mutable") . ")" ); if ( @classes ) { local $SIG{__WARN__} = sub {}; ( shift @classes )->meta->make_immutable; redo tests; } } done_testing; Moose-2.1604/t/todo_tests/moose_and_threads.t000644 000766 000024 00000001357 12617452415 021455 0ustar00etherstaff000000 000000 use strict; use warnings; use Test::More; =pod See this for some details: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=476579 Here is the basic test case, it segfaults, so I am going to leave it commented out. Basically it seems that there is some bad interaction between the ??{} construct that is used in the "parser" for type definitions and threading so probably the fix would involve removing the ??{} usage for something else. use threads; { package Foo; use Moose; has "bar" => (is => 'rw', isa => "Str | Num"); } my $thr = threads->create(sub {}); $thr->join(); =cut { local $TODO = 'This is just a stub for the test, see the POD'; fail('Moose type constraints and threads dont get along'); } done_testing; Moose-2.1604/t/todo_tests/replacing_super_methods.t000644 000766 000024 00000001423 12617452415 022676 0ustar00etherstaff000000 000000 use strict; use warnings; use Test::More; my ($super_called, $sub_called, $new_super_called) = (0, 0, 0); { package Foo; use Moose; sub foo { $super_called++ } } { package Foo::Sub; use Moose; extends 'Foo'; override foo => sub { $sub_called++; super(); }; } Foo::Sub->new->foo; is($super_called, 1, "super called"); is($new_super_called, 0, "new super not called"); is($sub_called, 1, "sub called"); ($super_called, $sub_called, $new_super_called) = (0, 0, 0); Foo->meta->add_method(foo => sub { $new_super_called++; }); Foo::Sub->new->foo; { local $TODO = "super doesn't get replaced"; is($super_called, 0, "super not called"); is($new_super_called, 1, "new super called"); } is($sub_called, 1, "sub called"); done_testing; Moose-2.1604/t/todo_tests/required_role_accessors.t000644 000766 000024 00000001543 12617452415 022702 0ustar00etherstaff000000 000000 use strict; use warnings; use Test::More; use Test::Fatal; { package Foo::API; use Moose::Role; requires 'foo'; } { package Foo; use Moose::Role; has foo => (is => 'ro'); with 'Foo::API'; } { package Foo::Class; use Moose; { our $TODO; local $TODO = "role accessors don't satisfy other role requires"; ::is( ::exception { with 'Foo' }, undef, 'requirements are satisfied properly' ); } } { package Bar; use Moose::Role; requires 'baz'; has bar => (is => 'ro'); } { package Baz; use Moose::Role; requires 'bar'; has baz => (is => 'ro'); } { package BarBaz; use Moose; { our $TODO; local $TODO = "role accessors don't satisfy other role requires"; ::is( ::exception { with qw(Bar Baz) }, undef, 'requirements are satisfied properly' ); } } done_testing; Moose-2.1604/t/todo_tests/role_attr_methods_original_package.t000644 000766 000024 00000001557 12617452416 025057 0ustar00etherstaff000000 000000 use strict; use warnings; use Test::More 0.88; { package Some::Role; use Moose::Role; has 'thing' => ( is => 'ro', ); sub foo { 42 } } { package Some::Class; use Moose; with 'Some::Role'; } my $attr = Some::Class->meta()->get_attribute('thing'); # See RT #84563 for my $method ( @{ $attr->associated_methods() } ) { TODO: { local $TODO = q{Methods generated from role-provided attributes don't know their original package}; is( $method->original_package_name(), 'Some::Role', 'original_package_name for methods generated from role attribute should match the role' ); } } is( Some::Class->meta()->get_method('foo')->original_package_name(), 'Some::Role', 'original_package_name for methods from role should match the role' ); done_testing(); Moose-2.1604/t/todo_tests/role_insertion_order.t000644 000766 000024 00000001601 12617452415 022215 0ustar00etherstaff000000 000000 use strict; use warnings; use Test::More; { package Foo::Role; use Moose::Role; has 'a' => (is => 'ro'); has 'b' => (is => 'ro'); has 'c' => (is => 'ro'); } { package Foo; use Moose; has 'd' => (is => 'ro'); with 'Foo::Role'; has 'e' => (is => 'ro'); } my %role_insertion_order = ( a => 0, b => 1, c => 2, ); is_deeply({ map { $_->name => $_->insertion_order } map { Foo::Role->meta->get_attribute($_) } Foo::Role->meta->get_attribute_list }, \%role_insertion_order, "right insertion order within the role"); my %class_insertion_order = ( d => 0, a => 1, b => 2, c => 3, e => 4, ); { local $TODO = "insertion order is lost during role application"; is_deeply({ map { $_->name => $_->insertion_order } Foo->meta->get_all_attributes }, \%class_insertion_order, "right insertion order within the class"); } done_testing; Moose-2.1604/t/todo_tests/various_role_features.t000644 000766 000024 00000016364 12617452415 022412 0ustar00etherstaff000000 000000 use strict; use warnings; use Test::More; use Test::Fatal; sub req_or_has ($$) { my ( $role, $method ) = @_; local $Test::Builder::Level = $Test::Builder::Level + 1; if ( $role ) { ok( $role->has_method($method) || $role->requires_method($method), $role->name . " has or requires method $method" ); } else { fail("role has or requires method $method"); } } { package Bar; use Moose::Role; # this role eventually adds three methods, qw(foo bar xxy), but only one is # known when it's still a role has foo => ( is => "rw" ); has gorch => ( reader => "bar" ); sub xxy { "BAAAD" } package Gorch; use Moose::Role; # similarly this role gives attr and gorch_method has attr => ( is => "rw" ); sub gorch_method { "gorch method" } around dandy => sub { shift->(@_) . "bar" }; package Quxx; use Moose; sub dandy { "foo" } # this object will be used in an attr of Foo to test that Foo can do the # Gorch interface with qw(Gorch); package Dancer; use Moose::Role; requires "twist"; package Dancer::Ballerina; use Moose; with qw(Dancer); sub twist { } sub pirouette { } package Dancer::Robot; use Moose::Role; # this doesn't fail but it produces a requires in the role # the order doesn't matter has twist => ( is => "rw" ); ::is( ::exception { with qw(Dancer) }, undef ); package Dancer::Something; use Moose; # this fail even though the method already exists has twist => ( is => "rw" ); { ::is( ::exception { with qw(Dancer) }, undef ); } package Dancer::80s; use Moose; # this should pass because ::Robot has the attribute to fill in the requires # but due to the deferrence logic that doesn't actually work { local our $TODO = "attribute accessor in role doesn't satisfy role requires"; ::is( ::exception { with qw(Dancer::Robot) }, undef ); } package Foo; use Moose; with qw(Bar); has oink => ( is => "rw", handles => "Gorch", # should handles take the same arguments as 'with'? Meta::Role::Application::Delegation? default => sub { Quxx->new }, ); has dancer => ( is => "rw", does => "Dancer", handles => "Dancer", default => sub { Dancer::Ballerina->new }, ); sub foo { 42 } sub bar { 33 } sub xxy { 7 } package Tree; use Moose::Role; has bark => ( is => "rw" ); package Dog; use Moose::Role; sub bark { warn "woof!" }; package EntPuppy; use Moose; { local our $TODO = "attrs and methods from a role should clash"; ::isnt( ::exception { with qw(Tree Dog) }, undef ); } } # these fail because of the deferral logic winning over actual methods # this might be tricky to fix due to the 'sub foo {}; has foo => ( )' hack # we've been doing for a long while, though I doubt people relied on it for # anything other than fulfilling 'requires' { local $TODO = "attributes from role overwrite class methods"; is( Foo->new->foo, 42, "attr did not zap overriding method" ); is( Foo->new->bar, 33, "attr did not zap overriding method" ); } is( Foo->new->xxy, 7, "method did not zap overriding method" ); # duh # these pass, simple delegate # mostly they are here to contrast the next blck can_ok( Foo->new->oink, "dandy" ); can_ok( Foo->new->oink, "attr" ); can_ok( Foo->new->oink, "gorch_method" ); ok( Foo->new->oink->does("Gorch"), "Quxx does Gorch" ); # these are broken because 'attr' is not technically part of the interface can_ok( Foo->new, "gorch_method" ); { local $TODO = "accessor methods from a role are omitted in handles role"; can_ok( Foo->new, "attr" ); } { local $TODO = "handles role doesn't add the role to the ->does of the delegate's parent class"; ok( Foo->new->does("Gorch"), "Foo does Gorch" ); } # these work can_ok( Foo->new->dancer, "pirouette" ); can_ok( Foo->new->dancer, "twist" ); can_ok( Foo->new, "twist" ); ok( !Foo->new->can("pirouette"), "can't pirouette, not part of the iface" ); { local $TODO = "handles role doesn't add the role to the ->does of the delegate's parent class"; ok( Foo->new->does("Dancer") ); } my $gorch = Gorch->meta; isa_ok( $gorch, "Moose::Meta::Role" ); ok( $gorch->has_attribute("attr"), "has attribute 'attr'" ); isa_ok( $gorch->get_attribute("attr"), "Moose::Meta::Role::Attribute" ); req_or_has($gorch, "gorch_method"); ok( $gorch->has_method("gorch_method"), "has_method gorch_method" ); ok( !$gorch->requires_method("gorch_method"), "requires gorch method" ); isa_ok( $gorch->get_method("gorch_method"), "Moose::Meta::Method" ); { local $TODO = "method modifier doesn't yet create a method requirement or meta object"; req_or_has($gorch, "dandy" ); # this specific test is maybe not backwards compat, but in theory it *does* # require that method to exist ok( $gorch->requires_method("dandy"), "requires the dandy method for the modifier" ); } { local $TODO = "attribute related methods are not yet known by the role"; # we want this to be a part of the interface, somehow req_or_has($gorch, "attr"); ok( $gorch->has_method("attr"), "has_method attr" ); isa_ok( $gorch->get_method("attr"), "Moose::Meta::Method" ); isa_ok( $gorch->get_method("attr"), "Moose::Meta::Method::Accessor" ); } my $robot = Dancer::Robot->meta; isa_ok( $robot, "Moose::Meta::Role" ); ok( $robot->has_attribute("twist"), "has attr 'twist'" ); isa_ok( $robot->get_attribute("twist"), "Moose::Meta::Role::Attribute" ); { req_or_has($robot, "twist"); local $TODO = "attribute related methods are not yet known by the role"; ok( $robot->has_method("twist"), "has twist method" ); isa_ok( $robot->get_method("twist"), "Moose::Meta::Method" ); isa_ok( $robot->get_method("twist"), "Moose::Meta::Method::Accessor" ); } done_testing; __END__ I think Attribute needs to be refactored in some way to better support roles. There are several possible ways to do this, all of them seem plausible to me. The first approach would be to change the attribute class to allow it to be queried about the methods it would install. Then we instantiate the attribute in the role, and instead of deferring the arguments, we just make an Cish method. Then we can interrogate the attr when adding it to the role, and generate stub methods for all the methods it would produce. A second approach is kinda like the Immutable hack: wrap the attr in an anonmyous class that disables part of its interface. A third method would be to create an Attribute::Partial object that would provide a more role-ish behavior, and to do this independently of the actual Attribute class. Something similar can be done for method modifiers, but I think that's even simpler. The benefits of doing this are: * Much better introspection of roles * More correctness in many cases (in my opinion anyway) * More roles are more usable as interface declarations, without having to split them into two pieces (one for the interface with a bunch of requires(), and another for the actual impl with the problematic attrs (and stub methods to fix the accessors) and method modifiers (dunno if this can even work at all) Moose-2.1604/t/todo_tests/wrong-inner.t000644 000766 000024 00000000740 12617452415 020237 0ustar00etherstaff000000 000000 use strict; use warnings; use Test::More; # see RT#89397 { package A; use Moose; sub run { my $self = shift; inner(); $self->cleanup; } sub cleanup { inner(); } } { package B; our $run; use Moose; extends 'A'; augment run => sub { my $self = shift; $run++; }; } B->new->run(); local $TODO = 'wtf is going on here??'; is($B::run, 1, 'B::run is only called once'); done_testing; Moose-2.1604/t/test_moose/test_moose.t000644 000766 000024 00000000140 12617452415 020137 0ustar00etherstaff000000 000000 use strict; use warnings; use Test::More; BEGIN { use_ok('Test::Moose'); } done_testing; Moose-2.1604/t/test_moose/test_moose_does_ok.t000644 000766 000024 00000001322 12617452415 021645 0ustar00etherstaff000000 000000 use strict; use warnings; use Test::Builder::Tester; use Test::More; use Test::Moose; { package Foo; use Moose::Role; } { package Bar; use Moose; with qw/Foo/; } { package Baz; use Moose; } # class ok test_out('ok 1 - does_ok class'); does_ok('Bar','Foo','does_ok class'); # class fail test_out ('not ok 2 - does_ok class fail'); test_fail (+2); does_ok('Baz','Foo','does_ok class fail'); # object ok my $bar = Bar->new; test_out ('ok 3 - does_ok object'); does_ok ($bar,'Foo','does_ok object'); # object fail my $baz = Baz->new; test_out ('not ok 4 - does_ok object fail'); test_fail (+2); does_ok ($baz,'Foo','does_ok object fail'); test_test ('does_ok'); done_testing; Moose-2.1604/t/test_moose/test_moose_has_attribute_ok.t000644 000766 000024 00000001512 12617452415 023552 0ustar00etherstaff000000 000000 use strict; use warnings; use Test::Builder::Tester; use Test::More; use Test::Moose; { package Foo; use Moose; has 'foo', is => 'bare'; } { package Bar; use Moose; extends 'Foo'; has 'bar', is => 'bare'; } test_out('ok 1 - ... has_attribute_ok(Foo, foo) passes'); has_attribute_ok('Foo', 'foo', '... has_attribute_ok(Foo, foo) passes'); test_out ('not ok 2 - ... has_attribute_ok(Foo, bar) fails'); test_fail (+2); has_attribute_ok('Foo', 'bar', '... has_attribute_ok(Foo, bar) fails'); test_out('ok 3 - ... has_attribute_ok(Bar, foo) passes'); has_attribute_ok('Bar', 'foo', '... has_attribute_ok(Bar, foo) passes'); test_out('ok 4 - ... has_attribute_ok(Bar, bar) passes'); has_attribute_ok('Bar', 'bar', '... has_attribute_ok(Bar, bar) passes'); test_test ('has_attribute_ok'); done_testing; Moose-2.1604/t/test_moose/test_moose_meta_ok.t000644 000766 000024 00000000577 12617452415 021654 0ustar00etherstaff000000 000000 use strict; use warnings; use Test::Builder::Tester; use Test::More; use Test::Moose; { package Foo; use Moose; } { package Bar; } test_out('ok 1 - ... meta_ok(Foo) passes'); meta_ok('Foo', '... meta_ok(Foo) passes'); test_out ('not ok 2 - ... meta_ok(Bar) fails'); test_fail (+2); meta_ok('Bar', '... meta_ok(Bar) fails'); test_test ('meta_ok'); done_testing; Moose-2.1604/t/test_moose/with_immutable.t000644 000766 000024 00000001061 12617452415 020773 0ustar00etherstaff000000 000000 use strict; use warnings; use Test::Builder::Tester; use Test::More; use Test::Moose; { package Foo; use Moose; } { package Bar; use Moose; } package main; test_out("ok 1", "not ok 2"); test_fail(+2); my $ret = with_immutable { ok(Foo->meta->is_mutable); } qw(Foo); test_test('with_immutable failure'); ok(!$ret, "one of our tests failed"); test_out("ok 1", "ok 2"); $ret = with_immutable { ok(Bar->meta->find_method_by_name('new')); } qw(Bar); test_test('with_immutable success'); ok($ret, "all tests succeeded"); done_testing; Moose-2.1604/t/roles/anonymous_roles.t000644 000766 000024 00000003233 12617452415 020163 0ustar00etherstaff000000 000000 use strict; use warnings; use Test::More; use Moose (); use Class::Load qw(is_class_loaded); my $role = Moose::Meta::Role->create_anon_role( attributes => { is_worn => { is => 'rw', isa => 'Bool', }, }, methods => { remove => sub { shift->is_worn(0) }, }, ); my $class = Moose::Meta::Class->create('MyItem::Armor::Helmet'); $role->apply($class); # XXX: Moose::Util::apply_all_roles doesn't cope with references yet my $visored = $class->new_object(is_worn => 0); ok(!$visored->is_worn, "attribute, accessor was consumed"); $visored->is_worn(1); ok($visored->is_worn, "accessor was consumed"); $visored->remove; ok(!$visored->is_worn, "method was consumed"); like($role->name, qr/^Moose::Meta::Role::__ANON__::SERIAL::\d+$/, ""); ok($role->is_anon_role, "the role knows it's anonymous"); ok(is_class_loaded(Moose::Meta::Role->create_anon_role->name), "creating an anonymous role satisifes is_class_loaded"); ok(Class::MOP::class_of(Moose::Meta::Role->create_anon_role->name), "creating an anonymous role satisifes class_of"); { my $role; { my $meta = Moose::Meta::Role->create_anon_role( methods => { foo => sub { 'FOO' }, }, ); $role = $meta->name; can_ok($role, 'foo'); } ok(!$role->can('foo')); } { my $role; { my $meta = Moose::Meta::Role->create_anon_role( methods => { foo => sub { 'FOO' }, }, ); $role = $meta->name; can_ok($role, 'foo'); Class::MOP::remove_metaclass_by_name($role); } ok(!$role->can('foo')); } done_testing; Moose-2.1604/t/roles/application_toclass.t000644 000766 000024 00000003634 12617452415 020767 0ustar00etherstaff000000 000000 use strict; use warnings; use Test::More; do { package Role::Foo; use Moose::Role; sub foo { } package Consumer::Basic; use Moose; with 'Role::Foo'; package Consumer::Excludes; use Moose; with 'Role::Foo' => { -excludes => 'foo' }; package Consumer::Aliases; use Moose; with 'Role::Foo' => { -alias => { 'foo' => 'role_foo' } }; package Consumer::Overrides; use Moose; with 'Role::Foo'; sub foo { } }; my @basic = Consumer::Basic->meta->role_applications; my @excludes = Consumer::Excludes->meta->role_applications; my @aliases = Consumer::Aliases->meta->role_applications; my @overrides = Consumer::Overrides->meta->role_applications; is(@basic, 1); is(@excludes, 1); is(@aliases, 1); is(@overrides, 1); my $basic = $basic[0]; my $excludes = $excludes[0]; my $aliases = $aliases[0]; my $overrides = $overrides[0]; isa_ok($basic, 'Moose::Meta::Role::Application::ToClass'); isa_ok($excludes, 'Moose::Meta::Role::Application::ToClass'); isa_ok($aliases, 'Moose::Meta::Role::Application::ToClass'); isa_ok($overrides, 'Moose::Meta::Role::Application::ToClass'); is($basic->role, Role::Foo->meta); is($excludes->role, Role::Foo->meta); is($aliases->role, Role::Foo->meta); is($overrides->role, Role::Foo->meta); is($basic->class, Consumer::Basic->meta); is($excludes->class, Consumer::Excludes->meta); is($aliases->class, Consumer::Aliases->meta); is($overrides->class, Consumer::Overrides->meta); is_deeply($basic->get_method_aliases, {}); is_deeply($excludes->get_method_aliases, {}); is_deeply($aliases->get_method_aliases, { foo => 'role_foo' }); is_deeply($overrides->get_method_aliases, {}); is_deeply($basic->get_method_exclusions, []); is_deeply($excludes->get_method_exclusions, ['foo']); is_deeply($aliases->get_method_exclusions, []); is_deeply($overrides->get_method_exclusions, []); done_testing; Moose-2.1604/t/roles/apply_role.t000644 000766 000024 00000014577 12617452415 017112 0ustar00etherstaff000000 000000 use strict; use warnings; use Test::More; use Test::Fatal; { package FooRole; use Moose::Role; our $VERSION = 23; has 'bar' => ( is => 'rw', isa => 'FooClass' ); has 'baz' => ( is => 'ro' ); sub goo {'FooRole::goo'} sub foo {'FooRole::foo'} override 'boo' => sub { 'FooRole::boo -> ' . super() }; around 'blau' => sub { my $c = shift; 'FooRole::blau -> ' . $c->(); }; } { package BarRole; use Moose::Role; sub woot {'BarRole::woot'} } { package BarClass; use Moose; sub boo {'BarClass::boo'} sub foo {'BarClass::foo'} # << the role overrides this ... } { package FooClass; use Moose; extends 'BarClass'; ::like( ::exception { with 'FooRole' => { -version => 42 } }, qr/FooRole version 42 required--this is only version 23/, 'applying role with unsatisfied version requirement' ); ::is( ::exception { with 'FooRole' => { -version => 13 } }, undef, 'applying role with satisfied version requirement' ); sub blau {'FooClass::blau'} # << the role wraps this ... sub goo {'FooClass::goo'} # << overrides the one from the role ... } { package FooBarClass; use Moose; extends 'FooClass'; with 'FooRole', 'BarRole'; } { package PlainJane; sub new { return bless {}, __PACKAGE__; } } my $foo_class_meta = FooClass->meta; isa_ok( $foo_class_meta, 'Moose::Meta::Class' ); my $foobar_class_meta = FooBarClass->meta; isa_ok( $foobar_class_meta, 'Moose::Meta::Class' ); isnt( exception { $foo_class_meta->does_role(); }, undef, '... does_role requires a role name' ); isnt( exception { $foo_class_meta->add_role(); }, undef, '... apply_role requires a role' ); isnt( exception { $foo_class_meta->add_role( bless( {} => 'Fail' ) ); }, undef, '... apply_role requires a role' ); ok( $foo_class_meta->does_role('FooRole'), '... the FooClass->meta does_role FooRole' ); ok( !$foo_class_meta->does_role('OtherRole'), '... the FooClass->meta !does_role OtherRole' ); ok( $foobar_class_meta->does_role('FooRole'), '... the FooBarClass->meta does_role FooRole' ); ok( $foobar_class_meta->does_role('BarRole'), '... the FooBarClass->meta does_role BarRole' ); ok( !$foobar_class_meta->does_role('OtherRole'), '... the FooBarClass->meta !does_role OtherRole' ); foreach my $method_name (qw(bar baz foo boo blau goo)) { ok( $foo_class_meta->has_method($method_name), '... FooClass has the method ' . $method_name ); ok( $foobar_class_meta->has_method($method_name), '... FooBarClass has the method ' . $method_name ); } ok( !$foo_class_meta->has_method('woot'), '... FooClass lacks the method woot' ); ok( $foobar_class_meta->has_method('woot'), '... FooBarClass has the method woot' ); foreach my $attr_name (qw(bar baz)) { ok( $foo_class_meta->has_attribute($attr_name), '... FooClass has the attribute ' . $attr_name ); ok( $foobar_class_meta->has_attribute($attr_name), '... FooBarClass has the attribute ' . $attr_name ); } can_ok( 'FooClass', 'does' ); ok( FooClass->does('FooRole'), '... the FooClass does FooRole' ); ok( !FooClass->does('BarRole'), '... the FooClass does not do BarRole' ); ok( !FooClass->does('OtherRole'), '... the FooClass does not do OtherRole' ); can_ok( 'FooBarClass', 'does' ); ok( FooBarClass->does('FooRole'), '... the FooClass does FooRole' ); ok( FooBarClass->does('BarRole'), '... the FooBarClass does FooBarRole' ); ok( !FooBarClass->does('OtherRole'), '... the FooBarClass does not do OtherRole' ); my $foo = FooClass->new(); isa_ok( $foo, 'FooClass' ); my $foobar = FooBarClass->new(); isa_ok( $foobar, 'FooBarClass' ); is( $foo->goo, 'FooClass::goo', '... got the right value of goo' ); is( $foobar->goo, 'FooRole::goo', '... got the right value of goo' ); is( $foo->boo, 'FooRole::boo -> BarClass::boo', '... got the right value from ->boo' ); is( $foobar->boo, 'FooRole::boo -> FooRole::boo -> BarClass::boo', '... got the right value from ->boo (double wrapped)' ); is( $foo->blau, 'FooRole::blau -> FooClass::blau', '... got the right value from ->blau' ); is( $foobar->blau, 'FooRole::blau -> FooRole::blau -> FooClass::blau', '... got the right value from ->blau' ); foreach my $foo ( $foo, $foobar ) { can_ok( $foo, 'does' ); ok( $foo->does('FooRole'), '... an instance of FooClass does FooRole' ); ok( !$foo->does('OtherRole'), '... and instance of FooClass does not do OtherRole' ); can_ok( $foobar, 'does' ); ok( $foobar->does('FooRole'), '... an instance of FooBarClass does FooRole' ); ok( $foobar->does('BarRole'), '... an instance of FooBarClass does BarRole' ); ok( !$foobar->does('OtherRole'), '... and instance of FooBarClass does not do OtherRole' ); for my $method (qw/bar baz foo boo goo blau/) { can_ok( $foo, $method ); } is( $foo->foo, 'FooRole::foo', '... got the right value of foo' ); ok( !defined( $foo->baz ), '... $foo->baz is undefined' ); ok( !defined( $foo->bar ), '... $foo->bar is undefined' ); isnt( exception { $foo->baz(1); }, undef, '... baz is a read-only accessor' ); isnt( exception { $foo->bar(1); }, undef, '... bar is a read-write accessor with a type constraint' ); my $foo2 = FooClass->new(); isa_ok( $foo2, 'FooClass' ); is( exception { $foo->bar($foo2); }, undef, '... bar is a read-write accessor with a type constraint' ); is( $foo->bar, $foo2, '... got the right value for bar now' ); } { { package MRole; use Moose::Role; sub meth { } } { package MRole2; use Moose::Role; sub meth2 { } } { use Moose::Meta::Class; use Moose::Object; use Moose::Util qw(apply_all_roles); my $class = Moose::Meta::Class->create( 'Class' => ( superclasses => [ 'Moose::Object' ], )); apply_all_roles($class, MRole->meta, MRole2->meta); ok(Class->can('meth'), "can meth"); ok(Class->can('meth2'), "can meth2"); } } { ok(!Moose::Util::find_meta('PlainJane'), 'not initialized'); Moose::Util::apply_all_roles('PlainJane', 'BarRole'); ok(Moose::Util::find_meta('PlainJane'), 'initialized'); ok(Moose::Util::find_meta('PlainJane')->does_role('BarRole'), 'does BarRole'); my $pj = PlainJane->new(); ok($pj->can('woot'), 'can woot'); } done_testing; Moose-2.1604/t/roles/build.t000644 000766 000024 00000003036 12617452415 016027 0ustar00etherstaff000000 000000 use strict; use warnings; use Test::More; use Test::Requires 'Test::Output'; # skip all if not installed # this test script ensures that my idiom of: # role: sub BUILD, after BUILD # continues to work to run code after object initialization, whether the class # has a BUILD method or not my @CALLS; do { package TestRole; use Moose::Role; sub BUILD { push @CALLS, 'TestRole::BUILD' } before BUILD => sub { push @CALLS, 'TestRole::BUILD:before' }; after BUILD => sub { push @CALLS, 'TestRole::BUILD:after' }; }; do { package ClassWithBUILD; use Moose; ::stderr_is { with 'TestRole'; } ''; sub BUILD { push @CALLS, 'ClassWithBUILD::BUILD' } }; do { package ExplicitClassWithBUILD; use Moose; ::stderr_is { with 'TestRole' => { -excludes => 'BUILD' }; } ''; sub BUILD { push @CALLS, 'ExplicitClassWithBUILD::BUILD' } }; do { package ClassWithoutBUILD; use Moose; with 'TestRole'; }; { is_deeply([splice @CALLS], [], "no calls to BUILD yet"); ClassWithBUILD->new; is_deeply([splice @CALLS], [ 'TestRole::BUILD:before', 'ClassWithBUILD::BUILD', 'TestRole::BUILD:after', ]); ClassWithoutBUILD->new; is_deeply([splice @CALLS], [ 'TestRole::BUILD:before', 'TestRole::BUILD', 'TestRole::BUILD:after', ]); if (ClassWithBUILD->meta->is_mutable) { ClassWithBUILD->meta->make_immutable; ClassWithoutBUILD->meta->make_immutable; redo; } } done_testing; Moose-2.1604/t/roles/conflict_many_methods.t000644 000766 000024 00000001565 12617452415 021305 0ustar00etherstaff000000 000000 use strict; use warnings; use Test::More; use Test::Fatal; { package Bomb; use Moose::Role; sub fuse { } sub explode { } package Spouse; use Moose::Role; sub fuse { } sub explode { } package Caninish; use Moose::Role; sub bark { } package Treeve; use Moose::Role; sub bark { } } { package PracticalJoke; use Moose; ::like( ::exception { with 'Bomb', 'Spouse'; }, qr/Due to method name conflicts in roles 'Bomb' and 'Spouse', the methods 'explode' and 'fuse' must be implemented or excluded by 'PracticalJoke'/ ); ::like( ::exception { with ( 'Bomb', 'Spouse', 'Caninish', 'Treeve', ); }, qr/Due to a method name conflict in roles 'Caninish' and 'Treeve', the method 'bark' must be implemented or excluded by 'PracticalJoke'/ ); } done_testing; Moose-2.1604/t/roles/create_role.t000644 000766 000024 00000001641 12617452415 017214 0ustar00etherstaff000000 000000 use strict; use warnings; use Test::More; use Moose (); my $role = Moose::Meta::Role->create( 'MyItem::Role::Equipment', attributes => { is_worn => { is => 'rw', isa => 'Bool', }, }, methods => { remove => sub { shift->is_worn(0) }, }, ); my $class = Moose::Meta::Class->create('MyItem::Armor::Helmet' => roles => ['MyItem::Role::Equipment'], ); my $visored = $class->new_object(is_worn => 0); ok(!$visored->is_worn, "attribute, accessor was consumed"); $visored->is_worn(1); ok($visored->is_worn, "accessor was consumed"); $visored->remove; ok(!$visored->is_worn, "method was consumed"); ok(!$role->is_anon_role, "the role is not anonymous"); my $composed_role = Moose::Meta::Role->create( 'MyItem::Role::Equipment2', roles => [ $role ], ); ok($composed_role->does_role('MyItem::Role::Equipment2'), "Role composed into role"); done_testing; Moose-2.1604/t/roles/create_role_subclass.t000644 000766 000024 00000001031 12617452415 021104 0ustar00etherstaff000000 000000 use strict; use warnings; use Test::More; use Moose (); do { package My::Meta::Role; use Moose; extends 'Moose::Meta::Role'; has test_serial => ( is => 'ro', isa => 'Int', default => 1, ); no Moose; }; my $role = My::Meta::Role->create_anon_role; is($role->test_serial, 1, "default value for the serial attribute"); my $nine_role = My::Meta::Role->create_anon_role(test_serial => 9); is($nine_role->test_serial, 9, "parameter value for the serial attribute"); done_testing; Moose-2.1604/t/roles/empty_method_modifiers_meta_bug.t000644 000766 000024 00000001047 12617452415 023332 0ustar00etherstaff000000 000000 use strict; use warnings; use Test::More; # test role and class package SomeRole; use Moose::Role; requires 'foo'; package SomeClass; use Moose; has 'foo' => (is => 'rw'); with 'SomeRole'; package main; #my $c = SomeClass->new; #isa_ok( $c, 'SomeClass'); for my $modifier_type (qw[ before around after ]) { my $get_func = "get_${modifier_type}_method_modifiers"; my @mms = eval{ SomeRole->meta->$get_func('foo') }; is($@, '', "$get_func for no method mods does not die"); is(scalar(@mms),0,'is an empty list'); } done_testing; Moose-2.1604/t/roles/extending_role_attrs.t000644 000766 000024 00000010273 12617452415 021154 0ustar00etherstaff000000 000000 use strict; use warnings; use Test::More; use Test::Fatal; =pod This basically just makes sure that using +name on role attributes works right. =cut { package Foo::Role; use Moose::Role; has 'bar' => ( is => 'rw', isa => 'Int', default => sub { 10 }, ); package Foo; use Moose; with 'Foo::Role'; ::is( ::exception { has '+bar' => (default => sub { 100 }); }, undef, '... extended the attribute successfully' ); } my $foo = Foo->new; isa_ok($foo, 'Foo'); is($foo->bar, 100, '... got the extended attribute'); { package Bar::Role; use Moose::Role; has 'foo' => ( is => 'rw', isa => 'Str | Int', ); package Bar; use Moose; with 'Bar::Role'; ::is( ::exception { has '+foo' => ( isa => 'Int', ) }, undef, "... narrowed the role's type constraint successfully" ); } my $bar = Bar->new(foo => 42); isa_ok($bar, 'Bar'); is($bar->foo, 42, '... got the extended attribute'); $bar->foo(100); is($bar->foo, 100, "... can change the attribute's value to an Int"); like( exception { $bar->foo("baz") }, qr/^Attribute \(foo\) does not pass the type constraint because: Validation failed for 'Int' with value .*baz.* at / ); is($bar->foo, 100, "... still has the old Int value"); { package Baz::Role; use Moose::Role; has 'baz' => ( is => 'rw', isa => 'Value', ); package Baz; use Moose; with 'Baz::Role'; ::is( ::exception { has '+baz' => ( isa => 'Int | ClassName', ) }, undef, "... narrowed the role's type constraint successfully" ); } my $baz = Baz->new(baz => 99); isa_ok($baz, 'Baz'); is($baz->baz, 99, '... got the extended attribute'); $baz->baz('Foo'); is($baz->baz, 'Foo', "... can change the attribute's value to a ClassName"); like( exception { $baz->baz("zonk") }, qr/^Attribute \(baz\) does not pass the type constraint because: Validation failed for 'ClassName\|Int' with value .*zonk.* at / ); is_deeply($baz->baz, 'Foo', "... still has the old ClassName value"); { package Quux::Role; use Moose::Role; has 'quux' => ( is => 'rw', isa => 'Str | Int | Ref', ); package Quux; use Moose; use Moose::Util::TypeConstraints; with 'Quux::Role'; subtype 'Positive' => as 'Int' => where { $_ > 0 }; ::is( ::exception { has '+quux' => ( isa => 'Positive | ArrayRef', ) }, undef, "... narrowed the role's type constraint successfully" ); } my $quux = Quux->new(quux => 99); isa_ok($quux, 'Quux'); is($quux->quux, 99, '... got the extended attribute'); $quux->quux(100); is($quux->quux, 100, "... can change the attribute's value to an Int"); $quux->quux(["hi"]); is_deeply($quux->quux, ["hi"], "... can change the attribute's value to an ArrayRef"); like( exception { $quux->quux("quux") }, qr/^Attribute \(quux\) does not pass the type constraint because: Validation failed for 'ArrayRef\|Positive' with value .*quux.* at / ); is_deeply($quux->quux, ["hi"], "... still has the old ArrayRef value"); like( exception { $quux->quux({a => 1}) }, qr/^Attribute \(quux\) does not pass the type constraint because: Validation failed for 'ArrayRef\|Positive' with value .+ at / ); is_deeply($quux->quux, ["hi"], "... still has the old ArrayRef value"); { package Err::Role; use Moose::Role; for (1..3) { has "err$_" => ( isa => 'Str | Int', is => 'bare', ); } package Err; use Moose; with 'Err::Role'; ::is( ::exception { has '+err1' => (isa => 'Defined'); }, undef, "can get less specific in the subclass" ); ::is( ::exception { has '+err2' => (isa => 'Bool'); }, undef, "or change the type completely" ); ::is( ::exception { has '+err3' => (isa => 'Str | ArrayRef'); }, undef, "or add new types to the union" ); } { package Role::With::PlusAttr; use Moose::Role; with 'Foo::Role'; ::like( ::exception { has '+bar' => ( is => 'ro' ); }, qr/has '\+attr' is not supported in roles/, "Test has '+attr' in roles explodes" ); } done_testing; Moose-2.1604/t/roles/free_anonymous_roles.t000644 000766 000024 00000003154 12617452415 021166 0ustar00etherstaff000000 000000 use strict; use warnings; use Test::More; use Moose (); use Scalar::Util 'weaken'; my $weak; my $name; do { my $anon_class; do { my $role = Moose::Meta::Role->create_anon_role( methods => { improperly_freed => sub { 1 }, }, ); weaken($weak = $role); $name = $role->name; $anon_class = Moose::Meta::Class->create_anon_class( roles => [ $role->name ], ); }; ok($weak, "we still have the role metaclass because the anonymous class that consumed it is still alive"); ok($name->can('improperly_freed'), "we have not blown away the role's symbol table"); }; ok(!$weak, "the role metaclass is freed after its last reference (from a consuming anonymous class) is freed"); ok(!$name->can('improperly_freed'), "we blew away the role's symbol table entries"); do { my $anon_class; do { my $role = Moose::Meta::Role->create_anon_role( methods => { improperly_freed => sub { 1 }, }, weaken => 0, ); weaken($weak = $role); $name = $role->name; $anon_class = Moose::Meta::Class->create_anon_class( roles => [ $role->name ], ); }; ok($weak, "we still have the role metaclass because the anonymous class that consumed it is still alive"); ok($name->can('improperly_freed'), "we have not blown away the role's symbol table"); }; ok($weak, "the role metaclass still exists because we told it not to weaken"); ok($name->can('improperly_freed'), "the symbol table still exists too"); done_testing; Moose-2.1604/t/roles/imported_required_method.t000644 000766 000024 00000002360 12617452415 022012 0ustar00etherstaff000000 000000 use strict; use warnings; use Test::More; use Test::Fatal; use Test::Moose; BEGIN { package ExportsFoo; use Sub::Exporter -setup => { exports => ['foo'], }; sub foo { 'FOO' } $INC{'ExportsFoo.pm'} = 1; } { package Foo; use Moose::Role; requires 'foo'; } { package Bar; use Moose::Role; requires 'bar'; } { package Class; use Moose; use ExportsFoo 'foo'; # The grossness near the end of the regex works around a bug with \Q not # escaping \& properly with perl 5.8.x ::like( ::exception { with 'Foo' }, qr/^\Q'Foo' requires the method 'foo' to be implemented by 'Class'. If you imported functions intending to use them as methods, you need to explicitly mark them as such, via Class->meta->add_method(foo => \E\\\&foo\)/, "imported 'method' isn't seen" ); Class->meta->add_method(foo => \&foo); ::is( ::exception { with 'Foo' }, undef, "now it's a method" ); ::like( ::exception { with 'Bar' }, qr/^\Q'Bar' requires the method 'bar' to be implemented by 'Class' at/, "requirement isn't imported, so don't give the extra info in the error" ); } does_ok('Class', 'Foo'); done_testing; Moose-2.1604/t/roles/meta_role.t000644 000766 000024 00000006155 12617452415 016704 0ustar00etherstaff000000 000000 use strict; use warnings; use Test::More; use Test::Fatal; use Moose::Meta::Role; use Moose::Util::TypeConstraints (); { package FooRole; our $VERSION = '0.01'; sub foo { 'FooRole::foo' } } my $foo_role = Moose::Meta::Role->initialize('FooRole'); isa_ok($foo_role, 'Moose::Meta::Role'); isa_ok($foo_role, 'Class::MOP::Module'); is($foo_role->name, 'FooRole', '... got the right name of FooRole'); is($foo_role->version, '0.01', '... got the right version of FooRole'); # methods ... ok($foo_role->has_method('foo'), '... FooRole has the foo method'); is($foo_role->get_method('foo')->body, \&FooRole::foo, '... FooRole got the foo method'); isa_ok($foo_role->get_method('foo'), 'Moose::Meta::Role::Method'); is_deeply( [ $foo_role->get_method_list() ], [ 'foo' ], '... got the right method list'); # attributes ... is_deeply( [ $foo_role->get_attribute_list() ], [], '... got the right attribute list'); ok(!$foo_role->has_attribute('bar'), '... FooRole does not have the bar attribute'); is( exception { $foo_role->add_attribute('bar' => (is => 'rw', isa => 'Foo')); }, undef, '... added the bar attribute okay' ); is_deeply( [ $foo_role->get_attribute_list() ], [ 'bar' ], '... got the right attribute list'); ok($foo_role->has_attribute('bar'), '... FooRole does have the bar attribute'); my $bar = $foo_role->get_attribute('bar'); is_deeply( $bar->original_options, { is => 'rw', isa => 'Foo' }, 'original options for bar attribute' ); my $bar_for_class = $bar->attribute_for_class('Moose::Meta::Attribute'); is( $bar_for_class->type_constraint, Moose::Util::TypeConstraints::class_type('Foo'), 'bar has a Foo class type' ); is( exception { $foo_role->add_attribute('baz' => (is => 'ro')); }, undef, '... added the baz attribute okay' ); is_deeply( [ sort $foo_role->get_attribute_list() ], [ 'bar', 'baz' ], '... got the right attribute list'); ok($foo_role->has_attribute('baz'), '... FooRole does have the baz attribute'); my $baz = $foo_role->get_attribute('baz'); is_deeply( $baz->original_options, { is => 'ro' }, 'original options for baz attribute' ); is( exception { $foo_role->remove_attribute('bar'); }, undef, '... removed the bar attribute okay' ); is_deeply( [ $foo_role->get_attribute_list() ], [ 'baz' ], '... got the right attribute list'); ok(!$foo_role->has_attribute('bar'), '... FooRole does not have the bar attribute'); ok($foo_role->has_attribute('baz'), '... FooRole does still have the baz attribute'); # method modifiers ok(!$foo_role->has_before_method_modifiers('boo'), '... no boo:before modifier'); my $method = sub { "FooRole::boo:before" }; is( exception { $foo_role->add_before_method_modifier('boo' => $method); }, undef, '... added a method modifier okay' ); ok($foo_role->has_before_method_modifiers('boo'), '... now we have a boo:before modifier'); is(($foo_role->get_before_method_modifiers('boo'))[0], $method, '... got the right method back'); is_deeply( [ $foo_role->get_method_modifier_list('before') ], [ 'boo' ], '... got the right list of before method modifiers'); done_testing; Moose-2.1604/t/roles/method_aliasing_in_composition.t000644 000766 000024 00000013012 12617452415 023163 0ustar00etherstaff000000 000000 use strict; use warnings; use Test::More; use Test::Fatal; { package My::Role; use Moose::Role; sub foo { 'Foo::foo' } sub bar { 'Foo::bar' } sub baz { 'Foo::baz' } requires 'role_bar'; package My::Class; use Moose; ::is( ::exception { with 'My::Role' => { -alias => { bar => 'role_bar' } }; }, undef, '... this succeeds' ); package My::Class::Failure; use Moose; ::like( ::exception { with 'My::Role' => { -alias => { bar => 'role_bar' } }; }, qr/Cannot create a method alias if a local method of the same name exists/, '... this succeeds' ); sub role_bar { 'FAIL' } } ok(My::Class->meta->has_method($_), "we have a $_ method") for qw(foo baz bar role_bar); { package My::OtherRole; use Moose::Role; ::is( ::exception { with 'My::Role' => { -alias => { bar => 'role_bar' } }; }, undef, '... this succeeds' ); sub bar { 'My::OtherRole::bar' } package My::OtherRole::Failure; use Moose::Role; ::like( ::exception { with 'My::Role' => { -alias => { bar => 'role_bar' } }; }, qr/Cannot create a method alias if a local method of the same name exists/, '... cannot alias to a name that exists' ); sub role_bar { 'FAIL' } } ok(My::OtherRole->meta->has_method($_), "we have a $_ method") for qw(foo baz role_bar); ok(!My::OtherRole->meta->requires_method('bar'), '... and the &bar method is not required'); ok(!My::OtherRole->meta->requires_method('role_bar'), '... and the &role_bar method is not required'); { package My::AliasingRole; use Moose::Role; ::is( ::exception { with 'My::Role' => { -alias => { bar => 'role_bar' } }; }, undef, '... this succeeds' ); } ok(My::AliasingRole->meta->has_method($_), "we have a $_ method") for qw(foo baz role_bar); ok(!My::AliasingRole->meta->requires_method('bar'), '... and the &bar method is not required'); { package Foo::Role; use Moose::Role; sub foo { 'Foo::Role::foo' } package Bar::Role; use Moose::Role; sub foo { 'Bar::Role::foo' } package Baz::Role; use Moose::Role; sub foo { 'Baz::Role::foo' } package My::Foo::Class; use Moose; ::is( ::exception { with 'Foo::Role' => { -alias => { 'foo' => 'foo_foo' }, -excludes => 'foo' }, 'Bar::Role' => { -alias => { 'foo' => 'bar_foo' }, -excludes => 'foo' }, 'Baz::Role'; }, undef, '... composed our roles correctly' ); package My::Foo::Class::Broken; use Moose; ::like( ::exception { with 'Foo::Role' => { -alias => { 'foo' => 'foo_foo' }, -excludes => 'foo' }, 'Bar::Role' => { -alias => { 'foo' => 'foo_foo' }, -excludes => 'foo' }, 'Baz::Role'; }, qr/Due to a method name conflict in roles 'Bar::Role' and 'Foo::Role', the method 'foo_foo' must be implemented or excluded by 'My::Foo::Class::Broken'/, '... composed our roles correctly' ); } { my $foo = My::Foo::Class->new; isa_ok($foo, 'My::Foo::Class'); can_ok($foo, $_) for qw/foo foo_foo bar_foo/; is($foo->foo, 'Baz::Role::foo', '... got the right method'); is($foo->foo_foo, 'Foo::Role::foo', '... got the right method'); is($foo->bar_foo, 'Bar::Role::foo', '... got the right method'); } { package My::Foo::Role; use Moose::Role; ::is( ::exception { with 'Foo::Role' => { -alias => { 'foo' => 'foo_foo' }, -excludes => 'foo' }, 'Bar::Role' => { -alias => { 'foo' => 'bar_foo' }, -excludes => 'foo' }, 'Baz::Role'; }, undef, '... composed our roles correctly' ); } ok(My::Foo::Role->meta->has_method($_), "we have a $_ method") for qw/foo foo_foo bar_foo/;; ok(!My::Foo::Role->meta->requires_method('foo'), '... and the &foo method is not required'); { package My::Foo::Role::Other; use Moose::Role; ::is( ::exception { with 'Foo::Role' => { -alias => { 'foo' => 'foo_foo' }, -excludes => 'foo' }, 'Bar::Role' => { -alias => { 'foo' => 'foo_foo' }, -excludes => 'foo' }, 'Baz::Role'; }, undef, '... composed our roles correctly' ); } ok(!My::Foo::Role::Other->meta->has_method('foo_foo'), "we dont have a foo_foo method"); ok(My::Foo::Role::Other->meta->requires_method('foo_foo'), '... and the &foo method is required'); { package My::Foo::AliasOnly; use Moose; ::is( ::exception { with 'Foo::Role' => { -alias => { 'foo' => 'foo_foo' } }, }, undef, '... composed our roles correctly' ); } ok(My::Foo::AliasOnly->meta->has_method('foo'), 'we have a foo method'); ok(My::Foo::AliasOnly->meta->has_method('foo_foo'), '.. and the aliased foo_foo method'); { package Role::Foo; use Moose::Role; sub x1 {} sub y1 {} } { package Role::Bar; use Moose::Role; ::is( ::exception { with 'Role::Foo' => { -alias => { x1 => 'foo_x1' }, -excludes => ['y1'], }; }, undef, 'Compose Role::Foo into Role::Bar with alias and exclude' ); sub x1 {} sub y1 {} } { my $bar = Role::Bar->meta; ok( $bar->has_method($_), "has $_ method" ) for qw( x1 y1 foo_x1 ); } { package Role::Baz; use Moose::Role; ::is( ::exception { with 'Role::Foo' => { -alias => { x1 => 'foo_x1' }, -excludes => ['y1'], }; }, undef, 'Compose Role::Foo into Role::Baz with alias and exclude' ); } { my $baz = Role::Baz->meta; ok( $baz->has_method($_), "has $_ method" ) for qw( x1 foo_x1 ); ok( ! $baz->has_method('y1'), 'Role::Baz has no y1 method' ); } done_testing; Moose-2.1604/t/roles/method_exclusion_in_composition.t000644 000766 000024 00000005312 12617452415 023411 0ustar00etherstaff000000 000000 use strict; use warnings; use Test::More; use Test::Fatal; { package My::Role; use Moose::Role; sub foo { 'Foo::foo' } sub bar { 'Foo::bar' } sub baz { 'Foo::baz' } package My::Class; use Moose; with 'My::Role' => { -excludes => 'bar' }; } ok(My::Class->meta->has_method($_), "we have a $_ method") for qw(foo baz); ok(!My::Class->meta->has_method('bar'), '... but we excluded bar'); { package My::OtherRole; use Moose::Role; with 'My::Role' => { -excludes => 'foo' }; sub foo { 'My::OtherRole::foo' } sub bar { 'My::OtherRole::bar' } } ok(My::OtherRole->meta->has_method($_), "we have a $_ method") for qw(foo bar baz); ok(!My::OtherRole->meta->requires_method('foo'), '... and the &foo method is not required'); ok(!My::OtherRole->meta->requires_method('bar'), '... and the &bar method is not required'); { package Foo::Role; use Moose::Role; sub foo { 'Foo::Role::foo' } package Bar::Role; use Moose::Role; sub foo { 'Bar::Role::foo' } package Baz::Role; use Moose::Role; sub foo { 'Baz::Role::foo' } package My::Foo::Class; use Moose; ::is( ::exception { with 'Foo::Role' => { -excludes => 'foo' }, 'Bar::Role' => { -excludes => 'foo' }, 'Baz::Role'; }, undef, '... composed our roles correctly' ); package My::Foo::Class::Broken; use Moose; ::like( ::exception { with 'Foo::Role', 'Bar::Role' => { -excludes => 'foo' }, 'Baz::Role'; }, qr/Due to a method name conflict in roles 'Baz::Role' and 'Foo::Role', the method 'foo' must be implemented or excluded by 'My::Foo::Class::Broken'/, '... composed our roles correctly' ); } { my $foo = My::Foo::Class->new; isa_ok($foo, 'My::Foo::Class'); can_ok($foo, 'foo'); is($foo->foo, 'Baz::Role::foo', '... got the right method'); } { package My::Foo::Role; use Moose::Role; ::is( ::exception { with 'Foo::Role' => { -excludes => 'foo' }, 'Bar::Role' => { -excludes => 'foo' }, 'Baz::Role'; }, undef, '... composed our roles correctly' ); } ok(My::Foo::Role->meta->has_method('foo'), "we have a foo method"); ok(!My::Foo::Role->meta->requires_method('foo'), '... and the &foo method is not required'); { package My::Foo::Role::Other; use Moose::Role; ::is( ::exception { with 'Foo::Role', 'Bar::Role' => { -excludes => 'foo' }, 'Baz::Role'; }, undef, '... composed our roles correctly' ); } ok(!My::Foo::Role::Other->meta->has_method('foo'), "we dont have a foo method"); ok(My::Foo::Role::Other->meta->requires_method('foo'), '... and the &foo method is required'); done_testing; Moose-2.1604/t/roles/method_modifiers.t000644 000766 000024 00000002467 12617452415 020260 0ustar00etherstaff000000 000000 use strict; use warnings; use Test::More; use Test::Fatal; my $FooRole; { package Foo::Role; use Moose::Role; after foo => sub { $FooRole++ }; } { package Foo; use Moose; with 'Foo::Role'; sub foo { } } Foo->foo; is($FooRole, 1, "modifier called"); my $BarRole; { package Bar::Role; use Moose::Role; after ['foo', 'bar'] => sub { $BarRole++ }; } { package Bar; use Moose; with 'Bar::Role'; sub foo { } sub bar { } } Bar->foo; is($BarRole, 1, "modifier called"); Bar->bar; is($BarRole, 2, "modifier called"); my $BazRole; { package Baz::Role; use Moose::Role; after 'foo', 'bar' => sub { $BazRole++ }; } { package Baz; use Moose; with 'Baz::Role'; sub foo { } sub bar { } } Baz->foo; is($BazRole, 1, "modifier called"); Baz->bar; is($BazRole, 2, "modifier called"); my $QuuxRole; { package Quux::Role; use Moose::Role; { our $TODO; local $TODO = "can't handle regexes yet"; ::is( ::exception { after qr/foo|bar/ => sub { $QuuxRole++ } }, undef ); } } { package Quux; use Moose; with 'Quux::Role'; sub foo { } sub bar { } } { local $TODO = "can't handle regexes yet"; Quux->foo; is($QuuxRole, 1, "modifier called"); Quux->bar; is($QuuxRole, 2, "modifier called"); } done_testing; Moose-2.1604/t/roles/methods.t000644 000766 000024 00000001700 12617452415 016367 0ustar00etherstaff000000 000000 use strict; use warnings; use Test::More; use Moose::Role (); my $test1 = Moose::Meta::Role->create_anon_role; $test1->add_method( 'foo1', sub { } ); ok( $test1->has_method('foo1'), 'anon role has a foo1 method' ); my $t1_am = $test1->get_method('foo1')->associated_metaclass; ok( $t1_am, 'associated_metaclass is defined' ); isa_ok( $t1_am, 'Moose::Meta::Role', 'associated_metaclass is correct class' ); like( $t1_am->name(), qr/::__ANON__::/, 'associated_metaclass->name looks like an anonymous class' ); { package Test2; use Moose::Role; sub foo2 { } } ok( Test2->meta->has_method('foo2'), 'Test2 role has a foo2 method' ); my $t2_am = Test2->meta->get_method('foo2')->associated_metaclass; ok( $t2_am, 'associated_metaclass is defined' ); isa_ok( $t2_am, 'Moose::Meta::Role', 'associated_metaclass is correct class' ); is( $t2_am->name(), 'Test2', 'associated_metaclass->name is Test2' ); done_testing; Moose-2.1604/t/roles/more_alias_and_exclude.t000644 000766 000024 00000004252 12617452415 021377 0ustar00etherstaff000000 000000 use strict; use warnings; use Test::More; use Test::Fatal; { package Foo; use Moose::Role; sub foo { 'Foo::foo' } sub bar { 'Foo::bar' } sub baz { 'Foo::baz' } sub gorch { 'Foo::gorch' } package Bar; use Moose::Role; sub foo { 'Bar::foo' } sub bar { 'Bar::bar' } sub baz { 'Bar::baz' } sub gorch { 'Bar::gorch' } package Baz; use Moose::Role; sub foo { 'Baz::foo' } sub bar { 'Baz::bar' } sub baz { 'Baz::baz' } sub gorch { 'Baz::gorch' } package Gorch; use Moose::Role; sub foo { 'Gorch::foo' } sub bar { 'Gorch::bar' } sub baz { 'Gorch::baz' } sub gorch { 'Gorch::gorch' } } { package My::Class; use Moose; ::is( ::exception { with 'Foo' => { -excludes => [qw/bar baz gorch/], -alias => { gorch => 'foo_gorch' } }, 'Bar' => { -excludes => [qw/foo baz gorch/] }, 'Baz' => { -excludes => [qw/foo bar gorch/], -alias => { foo => 'baz_foo', bar => 'baz_bar' } }, 'Gorch' => { -excludes => [qw/foo bar baz/] }; }, undef, '... everything works out all right' ); } my $c = My::Class->new; isa_ok($c, 'My::Class'); is($c->foo, 'Foo::foo', '... got the right method'); is($c->bar, 'Bar::bar', '... got the right method'); is($c->baz, 'Baz::baz', '... got the right method'); is($c->gorch, 'Gorch::gorch', '... got the right method'); is($c->foo_gorch, 'Foo::gorch', '... got the right method'); is($c->baz_foo, 'Baz::foo', '... got the right method'); is($c->baz_bar, 'Baz::bar', '... got the right method'); { package Splunk; use Moose::Role; sub baz { 'Splunk::baz' } sub gorch { 'Splunk::gorch' } ::is(::exception { with 'Foo' }, undef, 'role to role application works'); package My::Class2; use Moose; ::is(::exception { with 'Splunk' }, undef, 'and the role can be consumed'); } is(My::Class2->foo, 'Foo::foo', '... got the right method'); is(My::Class2->bar, 'Foo::bar', '... got the right method'); is(My::Class2->baz, 'Splunk::baz', '... got the right method'); is(My::Class2->gorch, 'Splunk::gorch', '... got the right method'); done_testing; Moose-2.1604/t/roles/more_role_edge_cases.t000644 000766 000024 00000015076 12617452415 021064 0ustar00etherstaff000000 000000 use strict; use warnings; use Test::More; use Test::Fatal; { # NOTE: # this tests that repeated role # composition will not cause # a conflict between two methods # which are actually the same anyway { package RootA; use Moose::Role; sub foo { "RootA::foo" } package SubAA; use Moose::Role; with "RootA"; sub bar { "SubAA::bar" } package SubAB; use Moose; ::is( ::exception { with "SubAA", "RootA"; }, undef, '... role was composed as expected' ); } ok( SubAB->does("SubAA"), "does SubAA"); ok( SubAB->does("RootA"), "does RootA"); isa_ok( my $i = SubAB->new, "SubAB" ); can_ok( $i, "bar" ); is( $i->bar, "SubAA::bar", "... got thr right bar rv" ); can_ok( $i, "foo" ); my $foo_rv; is( exception { $foo_rv = $i->foo; }, undef, '... called foo successfully' ); is($foo_rv, "RootA::foo", "... got the right foo rv"); } { # NOTE: # this edge cases shows the application of # an after modifier over a method which # was added during role composotion. # The way this will work is as follows: # role SubBA will consume RootB and # get a local copy of RootB::foo, it # will also store a deferred after modifier # to be applied to whatever class SubBA is # composed into. # When class SubBB comsumed role SubBA, the # RootB::foo method is added to SubBB, then # the deferred after modifier from SubBA is # applied to it. # It is important to note that the application # of the after modifier does not happen until # role SubBA is composed into SubAA. { package RootB; use Moose::Role; sub foo { "RootB::foo" } package SubBA; use Moose::Role; with "RootB"; has counter => ( isa => "Num", is => "rw", default => 0, ); after foo => sub { $_[0]->counter( $_[0]->counter + 1 ); }; package SubBB; use Moose; ::is( ::exception { with "SubBA"; }, undef, '... composed the role successfully' ); } ok( SubBB->does("SubBA"), "BB does SubBA" ); ok( SubBB->does("RootB"), "BB does RootB" ); isa_ok( my $i = SubBB->new, "SubBB" ); can_ok( $i, "foo" ); my $foo_rv; is( exception { $foo_rv = $i->foo }, undef, '... called foo successfully' ); is( $foo_rv, "RootB::foo", "foo rv" ); is( $i->counter, 1, "after hook called" ); is( exception { $i->foo }, undef, '... called foo successfully (again)' ); is( $i->counter, 2, "after hook called (again)" ); ok(SubBA->meta->has_method('foo'), '... this has the foo method'); #my $subba_foo_rv; #lives_ok { # $subba_foo_rv = SubBA::foo(); #} '... called the sub as a function correctly'; #is($subba_foo_rv, 'RootB::foo', '... the SubBA->foo is still the RootB version'); } { # NOTE: # this checks that an override method # does not try to trample over a locally # composed in method. In this case the # RootC::foo, which is composed into # SubCA cannot be trampled with an # override of 'foo' { package RootC; use Moose::Role; sub foo { "RootC::foo" } package SubCA; use Moose::Role; with "RootC"; ::isnt( ::exception { override foo => sub { "overridden" }; }, undef, '... cannot compose an override over a local method' ); } } # NOTE: # need to talk to Yuval about the motivation behind # this test, I am not sure we are testing anything # useful here (although more tests cant hurt) { use List::Util qw/shuffle/; { package Abstract; use Moose::Role; requires "method"; requires "other"; sub another { "abstract" } package ConcreteA; use Moose::Role; with "Abstract"; sub other { "concrete a" } package ConcreteB; use Moose::Role; with "Abstract"; sub method { "concrete b" } package ConcreteC; use Moose::Role; with "ConcreteA"; # NOTE: # this was originally override, but # that wont work (see above set of tests) # so I switched it to around. # However, this may not be testing the # same thing that was originally intended around other => sub { return ( (shift)->() . " + c" ); }; package SimpleClassWithSome; use Moose; eval { with ::shuffle qw/ConcreteA ConcreteB/ }; ::ok( !$@, "simple composition without abstract" ) || ::diag $@; package SimpleClassWithAll; use Moose; eval { with ::shuffle qw/ConcreteA ConcreteB Abstract/ }; ::ok( !$@, "simple composition with abstract" ) || ::diag $@; } foreach my $class (qw/SimpleClassWithSome SimpleClassWithAll/) { foreach my $role (qw/Abstract ConcreteA ConcreteB/) { ok( $class->does($role), "$class does $role"); } foreach my $method (qw/method other another/) { can_ok( $class, $method ); } is( eval { $class->another }, "abstract", "provided by abstract" ); is( eval { $class->other }, "concrete a", "provided by concrete a" ); is( eval { $class->method }, "concrete b", "provided by concrete b" ); } { package ClassWithSome; use Moose; eval { with ::shuffle qw/ConcreteC ConcreteB/ }; ::ok( !$@, "composition without abstract" ) || ::diag $@; package ClassWithAll; use Moose; eval { with ::shuffle qw/ConcreteC Abstract ConcreteB/ }; ::ok( !$@, "composition with abstract" ) || ::diag $@; package ClassWithEverything; use Moose; eval { with ::shuffle qw/ConcreteC Abstract ConcreteA ConcreteB/ }; # this should clash ::ok( !$@, "can compose ConcreteA and ConcreteC together" ); } foreach my $class (qw/ClassWithSome ClassWithAll ClassWithEverything/) { foreach my $role (qw/Abstract ConcreteA ConcreteB ConcreteC/) { ok( $class->does($role), "$class does $role"); } foreach my $method (qw/method other another/) { can_ok( $class, $method ); } is( eval { $class->another }, "abstract", "provided by abstract" ); is( eval { $class->other }, "concrete a + c", "provided by concrete c + a" ); is( eval { $class->method }, "concrete b", "provided by concrete b" ); } } done_testing; Moose-2.1604/t/roles/new_meta_role.t000644 000766 000024 00000000436 12617452415 017551 0ustar00etherstaff000000 000000 use strict; use warnings; use Test::More; do { package My::Meta::Role; use Moose; BEGIN { extends 'Moose::Meta::Role' }; }; do { package My::Role; use Moose::Role -metaclass => 'My::Meta::Role'; }; is(My::Role->meta->meta->name, 'My::Meta::Role'); done_testing; Moose-2.1604/t/roles/overloading_combine_to_class.t000644 000766 000024 00000001275 12617452415 022627 0ustar00etherstaff000000 000000 use strict; use warnings; use Test::More 0.96; use Test::Warnings; use overload (); use lib 't/lib'; use OverloadingTests; use Overloading::CombiningClass; for my $role ( qw( Overloading::RoleWithOverloads Overloading::RoleWithoutOverloads )) { ok( Overloading::CombiningClass->DOES($role), "Overloading::CombiningClass does $role role" ); } OverloadingTests::test_overloading_for_package($_) for qw( Overloading::RoleWithOverloads Overloading::CombiningClass ); OverloadingTests::test_no_overloading_for_package( 'Overloading::RoleWithoutOverloads'); OverloadingTests::test_overloading_for_package( 'Overloading::CombiningClass'); done_testing(); Moose-2.1604/t/roles/overloading_combine_to_instance.t000644 000766 000024 00000001526 12617452415 023325 0ustar00etherstaff000000 000000 use strict; use warnings; use Test::More 0.88; use Test::Warnings; use overload (); use lib 't/lib'; use OverloadingTests; use Overloading::RoleWithOverloads; use Overloading::RoleWithoutOverloads; { package MyClass; use Moose; } my $object = MyClass->new; Moose::Meta::Role->combine( [ 'Overloading::RoleWithOverloads' => undef ], [ 'Overloading::RoleWithoutOverloads' => undef ], )->apply($object); OverloadingTests::test_overloading_for_package($_) for 'Overloading::RoleWithOverloads', ref $object; OverloadingTests::test_no_overloading_for_package( 'Overloading::RoleWithoutOverloads'); $object->message('foo'); OverloadingTests::test_overloading_for_object( $object, 'object with Overloading::RoleWithOverloads and Overloading::RoleWithoutOverloads combined and applied to instance' ); done_testing(); Moose-2.1604/t/roles/overloading_combine_to_role.t000644 000766 000024 00000001345 12617452415 022461 0ustar00etherstaff000000 000000 use strict; use warnings; use Test::More 0.88; use Test::Warnings; use overload (); use lib 't/lib'; use OverloadingTests; use Overloading::ClassWithCombiningRole; for my $role ( qw( Overloading::RoleWithOverloads Overloading::RoleWithoutOverloads )) { ok( Overloading::ClassWithCombiningRole->DOES($role), "Overloading::ClassWithCombiningRole does $role role" ); } OverloadingTests::test_overloading_for_package($_) for qw( Overloading::RoleWithOverloads Overloading::ClassWithCombiningRole ); OverloadingTests::test_no_overloading_for_package( 'Overloading::RoleWithoutOverloads'); OverloadingTests::test_overloading_for_package( 'Overloading::ClassWithCombiningRole'); done_testing(); Moose-2.1604/t/roles/overloading_composition_errors.t000644 000766 000024 00000007001 12617452415 023254 0ustar00etherstaff000000 000000 use strict; use warnings; use Test::More 0.88; use Test::Fatal; use Test::Warnings; use lib 't/lib'; { package Role::HasFallback; use Moose::Role; use overload q{""} => '_stringify', fallback => 1; sub _stringify { __PACKAGE__ } } { package Role::NoFallback; use Moose::Role; use overload '0+' => '_numify', fallback => 0; sub _numify { 42 } } { package Class1; use Moose; ::like( ::exception { with qw( Role::HasFallback Role::NoFallback ) }, qr/\QWe have encountered an overloading conflict for the fallback during composition. This is a fatal error./, 'exception from fallback conflict during role summation' ); } { package Role::NoOverloading; use Moose::Role; sub foo { 42 } } { package Class2; use Moose; ::like( ::exception { with qw( Role::HasFallback Role::NoFallback Role::NoOverloading ) }, qr/\QWe have encountered an overloading conflict for the fallback during composition. This is a fatal error./, 'exception from fallback conflict during role summation including role without overloading' ); } { package Role::StringifiesViaSubref1; use Moose::Role; use overload q{""} => sub { 'foo' }; } { package Role::StringifiesViaSubref2; use Moose::Role; use overload q{""} => sub { 'bar' }; } { package Class3; use Moose; ::like( ::exception { with qw( Role::StringifiesViaSubref1 Role::StringifiesViaSubref2 ) }, qr/\QThe two roles both overload the '""' operator. This is a fatal error./, 'exception when two roles with different subref overloading conflict during role summation' ); } { package Class4; use Moose; ::like( ::exception { with qw( Role::StringifiesViaSubref1 Role::StringifiesViaSubref2 Role::NoOverloading ) }, qr/\QThe two roles both overload the '""' operator. This is a fatal error./, 'exception when two roles with different subref overloading conflict during role summation including role without overloading' ); } { package Role::StringifiesViaMethod1; use Moose::Role; use overload q{""} => '_stringify1'; sub _stringify1 { 'foo' } } { package Role::StringifiesViaMethod2; use Moose::Role; use overload q{""} => '_stringify2'; sub _stringify2 { 'foo' } } { package Class5; use Moose; ::like( ::exception { with qw( Role::StringifiesViaMethod1 Role::StringifiesViaMethod2 ) }, qr/\QThe two roles both overload the '""' operator. This is a fatal error./, 'exception when two roles with different method overloading conflict during role summation' ); } { package Class6; use Moose; ::like( ::exception { with qw( Role::StringifiesViaMethod1 Role::StringifiesViaMethod2 Role::NoOverloading ) }, qr/\QThe two roles both overload the '""' operator. This is a fatal error./, 'exception when two roles with different method overloading conflict during role summation including role without overloading' ); } { { package R1; use Moose::Role; use overload '&{}' => 'as_code'; sub as_code { } } { package R2; use Moose::Role; with 'R1'; } { package C1; use Moose; ::is( ::exception { with 'R1', 'R2' }, undef, 'no conflict when class consumes multiple roles with the same overloading' ); } } done_testing(); Moose-2.1604/t/roles/overloading_remove_attributes_bug.t000644 000766 000024 00000001164 12617452415 023721 0ustar00etherstaff000000 000000 use strict; use warnings; use Test::More 0.88; use Test::Warnings; use lib 't/lib'; use OverloadingTests; { package MyRole; use Moose::Role; has foo => ( is => 'ro' ); # Note ordering here. If metaclass reinitialization nukes attributes, this # breaks. with 'Overloading::RoleWithOverloads'; } { package MyClass; use Moose; with 'MyRole'; } my $object = MyClass->new( foo => 21, message => 'foo' ); OverloadingTests::test_overloading_for_object( $object, 'MyClass object' ); is( $object->foo(), 21, 'foo attribute in MyClass is still present (from MyRole)' ); done_testing(); Moose-2.1604/t/roles/overloading_to_class.t000644 000766 000024 00000002576 12617452415 021140 0ustar00etherstaff000000 000000 use strict; use warnings; use Test::More 0.88; use Test::Warnings; use overload (); use lib 't/lib'; use OverloadingTests; use Overloading::ClassWithOneRole; ok( Overloading::ClassWithOneRole->DOES('Overloading::RoleWithOverloads'), 'Overloading::ClassWithOneRole consumed Overloading::RoleWithOverloads', ); OverloadingTests::test_overloading_for_package($_) for qw( Overloading::RoleWithOverloads Overloading::ClassWithOneRole ); OverloadingTests::test_overloading_for_object( 'Overloading::ClassWithOneRole'); { package Role1; use Moose::Role; use overload q{""} => '_role1_stringify', q{+} => '_role1_plus', fallback => 0; sub _role1_stringify {__PACKAGE__} sub _role1_plus {42} } { package Class1; use Moose; use overload q{""} => '_class1_stringify', fallback => 1; with 'Role1'; sub _class1_stringify {__PACKAGE__} } is( Class1->meta->get_overload_fallback_value, 1, 'fallback setting for class overrides setting in composed role' ); is( Class1->new . q{}, 'Class1', 'overload method for class overrides method in composed role' ); my $overload = Class1->meta->get_overloaded_operator(q{+}); is( $overload->original_overload->associated_metaclass->name, 'Role1', '+ overloading for Class1 originally came from Role1' ); done_testing(); Moose-2.1604/t/roles/overloading_to_instance.t000644 000766 000024 00000001070 12617452415 021623 0ustar00etherstaff000000 000000 use strict; use warnings; use Test::More 0.88; use Test::Warnings; use overload (); use lib 't/lib'; use OverloadingTests; use Overloading::RoleWithOverloads; { package MyClass; use Moose; } my $object = MyClass->new; Overloading::RoleWithOverloads->meta->apply($object); OverloadingTests::test_overloading_for_package($_) for 'Overloading::RoleWithOverloads', ref $object; $object->message('foo'); OverloadingTests::test_overloading_for_object( $object, 'object with Overloading::RoleWithOverloads applied to instance' ); done_testing(); Moose-2.1604/t/roles/overloading_to_role.t000644 000766 000024 00000002303 12617452415 020760 0ustar00etherstaff000000 000000 use strict; use warnings; use Test::More 0.88; use Test::Warnings; use overload (); use lib 't/lib'; use OverloadingTests; use Overloading::ClassConsumesRoleConsumesOverloads; for my $role ( qw( Overloading::RoleWithOverloads Overloading::RoleConsumesOverloads )) { ok( Overloading::ClassConsumesRoleConsumesOverloads->DOES($role), "Overloading::ClassConsumesRoleConsumesOverloads does $role role" ); } OverloadingTests::test_overloading_for_package($_) for qw( Overloading::RoleWithOverloads Overloading::RoleConsumesOverloads Overloading::ClassConsumesRoleConsumesOverloads ); OverloadingTests::test_overloading_for_object( 'Overloading::ClassConsumesRoleConsumesOverloads'); # These tests failed on 5.18+ in MXRWO - the key issue was the lack of a # "fallback" key being passed to overload.pm { package MyRole1; use Moose::Role; use overload q{""} => '_stringify'; sub _stringify {__PACKAGE__} } { package MyRole2; use Moose::Role; with 'MyRole1'; } { package Class1; use Moose; with 'MyRole2'; } is( Class1->new . q{}, 'MyRole1', 'stringification overloading is passed through all roles' ); done_testing(); Moose-2.1604/t/roles/overriding.t000644 000766 000024 00000012710 12617452415 017077 0ustar00etherstaff000000 000000 use strict; use warnings; use Test::More; use Test::Fatal; { # test no conflicts here package Role::A; use Moose::Role; sub bar { 'Role::A::bar' } package Role::B; use Moose::Role; sub xxy { 'Role::B::xxy' } package Role::C; use Moose::Role; ::is( ::exception { with qw(Role::A Role::B); # no conflict here }, undef, "define role C" ); sub foo { 'Role::C::foo' } sub zot { 'Role::C::zot' } package Class::A; use Moose; ::is( ::exception { with qw(Role::C); }, undef, "define class A" ); sub zot { 'Class::A::zot' } } can_ok( Class::A->new, qw(foo bar xxy zot) ); is( Class::A->new->foo, "Role::C::foo", "... got the right foo method" ); is( Class::A->new->zot, "Class::A::zot", "... got the right zot method" ); is( Class::A->new->bar, "Role::A::bar", "... got the right bar method" ); is( Class::A->new->xxy, "Role::B::xxy", "... got the right xxy method" ); { # check that when a role is added to another role # that the consumer's method shadows just like for classes. package Role::A::Shadow; use Moose::Role; with 'Role::A'; sub bar { 'Role::A::Shadow::bar' } package Class::A::Shadow; use Moose; ::is( ::exception { with 'Role::A::Shadow'; }, undef, '... did fufill the requirement of &bar method' ); } can_ok( Class::A::Shadow->new, qw(bar) ); is( Class::A::Shadow->new->bar, 'Role::A::Shadow::bar', "... got the right bar method" ); { # check that when two roles are composed, they conflict # but the composing role can resolve that conflict package Role::D; use Moose::Role; sub foo { 'Role::D::foo' } sub bar { 'Role::D::bar' } package Role::E; use Moose::Role; sub foo { 'Role::E::foo' } sub xxy { 'Role::E::xxy' } package Role::F; use Moose::Role; ::is( ::exception { with qw(Role::D Role::E); # conflict between 'foo's here }, undef, "define role Role::F" ); sub foo { 'Role::F::foo' } sub zot { 'Role::F::zot' } package Class::B; use Moose; ::is( ::exception { with qw(Role::F); }, undef, "define class Class::B" ); sub zot { 'Class::B::zot' } } can_ok( Class::B->new, qw(foo bar xxy zot) ); is( Class::B->new->foo, "Role::F::foo", "... got the &foo method okay" ); is( Class::B->new->zot, "Class::B::zot", "... got the &zot method okay" ); is( Class::B->new->bar, "Role::D::bar", "... got the &bar method okay" ); is( Class::B->new->xxy, "Role::E::xxy", "... got the &xxy method okay" ); ok(!Role::F->meta->requires_method('foo'), '... Role::F fufilled the &foo requirement'); { # check that a conflict can be resolved # by a role, but also new ones can be # created just as easily ... package Role::D::And::E::NoConflict; use Moose::Role; ::is( ::exception { with qw(Role::D Role::E); # conflict between 'foo's here }, undef, "... define role Role::D::And::E::NoConflict" ); sub foo { 'Role::D::And::E::NoConflict::foo' } # this overrides ... sub xxy { 'Role::D::And::E::NoConflict::xxy' } # and so do these ... sub bar { 'Role::D::And::E::NoConflict::bar' } } ok(!Role::D::And::E::NoConflict->meta->requires_method('foo'), '... Role::D::And::E::NoConflict fufilled the &foo requirement'); ok(!Role::D::And::E::NoConflict->meta->requires_method('xxy'), '... Role::D::And::E::NoConflict fulfilled the &xxy requirement'); ok(!Role::D::And::E::NoConflict->meta->requires_method('bar'), '... Role::D::And::E::NoConflict fulfilled the &bar requirement'); { # conflict propagation package Role::H; use Moose::Role; sub foo { 'Role::H::foo' } sub bar { 'Role::H::bar' } package Role::J; use Moose::Role; sub foo { 'Role::J::foo' } sub xxy { 'Role::J::xxy' } package Role::I; use Moose::Role; ::is( ::exception { with qw(Role::J Role::H); # conflict between 'foo's here }, undef, "define role Role::I" ); sub zot { 'Role::I::zot' } sub zzy { 'Role::I::zzy' } package Class::C; use Moose; ::like( ::exception { with qw(Role::I); }, qr/Due to a method name conflict in roles 'Role::H' and 'Role::J', the method 'foo' must be implemented or excluded by 'Class::C'/, "defining class Class::C fails" ); sub zot { 'Class::C::zot' } package Class::E; use Moose; ::is( ::exception { with qw(Role::I); }, undef, "resolved with method" ); sub foo { 'Class::E::foo' } sub zot { 'Class::E::zot' } } can_ok( Class::E->new, qw(foo bar xxy zot) ); is( Class::E->new->foo, "Class::E::foo", "... got the right &foo method" ); is( Class::E->new->zot, "Class::E::zot", "... got the right &zot method" ); is( Class::E->new->bar, "Role::H::bar", "... got the right &bar method" ); is( Class::E->new->xxy, "Role::J::xxy", "... got the right &xxy method" ); ok(Role::I->meta->requires_method('foo'), '... Role::I still have the &foo requirement'); { is( exception { package Class::D; use Moose; has foo => ( default => __PACKAGE__ . "::foo", is => "rw" ); sub zot { 'Class::D::zot' } with qw(Role::I); }, undef, "resolved with attr" ); can_ok( Class::D->new, qw(foo bar xxy zot) ); is( eval { Class::D->new->bar }, "Role::H::bar", "bar" ); is( eval { Class::D->new->zzy }, "Role::I::zzy", "zzy" ); is( eval { Class::D->new->foo }, "Class::D::foo", "foo" ); is( eval { Class::D->new->zot }, "Class::D::zot", "zot" ); } done_testing; Moose-2.1604/t/roles/reinitialize_anon_role.t000644 000766 000024 00000001416 12617452415 021454 0ustar00etherstaff000000 000000 use strict; use warnings; use Test::More; { package Role::Metarole; use Moose::Role; } my ($role2); { my $role1 = Moose::Meta::Role->create_anon_role( methods => { foo => sub { }, }, ); ok($role1->has_method('foo'), "role has method foo"); $role2 = Moose::Util::MetaRole::apply_metaroles( for => $role1->name, role_metaroles => { role => ['Role::Metarole'] }, ); isnt($role1, $role2, "anon role was reinitialized"); is($role1->name, $role2->name, "but it's the same anon role"); is_deeply([sort $role2->get_method_list], ['foo', 'meta'], "has the right methods"); } is_deeply([sort $role2->get_method_list], ['foo', 'meta'], "still has the right methods"); done_testing; Moose-2.1604/t/roles/role.t000644 000766 000024 00000011255 12617452415 015673 0ustar00etherstaff000000 000000 use strict; use warnings; use Test::More; use Test::Fatal; =pod NOTE: Should we be testing here that the has & override are injecting their methods correctly? In other words, should 'has_method' return true for them? =cut { package FooRole; use Moose::Role; our $VERSION = '0.01'; has 'bar' => (is => 'rw', isa => 'Foo'); has 'baz' => (is => 'ro'); sub foo { 'FooRole::foo' } sub boo { 'FooRole::boo' } before 'boo' => sub { "FooRole::boo:before" }; after 'boo' => sub { "FooRole::boo:after1" }; after 'boo' => sub { "FooRole::boo:after2" }; around 'boo' => sub { "FooRole::boo:around" }; override 'bling' => sub { "FooRole::bling:override" }; override 'fling' => sub { "FooRole::fling:override" }; ::isnt( ::exception { extends() }, undef, '... extends() is not supported' ); ::isnt( ::exception { augment() }, undef, '... augment() is not supported' ); ::isnt( ::exception { inner() }, undef, '... inner() is not supported' ); no Moose::Role; } my $foo_role = FooRole->meta; isa_ok($foo_role, 'Moose::Meta::Role'); isa_ok($foo_role, 'Class::MOP::Module'); is($foo_role->name, 'FooRole', '... got the right name of FooRole'); is($foo_role->version, '0.01', '... got the right version of FooRole'); # methods ... ok($foo_role->has_method('foo'), '... FooRole has the foo method'); is($foo_role->get_method('foo')->body, \&FooRole::foo, '... FooRole got the foo method'); isa_ok($foo_role->get_method('foo'), 'Moose::Meta::Role::Method'); ok($foo_role->has_method('boo'), '... FooRole has the boo method'); is($foo_role->get_method('boo')->body, \&FooRole::boo, '... FooRole got the boo method'); isa_ok($foo_role->get_method('boo'), 'Moose::Meta::Role::Method'); is_deeply( [ sort $foo_role->get_method_list() ], [ 'boo', 'foo', 'meta' ], '... got the right method list'); ok(FooRole->can('foo'), "locally defined methods are still there"); ok(!FooRole->can('has'), "sugar was unimported"); # attributes ... is_deeply( [ sort $foo_role->get_attribute_list() ], [ 'bar', 'baz' ], '... got the right attribute list'); ok($foo_role->has_attribute('bar'), '... FooRole does have the bar attribute'); my $bar_attr = $foo_role->get_attribute('bar'); is($bar_attr->{is}, 'rw', 'bar attribute is rw'); is($bar_attr->{isa}, 'Foo', 'bar attribute isa Foo'); is(ref($bar_attr->{definition_context}), 'HASH', 'bar\'s definition context is a hash'); is($bar_attr->{definition_context}->{package}, 'FooRole', 'bar was defined in FooRole'); ok($foo_role->has_attribute('baz'), '... FooRole does have the baz attribute'); my $baz_attr = $foo_role->get_attribute('baz'); is($baz_attr->{is}, 'ro', 'baz attribute is ro'); is(ref($baz_attr->{definition_context}), 'HASH', 'bar\'s definition context is a hash'); is($baz_attr->{definition_context}->{package}, 'FooRole', 'baz was defined in FooRole'); # method modifiers ok($foo_role->has_before_method_modifiers('boo'), '... now we have a boo:before modifier'); is(($foo_role->get_before_method_modifiers('boo'))[0]->(), "FooRole::boo:before", '... got the right method back'); is_deeply( [ $foo_role->get_method_modifier_list('before') ], [ 'boo' ], '... got the right list of before method modifiers'); ok($foo_role->has_after_method_modifiers('boo'), '... now we have a boo:after modifier'); is(($foo_role->get_after_method_modifiers('boo'))[0]->(), "FooRole::boo:after1", '... got the right method back'); is(($foo_role->get_after_method_modifiers('boo'))[1]->(), "FooRole::boo:after2", '... got the right method back'); is_deeply( [ $foo_role->get_method_modifier_list('after') ], [ 'boo' ], '... got the right list of after method modifiers'); ok($foo_role->has_around_method_modifiers('boo'), '... now we have a boo:around modifier'); is(($foo_role->get_around_method_modifiers('boo'))[0]->(), "FooRole::boo:around", '... got the right method back'); is_deeply( [ $foo_role->get_method_modifier_list('around') ], [ 'boo' ], '... got the right list of around method modifiers'); ## overrides ok($foo_role->has_override_method_modifier('bling'), '... now we have a bling:override modifier'); is($foo_role->get_override_method_modifier('bling')->(), "FooRole::bling:override", '... got the right method back'); ok($foo_role->has_override_method_modifier('fling'), '... now we have a fling:override modifier'); is($foo_role->get_override_method_modifier('fling')->(), "FooRole::fling:override", '... got the right method back'); is_deeply( [ sort $foo_role->get_method_modifier_list('override') ], [ 'bling', 'fling' ], '... got the right list of override method modifiers'); done_testing; Moose-2.1604/t/roles/role_attr_application.t000644 000766 000024 00000016065 12617452415 021314 0ustar00etherstaff000000 000000 use strict; use warnings; use Test::More; use Test::Moose; use Moose::Util qw( does_role ); { package Foo::Meta::Attribute; use Moose::Role; } { package Foo::Meta::Attribute2; use Moose::Role; } { package Foo::Role; use Moose::Role; has foo => (is => 'ro'); } { package Foo; use Moose; Moose::Util::MetaRole::apply_metaroles( for => __PACKAGE__, class_metaroles => { attribute => ['Foo::Meta::Attribute'] }, role_metaroles => { applied_attribute => ['Foo::Meta::Attribute2'] }, ); with 'Foo::Role'; has bar => (is => 'ro'); } ok(Moose::Util::does_role(Foo->meta->get_attribute('bar'), 'Foo::Meta::Attribute'), "attrs defined in the class get the class metarole applied"); ok(!Moose::Util::does_role(Foo->meta->get_attribute('bar'), 'Foo::Meta::Attribute2'), "attrs defined in the class don't get the role metarole applied"); ok(!Moose::Util::does_role(Foo->meta->get_attribute('foo'), 'Foo::Meta::Attribute'), "attrs defined in the role don't get the metarole applied"); ok(!Moose::Util::does_role(Foo->meta->get_attribute('foo'), 'Foo::Meta::Attribute'), "attrs defined in the role don't get the role metarole defined in the class applied"); { package Bar::Meta::Attribute; use Moose::Role; } { package Bar::Meta::Attribute2; use Moose::Role; } { package Bar::Role; use Moose::Role; Moose::Util::MetaRole::apply_metaroles( for => __PACKAGE__, class_metaroles => { attribute => ['Bar::Meta::Attribute'] }, role_metaroles => { applied_attribute => ['Bar::Meta::Attribute2'] }, ); has foo => (is => 'ro'); } { package Bar; use Moose; with 'Bar::Role'; has bar => (is => 'ro'); } ok(!Moose::Util::does_role(Bar->meta->get_attribute('bar'), 'Bar::Meta::Attribute'), "attrs defined in the class don't get the class metarole from the role applied"); ok(!Moose::Util::does_role(Bar->meta->get_attribute('bar'), 'Bar::Meta::Attribute2'), "attrs defined in the class don't get the role metarole applied"); ok(Moose::Util::does_role(Bar->meta->get_attribute('foo'), 'Bar::Meta::Attribute2'), "attrs defined in the role get the role metarole applied"); ok(!Moose::Util::does_role(Bar->meta->get_attribute('foo'), 'Bar::Meta::Attribute'), "attrs defined in the role don't get the class metarole applied"); { package Baz::Meta::Attribute; use Moose::Role; } { package Baz::Meta::Attribute2; use Moose::Role; } { package Baz::Role; use Moose::Role; Moose::Util::MetaRole::apply_metaroles( for => __PACKAGE__, class_metaroles => { attribute => ['Baz::Meta::Attribute'] }, role_metaroles => { applied_attribute => ['Baz::Meta::Attribute2'] }, ); has foo => (is => 'ro'); } { package Baz; use Moose; Moose::Util::MetaRole::apply_metaroles( for => __PACKAGE__, class_metaroles => { attribute => ['Baz::Meta::Attribute'] }, role_metaroles => { applied_attribute => ['Baz::Meta::Attribute2'] }, ); with 'Baz::Role'; has bar => (is => 'ro'); } ok(Moose::Util::does_role(Baz->meta->get_attribute('bar'), 'Baz::Meta::Attribute'), "attrs defined in the class get the class metarole applied"); ok(!Moose::Util::does_role(Baz->meta->get_attribute('bar'), 'Baz::Meta::Attribute2'), "attrs defined in the class don't get the role metarole applied"); ok(Moose::Util::does_role(Baz->meta->get_attribute('foo'), 'Baz::Meta::Attribute2'), "attrs defined in the role get the role metarole applied"); ok(!Moose::Util::does_role(Baz->meta->get_attribute('foo'), 'Baz::Meta::Attribute'), "attrs defined in the role don't get the class metarole applied"); { package Accessor::Modifying::Role; use Moose::Role; around _process_options => sub { my $orig = shift; my $self = shift; my ($name, $params) = @_; $self->$orig(@_); $params->{reader} .= '_foo'; }; } { package Plain::Role; use Moose::Role; has foo => ( is => 'ro', isa => 'Str', ); } { package Class::With::Trait; use Moose; Moose::Util::MetaRole::apply_metaroles( for => __PACKAGE__, class_metaroles => { attribute => ['Accessor::Modifying::Role'], }, ); with 'Plain::Role'; has bar => ( is => 'ro', isa => 'Str', ); } { can_ok('Class::With::Trait', 'foo'); can_ok('Class::With::Trait', 'bar_foo'); } { package Role::With::Trait; use Moose::Role; Moose::Util::MetaRole::apply_metaroles( for => __PACKAGE__, role_metaroles => { applied_attribute => ['Accessor::Modifying::Role'], }, ); with 'Plain::Role'; has foo => ( is => 'ro', isa => 'Str', ); sub foo_test { my $self = shift; return $self->can('foo_foo'); } } { package Class::With::Role::With::Trait; use Moose; with 'Role::With::Trait'; has bar => ( is => 'ro', isa => 'Str', ); sub bar_test { my $self = shift; return $self->can('bar'); } } { can_ok('Class::With::Role::With::Trait', 'foo_foo'); can_ok('Class::With::Role::With::Trait', 'bar'); } { package Quux::Meta::Role::Attribute; use Moose::Role; } { package Quux::Role1; use Moose::Role; has foo => (traits => ['Quux::Meta::Role::Attribute'], is => 'ro'); has baz => (is => 'ro'); } { package Quux::Role2; use Moose::Role; Moose::Util::MetaRole::apply_metaroles( for => __PACKAGE__, role_metaroles => { applied_attribute => ['Quux::Meta::Role::Attribute'] }, ); has bar => (is => 'ro'); } { package Quux; use Moose; with 'Quux::Role1', 'Quux::Role2'; } { my $foo = Quux->meta->get_attribute('foo'); does_ok($foo, 'Quux::Meta::Role::Attribute', "individual attribute trait applied correctly"); my $baz = Quux->meta->get_attribute('baz'); ok(! does_role($baz, 'Quux::Meta::Role::Attribute'), "applied_attribute traits do not end up applying to attributes from other roles during composition"); my $bar = Quux->meta->get_attribute('bar'); does_ok($bar, 'Quux::Meta::Role::Attribute', "attribute metarole applied correctly"); } { package HasMeta; use Moose::Role; Moose::Util::MetaRole::apply_metaroles( for => __PACKAGE__, role_metaroles => { applied_attribute => ['Quux::Meta::Role::Attribute'] }, ); has foo => (is => 'ro'); } { package NoMeta; use Moose::Role; with 'HasMeta'; has bar => (is => 'ro'); } { package ConsumesBoth; use Moose; with 'HasMeta', 'NoMeta'; } { my $foo = ConsumesBoth->meta->get_attribute('foo'); does_ok($foo, 'Quux::Meta::Role::Attribute', 'applied_attribute traits are preserved when one role consumes another'); my $bar = ConsumesBoth->meta->get_attribute('bar'); ok(! does_role($bar, 'Quux::Meta::Role::Attribute'), "applied_attribute traits do not spill over from consumed role"); } done_testing; Moose-2.1604/t/roles/role_attribute_conflict.t000644 000766 000024 00000000634 12617452415 021636 0ustar00etherstaff000000 000000 use strict; use warnings; use Test::More; use Test::Fatal; { package My::Role1; use Moose::Role; has foo => ( is => 'ro', ); } { package My::Role2; use Moose::Role; has foo => ( is => 'ro', ); ::like( ::exception { with 'My::Role1' }, qr/attribute conflict.+My::Role2.+foo/, 'attribute conflict when composing one role into another' ); } done_testing; Moose-2.1604/t/roles/role_attrs.t000644 000766 000024 00000002422 12617452415 017104 0ustar00etherstaff000000 000000 use strict; use warnings; use Test::More; use Moose (); use Moose::Meta::Role; use Moose::Util; my $role1 = Moose::Meta::Role->initialize('Foo'); $role1->add_attribute( foo => ( is => 'ro' ) ); ok( $role1->has_attribute('foo'), 'Foo role has a foo attribute' ); my $foo_attr = $role1->get_attribute('foo'); is( $foo_attr->associated_role->name, 'Foo', 'associated_role for foo attr is Foo role' ); isa_ok( $foo_attr->attribute_for_class('Moose::Meta::Attribute'), 'Moose::Meta::Attribute', 'attribute returned by ->attribute_for_class' ); my $role2 = Moose::Meta::Role->initialize('Bar'); $role1->apply($role2); ok( $role2->has_attribute('foo'), 'Bar role has a foo attribute' ); is( $foo_attr->associated_role->name, 'Foo', 'associated_role for foo attr is still Foo role' ); isa_ok( $foo_attr->attribute_for_class('Moose::Meta::Attribute'), 'Moose::Meta::Attribute', 'attribute returned by ->attribute_for_class' ); my $role3 = Moose::Meta::Role->initialize('Baz'); my $combined = Moose::Meta::Role->combine( [ $role1->name ], [ $role3->name ] ); ok( $combined->has_attribute('foo'), 'combined role has a foo attribute' ); is( $foo_attr->associated_role->name, 'Foo', 'associated_role for foo attr is still Foo role' ); done_testing; Moose-2.1604/t/roles/role_compose_requires.t000644 000766 000024 00000007112 12617452415 021334 0ustar00etherstaff000000 000000 use strict; use warnings; # See https://rt.cpan.org/Ticket/Display.html?id=46347 use Test::More; use Test::Fatal; { package My::Role1; use Moose::Role; requires 'test_output'; } { package My::Role2; use Moose::Role; has test_output => ( is => 'rw' ); with 'My::Role1'; } { package My::Role3; use Moose::Role; sub test_output { } with 'My::Role1'; } { package My::Role4; use Moose::Role; has test_output => ( is => 'rw' ); } { package My::Role5; use Moose::Role; sub test_output { } } { package My::Base1; use Moose; has test_output => ( is => 'rw' ); } { package My::Base2; use Moose; sub test_output { } } # Roles providing attributes/methods should satisfy requires() of other # roles they consume. { local $TODO = "role attributes don't satisfy method requirements"; is( exception { package My::Test1; use Moose; with 'My::Role2'; }, undef, 'role2(provides attribute) consumes role1' ); } is( exception { package My::Test2; use Moose; with 'My::Role3'; }, undef, 'role3(provides method) consumes role1' ); # As I understand the design, Roles composed in the same with() statement # should NOT demonstrate ordering dependency. Alter these tests if that # assumption is false. -Vince Veselosky { local $TODO = "role attributes don't satisfy method requirements"; is( exception { package My::Test3; use Moose; with 'My::Role4', 'My::Role1'; }, undef, 'class consumes role4(provides attribute), role1' ); } { local $TODO = "role attributes don't satisfy method requirements"; is( exception { package My::Test4; use Moose; with 'My::Role1', 'My::Role4'; }, undef, 'class consumes role1, role4(provides attribute)' ); } is( exception { package My::Test5; use Moose; with 'My::Role5', 'My::Role1'; }, undef, 'class consumes role5(provides method), role1' ); is( exception { package My::Test6; use Moose; with 'My::Role1', 'My::Role5'; }, undef, 'class consumes role1, role5(provides method)' ); # Inherited methods/attributes should satisfy requires(), as long as # extends() comes first in code order. is( exception { package My::Test7; use Moose; extends 'My::Base1'; with 'My::Role1'; }, undef, 'class extends base1(provides attribute), consumes role1' ); is( exception { package My::Test8; use Moose; extends 'My::Base2'; with 'My::Role1'; }, undef, 'class extends base2(provides method), consumes role1' ); # Attributes/methods implemented in class should satisfy requires() is( exception { package My::Test9; use Moose; has 'test_output', is => 'rw'; with 'My::Role1'; }, undef, 'class provides attribute, consumes role1' ); is( exception { package My::Test10; use Moose; sub test_output { } with 'My::Role1'; }, undef, 'class provides method, consumes role1' ); # Roles composed in separate with() statements SHOULD demonstrate ordering # dependency. See comment with tests 3-6 above. is( exception { package My::Test11; use Moose; with 'My::Role4'; with 'My::Role1'; }, undef, 'class consumes role4(provides attribute); consumes role1' ); isnt( exception { package My::Test12; use Moose; with 'My::Role1'; with 'My::Role4'; }, undef, 'class consumes role1; consumes role4(provides attribute)' ); is( exception { package My::Test13; use Moose; with 'My::Role5'; with 'My::Role1'; }, undef, 'class consumes role5(provides method); consumes role1' ); isnt( exception { package My::Test14; use Moose; with 'My::Role1'; with 'My::Role5'; }, undef, 'class consumes role1; consumes role5(provides method)' ); done_testing; Moose-2.1604/t/roles/role_composite.t000644 000766 000024 00000003552 12617452415 017756 0ustar00etherstaff000000 000000 use strict; use warnings; use Test::More; use Test::Fatal; use Moose::Meta::Role::Application::RoleSummation; use Moose::Meta::Role::Composite; { package Role::Foo; use Moose::Role; package Role::Bar; use Moose::Role; package Role::Baz; use Moose::Role; package Role::Gorch; use Moose::Role; } { my $c = Moose::Meta::Role::Composite->new( roles => [ Role::Foo->meta, Role::Bar->meta, Role::Baz->meta, ] ); isa_ok($c, 'Moose::Meta::Role::Composite'); is($c->name, 'Role::Foo|Role::Bar|Role::Baz', '... got the composite role name'); is_deeply($c->get_roles, [ Role::Foo->meta, Role::Bar->meta, Role::Baz->meta, ], '... got the right roles'); ok($c->does_role($_), '... our composite does the role ' . $_) for qw( Role::Foo Role::Bar Role::Baz ); is( exception { Moose::Meta::Role::Application::RoleSummation->new->apply($c); }, undef, '... this composed okay' ); ok(!$c->is_anon, '... composite is not anonymous'); ##... now nest 'em { my $c2 = Moose::Meta::Role::Composite->new( roles => [ $c, Role::Gorch->meta, ] ); isa_ok($c2, 'Moose::Meta::Role::Composite'); is($c2->name, 'Role::Foo|Role::Bar|Role::Baz|Role::Gorch', '... got the composite role name'); is_deeply($c2->get_roles, [ $c, Role::Gorch->meta, ], '... got the right roles'); ok($c2->does_role($_), '... our composite does the role ' . $_) for qw( Role::Foo Role::Bar Role::Baz Role::Gorch ); ok(!$c2->is_anon, '... composite is not anonymous'); } } done_testing; Moose-2.1604/t/roles/role_composite_exclusion.t000644 000766 000024 00000005177 12617452415 022054 0ustar00etherstaff000000 000000 use strict; use warnings; use Test::More; use Test::Fatal; use Moose::Meta::Role::Application::RoleSummation; use Moose::Meta::Role::Composite; { package Role::Foo; use Moose::Role; package Role::Bar; use Moose::Role; package Role::ExcludesFoo; use Moose::Role; excludes 'Role::Foo'; package Role::DoesExcludesFoo; use Moose::Role; with 'Role::ExcludesFoo'; package Role::DoesFoo; use Moose::Role; with 'Role::Foo'; } ok(Role::ExcludesFoo->meta->excludes_role('Role::Foo'), '... got the right exclusions'); ok(Role::DoesExcludesFoo->meta->excludes_role('Role::Foo'), '... got the right exclusions'); # test simple exclusion isnt( exception { Moose::Meta::Role::Application::RoleSummation->new->apply( Moose::Meta::Role::Composite->new( roles => [ Role::Foo->meta, Role::ExcludesFoo->meta, ] ) ); }, undef, '... this fails as expected' ); # test no conflicts { my $c = Moose::Meta::Role::Composite->new( roles => [ Role::Foo->meta, Role::Bar->meta, ] ); isa_ok($c, 'Moose::Meta::Role::Composite'); is($c->name, 'Role::Foo|Role::Bar', '... got the composite role name'); is( exception { Moose::Meta::Role::Application::RoleSummation->new->apply($c); }, undef, '... this lives as expected' ); } # test no conflicts w/exclusion { my $c = Moose::Meta::Role::Composite->new( roles => [ Role::Bar->meta, Role::ExcludesFoo->meta, ] ); isa_ok($c, 'Moose::Meta::Role::Composite'); is($c->name, 'Role::Bar|Role::ExcludesFoo', '... got the composite role name'); is( exception { Moose::Meta::Role::Application::RoleSummation->new->apply($c); }, undef, '... this lives as expected' ); is_deeply([$c->get_excluded_roles_list], ['Role::Foo'], '... has excluded roles'); } # test conflict with an "inherited" exclusion isnt( exception { Moose::Meta::Role::Application::RoleSummation->new->apply( Moose::Meta::Role::Composite->new( roles => [ Role::Foo->meta, Role::DoesExcludesFoo->meta, ] ) ); }, undef, '... this fails as expected' ); # test conflict with an "inherited" exclusion of an "inherited" role isnt( exception { Moose::Meta::Role::Application::RoleSummation->new->apply( Moose::Meta::Role::Composite->new( roles => [ Role::DoesFoo->meta, Role::DoesExcludesFoo->meta, ] ) ); }, undef, '... this fails as expected' ); done_testing; Moose-2.1604/t/roles/role_composition_attributes.t000644 000766 000024 00000004211 12617452415 022556 0ustar00etherstaff000000 000000 use strict; use warnings; use Test::More; use Test::Fatal; use Moose::Meta::Role::Application::RoleSummation; use Moose::Meta::Role::Composite; { package Role::Foo; use Moose::Role; has 'foo' => (is => 'rw'); package Role::Bar; use Moose::Role; has 'bar' => (is => 'rw'); package Role::FooConflict; use Moose::Role; has 'foo' => (is => 'rw'); package Role::BarConflict; use Moose::Role; has 'bar' => (is => 'rw'); package Role::AnotherFooConflict; use Moose::Role; with 'Role::FooConflict'; } # test simple attributes { my $c = Moose::Meta::Role::Composite->new( roles => [ Role::Foo->meta, Role::Bar->meta, ] ); isa_ok($c, 'Moose::Meta::Role::Composite'); is($c->name, 'Role::Foo|Role::Bar', '... got the composite role name'); is( exception { Moose::Meta::Role::Application::RoleSummation->new->apply($c); }, undef, '... this succeeds as expected' ); is_deeply( [ sort $c->get_attribute_list ], [ 'bar', 'foo' ], '... got the right list of attributes' ); } # test simple conflict isnt( exception { Moose::Meta::Role::Application::RoleSummation->new->apply( Moose::Meta::Role::Composite->new( roles => [ Role::Foo->meta, Role::FooConflict->meta, ] ) ); }, undef, '... this fails as expected' ); # test complex conflict isnt( exception { Moose::Meta::Role::Application::RoleSummation->new->apply( Moose::Meta::Role::Composite->new( roles => [ Role::Foo->meta, Role::Bar->meta, Role::FooConflict->meta, Role::BarConflict->meta, ] ) ); }, undef, '... this fails as expected' ); # test simple conflict isnt( exception { Moose::Meta::Role::Application::RoleSummation->new->apply( Moose::Meta::Role::Composite->new( roles => [ Role::Foo->meta, Role::AnotherFooConflict->meta, ] ) ); }, undef, '... this fails as expected' ); done_testing; Moose-2.1604/t/roles/role_composition_conflict_detection.t000644 000766 000024 00000001633 12617452415 024234 0ustar00etherstaff000000 000000 use strict; use warnings; use Test::More; use Moose::Util qw( find_meta ); { package RoleA; use Moose::Role; sub foo { 42 } } { package RoleB; use Moose::Role; with 'RoleA'; } { package RoleC; use Moose::Role; sub foo { 84 } } { my $composite = Moose::Meta::Role->combine( map { [ find_meta($_) => {} ] } qw( RoleA RoleB RoleC ) ); ok( $composite->requires_method('foo'), 'Composite of [ABC] requires a foo method' ); ok( ! $composite->has_method('foo'), 'Composite of [ABC] does not also have a foo method' ); } { my $composite = Moose::Meta::Role->combine( map { [ find_meta($_) => {} ] } qw( RoleA RoleC RoleB ) ); ok( $composite->requires_method('foo'), 'Composite of [ACB] requires a foo method' ); ok( ! $composite->has_method('foo'), 'Composite of [ACB] does not also have a foo method' ); } done_testing; Moose-2.1604/t/roles/role_composition_errors.t000644 000766 000024 00000006513 12617452415 021713 0ustar00etherstaff000000 000000 use strict; use warnings; use Test::More; use Test::Fatal; { package Foo::Role; use Moose::Role; requires 'foo'; } is_deeply( [ sort Foo::Role->meta->get_required_method_list ], ['foo'], '... the Foo::Role has a required method (foo)' ); # classes which does not implement required method { package Foo::Class; use Moose; ::isnt( ::exception { with('Foo::Role') }, undef, '... no foo method implemented by Foo::Class' ); } # class which does implement required method { package Bar::Class; use Moose; ::isnt( ::exception { with('Foo::Class') }, undef, '... cannot consume a class, it must be a role' ); ::is( ::exception { with('Foo::Role') }, undef, '... has a foo method implemented by Bar::Class' ); sub foo {'Bar::Class::foo'} } # role which does implement required method { package Bar::Role; use Moose::Role; ::is( ::exception { with('Foo::Role') }, undef, '... has a foo method implemented by Bar::Role' ); sub foo {'Bar::Role::foo'} } is_deeply( [ sort Bar::Role->meta->get_required_method_list ], [], '... the Bar::Role has not inherited the required method from Foo::Role' ); # role which does not implement required method { package Baz::Role; use Moose::Role; ::is( ::exception { with('Foo::Role') }, undef, '... no foo method implemented by Baz::Role' ); } is_deeply( [ sort Baz::Role->meta->get_required_method_list ], ['foo'], '... the Baz::Role has inherited the required method from Foo::Role' ); # classes which does not implement required method { package Baz::Class; use Moose; ::isnt( ::exception { with('Baz::Role') }, undef, '... no foo method implemented by Baz::Class2' ); } # class which does implement required method { package Baz::Class2; use Moose; ::is( ::exception { with('Baz::Role') }, undef, '... has a foo method implemented by Baz::Class2' ); sub foo {'Baz::Class2::foo'} } { package Quux::Role; use Moose::Role; requires qw( meth1 meth2 meth3 meth4 ); } # RT #41119 { package Quux::Class; use Moose; ::like( ::exception { with('Quux::Role') }, qr/\Q'Quux::Role' requires the methods 'meth1', 'meth2', 'meth3', and 'meth4' to be implemented by 'Quux::Class'/, 'exception mentions all the missing required methods at once' ); } { package Quux::Class2; use Moose; sub meth1 { } ::like( ::exception { with('Quux::Role') }, qr/'Quux::Role' requires the methods 'meth2', 'meth3', and 'meth4' to be implemented by 'Quux::Class2'/, 'exception mentions all the missing required methods at once, but not the one that exists' ); } { package Quux::Class3; use Moose; has 'meth1' => ( is => 'ro' ); has 'meth2' => ( is => 'ro' ); ::like( ::exception { with('Quux::Role') }, qr/'Quux::Role' requires the methods 'meth3' and 'meth4' to be implemented by 'Quux::Class3'/, 'exception mentions all the missing methods at once, but not the accessors' ); } { package Quux::Class4; use Moose; sub meth1 { } has 'meth2' => ( is => 'ro' ); ::like( ::exception { with('Quux::Role') }, qr/'Quux::Role' requires the methods 'meth3' and 'meth4' to be implemented by 'Quux::Class4'/, 'exception mentions all the require methods that are accessors at once, as well as missing methods, but not the one that exists' ); } done_testing; Moose-2.1604/t/roles/role_composition_method_mods.t000644 000766 000024 00000003477 12617452415 022707 0ustar00etherstaff000000 000000 use strict; use warnings; use Test::More; use Test::Fatal; use Moose::Meta::Role::Application::RoleSummation; use Moose::Meta::Role::Composite; { package Role::Foo; use Moose::Role; before foo => sub { 'Role::Foo::foo' }; around foo => sub { 'Role::Foo::foo' }; after foo => sub { 'Role::Foo::foo' }; around baz => sub { [ 'Role::Foo', @{shift->(@_)} ] }; package Role::Bar; use Moose::Role; before bar => sub { 'Role::Bar::bar' }; around bar => sub { 'Role::Bar::bar' }; after bar => sub { 'Role::Bar::bar' }; package Role::Baz; use Moose::Role; with 'Role::Foo'; around baz => sub { [ 'Role::Baz', @{shift->(@_)} ] }; } { package Class::FooBar; use Moose; with 'Role::Baz'; sub foo { 'placeholder' } sub baz { ['Class::FooBar'] } } #test modifier call order { is_deeply( Class::FooBar->baz, ['Role::Baz','Role::Foo','Class::FooBar'] ); } # test simple overrides { my $c = Moose::Meta::Role::Composite->new( roles => [ Role::Foo->meta, Role::Bar->meta, ] ); isa_ok($c, 'Moose::Meta::Role::Composite'); is($c->name, 'Role::Foo|Role::Bar', '... got the composite role name'); is( exception { Moose::Meta::Role::Application::RoleSummation->new->apply($c); }, undef, '... this succeeds as expected' ); is_deeply( [ sort $c->get_method_modifier_list('before') ], [ 'bar', 'foo' ], '... got the right list of methods' ); is_deeply( [ sort $c->get_method_modifier_list('after') ], [ 'bar', 'foo' ], '... got the right list of methods' ); is_deeply( [ sort $c->get_method_modifier_list('around') ], [ 'bar', 'baz', 'foo' ], '... got the right list of methods' ); } done_testing; Moose-2.1604/t/roles/role_composition_methods.t000644 000766 000024 00000006621 12617452415 022042 0ustar00etherstaff000000 000000 use strict; use warnings; use Test::More; use Test::Fatal; use Moose::Meta::Role::Application::RoleSummation; use Moose::Meta::Role::Composite; { package Role::Foo; use Moose::Role; sub foo { 'Role::Foo::foo' } package Role::Bar; use Moose::Role; sub bar { 'Role::Bar::bar' } package Role::FooConflict; use Moose::Role; sub foo { 'Role::FooConflict::foo' } package Role::BarConflict; use Moose::Role; sub bar { 'Role::BarConflict::bar' } package Role::AnotherFooConflict; use Moose::Role; with 'Role::FooConflict'; sub baz { 'Role::AnotherFooConflict::baz' } } # test simple attributes { my $c = Moose::Meta::Role::Composite->new( roles => [ Role::Foo->meta, Role::Bar->meta, ] ); isa_ok($c, 'Moose::Meta::Role::Composite'); is($c->name, 'Role::Foo|Role::Bar', '... got the composite role name'); is( exception { Moose::Meta::Role::Application::RoleSummation->new->apply($c); }, undef, '... this succeeds as expected' ); is_deeply( [ sort $c->get_method_list ], [ 'bar', 'foo' ], '... got the right list of methods' ); } # test simple conflict { my $c = Moose::Meta::Role::Composite->new( roles => [ Role::Foo->meta, Role::FooConflict->meta, ] ); isa_ok($c, 'Moose::Meta::Role::Composite'); is($c->name, 'Role::Foo|Role::FooConflict', '... got the composite role name'); is( exception { Moose::Meta::Role::Application::RoleSummation->new->apply($c); }, undef, '... this succeeds as expected' ); is_deeply( [ sort $c->get_method_list ], [], '... got the right list of methods' ); is_deeply( [ sort $c->get_required_method_list ], [ 'foo' ], '... got the right list of required methods' ); } # test complex conflict { my $c = Moose::Meta::Role::Composite->new( roles => [ Role::Foo->meta, Role::Bar->meta, Role::FooConflict->meta, Role::BarConflict->meta, ] ); isa_ok($c, 'Moose::Meta::Role::Composite'); is($c->name, 'Role::Foo|Role::Bar|Role::FooConflict|Role::BarConflict', '... got the composite role name'); is( exception { Moose::Meta::Role::Application::RoleSummation->new->apply($c); }, undef, '... this succeeds as expected' ); is_deeply( [ sort $c->get_method_list ], [], '... got the right list of methods' ); is_deeply( [ sort $c->get_required_method_list ], [ 'bar', 'foo' ], '... got the right list of required methods' ); } # test simple conflict { my $c = Moose::Meta::Role::Composite->new( roles => [ Role::Foo->meta, Role::AnotherFooConflict->meta, ] ); isa_ok($c, 'Moose::Meta::Role::Composite'); is($c->name, 'Role::Foo|Role::AnotherFooConflict', '... got the composite role name'); is( exception { Moose::Meta::Role::Application::RoleSummation->new->apply($c); }, undef, '... this succeeds as expected' ); is_deeply( [ sort $c->get_method_list ], [ 'baz' ], '... got the right list of methods' ); is_deeply( [ sort $c->get_required_method_list ], [ 'foo' ], '... got the right list of required methods' ); } done_testing; Moose-2.1604/t/roles/role_composition_override.t000644 000766 000024 00000007252 12617452415 022217 0ustar00etherstaff000000 000000 use strict; use warnings; use Test::More; use Test::Fatal; use Moose::Meta::Role::Application::RoleSummation; use Moose::Meta::Role::Composite; { package Role::Foo; use Moose::Role; override foo => sub { 'Role::Foo::foo' }; package Role::Bar; use Moose::Role; override bar => sub { 'Role::Bar::bar' }; package Role::FooConflict; use Moose::Role; override foo => sub { 'Role::FooConflict::foo' }; package Role::FooMethodConflict; use Moose::Role; sub foo { 'Role::FooConflict::foo' } package Role::BarMethodConflict; use Moose::Role; sub bar { 'Role::BarConflict::bar' } } # test simple overrides { my $c = Moose::Meta::Role::Composite->new( roles => [ Role::Foo->meta, Role::Bar->meta, ] ); isa_ok($c, 'Moose::Meta::Role::Composite'); is($c->name, 'Role::Foo|Role::Bar', '... got the composite role name'); is( exception { Moose::Meta::Role::Application::RoleSummation->new->apply($c); }, undef, '... this lives ok' ); is_deeply( [ sort $c->get_method_modifier_list('override') ], [ 'bar', 'foo' ], '... got the right list of methods' ); } # test simple overrides w/ conflicts isnt( exception { Moose::Meta::Role::Application::RoleSummation->new->apply( Moose::Meta::Role::Composite->new( roles => [ Role::Foo->meta, Role::FooConflict->meta, ] ) ); }, undef, '... this fails as expected' ); # test simple overrides w/ conflicts isnt( exception { Moose::Meta::Role::Application::RoleSummation->new->apply( Moose::Meta::Role::Composite->new( roles => [ Role::Foo->meta, Role::FooMethodConflict->meta, ] ) ); }, undef, '... this fails as expected' ); # test simple overrides w/ conflicts isnt( exception { Moose::Meta::Role::Application::RoleSummation->new->apply( Moose::Meta::Role::Composite->new( roles => [ Role::Foo->meta, Role::Bar->meta, Role::FooConflict->meta, ] ) ); }, undef, '... this fails as expected' ); # test simple overrides w/ conflicts isnt( exception { Moose::Meta::Role::Application::RoleSummation->new->apply( Moose::Meta::Role::Composite->new( roles => [ Role::Foo->meta, Role::Bar->meta, Role::FooMethodConflict->meta, ] ) ); }, undef, '... this fails as expected' ); { { package Foo; use Moose::Role; override test => sub { print "override test in Foo" }; } my $exception = exception { { package Bar; use Moose::Role; override test => sub { print "override test in Bar" }; with 'Foo'; } }; like( $exception, qr/\QRole 'Foo' has encountered an 'override' method conflict during composition (Two 'override' methods of the same name encountered). This is a fatal error./, "Foo & Bar, both roles are overriding test method"); } { { package Role::A; use Moose::Role; override a_method => sub { "a method in A" }; } { package Role::B; use Moose::Role; with 'Role::A'; } { package Role::C; use Moose::Role; with 'Role::A' } my $exception = exception { { package Role::D; use Moose::Role; with 'Role::B'; with 'Role::C'; } }; is( $exception, undef, "this works fine"); } done_testing; Moose-2.1604/t/roles/role_composition_req_methods.t000644 000766 000024 00000005653 12617452415 022715 0ustar00etherstaff000000 000000 use strict; use warnings; use Test::More; use Test::Fatal; use Moose::Meta::Role::Application::RoleSummation; use Moose::Meta::Role::Composite; { package Role::Foo; use Moose::Role; requires 'foo'; package Role::Bar; use Moose::Role; requires 'bar'; package Role::ProvidesFoo; use Moose::Role; sub foo { 'Role::ProvidesFoo::foo' } package Role::ProvidesBar; use Moose::Role; sub bar { 'Role::ProvidesBar::bar' } } # test simple requirement { my $c = Moose::Meta::Role::Composite->new( roles => [ Role::Foo->meta, Role::Bar->meta, ] ); isa_ok($c, 'Moose::Meta::Role::Composite'); is($c->name, 'Role::Foo|Role::Bar', '... got the composite role name'); is( exception { Moose::Meta::Role::Application::RoleSummation->new->apply($c); }, undef, '... this succeeds as expected' ); is_deeply( [ sort $c->get_required_method_list ], [ 'bar', 'foo' ], '... got the right list of required methods' ); } # test requirement satisfied { my $c = Moose::Meta::Role::Composite->new( roles => [ Role::Foo->meta, Role::ProvidesFoo->meta, ] ); isa_ok($c, 'Moose::Meta::Role::Composite'); is($c->name, 'Role::Foo|Role::ProvidesFoo', '... got the composite role name'); is( exception { Moose::Meta::Role::Application::RoleSummation->new->apply($c); }, undef, '... this succeeds as expected' ); is_deeply( [ sort $c->get_required_method_list ], [], '... got the right list of required methods' ); } # test requirement satisfied { my $c = Moose::Meta::Role::Composite->new( roles => [ Role::Foo->meta, Role::ProvidesFoo->meta, Role::Bar->meta, ] ); isa_ok($c, 'Moose::Meta::Role::Composite'); is($c->name, 'Role::Foo|Role::ProvidesFoo|Role::Bar', '... got the composite role name'); is( exception { Moose::Meta::Role::Application::RoleSummation->new->apply($c); }, undef, '... this succeeds as expected' ); is_deeply( [ sort $c->get_required_method_list ], [ 'bar' ], '... got the right list of required methods' ); } # test requirement satisfied { my $c = Moose::Meta::Role::Composite->new( roles => [ Role::Foo->meta, Role::ProvidesFoo->meta, Role::ProvidesBar->meta, Role::Bar->meta, ] ); isa_ok($c, 'Moose::Meta::Role::Composite'); is($c->name, 'Role::Foo|Role::ProvidesFoo|Role::ProvidesBar|Role::Bar', '... got the composite role name'); is( exception { Moose::Meta::Role::Application::RoleSummation->new->apply($c); }, undef, '... this succeeds as expected' ); is_deeply( [ sort $c->get_required_method_list ], [ ], '... got the right list of required methods' ); } done_testing; Moose-2.1604/t/roles/role_conflict_detection.t000644 000766 000024 00000045176 12617452415 021623 0ustar00etherstaff000000 000000 use strict; use warnings; use Test::More; use Test::Fatal; =pod Mutually recursive roles. =cut { package Role::Foo; use Moose::Role; requires 'foo'; sub bar { 'Role::Foo::bar' } package Role::Bar; use Moose::Role; requires 'bar'; sub foo { 'Role::Bar::foo' } } { package My::Test1; use Moose; ::is( ::exception { with 'Role::Foo', 'Role::Bar'; }, undef, '... our mutually recursive roles combine okay' ); package My::Test2; use Moose; ::is( ::exception { with 'Role::Bar', 'Role::Foo'; }, undef, '... our mutually recursive roles combine okay (no matter what order)' ); } my $test1 = My::Test1->new; isa_ok($test1, 'My::Test1'); ok($test1->does('Role::Foo'), '... $test1 does Role::Foo'); ok($test1->does('Role::Bar'), '... $test1 does Role::Bar'); can_ok($test1, 'foo'); can_ok($test1, 'bar'); is($test1->foo, 'Role::Bar::foo', '... $test1->foo worked'); is($test1->bar, 'Role::Foo::bar', '... $test1->bar worked'); my $test2 = My::Test2->new; isa_ok($test2, 'My::Test2'); ok($test2->does('Role::Foo'), '... $test2 does Role::Foo'); ok($test2->does('Role::Bar'), '... $test2 does Role::Bar'); can_ok($test2, 'foo'); can_ok($test2, 'bar'); is($test2->foo, 'Role::Bar::foo', '... $test2->foo worked'); is($test2->bar, 'Role::Foo::bar', '... $test2->bar worked'); # check some meta-stuff ok(Role::Foo->meta->has_method('bar'), '... it still has the bar method'); ok(Role::Foo->meta->requires_method('foo'), '... it still has the required foo method'); ok(Role::Bar->meta->has_method('foo'), '... it still has the foo method'); ok(Role::Bar->meta->requires_method('bar'), '... it still has the required bar method'); =pod Role method conflicts =cut { package Role::Bling; use Moose::Role; sub bling { 'Role::Bling::bling' } package Role::Bling::Bling; use Moose::Role; sub bling { 'Role::Bling::Bling::bling' } } { package My::Test3; use Moose; ::like( ::exception { with 'Role::Bling', 'Role::Bling::Bling'; }, qr/Due to a method name conflict in roles 'Role::Bling' and 'Role::Bling::Bling', the method 'bling' must be implemented or excluded by 'My::Test3'/, '... role methods conflict and method was required' ); package My::Test4; use Moose; ::is( ::exception { with 'Role::Bling'; with 'Role::Bling::Bling'; }, undef, '... role methods didnt conflict when manually combined' ); package My::Test5; use Moose; ::is( ::exception { with 'Role::Bling::Bling'; with 'Role::Bling'; }, undef, '... role methods didnt conflict when manually combined (in opposite order)' ); package My::Test6; use Moose; ::is( ::exception { with 'Role::Bling::Bling', 'Role::Bling'; }, undef, '... role methods didnt conflict when manually resolved' ); sub bling { 'My::Test6::bling' } package My::Test7; use Moose; ::is( ::exception { with 'Role::Bling::Bling', { -excludes => ['bling'] }, 'Role::Bling'; }, undef, '... role methods didnt conflict when one of the conflicting methods is excluded' ); package My::Test8; use Moose; ::is( ::exception { with 'Role::Bling::Bling', { -excludes => ['bling'], -alias => { bling => 'bling_bling' } }, 'Role::Bling'; }, undef, '... role methods didnt conflict when one of the conflicting methods is excluded and aliased' ); } ok(!My::Test3->meta->has_method('bling'), '... we didnt get any methods in the conflict'); ok(My::Test4->meta->has_method('bling'), '... we did get the method when manually dealt with'); ok(My::Test5->meta->has_method('bling'), '... we did get the method when manually dealt with'); ok(My::Test6->meta->has_method('bling'), '... we did get the method when manually dealt with'); ok(My::Test7->meta->has_method('bling'), '... we did get the method when manually dealt with'); ok(My::Test8->meta->has_method('bling'), '... we did get the method when manually dealt with'); ok(My::Test8->meta->has_method('bling_bling'), '... we did get the aliased method too'); ok(!My::Test3->does('Role::Bling'), '... our class does() the correct roles'); ok(!My::Test3->does('Role::Bling::Bling'), '... our class does() the correct roles'); ok(My::Test4->does('Role::Bling'), '... our class does() the correct roles'); ok(My::Test4->does('Role::Bling::Bling'), '... our class does() the correct roles'); ok(My::Test5->does('Role::Bling'), '... our class does() the correct roles'); ok(My::Test5->does('Role::Bling::Bling'), '... our class does() the correct roles'); ok(My::Test6->does('Role::Bling'), '... our class does() the correct roles'); ok(My::Test6->does('Role::Bling::Bling'), '... our class does() the correct roles'); ok(My::Test7->does('Role::Bling'), '... our class does() the correct roles'); ok(My::Test7->does('Role::Bling::Bling'), '... our class does() the correct roles'); ok(My::Test8->does('Role::Bling'), '... our class does() the correct roles'); ok(My::Test8->does('Role::Bling::Bling'), '... our class does() the correct roles'); is(My::Test4->bling, 'Role::Bling::bling', '... and we got the first method that was added'); is(My::Test5->bling, 'Role::Bling::Bling::bling', '... and we got the first method that was added'); is(My::Test6->bling, 'My::Test6::bling', '... and we got the local method'); is(My::Test7->bling, 'Role::Bling::bling', '... and we got the non-excluded method'); is(My::Test8->bling, 'Role::Bling::bling', '... and we got the non-excluded/aliased method'); is(My::Test8->bling_bling, 'Role::Bling::Bling::bling', '... and the aliased method comes from the correct role'); # check how this affects role compostion { package Role::Bling::Bling::Bling; use Moose::Role; with 'Role::Bling::Bling'; sub bling { 'Role::Bling::Bling::Bling::bling' } } ok(Role::Bling::Bling->meta->has_method('bling'), '... still got the bling method in Role::Bling::Bling'); ok(Role::Bling::Bling->meta->does_role('Role::Bling::Bling'), '... our role correctly does() the other role'); ok(Role::Bling::Bling::Bling->meta->has_method('bling'), '... dont have the bling method in Role::Bling::Bling::Bling'); is(Role::Bling::Bling::Bling->meta->get_method('bling')->(), 'Role::Bling::Bling::Bling::bling', '... still got the bling method in Role::Bling::Bling::Bling'); =pod Role attribute conflicts =cut { package Role::Boo; use Moose::Role; has 'ghost' => (is => 'ro', default => 'Role::Boo::ghost'); package Role::Boo::Hoo; use Moose::Role; has 'ghost' => (is => 'ro', default => 'Role::Boo::Hoo::ghost'); } { package My::Test7; use Moose; ::like( ::exception { with 'Role::Boo', 'Role::Boo::Hoo'; }, qr/We have encountered an attribute conflict.+ghost/ ); package My::Test8; use Moose; ::is( ::exception { with 'Role::Boo'; with 'Role::Boo::Hoo'; }, undef, '... role attrs didnt conflict when manually combined' ); package My::Test9; use Moose; ::is( ::exception { with 'Role::Boo::Hoo'; with 'Role::Boo'; }, undef, '... role attrs didnt conflict when manually combined' ); package My::Test10; use Moose; has 'ghost' => (is => 'ro', default => 'My::Test10::ghost'); ::like( ::exception { with 'Role::Boo', 'Role::Boo::Hoo'; }, qr/We have encountered an attribute conflict/, '... role attrs conflict and cannot be manually disambiguted' ); } ok(!My::Test7->meta->has_attribute('ghost'), '... we didnt get any attributes in the conflict'); ok(My::Test8->meta->has_attribute('ghost'), '... we did get an attributes when manually composed'); ok(My::Test9->meta->has_attribute('ghost'), '... we did get an attributes when manually composed'); ok(My::Test10->meta->has_attribute('ghost'), '... we did still have an attribute ghost (conflict does not mess with class)'); ok(!My::Test7->does('Role::Boo'), '... our class does() the correct roles'); ok(!My::Test7->does('Role::Boo::Hoo'), '... our class does() the correct roles'); ok(My::Test8->does('Role::Boo'), '... our class does() the correct roles'); ok(My::Test8->does('Role::Boo::Hoo'), '... our class does() the correct roles'); ok(My::Test9->does('Role::Boo'), '... our class does() the correct roles'); ok(My::Test9->does('Role::Boo::Hoo'), '... our class does() the correct roles'); ok(!My::Test10->does('Role::Boo'), '... our class does() the correct roles'); ok(!My::Test10->does('Role::Boo::Hoo'), '... our class does() the correct roles'); can_ok('My::Test8', 'ghost'); can_ok('My::Test9', 'ghost'); can_ok('My::Test10', 'ghost'); is(My::Test8->new->ghost, 'Role::Boo::ghost', '... got the expected default attr value'); is(My::Test9->new->ghost, 'Role::Boo::Hoo::ghost', '... got the expected default attr value'); is(My::Test10->new->ghost, 'My::Test10::ghost', '... got the expected default attr value'); =pod Role override method conflicts =cut { package Role::Plot; use Moose::Role; override 'twist' => sub { super() . ' -> Role::Plot::twist'; }; package Role::Truth; use Moose::Role; override 'twist' => sub { super() . ' -> Role::Truth::twist'; }; } { package My::Test::Base; use Moose; sub twist { 'My::Test::Base::twist' } package My::Test11; use Moose; extends 'My::Test::Base'; ::is( ::exception { with 'Role::Truth'; }, undef, '... composed the role with override okay' ); package My::Test12; use Moose; extends 'My::Test::Base'; ::is( ::exception { with 'Role::Plot'; }, undef, '... composed the role with override okay' ); package My::Test13; use Moose; ::isnt( ::exception { with 'Role::Plot'; }, undef, '... cannot compose it because we have no superclass' ); package My::Test14; use Moose; extends 'My::Test::Base'; ::like( ::exception { with 'Role::Plot', 'Role::Truth'; }, qr/Two \'override\' methods of the same name encountered/, '... cannot compose it because we have no superclass' ); } ok(My::Test11->meta->has_method('twist'), '... the twist method has been added'); ok(My::Test12->meta->has_method('twist'), '... the twist method has been added'); ok(!My::Test13->meta->has_method('twist'), '... the twist method has not been added'); ok(!My::Test14->meta->has_method('twist'), '... the twist method has not been added'); ok(!My::Test11->does('Role::Plot'), '... our class does() the correct roles'); ok(My::Test11->does('Role::Truth'), '... our class does() the correct roles'); ok(!My::Test12->does('Role::Truth'), '... our class does() the correct roles'); ok(My::Test12->does('Role::Plot'), '... our class does() the correct roles'); ok(!My::Test13->does('Role::Plot'), '... our class does() the correct roles'); ok(!My::Test14->does('Role::Truth'), '... our class does() the correct roles'); ok(!My::Test14->does('Role::Plot'), '... our class does() the correct roles'); is(My::Test11->twist(), 'My::Test::Base::twist -> Role::Truth::twist', '... got the right method return'); is(My::Test12->twist(), 'My::Test::Base::twist -> Role::Plot::twist', '... got the right method return'); ok(!My::Test13->can('twist'), '... no twist method here at all'); is(My::Test14->twist(), 'My::Test::Base::twist', '... got the right method return (from superclass)'); { package Role::Reality; use Moose::Role; ::like( ::exception { with 'Role::Plot'; }, qr/A local method of the same name as been found/, '... could not compose roles here, it dies' ); sub twist { 'Role::Reality::twist'; } } ok(Role::Reality->meta->has_method('twist'), '... the twist method has not been added'); #ok(!Role::Reality->meta->does_role('Role::Plot'), '... our role does() the correct roles'); is(Role::Reality->meta->get_method('twist')->(), 'Role::Reality::twist', '... the twist method returns the right value'); # Ovid's test case from rt.cpan.org #44 { package Role1; use Moose::Role; sub foo {} } { package Role2; use Moose::Role; sub foo {} } { package Conflicts; use Moose; ::like( ::exception { with qw(Role1 Role2); }, qr/Due to a method name conflict in roles 'Role1' and 'Role2', the method 'foo' must be implemented or excluded by 'Conflicts'/ ); } =pod Role conflicts between attributes and methods [15:23] when class defines method and role defines method, class wins [15:24] when class 'has' method and role defines method, class wins [15:24] when class defines method and role 'has' method, role wins [15:24] when class 'has' method and role 'has' method, role wins [15:24] which means when class 'has' method and two roles 'has' method, no tiebreak is detected [15:24] this is with role and has declaration in the exact same order in every case? [15:25] yes [15:25] interesting [15:25] that's what I thought [15:26] does that sound like something I should write a test for? [15:27] stevan, ping? [15:27] I'm not sure what the right answer for composition is. [15:27] who should win [15:27] if I were to guess I'd say the class should always win. [15:27] that would be my guess, but I thought I would ask to make sure [15:29] kolibrie: please write a test [15:29] I am not exactly sure who should win either,.. but I suspect it is not working correctly right now [15:29] I know exactly why it is doing what it is doing though Now I have to decide actually what happens, and how to fix it. - SL { package Role::Method; use Moose::Role; sub ghost { 'Role::Method::ghost' } package Role::Method2; use Moose::Role; sub ghost { 'Role::Method2::ghost' } package Role::Attribute; use Moose::Role; has 'ghost' => (is => 'ro', default => 'Role::Attribute::ghost'); package Role::Attribute2; use Moose::Role; has 'ghost' => (is => 'ro', default => 'Role::Attribute2::ghost'); } { package My::Test15; use Moose; ::lives_ok { with 'Role::Method'; } '... composed the method role into the method class'; sub ghost { 'My::Test15::ghost' } package My::Test16; use Moose; ::lives_ok { with 'Role::Method'; } '... composed the method role into the attribute class'; has 'ghost' => (is => 'ro', default => 'My::Test16::ghost'); package My::Test17; use Moose; ::lives_ok { with 'Role::Attribute'; } '... composed the attribute role into the method class'; sub ghost { 'My::Test17::ghost' } package My::Test18; use Moose; ::lives_ok { with 'Role::Attribute'; } '... composed the attribute role into the attribute class'; has 'ghost' => (is => 'ro', default => 'My::Test18::ghost'); package My::Test19; use Moose; ::lives_ok { with 'Role::Method', 'Role::Method2'; } '... composed method roles into class with method tiebreaker'; sub ghost { 'My::Test19::ghost' } package My::Test20; use Moose; ::lives_ok { with 'Role::Method', 'Role::Method2'; } '... composed method roles into class with attribute tiebreaker'; has 'ghost' => (is => 'ro', default => 'My::Test20::ghost'); package My::Test21; use Moose; ::lives_ok { with 'Role::Attribute', 'Role::Attribute2'; } '... composed attribute roles into class with method tiebreaker'; sub ghost { 'My::Test21::ghost' } package My::Test22; use Moose; ::lives_ok { with 'Role::Attribute', 'Role::Attribute2'; } '... composed attribute roles into class with attribute tiebreaker'; has 'ghost' => (is => 'ro', default => 'My::Test22::ghost'); package My::Test23; use Moose; ::lives_ok { with 'Role::Method', 'Role::Attribute'; } '... composed method and attribute role into class with method tiebreaker'; sub ghost { 'My::Test23::ghost' } package My::Test24; use Moose; ::lives_ok { with 'Role::Method', 'Role::Attribute'; } '... composed method and attribute role into class with attribute tiebreaker'; has 'ghost' => (is => 'ro', default => 'My::Test24::ghost'); package My::Test25; use Moose; ::lives_ok { with 'Role::Attribute', 'Role::Method'; } '... composed attribute and method role into class with method tiebreaker'; sub ghost { 'My::Test25::ghost' } package My::Test26; use Moose; ::lives_ok { with 'Role::Attribute', 'Role::Method'; } '... composed attribute and method role into class with attribute tiebreaker'; has 'ghost' => (is => 'ro', default => 'My::Test26::ghost'); } my $test15 = My::Test15->new; isa_ok($test15, 'My::Test15'); is($test15->ghost, 'My::Test15::ghost', '... we access the method from the class and ignore the role method'); my $test16 = My::Test16->new; isa_ok($test16, 'My::Test16'); is($test16->ghost, 'My::Test16::ghost', '... we access the attribute from the class and ignore the role method'); my $test17 = My::Test17->new; isa_ok($test17, 'My::Test17'); is($test17->ghost, 'My::Test17::ghost', '... we access the method from the class and ignore the role attribute'); my $test18 = My::Test18->new; isa_ok($test18, 'My::Test18'); is($test18->ghost, 'My::Test18::ghost', '... we access the attribute from the class and ignore the role attribute'); my $test19 = My::Test19->new; isa_ok($test19, 'My::Test19'); is($test19->ghost, 'My::Test19::ghost', '... we access the method from the class and ignore the role methods'); my $test20 = My::Test20->new; isa_ok($test20, 'My::Test20'); is($test20->ghost, 'My::Test20::ghost', '... we access the attribute from the class and ignore the role methods'); my $test21 = My::Test21->new; isa_ok($test21, 'My::Test21'); is($test21->ghost, 'My::Test21::ghost', '... we access the method from the class and ignore the role attributes'); my $test22 = My::Test22->new; isa_ok($test22, 'My::Test22'); is($test22->ghost, 'My::Test22::ghost', '... we access the attribute from the class and ignore the role attributes'); my $test23 = My::Test23->new; isa_ok($test23, 'My::Test23'); is($test23->ghost, 'My::Test23::ghost', '... we access the method from the class and ignore the role method and attribute'); my $test24 = My::Test24->new; isa_ok($test24, 'My::Test24'); is($test24->ghost, 'My::Test24::ghost', '... we access the attribute from the class and ignore the role method and attribute'); my $test25 = My::Test25->new; isa_ok($test25, 'My::Test25'); is($test25->ghost, 'My::Test25::ghost', '... we access the method from the class and ignore the role attribute and method'); my $test26 = My::Test26->new; isa_ok($test26, 'My::Test26'); is($test26->ghost, 'My::Test26::ghost', '... we access the attribute from the class and ignore the role attribute and method'); =cut done_testing; Moose-2.1604/t/roles/role_conflict_edge_cases.t000644 000766 000024 00000012105 12617452415 021711 0ustar00etherstaff000000 000000 use strict; use warnings; use Test::More; use Test::Fatal; =pod Check for repeated inheritance causing a method conflict (which is not really a conflict) =cut { package Role::Base; use Moose::Role; sub foo { 'Role::Base::foo' } package Role::Derived1; use Moose::Role; with 'Role::Base'; package Role::Derived2; use Moose::Role; with 'Role::Base'; package My::Test::Class1; use Moose; ::is( ::exception { with 'Role::Derived1', 'Role::Derived2'; }, undef, '... roles composed okay (no conflicts)' ); } ok(Role::Base->meta->has_method('foo'), '... have the method foo as expected'); ok(Role::Derived1->meta->has_method('foo'), '... have the method foo as expected'); ok(Role::Derived2->meta->has_method('foo'), '... have the method foo as expected'); ok(My::Test::Class1->meta->has_method('foo'), '... have the method foo as expected'); is(My::Test::Class1->foo, 'Role::Base::foo', '... got the right value from method'); =pod Check for repeated inheritance causing a method conflict with method modifiers (which is not really a conflict) =cut { package Role::Base2; use Moose::Role; override 'foo' => sub { super() . ' -> Role::Base::foo' }; package Role::Derived3; use Moose::Role; with 'Role::Base2'; package Role::Derived4; use Moose::Role; with 'Role::Base2'; package My::Test::Class2::Base; use Moose; sub foo { 'My::Test::Class2::Base' } package My::Test::Class2; use Moose; extends 'My::Test::Class2::Base'; ::is( ::exception { with 'Role::Derived3', 'Role::Derived4'; }, undef, '... roles composed okay (no conflicts)' ); } ok(Role::Base2->meta->has_override_method_modifier('foo'), '... have the method foo as expected'); ok(Role::Derived3->meta->has_override_method_modifier('foo'), '... have the method foo as expected'); ok(Role::Derived4->meta->has_override_method_modifier('foo'), '... have the method foo as expected'); ok(My::Test::Class2->meta->has_method('foo'), '... have the method foo as expected'); isa_ok(My::Test::Class2->meta->get_method('foo'), 'Moose::Meta::Method::Overridden'); ok(My::Test::Class2::Base->meta->has_method('foo'), '... have the method foo as expected'); isa_ok(My::Test::Class2::Base->meta->get_method('foo'), 'Class::MOP::Method'); is(My::Test::Class2::Base->foo, 'My::Test::Class2::Base', '... got the right value from method'); is(My::Test::Class2->foo, 'My::Test::Class2::Base -> Role::Base::foo', '... got the right value from method'); =pod Check for repeated inheritance of the same code. There are no conflicts with before/around/after method modifiers. This tests around, but should work the same for before/afters as well =cut { package Role::Base3; use Moose::Role; around 'foo' => sub { 'Role::Base::foo(' . (shift)->() . ')' }; package Role::Derived5; use Moose::Role; with 'Role::Base3'; package Role::Derived6; use Moose::Role; with 'Role::Base3'; package My::Test::Class3::Base; use Moose; sub foo { 'My::Test::Class3::Base' } package My::Test::Class3; use Moose; extends 'My::Test::Class3::Base'; ::is( ::exception { with 'Role::Derived5', 'Role::Derived6'; }, undef, '... roles composed okay (no conflicts)' ); } ok(Role::Base3->meta->has_around_method_modifiers('foo'), '... have the method foo as expected'); ok(Role::Derived5->meta->has_around_method_modifiers('foo'), '... have the method foo as expected'); ok(Role::Derived6->meta->has_around_method_modifiers('foo'), '... have the method foo as expected'); ok(My::Test::Class3->meta->has_method('foo'), '... have the method foo as expected'); isa_ok(My::Test::Class3->meta->get_method('foo'), 'Class::MOP::Method::Wrapped'); ok(My::Test::Class3::Base->meta->has_method('foo'), '... have the method foo as expected'); isa_ok(My::Test::Class3::Base->meta->get_method('foo'), 'Class::MOP::Method'); is(My::Test::Class3::Base->foo, 'My::Test::Class3::Base', '... got the right value from method'); is(My::Test::Class3->foo, 'Role::Base::foo(My::Test::Class3::Base)', '... got the right value from method'); =pod Check for repeated inheritance causing a attr conflict (which is not really a conflict) =cut { package Role::Base4; use Moose::Role; has 'foo' => (is => 'ro', default => 'Role::Base::foo'); package Role::Derived7; use Moose::Role; with 'Role::Base4'; package Role::Derived8; use Moose::Role; with 'Role::Base4'; package My::Test::Class4; use Moose; ::is( ::exception { with 'Role::Derived7', 'Role::Derived8'; }, undef, '... roles composed okay (no conflicts)' ); } ok(Role::Base4->meta->has_attribute('foo'), '... have the attribute foo as expected'); ok(Role::Derived7->meta->has_attribute('foo'), '... have the attribute foo as expected'); ok(Role::Derived8->meta->has_attribute('foo'), '... have the attribute foo as expected'); ok(My::Test::Class4->meta->has_attribute('foo'), '... have the attribute foo as expected'); is(My::Test::Class4->new->foo, 'Role::Base::foo', '... got the right value from method'); done_testing; Moose-2.1604/t/roles/role_consumers.t000644 000766 000024 00000001417 12617452415 017770 0ustar00etherstaff000000 000000 use strict; use warnings; use Test::More; { package Foo::Role; use Moose::Role; } { package Bar::Role; use Moose::Role; } { package Foo; use Moose; with 'Foo::Role'; } { package Bar; use Moose; extends 'Foo'; with 'Bar::Role'; } { package FooBar; use Moose; with 'Foo::Role', 'Bar::Role'; } { package Foo::Role::User; use Moose::Role; with 'Foo::Role'; } { package Foo::User; use Moose; with 'Foo::Role::User'; } is_deeply([sort Foo::Role->meta->consumers], ['Bar', 'Foo', 'Foo::Role::User', 'Foo::User', 'FooBar']); is_deeply([sort Bar::Role->meta->consumers], ['Bar', 'FooBar']); is_deeply([sort Foo::Role::User->meta->consumers], ['Foo::User']); done_testing; Moose-2.1604/t/roles/role_exclusion.t000644 000766 000024 00000006601 12617452415 017763 0ustar00etherstaff000000 000000 use strict; use warnings; use Test::More; use Test::Fatal; =pod The idea and examples for this feature are taken from the Fortress spec. http://research.sun.com/projects/plrg/fortress0903.pdf trait OrganicMolecule extends Molecule excludes { InorganicMolecule } end trait InorganicMolecule extends Molecule end =cut { package Molecule; use Moose::Role; package Molecule::Organic; use Moose::Role; with 'Molecule'; excludes 'Molecule::Inorganic'; package Molecule::Inorganic; use Moose::Role; with 'Molecule'; } ok(Molecule::Organic->meta->excludes_role('Molecule::Inorganic'), '... Molecule::Organic exludes Molecule::Inorganic'); is_deeply( [ Molecule::Organic->meta->get_excluded_roles_list() ], [ 'Molecule::Inorganic' ], '... Molecule::Organic exludes Molecule::Inorganic'); =pod Check some basic conflicts when combining the roles into the same class =cut { package My::Test1; use Moose; ::is( ::exception { with 'Molecule::Organic'; }, undef, '... adding the role (w/ excluded roles) okay' ); package My::Test2; use Moose; ::like( ::exception { with 'Molecule::Organic', 'Molecule::Inorganic'; }, qr/Conflict detected: Role Molecule::Organic excludes role 'Molecule::Inorganic'/, '... adding the role w/ excluded role conflict dies okay' ); package My::Test3; use Moose; ::is( ::exception { with 'Molecule::Organic'; }, undef, '... adding the role (w/ excluded roles) okay' ); ::like( ::exception { with 'Molecule::Inorganic'; }, qr/Conflict detected: My::Test3 excludes role 'Molecule::Inorganic'/, '... adding the role w/ excluded role conflict dies okay' ); } ok(My::Test1->does('Molecule::Organic'), '... My::Test1 does Molecule::Organic'); ok(My::Test1->does('Molecule'), '... My::Test1 does Molecule'); ok(My::Test1->meta->excludes_role('Molecule::Inorganic'), '... My::Test1 excludes Molecule::Organic'); ok(!My::Test2->does('Molecule::Organic'), '... ! My::Test2 does Molecule::Organic'); ok(!My::Test2->does('Molecule::Inorganic'), '... ! My::Test2 does Molecule::Inorganic'); ok(My::Test3->does('Molecule::Organic'), '... My::Test3 does Molecule::Organic'); ok(My::Test3->does('Molecule'), '... My::Test1 does Molecule'); ok(My::Test3->meta->excludes_role('Molecule::Inorganic'), '... My::Test3 excludes Molecule::Organic'); ok(!My::Test3->does('Molecule::Inorganic'), '... ! My::Test3 does Molecule::Inorganic'); =pod Check some basic conflicts when combining the roles into the a superclass =cut { package Methane; use Moose; with 'Molecule::Organic'; package My::Test4; use Moose; extends 'Methane'; ::like( ::exception { with 'Molecule::Inorganic'; }, qr/Conflict detected: My::Test4 excludes role \'Molecule::Inorganic\'/, '... cannot add exculded role into class which extends Methane' ); } ok(Methane->does('Molecule::Organic'), '... Methane does Molecule::Organic'); ok(My::Test4->isa('Methane'), '... My::Test4 isa Methane'); ok(My::Test4->does('Molecule::Organic'), '... My::Test4 does Molecule::Organic'); ok(My::Test4->meta->does_role('Molecule::Organic'), '... My::Test4 meat does_role Molecule::Organic'); ok(My::Test4->meta->excludes_role('Molecule::Inorganic'), '... My::Test4 meta excludes Molecule::Organic'); ok(!My::Test4->does('Molecule::Inorganic'), '... My::Test4 does Molecule::Inorganic'); done_testing; Moose-2.1604/t/roles/role_exclusion_and_alias_bug.t000644 000766 000024 00000002341 12617452415 022610 0ustar00etherstaff000000 000000 use strict; use warnings; use Test::More; use Test::Moose; { package My::Role; use Moose::Role; sub foo { "FOO" } sub bar { "BAR" } } { package My::Class; use Moose; with 'My::Role' => { -alias => { foo => 'baz', bar => 'gorch' }, -excludes => ['foo', 'bar'], }; } { my $x = My::Class->new; isa_ok($x, 'My::Class'); does_ok($x, 'My::Role'); can_ok($x, $_) for qw[baz gorch]; ok(!$x->can($_), '... cant call method ' . $_) for qw[foo bar]; is($x->baz, 'FOO', '... got the right value'); is($x->gorch, 'BAR', '... got the right value'); } { package My::Role::Again; use Moose::Role; with 'My::Role' => { -alias => { foo => 'baz', bar => 'gorch' }, -excludes => ['foo', 'bar'], }; package My::Class::Again; use Moose; with 'My::Role::Again'; } { my $x = My::Class::Again->new; isa_ok($x, 'My::Class::Again'); does_ok($x, 'My::Role::Again'); does_ok($x, 'My::Role'); can_ok($x, $_) for qw[baz gorch]; ok(!$x->can($_), '... cant call method ' . $_) for qw[foo bar]; is($x->baz, 'FOO', '... got the right value'); is($x->gorch, 'BAR', '... got the right value'); } done_testing; Moose-2.1604/t/roles/role_for_combination.t000644 000766 000024 00000001642 12617452415 021122 0ustar00etherstaff000000 000000 use strict; use warnings; use Test::More; my $OPTS; do { package My::Singleton::Role; use Moose::Role; sub foo { 'My::Singleton::Role' } package My::Role::Metaclass; use Moose; BEGIN { extends 'Moose::Meta::Role' }; sub _role_for_combination { my ($self, $opts) = @_; $OPTS = $opts; return My::Singleton::Role->meta; } package My::Special::Role; use Moose::Role -metaclass => 'My::Role::Metaclass'; sub foo { 'My::Special::Role' } package My::Usual::Role; use Moose::Role; sub bar { 'My::Usual::Role' } package My::Class; use Moose; with ( 'My::Special::Role' => { number => 1 }, 'My::Usual::Role' => { number => 2 }, ); }; is(My::Class->foo, 'My::Singleton::Role', 'role_for_combination applied'); is(My::Class->bar, 'My::Usual::Role', 'collateral role'); is_deeply($OPTS, { number => 1 }); done_testing; Moose-2.1604/t/roles/roles_and_method_cloning.t000644 000766 000024 00000003772 12617452415 021756 0ustar00etherstaff000000 000000 use strict; use warnings; use Test::More; { package Role::Foo; use Moose::Role; sub foo { (caller(0))[3] } } { package ClassA; use Moose; with 'Role::Foo'; } { my $meth = ClassA->meta->get_method('foo'); ok( $meth, 'ClassA has a foo method' ); isa_ok( $meth, 'Moose::Meta::Method' ); is( $meth->original_method, Role::Foo->meta->get_method('foo'), 'ClassA->foo was cloned from Role::Foo->foo' ); is( $meth->fully_qualified_name, 'ClassA::foo', 'fq name is ClassA::foo' ); is( $meth->original_fully_qualified_name, 'Role::Foo::foo', 'original fq name is Role::Foo::foo' ); } { package Role::Bar; use Moose::Role; with 'Role::Foo'; sub bar { } } { my $meth = Role::Bar->meta->get_method('foo'); ok( $meth, 'Role::Bar has a foo method' ); is( $meth->original_method, Role::Foo->meta->get_method('foo'), 'Role::Bar->foo was cloned from Role::Foo->foo' ); is( $meth->fully_qualified_name, 'Role::Bar::foo', 'fq name is Role::Bar::foo' ); is( $meth->original_fully_qualified_name, 'Role::Foo::foo', 'original fq name is Role::Foo::foo' ); } { package ClassB; use Moose; with 'Role::Bar'; } { my $meth = ClassB->meta->get_method('foo'); ok( $meth, 'ClassB has a foo method' ); is( $meth->original_method, Role::Bar->meta->get_method('foo'), 'ClassA->foo was cloned from Role::Bar->foo' ); is( $meth->original_method->original_method, Role::Foo->meta->get_method('foo'), '... which in turn was cloned from Role::Foo->foo' ); is( $meth->fully_qualified_name, 'ClassB::foo', 'fq name is ClassA::foo' ); is( $meth->original_fully_qualified_name, 'Role::Foo::foo', 'original fq name is Role::Foo::foo' ); } isnt( ClassA->foo, "ClassB::foo", "ClassA::foo is not confused with ClassB::foo"); is( ClassB->foo, 'Role::Foo::foo', 'ClassB::foo knows its name' ); is( ClassA->foo, 'Role::Foo::foo', 'ClassA::foo knows its name' ); done_testing; Moose-2.1604/t/roles/roles_and_req_method_edge_cases.t000644 000766 000024 00000014053 12617452415 023250 0ustar00etherstaff000000 000000 use strict; use warnings; use Test::More; use Test::Fatal; =pod NOTE: A fair amount of these tests will likely be irrelevant once we have more fine grained control over the class building process. A lot of the edge cases tested here are actually related to class construction order and not any real functionality. - SL Role which requires a method implemented in another role as an override (it does not remove the requirement) =cut { package Role::RequireFoo; use strict; use warnings; use Moose::Role; requires 'foo'; package Role::ProvideFoo; use strict; use warnings; use Moose::Role; ::is( ::exception { with 'Role::RequireFoo'; }, undef, '... the required "foo" method will not exist yet (but we will live)' ); override 'foo' => sub { 'Role::ProvideFoo::foo' }; } is_deeply( [ Role::ProvideFoo->meta->get_required_method_list ], [ 'foo' ], '... foo method is still required for Role::ProvideFoo'); =pod Role which requires a method implemented in the consuming class as an override. It will fail since method modifiers are second class citizens. =cut { package Class::ProvideFoo::Base; use Moose; sub foo { 'Class::ProvideFoo::Base::foo' } package Class::ProvideFoo::Override1; use Moose; extends 'Class::ProvideFoo::Base'; ::is( ::exception { with 'Role::RequireFoo'; }, undef, '... the required "foo" method will be found in the superclass' ); override 'foo' => sub { 'Class::ProvideFoo::foo' }; package Class::ProvideFoo::Override2; use Moose; extends 'Class::ProvideFoo::Base'; override 'foo' => sub { 'Class::ProvideFoo::foo' }; ::is( ::exception { with 'Role::RequireFoo'; }, undef, '... the required "foo" method exists, although it is overriden locally' ); } =pod Now same thing, but with a before method modifier. =cut { package Class::ProvideFoo::Before1; use Moose; extends 'Class::ProvideFoo::Base'; ::is( ::exception { with 'Role::RequireFoo'; }, undef, '... the required "foo" method will be found in the superclass' ); before 'foo' => sub { 'Class::ProvideFoo::foo:before' }; package Class::ProvideFoo::Before2; use Moose; extends 'Class::ProvideFoo::Base'; before 'foo' => sub { 'Class::ProvideFoo::foo:before' }; ::is( ::exception { with 'Role::RequireFoo'; }, undef, '... the required "foo" method exists, although it is a before modifier locally' ); package Class::ProvideFoo::Before3; use Moose; extends 'Class::ProvideFoo::Base'; sub foo { 'Class::ProvideFoo::foo' } before 'foo' => sub { 'Class::ProvideFoo::foo:before' }; ::is( ::exception { with 'Role::RequireFoo'; }, undef, '... the required "foo" method exists locally, and it is modified locally' ); package Class::ProvideFoo::Before4; use Moose; extends 'Class::ProvideFoo::Base'; sub foo { 'Class::ProvideFoo::foo' } before 'foo' => sub { 'Class::ProvideFoo::foo:before' }; ::isa_ok(__PACKAGE__->meta->get_method('foo'), 'Class::MOP::Method::Wrapped'); ::is(__PACKAGE__->meta->get_method('foo')->get_original_method->package_name, __PACKAGE__, '... but the original method is from our package'); ::is( ::exception { with 'Role::RequireFoo'; }, undef, '... the required "foo" method exists in the symbol table (and we will live)' ); } =pod Now same thing, but with a method from an attribute method modifier. =cut { package Class::ProvideFoo::Attr1; use Moose; extends 'Class::ProvideFoo::Base'; ::is( ::exception { with 'Role::RequireFoo'; }, undef, '... the required "foo" method will be found in the superclass (but then overriden)' ); has 'foo' => (is => 'ro'); package Class::ProvideFoo::Attr2; use Moose; extends 'Class::ProvideFoo::Base'; has 'foo' => (is => 'ro'); ::is( ::exception { with 'Role::RequireFoo'; }, undef, '... the required "foo" method exists, and is an accessor' ); } # ... # a method required in a role, but then # implemented in the superclass (as an # attribute accessor too) { package Foo::Class::Base; use Moose; has 'bar' => ( isa => 'Int', is => 'rw', default => sub { 1 } ); } { package Foo::Role; use Moose::Role; requires 'bar'; has 'foo' => ( isa => 'Int', is => 'rw', lazy => 1, default => sub { (shift)->bar + 1 } ); } { package Foo::Class::Child; use Moose; extends 'Foo::Class::Base'; ::is( ::exception { with 'Foo::Role'; }, undef, '... our role combined successfully' ); } # a method required in a role and implemented in a superclass, with a method # modifier in the subclass. this should live, but dies in 0.26 -- hdp, # 2007-10-11 { package Bar::Class::Base; use Moose; sub bar { "hello!" } } { package Bar::Role; use Moose::Role; requires 'bar'; } { package Bar::Class::Child; use Moose; extends 'Bar::Class::Base'; after bar => sub { "o noes" }; # technically we could run lives_ok here, too, but putting it into a # grandchild class makes it more obvious why this matters. } { package Bar::Class::Grandchild; use Moose; extends 'Bar::Class::Child'; ::is( ::exception { with 'Bar::Role'; }, undef, 'required method exists in superclass as non-modifier, so we live' ); } { package Bar2::Class::Base; use Moose; sub bar { "hello!" } } { package Bar2::Role; use Moose::Role; requires 'bar'; } { package Bar2::Class::Child; use Moose; extends 'Bar2::Class::Base'; override bar => sub { "o noes" }; # technically we could run lives_ok here, too, but putting it into a # grandchild class makes it more obvious why this matters. } { package Bar2::Class::Grandchild; use Moose; extends 'Bar2::Class::Child'; ::is( ::exception { with 'Bar2::Role'; }, undef, 'required method exists in superclass as non-modifier, so we live' ); } done_testing; Moose-2.1604/t/roles/roles_applied_in_create.t000644 000766 000024 00000001026 12617452415 021560 0ustar00etherstaff000000 000000 use strict; use warnings; use Test::More; use Test::Fatal; use Moose::Meta::Class; use Moose::Util; use lib 't/lib'; # Note that this test passed (pre svn #5543) if we inlined the role # definitions in this file, as it was very timing sensitive. is( exception { my $builder_meta = Moose::Meta::Class->create( 'YATTA' => ( superclass => 'Moose::Meta::Class', roles => [qw( Role::Interface Role::Child )], ) ); }, undef, 'Create a new class with several roles' ); done_testing; Moose-2.1604/t/roles/run_time_role_composition.t000644 000766 000024 00000005735 12617452415 022226 0ustar00etherstaff000000 000000 use strict; use warnings; use Test::More; use Scalar::Util qw(blessed); =pod This test can be used as a basis for the runtime role composition. Apparently it is not as simple as just making an anon class. One of the problems is the way that anon classes are DESTROY-ed, which is not very compatible with how instances are dealt with. =cut { package Bark; use Moose::Role; sub talk { 'woof' } package Sleeper; use Moose::Role; sub sleep { 'snore' } sub talk { 'zzz' } package My::Class; use Moose; sub sleep { 'nite-nite' } } my $obj = My::Class->new; isa_ok($obj, 'My::Class'); my $obj2 = My::Class->new; isa_ok($obj2, 'My::Class'); { ok(!$obj->can( 'talk' ), "... the role is not composed yet"); ok(!$obj->does('Bark'), '... we do not do any roles yet'); Bark->meta->apply($obj); ok($obj->does('Bark'), '... we now do the Bark role'); ok(!My::Class->does('Bark'), '... the class does not do the Bark role'); isa_ok($obj, 'My::Class'); isnt(blessed($obj), 'My::Class', '... but it is no longer blessed into My::Class'); ok(!My::Class->can('talk'), "... the role is not composed at the class level"); ok($obj->can('talk'), "... the role is now composed at the object level"); is($obj->talk, 'woof', '... got the right return value for the newly composed method'); } { ok(!$obj2->does('Sleeper'), '... we do not do any roles yet'); Sleeper->meta->apply($obj2); ok($obj2->does('Sleeper'), '... we now do the Sleeper role'); isnt(blessed($obj), blessed($obj2), '... they DO NOT share the same anon-class/role thing'); } { is($obj->sleep, 'nite-nite', '... the original method responds as expected'); ok(!$obj->does('Sleeper'), '... we do not do the Sleeper role'); Sleeper->meta->apply($obj); ok($obj->does('Bark'), '... we still do the Bark role'); ok($obj->does('Sleeper'), '... we now do the Sleeper role too'); ok(!My::Class->does('Sleeper'), '... the class does not do the Sleeper role'); isnt(blessed($obj), blessed($obj2), '... they still don\'t share the same anon-class/role thing'); isa_ok($obj, 'My::Class'); is(My::Class->sleep, 'nite-nite', '... the original method still responds as expected'); is($obj->sleep, 'snore', '... got the right return value for the newly composed method'); is($obj->talk, 'zzz', '... got the right return value for the newly composed method'); } { ok(!$obj2->does('Bark'), '... we do not do Bark yet'); Bark->meta->apply($obj2); ok($obj2->does('Bark'), '... we now do the Bark role'); isnt(blessed($obj), blessed($obj2), '... they still don\'t share the same anon-class/role thing'); } # test that anon classes are equivalent after role composition in the same order { foreach ($obj, $obj2) { $_ = My::Class->new; Bark->meta->apply($_); Sleeper->meta->apply($_); } is(blessed($obj), blessed($obj2), '... they now share the same anon-class/role thing'); } done_testing; Moose-2.1604/t/roles/runtime_roles_and_attrs.t000644 000766 000024 00000002052 12617452415 021653 0ustar00etherstaff000000 000000 use strict; use warnings; use Test::More; use Test::Fatal; { package Dog; use Moose::Role; sub talk { 'woof' } has fur => ( isa => "Str", is => "rw", default => "dirty", ); package Foo; use Moose; has 'dog' => ( is => 'rw', does => 'Dog', ); } my $obj = Foo->new; isa_ok($obj, 'Foo'); ok(!$obj->can( 'talk' ), "... the role is not composed yet"); ok(!$obj->can( 'fur' ), 'ditto'); ok(!$obj->does('Dog'), '... we do not do any roles yet'); isnt( exception { $obj->dog($obj) }, undef, '... and setting the accessor fails (not a Dog yet)' ); Dog->meta->apply($obj); ok($obj->does('Dog'), '... we now do the Bark role'); ok($obj->can('talk'), "... the role is now composed at the object level"); ok($obj->can('fur'), "it has fur"); is($obj->talk, 'woof', '... got the right return value for the newly composed method'); is( exception { $obj->dog($obj) }, undef, '... and setting the accessor is okay' ); is($obj->fur, "dirty", "role attr initialized"); done_testing; Moose-2.1604/t/roles/runtime_roles_and_nonmoose.t000644 000766 000024 00000001540 12617452415 022354 0ustar00etherstaff000000 000000 use strict; use warnings; use Test::More; use Test::Fatal; { package Dog; use Moose::Role; sub talk { 'woof' } package Foo; use Moose; has 'dog' => ( is => 'rw', does => 'Dog', ); no Moose; package Bar; sub new { return bless {}, shift; } } my $bar = Bar->new; isa_ok($bar, 'Bar'); my $foo = Foo->new; isa_ok($foo, 'Foo'); ok(!$bar->can( 'talk' ), "... the role is not composed yet"); isnt( exception { $foo->dog($bar) }, undef, '... and setting the accessor fails (not a Dog yet)' ); Dog->meta->apply($bar); ok($bar->can('talk'), "... the role is now composed at the object level"); is($bar->talk, 'woof', '... got the right return value for the newly composed method'); is( exception { $foo->dog($bar) }, undef, '... and setting the accessor is okay' ); done_testing; Moose-2.1604/t/roles/runtime_roles_w_params.t000644 000766 000024 00000003237 12617452415 021513 0ustar00etherstaff000000 000000 use strict; use warnings; use Test::More; use Test::Fatal; { package Foo; use Moose; has 'bar' => (is => 'ro'); package Bar; use Moose::Role; has 'baz' => (is => 'ro', default => 'BAZ'); } # normal ... { my $foo = Foo->new(bar => 'BAR'); isa_ok($foo, 'Foo'); is($foo->bar, 'BAR', '... got the expect value'); ok(!$foo->can('baz'), '... no baz method though'); is( exception { Bar->meta->apply($foo) }, undef, '... this works' ); is($foo->bar, 'BAR', '... got the expect value'); ok($foo->can('baz'), '... we have baz method now'); is($foo->baz, 'BAZ', '... got the expect value'); } # with extra params ... { my $foo = Foo->new(bar => 'BAR'); isa_ok($foo, 'Foo'); is($foo->bar, 'BAR', '... got the expect value'); ok(!$foo->can('baz'), '... no baz method though'); is( exception { Bar->meta->apply($foo, (rebless_params => { baz => 'FOO-BAZ' })) }, undef, '... this works' ); is($foo->bar, 'BAR', '... got the expect value'); ok($foo->can('baz'), '... we have baz method now'); is($foo->baz, 'FOO-BAZ', '... got the expect value'); } # with extra params ... { my $foo = Foo->new(bar => 'BAR'); isa_ok($foo, 'Foo'); is($foo->bar, 'BAR', '... got the expect value'); ok(!$foo->can('baz'), '... no baz method though'); is( exception { Bar->meta->apply($foo, (rebless_params => { bar => 'FOO-BAR', baz => 'FOO-BAZ' })) }, undef, '... this works' ); is($foo->bar, 'FOO-BAR', '... got the expect value'); ok($foo->can('baz'), '... we have baz method now'); is($foo->baz, 'FOO-BAZ', '... got the expect value'); } done_testing; Moose-2.1604/t/roles/use_base_does.t000644 000766 000024 00000001247 12617452415 017532 0ustar00etherstaff000000 000000 use strict; use warnings; use Test::More; { package Foo::Role; use Moose::Role; } { package Foo; use Moose; with 'Foo::Role'; } { package Foo::Sub; use parent -norequire => 'Foo'; } { package Foo::Sub2; use parent -norequire => 'Foo'; } { package Foo::Sub3; use parent -norequire => 'Foo'; } { package Foo::Sub4; use parent -norequire => 'Foo'; } ok(Foo::Sub->does('Foo::Role'), "class does Foo::Role"); ok(Foo::Sub2->new->does('Foo::Role'), "object does Foo::Role"); ok(!Foo::Sub3->does('Bar::Role'), "class doesn't do Bar::Role"); ok(!Foo::Sub4->new->does('Bar::Role'), "object doesn't do Bar::Role"); done_testing; Moose-2.1604/t/recipes/basics_bankaccount_methodmodifiersandsubclassing.t000644 000766 000024 00000007333 12617452416 027242 0ustar00etherstaff000000 000000 #!/usr/bin/perl -w use strict; use Test::More 'no_plan'; use Test::Fatal; $| = 1; # =begin testing SETUP { package BankAccount; use Moose; has 'balance' => ( isa => 'Int', is => 'rw', default => 0 ); sub deposit { my ( $self, $amount ) = @_; $self->balance( $self->balance + $amount ); } sub withdraw { my ( $self, $amount ) = @_; my $current_balance = $self->balance(); ( $current_balance >= $amount ) || confess "Account overdrawn"; $self->balance( $current_balance - $amount ); } package CheckingAccount; use Moose; extends 'BankAccount'; has 'overdraft_account' => ( isa => 'BankAccount', is => 'rw' ); before 'withdraw' => sub { my ( $self, $amount ) = @_; my $overdraft_amount = $amount - $self->balance(); if ( $self->overdraft_account && $overdraft_amount > 0 ) { $self->overdraft_account->withdraw($overdraft_amount); $self->deposit($overdraft_amount); } }; } # =begin testing { my $savings_account; { $savings_account = BankAccount->new( balance => 250 ); isa_ok( $savings_account, 'BankAccount' ); is( $savings_account->balance, 250, '... got the right savings balance' ); is( exception { $savings_account->withdraw(50); }, undef, '... withdrew from savings successfully' ); is( $savings_account->balance, 200, '... got the right savings balance after withdrawal' ); $savings_account->deposit(150); is( $savings_account->balance, 350, '... got the right savings balance after deposit' ); } { my $checking_account = CheckingAccount->new( balance => 100, overdraft_account => $savings_account ); isa_ok( $checking_account, 'CheckingAccount' ); isa_ok( $checking_account, 'BankAccount' ); is( $checking_account->overdraft_account, $savings_account, '... got the right overdraft account' ); is( $checking_account->balance, 100, '... got the right checkings balance' ); is( exception { $checking_account->withdraw(50); }, undef, '... withdrew from checking successfully' ); is( $checking_account->balance, 50, '... got the right checkings balance after withdrawal' ); is( $savings_account->balance, 350, '... got the right savings balance after checking withdrawal (no overdraft)' ); is( exception { $checking_account->withdraw(200); }, undef, '... withdrew from checking successfully' ); is( $checking_account->balance, 0, '... got the right checkings balance after withdrawal' ); is( $savings_account->balance, 200, '... got the right savings balance after overdraft withdrawal' ); } { my $checking_account = CheckingAccount->new( balance => 100 # no overdraft account ); isa_ok( $checking_account, 'CheckingAccount' ); isa_ok( $checking_account, 'BankAccount' ); is( $checking_account->overdraft_account, undef, '... no overdraft account' ); is( $checking_account->balance, 100, '... got the right checkings balance' ); is( exception { $checking_account->withdraw(50); }, undef, '... withdrew from checking successfully' ); is( $checking_account->balance, 50, '... got the right checkings balance after withdrawal' ); isnt( exception { $checking_account->withdraw(200); }, undef, '... withdrawal failed due to attempted overdraft' ); is( $checking_account->balance, 50, '... got the right checkings balance after withdrawal failure' ); } } 1; Moose-2.1604/t/recipes/basics_binarytree_attributefeatures.t000644 000766 000024 00000007517 12617452415 024560 0ustar00etherstaff000000 000000 #!/usr/bin/perl -w use strict; use Test::More 'no_plan'; use Test::Fatal; $| = 1; # =begin testing SETUP { package BinaryTree; use Moose; has 'node' => ( is => 'rw', isa => 'Any' ); has 'parent' => ( is => 'rw', isa => 'BinaryTree', predicate => 'has_parent', weak_ref => 1, ); has 'left' => ( is => 'rw', isa => 'BinaryTree', predicate => 'has_left', lazy => 1, default => sub { BinaryTree->new( parent => $_[0] ) }, trigger => \&_set_parent_for_child ); has 'right' => ( is => 'rw', isa => 'BinaryTree', predicate => 'has_right', lazy => 1, default => sub { BinaryTree->new( parent => $_[0] ) }, trigger => \&_set_parent_for_child ); sub _set_parent_for_child { my ( $self, $child ) = @_; confess "You cannot insert a tree which already has a parent" if $child->has_parent; $child->parent($self); } } # =begin testing { use Scalar::Util 'isweak'; my $root = BinaryTree->new(node => 'root'); isa_ok($root, 'BinaryTree'); is($root->node, 'root', '... got the right node value'); ok(!$root->has_left, '... no left node yet'); ok(!$root->has_right, '... no right node yet'); ok(!$root->has_parent, '... no parent for root node'); # make a left node my $left = $root->left; isa_ok($left, 'BinaryTree'); is($root->left, $left, '... got the same node (and it is $left)'); ok($root->has_left, '... we have a left node now'); ok($left->has_parent, '... lefts has a parent'); is($left->parent, $root, '... lefts parent is the root'); ok(isweak($left->{parent}), '... parent is a weakened ref'); ok(!$left->has_left, '... $left no left node yet'); ok(!$left->has_right, '... $left no right node yet'); is($left->node, undef, '... left has got no node value'); is( exception { $left->node('left'); }, undef, '... assign to lefts node' ); is($left->node, 'left', '... left now has a node value'); # make a right node ok(!$root->has_right, '... still no right node yet'); is($root->right->node, undef, '... right has got no node value'); ok($root->has_right, '... now we have a right node'); my $right = $root->right; isa_ok($right, 'BinaryTree'); is( exception { $right->node('right'); }, undef, '... assign to rights node' ); is($right->node, 'right', '... left now has a node value'); is($root->right, $right, '... got the same node (and it is $right)'); ok($root->has_right, '... we have a right node now'); ok($right->has_parent, '... rights has a parent'); is($right->parent, $root, '... rights parent is the root'); ok(isweak($right->{parent}), '... parent is a weakened ref'); # make a left node of the left node my $left_left = $left->left; isa_ok($left_left, 'BinaryTree'); ok($left_left->has_parent, '... left does have a parent'); is($left_left->parent, $left, '... got a parent node (and it is $left)'); ok($left->has_left, '... we have a left node now'); is($left->left, $left_left, '... got a left node (and it is $left_left)'); ok(isweak($left_left->{parent}), '... parent is a weakened ref'); # make a right node of the left node my $left_right = BinaryTree->new; isa_ok($left_right, 'BinaryTree'); is( exception { $left->right($left_right); }, undef, '... assign to rights node' ); ok($left_right->has_parent, '... left does have a parent'); is($left_right->parent, $left, '... got a parent node (and it is $left)'); ok($left->has_right, '... we have a left node now'); is($left->right, $left_right, '... got a left node (and it is $left_left)'); ok(isweak($left_right->{parent}), '... parent is a weakened ref'); # and check the error isnt( exception { $left_right->right($left_left); }, undef, '... cannot assign a node which already has a parent' ); } 1; Moose-2.1604/t/recipes/basics_company_subtypes.t000644 000766 000024 00000022506 12617452415 022171 0ustar00etherstaff000000 000000 #!/usr/bin/perl -w use strict; use Test::More 'no_plan'; use Test::Fatal; $| = 1; # =begin testing SETUP use Test::Requires { 'Locale::US' => '0', 'Regexp::Common' => '0', }; # =begin testing SETUP { package Address; use Moose; use Moose::Util::TypeConstraints; use Locale::US; use Regexp::Common 'zip'; my $STATES = Locale::US->new; subtype 'USState' => as Str => where { ( exists $STATES->{code2state}{ uc($_) } || exists $STATES->{state2code}{ uc($_) } ); }; subtype 'USZipCode' => as Value => where { /^$RE{zip}{US}{-extended => 'allow'}$/; }; has 'street' => ( is => 'rw', isa => 'Str' ); has 'city' => ( is => 'rw', isa => 'Str' ); has 'state' => ( is => 'rw', isa => 'USState' ); has 'zip_code' => ( is => 'rw', isa => 'USZipCode' ); package Company; use Moose; use Moose::Util::TypeConstraints; has 'name' => ( is => 'rw', isa => 'Str', required => 1 ); has 'address' => ( is => 'rw', isa => 'Address' ); has 'employees' => ( is => 'rw', isa => 'ArrayRef[Employee]', default => sub { [] }, ); sub BUILD { my ( $self, $params ) = @_; foreach my $employee ( @{ $self->employees } ) { $employee->employer($self); } } after 'employees' => sub { my ( $self, $employees ) = @_; return unless $employees; foreach my $employee ( @$employees ) { $employee->employer($self); } }; package Person; use Moose; has 'first_name' => ( is => 'rw', isa => 'Str', required => 1 ); has 'last_name' => ( is => 'rw', isa => 'Str', required => 1 ); has 'middle_initial' => ( is => 'rw', isa => 'Str', predicate => 'has_middle_initial' ); has 'address' => ( is => 'rw', isa => 'Address' ); sub full_name { my $self = shift; return $self->first_name . ( $self->has_middle_initial ? ' ' . $self->middle_initial . '. ' : ' ' ) . $self->last_name; } package Employee; use Moose; extends 'Person'; has 'title' => ( is => 'rw', isa => 'Str', required => 1 ); has 'employer' => ( is => 'rw', isa => 'Company', weak_ref => 1 ); override 'full_name' => sub { my $self = shift; super() . ', ' . $self->title; }; } # =begin testing { { package Company; sub get_employee_count { scalar @{(shift)->employees} } } use Scalar::Util 'isweak'; my $ii; is( exception { $ii = Company->new( { name => 'Infinity Interactive', address => Address->new( street => '565 Plandome Rd., Suite 307', city => 'Manhasset', state => 'NY', zip_code => '11030' ), employees => [ Employee->new( first_name => 'Jeremy', last_name => 'Shao', title => 'President / Senior Consultant', address => Address->new( city => 'Manhasset', state => 'NY' ) ), Employee->new( first_name => 'Tommy', last_name => 'Lee', title => 'Vice President / Senior Developer', address => Address->new( city => 'New York', state => 'NY' ) ), Employee->new( first_name => 'Stevan', middle_initial => 'C', last_name => 'Little', title => 'Senior Developer', address => Address->new( city => 'Madison', state => 'CT' ) ), ] } ); }, undef, '... created the entire company successfully' ); isa_ok( $ii, 'Company' ); is( $ii->name, 'Infinity Interactive', '... got the right name for the company' ); isa_ok( $ii->address, 'Address' ); is( $ii->address->street, '565 Plandome Rd., Suite 307', '... got the right street address' ); is( $ii->address->city, 'Manhasset', '... got the right city' ); is( $ii->address->state, 'NY', '... got the right state' ); is( $ii->address->zip_code, 11030, '... got the zip code' ); is( $ii->get_employee_count, 3, '... got the right employee count' ); # employee #1 isa_ok( $ii->employees->[0], 'Employee' ); isa_ok( $ii->employees->[0], 'Person' ); is( $ii->employees->[0]->first_name, 'Jeremy', '... got the right first name' ); is( $ii->employees->[0]->last_name, 'Shao', '... got the right last name' ); ok( !$ii->employees->[0]->has_middle_initial, '... no middle initial' ); is( $ii->employees->[0]->middle_initial, undef, '... got the right middle initial value' ); is( $ii->employees->[0]->full_name, 'Jeremy Shao, President / Senior Consultant', '... got the right full name' ); is( $ii->employees->[0]->title, 'President / Senior Consultant', '... got the right title' ); is( $ii->employees->[0]->employer, $ii, '... got the right company' ); ok( isweak( $ii->employees->[0]->{employer} ), '... the company is a weak-ref' ); isa_ok( $ii->employees->[0]->address, 'Address' ); is( $ii->employees->[0]->address->city, 'Manhasset', '... got the right city' ); is( $ii->employees->[0]->address->state, 'NY', '... got the right state' ); # employee #2 isa_ok( $ii->employees->[1], 'Employee' ); isa_ok( $ii->employees->[1], 'Person' ); is( $ii->employees->[1]->first_name, 'Tommy', '... got the right first name' ); is( $ii->employees->[1]->last_name, 'Lee', '... got the right last name' ); ok( !$ii->employees->[1]->has_middle_initial, '... no middle initial' ); is( $ii->employees->[1]->middle_initial, undef, '... got the right middle initial value' ); is( $ii->employees->[1]->full_name, 'Tommy Lee, Vice President / Senior Developer', '... got the right full name' ); is( $ii->employees->[1]->title, 'Vice President / Senior Developer', '... got the right title' ); is( $ii->employees->[1]->employer, $ii, '... got the right company' ); ok( isweak( $ii->employees->[1]->{employer} ), '... the company is a weak-ref' ); isa_ok( $ii->employees->[1]->address, 'Address' ); is( $ii->employees->[1]->address->city, 'New York', '... got the right city' ); is( $ii->employees->[1]->address->state, 'NY', '... got the right state' ); # employee #3 isa_ok( $ii->employees->[2], 'Employee' ); isa_ok( $ii->employees->[2], 'Person' ); is( $ii->employees->[2]->first_name, 'Stevan', '... got the right first name' ); is( $ii->employees->[2]->last_name, 'Little', '... got the right last name' ); ok( $ii->employees->[2]->has_middle_initial, '... got middle initial' ); is( $ii->employees->[2]->middle_initial, 'C', '... got the right middle initial value' ); is( $ii->employees->[2]->full_name, 'Stevan C. Little, Senior Developer', '... got the right full name' ); is( $ii->employees->[2]->title, 'Senior Developer', '... got the right title' ); is( $ii->employees->[2]->employer, $ii, '... got the right company' ); ok( isweak( $ii->employees->[2]->{employer} ), '... the company is a weak-ref' ); isa_ok( $ii->employees->[2]->address, 'Address' ); is( $ii->employees->[2]->address->city, 'Madison', '... got the right city' ); is( $ii->employees->[2]->address->state, 'CT', '... got the right state' ); # create new company my $new_company = Company->new( name => 'Infinity Interactive International' ); isa_ok( $new_company, 'Company' ); my $ii_employees = $ii->employees; foreach my $employee (@$ii_employees) { is( $employee->employer, $ii, '... has the ii company' ); } $new_company->employees($ii_employees); foreach my $employee ( @{ $new_company->employees } ) { is( $employee->employer, $new_company, '... has the different company now' ); } ## check some error conditions for the subtypes isnt( exception { Address->new( street => {} ),; }, undef, '... we die correctly with bad args' ); isnt( exception { Address->new( city => {} ),; }, undef, '... we die correctly with bad args' ); isnt( exception { Address->new( state => 'British Columbia' ),; }, undef, '... we die correctly with bad args' ); is( exception { Address->new( state => 'Connecticut' ),; }, undef, '... we live correctly with good args' ); isnt( exception { Address->new( zip_code => 'AF5J6$' ),; }, undef, '... we die correctly with bad args' ); is( exception { Address->new( zip_code => '06443' ),; }, undef, '... we live correctly with good args' ); isnt( exception { Company->new(),; }, undef, '... we die correctly without good args' ); is( exception { Company->new( name => 'Foo' ),; }, undef, '... we live correctly without good args' ); isnt( exception { Company->new( name => 'Foo', employees => [ Person->new ] ),; }, undef, '... we die correctly with good args' ); is( exception { Company->new( name => 'Foo', employees => [] ),; }, undef, '... we live correctly with good args' ); } 1; Moose-2.1604/t/recipes/basics_datetime_extendingnonmooseparent.t000644 000766 000024 00000002441 12617452416 025413 0ustar00etherstaff000000 000000 #!/usr/bin/perl -w use strict; use Test::More 'no_plan'; use Test::Fatal; $| = 1; # =begin testing SETUP # because MooseX::NonMoose has a version requirement BEGIN { $Moose::Role::VERSION = 9999 unless $Moose::Role::VERSION } use Test::Requires { 'DateTime' => '0', 'DateTime::Calendar::Mayan' => '0', 'MooseX::NonMoose' => '0.25', }; # =begin testing SETUP { package My::DateTime; use Moose; use MooseX::NonMoose; use DateTime::Calendar::Mayan; extends qw( DateTime ); has 'mayan_date' => ( is => 'ro', isa => 'DateTime::Calendar::Mayan', init_arg => undef, lazy => 1, builder => '_build_mayan_date', clearer => '_clear_mayan_date', predicate => 'has_mayan_date', ); after 'set' => sub { $_[0]->_clear_mayan_date; }; sub _build_mayan_date { DateTime::Calendar::Mayan->from_object( object => $_[0] ); } } # =begin testing { my $dt = My::DateTime->new( year => 1970, month => 2, day => 24 ); can_ok( $dt, 'mayan_date' ); isa_ok( $dt->mayan_date, 'DateTime::Calendar::Mayan' ); is( $dt->mayan_date->date, '12.17.16.9.19', 'got expected mayan date' ); $dt->set( year => 2009 ); ok( ! $dt->has_mayan_date, 'mayan_date is cleared after call to ->set' ); } 1; Moose-2.1604/t/recipes/basics_document_augmentandinner.t000644 000766 000024 00000002711 12617452415 023636 0ustar00etherstaff000000 000000 #!/usr/bin/perl -w use strict; use Test::More 'no_plan'; use Test::Fatal; $| = 1; # =begin testing SETUP { package Document::Page; use Moose; has 'body' => ( is => 'rw', isa => 'Str', default => sub {''} ); sub create { my $self = shift; $self->open_page; inner(); $self->close_page; } sub append_body { my ( $self, $appendage ) = @_; $self->body( $self->body . $appendage ); } sub open_page { (shift)->append_body('') } sub close_page { (shift)->append_body('') } package Document::PageWithHeadersAndFooters; use Moose; extends 'Document::Page'; augment 'create' => sub { my $self = shift; $self->create_header; inner(); $self->create_footer; }; sub create_header { (shift)->append_body('
') } sub create_footer { (shift)->append_body('