MooseX-Method-Signatures-0.49/000700 000766 000024 00000000000 12605070147 016463 5ustar00etherstaff000000 000000 MooseX-Method-Signatures-0.49/Build.PL000644 000766 000024 00000011474 12605070147 020000 0ustar00etherstaff000000 000000 # This Build.PL for MooseX-Method-Signatures was generated by # Dist::Zilla::Plugin::ModuleBuildTiny::Fallback 0.020 use strict; use warnings; my %configure_requires = ( 'Module::Build::Tiny' => '0.034', ); my @missing = grep { ! eval "require $_; $_->VERSION($configure_requires{$_}); 1" } keys %configure_requires; if (not @missing) { # This section for MooseX-Method-Signatures was generated by Dist::Zilla::Plugin::ModuleBuildTiny 0.014. use strict; use warnings; use 5.006; # use Module::Build::Tiny 0.034; Module::Build::Tiny::Build_PL(); } else { if (not $ENV{PERL_MB_FALLBACK_SILENCE_WARNING}) { warn <<'EOW'; *** WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING *** If you're seeing this warning, your toolchain is really, really old* and you'll almost certainly have problems installing CPAN modules from this century. But never fear, dear user, for we have the technology to fix this! If you're using CPAN.pm to install things, then you can upgrade it using: cpan CPAN If you're using CPANPLUS to install things, then you can upgrade it using: cpanp CPANPLUS If you're using cpanminus, you shouldn't be seeing this message in the first place, so please file an issue on github. This public service announcement was brought to you by the Perl Toolchain Gang, the irc.perl.org #toolchain IRC channel, and the number 42. ---- * Alternatively, you are running this file manually, in which case you need to learn to first fulfill all configure requires prerequisites listed in META.yml or META.json -- or use a cpan client to install this distribution. You can also silence this warning for future installations by setting the PERL_MB_FALLBACK_SILENCE_WARNING environment variable, but please don't do that until you fix your toolchain as described above. EOW sleep 10 if -t STDIN && (-t STDOUT || !(-f STDOUT || -c STDOUT)); } # This section was automatically generated by Dist::Zilla::Plugin::ModuleBuild v5.039. use strict; use warnings; require Module::Build; Module::Build->VERSION(0.28); my %module_build_args = ( "configure_requires" => { "Module::Build::Tiny" => "0.034", "perl" => "5.006" }, "dist_abstract" => "(DEPRECATED) Method declarations with type constraints and no source filter", "dist_author" => [ "Florian Ragwitz " ], "dist_name" => "MooseX-Method-Signatures", "dist_version" => "0.49", "license" => "perl", "module_name" => "MooseX::Method::Signatures", "recursive_test_files" => 1, "requires" => { "B::Hooks::EndOfScope" => "0.10", "Carp" => 0, "Context::Preserve" => 0, "Devel::Declare" => "0.005011", "Devel::Declare::Context::Simple" => 0, "Eval::Closure" => 0, "Module::Runtime" => "0.012", "Moose" => "0.89", "Moose::Meta::Class" => 0, "Moose::Meta::Method" => 0, "Moose::Util" => 0, "Moose::Util::TypeConstraints" => 0, "MooseX::LazyRequire" => "0.06", "MooseX::Meta::TypeConstraint::ForceCoercion" => 0, "MooseX::Types" => "0.35", "MooseX::Types::Moose" => "0.19", "MooseX::Types::Structured" => "0.24", "MooseX::Types::Util" => 0, "Parse::Method::Signatures" => "1.003014", "Parse::Method::Signatures::Param::Named" => 0, "Parse::Method::Signatures::Param::Placeholder" => 0, "Parse::Method::Signatures::TypeConstraint" => 0, "Parse::Method::Signatures::Types" => 0, "Scalar::Util" => 0, "Sub::Name" => 0, "Task::Weaken" => 0, "Text::Balanced" => 0, "aliased" => 0, "if" => 0, "namespace::autoclean" => 0, "perl" => "5.006", "strict" => 0, "warnings" => 0 }, "test_requires" => { "ExtUtils::MakeMaker" => 0, "File::Spec" => 0, "Moose::Role" => 0, "Test::Deep" => 0, "Test::Fatal" => 0, "Test::Moose" => 0, "Test::More" => "0.89", "attributes" => 0, "lib" => 0, "metaclass" => 0, "namespace::clean" => "0.19", "perl" => "5.006" } ); my %fallback_build_requires = ( "ExtUtils::MakeMaker" => 0, "File::Spec" => 0, "Moose::Role" => 0, "Test::Deep" => 0, "Test::Fatal" => 0, "Test::Moose" => 0, "Test::More" => "0.89", "attributes" => 0, "lib" => 0, "metaclass" => 0, "namespace::clean" => "0.19", "perl" => "5.006" ); unless ( eval { Module::Build->VERSION(0.4004) } ) { delete $module_build_args{test_requires}; $module_build_args{build_requires} = \%fallback_build_requires; } my $build = Module::Build->new(%module_build_args); $build->create_build_script; } MooseX-Method-Signatures-0.49/Changes000600 000766 000024 00000024457 12605070147 017774 0ustar00etherstaff000000 000000 Revision history for MooseX-Method-Signatures 0.49 2015-10-07 01:07:44Z - added x_deprecated to metadata 0.48 2014-09-20 17:46:45Z - fix tests that fail on altered warning messages in perl 5.21.4 (see perl RT#121638) 0.47 2013-12-14 19:06:59Z - update configure_requires checking in Makefile.PL, add CONTRIBUTING file 0.46 2013-10-02 00:40:37Z - re-release with fixed compile test 0.45 2013-09-12 03:06:25Z - removed use of deprecated Class::MOP::load_class - documentation reference added, pointing to the WARNING section in MooseX::Declare, regarding future utility of this module - repository migrated to the github moose organization 0.44 2012-11-24 21:17:02Z - Fix broken test in 5.17.6, where hash ordering is now randomized (RT#81388, Karen Etheridge) 0.43 2012-05-21 00:34:04Z - Bump dependency on MooseX::Types to 0.35 to resolve issues with recent MooseX::Types releases. 0.42 2012-04-23 18:08:19Z - Mark failing test due to Eval::Closure/Devel::Declare issues as TODO until things are fixed, to at least allow recent versions to install without errors. 0.41 2012-03-11 17:05:27Z - Add explicit dependency on Eval::Closure, in an effort to get more diagnostics from failing cpantesters reports. No functionality changes. 0.40 2012-03-10 17:03:51Z - Loosen a regexp in a test, to handle the new format emitted by Carp 1.25. 0.39 2012-03-10 00:54:18Z - The test suite now uses Test::Fatal instead of Test::Exception (Karen Etheridge). - Bump dependency on MooseX::Types::Structured to 0.24, which contains more detailed error messages as well as some performance enhancements. 0.38 2012-03-09 23:43:07Z - Require B::Hooks::EndOfScope 0.10 and Module::Runtime 0.012, fixing various perl 5.8 breakages. 0.37 2011-09-12 09:35:29Z - Don't look in the stash for traits or types that contain :: (Jesse Luehrs). 0.36 2010-08-31 21:36:19Z - Avoid deprecation warnings from new Moose version by depending on MooseX::LazyRequire 0.06 (Jeremy Carman). 0.35 2010-07-19 03:50:08Z - Updated to avoid warnings from Moose 1.09 (Dave Rolsky). - Switch from Module::Install to Dist::Zilla. 0.34 2010-06-08 17:00:00Z - Provides a version of reify that replaces the original version and now finally CatalystX::Declare and MooseX::MultiMethods work. 0.33 2010-06-01 16:47:34Z - CatalystX::Declare seems to create a method object without a code reference at all. 0.32 2010-06-01 16:47:34Z - Detect usage of old MXMS::Meta::Method API and retro-compatibilize. 0.31 2010-06-01 16:47:34Z - Add support for "does" as a trait declarator - Compatibilize MXMS::Meta::Method signature with Class::MOP::Method so other traits can apply customizations to the actual body of the method. 0.30 2010-02-04 01:41:36Z - Make Any instead of Defined the default type constraint. - Add tests for coercing optional named parameters (Cory Watson). + Make those tests pass by depending on MooseX::Types::Structured 0.20. - Make sure Text::Balanced doesn't screw up our data. 0.29 2009-10-15 21:27:08Z - Fix regression introduced in 0.28. Validation for methods without named arguments wasn't strict enough anymore. Passing too many arguments hasn't been rejected. Thanks Justin Hunter for finding this. 0.28 2009-10-08 23:28:02Z - Fix default values for named arguments. 0.27 2009-09-22 12:30:23Z - Depend on MooseX::LazyRequire 0.04 to avoid fail on version 0.03, which has been broken by recent Moose versions (Closes RT#49903) (Maik Hentsche). 0.26 2009-09-08 18:14:01Z - Rebuilt dist to include missing files 0.25 2009-09-07 21:03:03Z - Remove scary ALPHA disclaimer from POD - Depend on Test::More 0.88 for done_testing 0.24 2009-08-31 17:04:14Z - Rename the meta method's clone method to reify. clone already had a special meaning for methods in role applications to classes. 0.23 2009-08-27 20:22:40Z - Bump Moose dependency to 0.89. This avoids test failures on some older Moose versions. 0.22 2009-08-27 13:29:25Z - Provide sane closure behaviour for anonymous methods. - Add tests for the above (Sebastian Willert). - Depend on MooseX::Types 0.19, as 0.18 made us blow up spectacularly. 0.21 2009-08-18 06:45:48Z - Add tests for using aliased.pm for type aliases (Steffen Schwigon). - Depend on the latest PMS to get type alias resolving. 0.20 2009-08-17 10:11:32Z - Make the meta method's parsed_signature public. - Use MooseX::LazyRequire's new interface and depend on 0.03. 0.19 2009-08-14 09:23:42Z - Move method redefinition warnings to the method application hook so it's easy to override. 0.18 2009-08-14 00:24:41Z - Depend on Devel::Declare 0.005011. This avoids "->method" and "method =>" being misinterpreted sometimes. 0.17 2009-08-13 06:37:31Z - Implement method traits (Cory Watson). - Properly test list placeholders. - Document the right syntax for return value type constraints. - Use namespace::autoclean instead of namespace::clean. - Let the signature default to (@) if none is given. - Don't require the package attribute when a pre-built context is passed in. - Depend on a recent Parse::Method::Signatures to make sure we will work with new PPIs and have the right MooseX::Traits version. - Fix doc typo (arcanez). - Split out context from self so that we may pass in an arbitrary context (nperez). - Enable passing a context and also a coderef to use to apply the method once constructed (for deferred method modifier application in MXD) (nperez). - Enable MXMS to work with multiple different declarators and prototype injections (nperez). - Change from using Devel::Declare::MethodInstaller::Simple to ::Context::Simple since strip_attrs was moved down there (nperez). 0.16 2009-05-01 06:03:44Z - Bump prereq to Types::Structured to avoid warnings on new Moose versions. - Make sure the method keyword is "tight" enough, so "@methods = (method { }, method { });" works. - Implement non-scalar parameters. - Updated documentation. - Fix a couple of POD nits (Matt Kraai). 0.15 2009-04-13 02:32:25Z - Use MooseX::Meta::TypeConstraint::ForceCoercion instead of forcing coercion manually on validation to make reusing the method type constraints easier. 0.14 2009-04-08 01:45:50Z - Depend on MooseX::Types::Structured 0.11. 0.10 had a bug which caused validation to always fail. 0.13 2009-03-28 13:04:36Z - Fix bug with namespace::clean and MooseX::Types. (Ash Berlin) - Rename methods to remove __ANON__ from callstack. - Port to using 'from_namespace' from Parse::Method::Signatures 1.003003. - Ensure errors from type constraints are reporting from the right place. - Now warns if you try to refdefine a method. - Return values can now be enforced by using method foo ($x) returns (ArrayRef) { } This will be documented in the pod once we are happy with the exact behaviour. See t/return_value.t for examples for now. - Depend upon Parse::Method::Signatures 1.003004 for better error reporting - Fix a bug in methods with attributes on perl 5.8.7 - Fix bug in location of errors with older Mooses - Bump minium Moose dep to 0.63 0.12 2009-03-04 02:05:19Z - Implement and test scalar placeholder values. - Eval default value so reference and string defaults work as expected. - Make the testsuite less noisy. 0.11 2009-03-03 02:27:00Z - Use MooseX::Types introspection capabilities instead of blindly executing functions in other pakages. - Stop mentioning the deprecated MX::Method, as requested by its author. - Fix and test reporting of compile-time error message (Ash Berlin). - Small stylistic whitespace changes in the docs. - Test that optional params really are optional (Rhesa Rozendaal). - Added test for hashref default values (Rhesa Rozendaal). - Testing that eval works with semicolon insertion (Hakim Cassimally). 0.10 2009-02-28 18:04:02Z - Mention all contributors. - Update copyright notice for 2009. - Refer to Method::Signatures::Simple. - Move most of the actual functionality into the method metaclass. - Allow adding methods with signature validation without the Devel::Declare sugar. - Allow method names to be quoted strings with possible variable interpolations. 0.09 2009-02-23 07:07:47Z - Port to MX::Types::Structured. + Much more useful error messages, including backtraces. + Don't pass undef for parameters now actual value was provided for. - Require a Defined value, not a simple Value when no type constraints are given. - Add more tests. Improve existing tests. 0.08 2009-02-22 01:15:40Z - Don't depend on Readonly in the tests. - Allow parameters to be coerced using the coerce trait. 0.07 2009-02-21 19:31:47Z - Tests for anon methods. - Use B::Hooks::EndOfScope instead of Scope::Guard and %^H. - Add TODO test for using exported types in signatures. - Port from Perl6::Signature to Parse::Method::Signatures. - Port to Devel::Declare::MethodInstaller::Simple. - Support for MX::Types. - Use a custom method metaclass. - Doc patch to mention interaction with Moose::Role (Jonathan Scott Duff). - Add more tests for eval and various signatures (Kent Fredric). - TODO test for sane error messages with files and line numbers (Rhesa Rozendaal). - Don't confuse people with the lack of "use Moose" in SYSOPSIS (Ricardo SIGNES). - Add information for repo and bugtracker in META.yml (Yanick Champoux). - Explain interaction with Role's 'require' (Yanick Champoux). 0.06 2008-10-14 03:43:35Z - Use Moose meta methods instead of just coderefs. - Add a setup_for method to set up the method keyword for something different than the caller(). 0.05 2008-10-12 01:49:03Z - Depend on Devel::Declare 0.002000. - Make named arguments work as expected and add more tests. 0.04 2008-10-01 23:07:00Z - Depend on Perl6::Signature 0.03. This is the first version to implement Foo|Bar $x correctly. - Minor documentation improvement. 0.03 2008-09-28 11:37:39Z - Support attributes. - Fixed documentation typo. 0.02 2008-09-24 06:47:17Z - Properly specify prereqs. 0.01 2008-09-24 06:39:22Z - Initial release. MooseX-Method-Signatures-0.49/CONTRIBUTING000644 000766 000024 00000007354 12605070147 020340 0ustar00etherstaff000000 000000 CONTRIBUTING Thank you for considering contributing to this distribution. This file contains instructions that will help you work with the source code. PLEASE NOTE that if you have any questions or difficulties, you can reach the maintainer(s) through the bug queue described later in this document (preferred), or by emailing the releaser directly. You are not required to follow any of the steps in this document to submit a patch or bug report; these are just recommendations, intended to help you (and help us help you faster). The distribution is managed with Dist::Zilla (https://metacpan.org/release/Dist-Zilla). This means than many of the usual files you might expect are not in the repository, but are generated at release time (e.g. Makefile.PL). However, you can run tests directly using the 'prove' tool: $ prove -l $ prove -lv t/some_test_file.t $ prove -lvr t/ In most cases, 'prove' is entirely sufficent for you to test any patches you have. You may need to satisfy some dependencies. The easiest way to satisfy dependencies is to install the last release -- this is available at https://metacpan.org/release/MooseX-Method-Signatures. If you use cpanminus, you can do it without downloading the tarball first: $ cpanm --reinstall --installdeps --with-recommends MooseX::Method::Signatures Dist::Zilla is a very powerful authoring tool, but requires a number of author-specific plugins. If you would like to use it for contributing, install it from CPAN, then run one of the following commands, depending on your CPAN client: $ cpan `dzil authordeps --missing` or $ dzil authordeps --missing | cpanm You should then also install any additional requirements not needed by the dzil build but may be needed by tests or other development: $ cpan `dzil listdeps --author --missing` or $ dzil listdeps --author --missing | cpanm Or, you can use the 'dzil stale' command to install all requirements at once: $ cpan Dist::Zilla::App::Command::stale $ cpan `dzil stale --all` or $ cpanm Dist::Zilla::App::Command::stale $ dzil stale --all | cpanm You can also do this via cpanm directly: $ cpanm --reinstall --installdeps --with-develop --with-recommends MooseX::Method::Signatures Once installed, here are some dzil commands you might try: $ dzil build $ dzil test $ dzil test --release $ dzil xtest $ dzil listdeps --json $ dzil build --notgz You can learn more about Dist::Zilla at http://dzil.org/. The code for this distribution is hosted at GitHub. The repository is: https://github.com/moose/MooseX-Method-Signatures You can submit code changes by forking the repository, pushing your code changes to your clone, and then submitting a pull request. Detailed instructions for doing that is available here: https://help.github.com/articles/creating-a-pull-request If you have found a bug, but do not have an accompanying patch to fix it, you can submit an issue report here: https://rt.cpan.org/Public/Dist/Display.html?Name=MooseX-Method-Signatures or via bug-MooseX-Method-Signatures@rt.cpan.org. There is also a mailing list available for users of this distribution, at http://lists.perl.org/list/moose.html. There is also an irc channel available for users of this distribution, at irc://irc.perl.org/#moose. If you send me a patch or pull request, your name and email address will be included in the documentation as a contributor (using the attribution on the commit or patch), unless you specifically request for it not to be. If you wish to be listed under a different name or address, you should submit a pull request to the .mailmap file to contain the correct mapping. This file was generated via Dist::Zilla::Plugin::GenerateFile::ShareDir 0.006 from a template file originating in Dist-Zilla-PluginBundle-Author-ETHER-0.105. MooseX-Method-Signatures-0.49/dist.ini000600 000766 000024 00000001676 12605070147 020143 0ustar00etherstaff000000 000000 name = MooseX-Method-Signatures author = Florian Ragwitz license = Perl_5 copyright_holder = Florian Ragwitz copyright_year = 2008 [@Author::ETHER] :version = 0.094 authority = cpan:FLORA -remove = PodCoverageTests -remove = Test::UnusedVars Test::ReportPrereqs.include = Dist::CheckConflicts Test::MinimumVersion.max_target_perl = 5.008003 [MetaResources] x_IRC = irc://irc.perl.org/#moose x_MailingList = http://lists.perl.org/list/moose.html [Prereqs] Task::Weaken = 0 Module::Runtime = 0.012 ; this is not actually used here directly, but cpantesters reports don't ; contain this version otherwise, and we suspect the recent failures are due ; to something in E.C. Eval::Closure = 0 MooseX::Types = 0.35 [Prereqs / DevelopRequires] MooseX::Meta::Method::Transactional = 0 ; see xt/author MooseX::Meta::Method::Authorized = 0 ; "" Dist::Zilla = 5.000 [Test::CheckBreaks] conflicts_module = Moose::Conflicts [Deprecated] MooseX-Method-Signatures-0.49/INSTALL000644 000766 000024 00000002032 12605070147 017523 0ustar00etherstaff000000 000000 This is the Perl distribution MooseX-Method-Signatures. Installing MooseX-Method-Signatures is straightforward. ## Installation with cpanm If you have cpanm, you only need one line: % cpanm MooseX::Method::Signatures If you are installing into a system-wide directory, you may need to pass the "-S" flag to cpanm, which uses sudo to install the module: % cpanm -S MooseX::Method::Signatures ## Installing with the CPAN shell Alternatively, if your CPAN shell is set up, you should just be able to do: % cpan MooseX::Method::Signatures ## Manual installation As a last resort, you can manually install it. Download the tarball, untar it, then build it: % perl Build.PL % ./Build && ./Build test Then install it: % ./Build install If you are installing into a system-wide directory, you may need to run: % sudo ./Build install ## Documentation MooseX-Method-Signatures documentation is available as POD. You can run perldoc from a shell to read the documentation: % perldoc MooseX::Method::Signatures MooseX-Method-Signatures-0.49/lib/000700 000766 000024 00000000000 12605070147 017231 5ustar00etherstaff000000 000000 MooseX-Method-Signatures-0.49/LICENCE000644 000766 000024 00000043666 12605070147 017501 0ustar00etherstaff000000 000000 This software is copyright (c) 2008 by Florian Ragwitz. 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) 2008 by Florian Ragwitz. 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) 2008 by Florian Ragwitz. 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 MooseX-Method-Signatures-0.49/Makefile.PL000644 000766 000024 00000012401 12605070147 020445 0ustar00etherstaff000000 000000 # This Makefile.PL for MooseX-Method-Signatures was generated by # Dist::Zilla::Plugin::MakeMaker::Fallback 0.021 # 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; BEGIN { my %configure_requires = ( 'Module::Build::Tiny' => '0.034', ); my @missing = grep { ! eval "require $_; $_->VERSION($configure_requires{$_}); 1" } keys %configure_requires; if (@missing) { if (not $ENV{PERL_MM_FALLBACK_SILENCE_WARNING}) { warn <<'EOW'; *** WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING *** If you're seeing this warning, your toolchain is really, really old* and you'll almost certainly have problems installing CPAN modules from this century. But never fear, dear user, for we have the technology to fix this! If you're using CPAN.pm to install things, then you can upgrade it using: cpan CPAN If you're using CPANPLUS to install things, then you can upgrade it using: cpanp CPANPLUS If you're using cpanminus, you shouldn't be seeing this message in the first place, so please file an issue on github. If you're installing manually, please retrain your fingers to run Build.PL when present instead. This public service announcement was brought to you by the Perl Toolchain Gang, the irc.perl.org #toolchain IRC channel, and the number 42. ---- * Alternatively, you are doing something overly clever, in which case you should consider setting the 'prefer_installer' config option in CPAN.pm, or 'prefer_makefile' in CPANPLUS, to 'mb" and '0' respectively. You can also silence this warning for future installations by setting the PERL_MM_FALLBACK_SILENCE_WARNING environment variable. EOW sleep 10 if -t STDIN && (-t STDOUT || !(-f STDOUT || -c STDOUT)); } } } # end BEGIN use 5.006; use ExtUtils::MakeMaker; my %WriteMakefileArgs = ( "ABSTRACT" => "(DEPRECATED) Method declarations with type constraints and no source filter", "AUTHOR" => "Florian Ragwitz ", "CONFIGURE_REQUIRES" => { "Module::Build::Tiny" => "0.034" }, "DISTNAME" => "MooseX-Method-Signatures", "LICENSE" => "perl", "MIN_PERL_VERSION" => "5.006", "NAME" => "MooseX::Method::Signatures", "PL_FILES" => {}, "PREREQ_PM" => { "B::Hooks::EndOfScope" => "0.10", "Carp" => 0, "Context::Preserve" => 0, "Devel::Declare" => "0.005011", "Devel::Declare::Context::Simple" => 0, "Eval::Closure" => 0, "Module::Runtime" => "0.012", "Moose" => "0.89", "Moose::Meta::Class" => 0, "Moose::Meta::Method" => 0, "Moose::Util" => 0, "Moose::Util::TypeConstraints" => 0, "MooseX::LazyRequire" => "0.06", "MooseX::Meta::TypeConstraint::ForceCoercion" => 0, "MooseX::Types" => "0.35", "MooseX::Types::Moose" => "0.19", "MooseX::Types::Structured" => "0.24", "MooseX::Types::Util" => 0, "Parse::Method::Signatures" => "1.003014", "Parse::Method::Signatures::Param::Named" => 0, "Parse::Method::Signatures::Param::Placeholder" => 0, "Parse::Method::Signatures::TypeConstraint" => 0, "Parse::Method::Signatures::Types" => 0, "Scalar::Util" => 0, "Sub::Name" => 0, "Task::Weaken" => 0, "Text::Balanced" => 0, "aliased" => 0, "if" => 0, "namespace::autoclean" => 0, "strict" => 0, "warnings" => 0 }, "TEST_REQUIRES" => { "ExtUtils::MakeMaker" => 0, "File::Spec" => 0, "Moose::Role" => 0, "Test::Deep" => 0, "Test::Fatal" => 0, "Test::Moose" => 0, "Test::More" => "0.89", "attributes" => 0, "lib" => 0, "metaclass" => 0, "namespace::clean" => "0.19" }, "VERSION" => "0.49", "test" => { "TESTS" => "t/*.t" } ); my %FallbackPrereqs = ( "B::Hooks::EndOfScope" => "0.10", "Carp" => 0, "Context::Preserve" => 0, "Devel::Declare" => "0.005011", "Devel::Declare::Context::Simple" => 0, "Eval::Closure" => 0, "ExtUtils::MakeMaker" => 0, "File::Spec" => 0, "Module::Runtime" => "0.012", "Moose" => "0.89", "Moose::Meta::Class" => 0, "Moose::Meta::Method" => 0, "Moose::Role" => 0, "Moose::Util" => 0, "Moose::Util::TypeConstraints" => 0, "MooseX::LazyRequire" => "0.06", "MooseX::Meta::TypeConstraint::ForceCoercion" => 0, "MooseX::Types" => "0.35", "MooseX::Types::Moose" => "0.19", "MooseX::Types::Structured" => "0.24", "MooseX::Types::Util" => 0, "Parse::Method::Signatures" => "1.003014", "Parse::Method::Signatures::Param::Named" => 0, "Parse::Method::Signatures::Param::Placeholder" => 0, "Parse::Method::Signatures::TypeConstraint" => 0, "Parse::Method::Signatures::Types" => 0, "Scalar::Util" => 0, "Sub::Name" => 0, "Task::Weaken" => 0, "Test::Deep" => 0, "Test::Fatal" => 0, "Test::Moose" => 0, "Test::More" => "0.89", "Text::Balanced" => 0, "aliased" => 0, "attributes" => 0, "if" => 0, "lib" => 0, "metaclass" => 0, "namespace::autoclean" => 0, "namespace::clean" => "0.19", "strict" => 0, "warnings" => 0 ); unless ( eval { ExtUtils::MakeMaker->VERSION(6.63_03) } ) { delete $WriteMakefileArgs{TEST_REQUIRES}; delete $WriteMakefileArgs{BUILD_REQUIRES}; $WriteMakefileArgs{PREREQ_PM} = \%FallbackPrereqs; } delete $WriteMakefileArgs{CONFIGURE_REQUIRES} unless eval { ExtUtils::MakeMaker->VERSION(6.52) }; WriteMakefile(%WriteMakefileArgs); MooseX-Method-Signatures-0.49/MANIFEST000644 000766 000024 00000002510 12605070147 017624 0ustar00etherstaff000000 000000 # This file was automatically generated by Dist::Zilla::Plugin::Manifest v5.039. Build.PL CONTRIBUTING Changes INSTALL LICENCE MANIFEST META.json META.yml Makefile.PL README dist.ini lib/MooseX/Method/Signatures.pm lib/MooseX/Method/Signatures/Meta/Method.pm lib/MooseX/Method/Signatures/Types.pm t/00-load.t t/00-report-prereqs.dd t/00-report-prereqs.t t/attributes.t t/basic.t t/caller.t t/closure.t t/declarators.t t/errors.t t/eval.t t/lib/InvalidCase01.pm t/lib/InvalidCase02.pm t/lib/MXMSLabeled.pm t/lib/MXMSMoody.pm t/lib/My/Annoyingly/Long/Name/Space.pm t/lib/Redefined.pm t/lib/TestClass.pm t/lib/TestClassTrait.pm t/lib/TestClassWithMxTypes.pm t/list.t t/meta.t t/method-trait.t t/named_defaults.t t/no_signature.t t/placeholders.t t/precedence.t t/quoted_name.t t/return_value.t t/signatures.t t/sigs-optional.t t/structured.t t/synopsis.t t/too_many_args.t t/traits.t t/type_alias.t t/types.t t/undef_method_arg.t t/undef_method_arg2.t t/where.t t/zzz-check-breaks.t xt/author/00-compile.t xt/author/clean-namespaces.t xt/author/eol.t xt/author/kwalitee.t xt/author/mojibake.t xt/author/no-tabs.t xt/author/pod-spell.t xt/author/transactional-authorized.t xt/release/changes_has_content.t xt/release/cpan-changes.t xt/release/distmeta.t xt/release/minimum-version.t xt/release/pod-no404s.t xt/release/pod-syntax.t xt/release/portability.t MooseX-Method-Signatures-0.49/META.json000644 000766 000024 00000133606 12605070147 020127 0ustar00etherstaff000000 000000 { "abstract" : "(DEPRECATED) Method declarations with type constraints and no source filter", "author" : [ "Florian Ragwitz " ], "dynamic_config" : 0, "generated_by" : "Dist::Zilla version 5.039, CPAN::Meta::Converter version 2.150005", "keywords" : [ "moose", "extension", "method", "declaration", "signature", "prototype", "syntax", "sugar", "deprecated" ], "license" : [ "perl_5" ], "meta-spec" : { "url" : "http://search.cpan.org/perldoc?CPAN::Meta::Spec", "version" : 2 }, "name" : "MooseX-Method-Signatures", "no_index" : { "directory" : [ "t", "xt" ] }, "prereqs" : { "configure" : { "requires" : { "Module::Build::Tiny" : "0.034", "perl" : "5.006" } }, "develop" : { "recommends" : { "Dist::Zilla::PluginBundle::Author::ETHER" : "0.105" }, "requires" : { "Dist::Zilla" : "5.000", "Dist::Zilla::Plugin::Authority" : "1.009", "Dist::Zilla::Plugin::AuthorityFromModule" : "0.002", "Dist::Zilla::Plugin::AutoMetaResources" : "0", "Dist::Zilla::Plugin::AutoPrereqs" : "5.038", "Dist::Zilla::Plugin::BumpVersionAfterRelease::Transitional" : "0.004", "Dist::Zilla::Plugin::CheckIssues" : "0", "Dist::Zilla::Plugin::CheckPrereqsIndexed" : "0", "Dist::Zilla::Plugin::CheckSelfDependency" : "0", "Dist::Zilla::Plugin::CheckStrictVersion" : "0", "Dist::Zilla::Plugin::ConfirmRelease" : "0", "Dist::Zilla::Plugin::CopyFilesFromRelease" : "0", "Dist::Zilla::Plugin::Deprecated" : "0", "Dist::Zilla::Plugin::FileFinder::ByName" : "0", "Dist::Zilla::Plugin::GenerateFile::ShareDir" : "0", "Dist::Zilla::Plugin::Git::Check" : "0", "Dist::Zilla::Plugin::Git::CheckFor::CorrectBranch" : "0.004", "Dist::Zilla::Plugin::Git::CheckFor::MergeConflicts" : "0", "Dist::Zilla::Plugin::Git::Commit" : "2.020", "Dist::Zilla::Plugin::Git::Contributors" : "0.004", "Dist::Zilla::Plugin::Git::Describe" : "0.004", "Dist::Zilla::Plugin::Git::GatherDir" : "2.016", "Dist::Zilla::Plugin::Git::Push" : "0", "Dist::Zilla::Plugin::Git::Remote::Check" : "0", "Dist::Zilla::Plugin::Git::Tag" : "0", "Dist::Zilla::Plugin::GitHub::Update" : "0.40", "Dist::Zilla::Plugin::GithubMeta" : "0.54", "Dist::Zilla::Plugin::InstallGuide" : "0", "Dist::Zilla::Plugin::Keywords" : "0.004", "Dist::Zilla::Plugin::License" : "5.038", "Dist::Zilla::Plugin::MakeMaker::Fallback" : "0.012", "Dist::Zilla::Plugin::Manifest" : "0", "Dist::Zilla::Plugin::MetaConfig" : "0", "Dist::Zilla::Plugin::MetaJSON" : "0", "Dist::Zilla::Plugin::MetaNoIndex" : "0", "Dist::Zilla::Plugin::MetaProvides::Package" : "1.15000002", "Dist::Zilla::Plugin::MetaResources" : "0", "Dist::Zilla::Plugin::MetaTests" : "0", "Dist::Zilla::Plugin::MetaYAML" : "0", "Dist::Zilla::Plugin::MinimumPerl" : "1.006", "Dist::Zilla::Plugin::ModuleBuildTiny::Fallback" : "0.018", "Dist::Zilla::Plugin::MojibakeTests" : "0.8", "Dist::Zilla::Plugin::NextRelease" : "5.033", "Dist::Zilla::Plugin::PodSyntaxTests" : "0", "Dist::Zilla::Plugin::PodWeaver" : "4.005", "Dist::Zilla::Plugin::Prereqs" : "0", "Dist::Zilla::Plugin::Prereqs::AuthorDeps" : "0", "Dist::Zilla::Plugin::PromptIfStale" : "0", "Dist::Zilla::Plugin::Readme" : "0", "Dist::Zilla::Plugin::ReadmeAnyFromPod" : "0.142180", "Dist::Zilla::Plugin::RewriteVersion::Transitional" : "0.004", "Dist::Zilla::Plugin::Run::AfterBuild" : "0.038", "Dist::Zilla::Plugin::Run::AfterRelease" : "0.038", "Dist::Zilla::Plugin::RunExtraTests" : "0.024", "Dist::Zilla::Plugin::StaticInstall" : "0.005", "Dist::Zilla::Plugin::Test::CPAN::Changes" : "0.008", "Dist::Zilla::Plugin::Test::ChangesHasContent" : "0", "Dist::Zilla::Plugin::Test::CheckBreaks" : "0", "Dist::Zilla::Plugin::Test::CleanNamespaces" : "0.006", "Dist::Zilla::Plugin::Test::Compile" : "2.039", "Dist::Zilla::Plugin::Test::EOL" : "0.17", "Dist::Zilla::Plugin::Test::Kwalitee" : "2.10", "Dist::Zilla::Plugin::Test::MinimumVersion" : "2.000003", "Dist::Zilla::Plugin::Test::NoTabs" : "0.08", "Dist::Zilla::Plugin::Test::Pod::No404s" : "1.002", "Dist::Zilla::Plugin::Test::PodSpelling" : "2.006001", "Dist::Zilla::Plugin::Test::Portability" : "0", "Dist::Zilla::Plugin::Test::ReportPrereqs" : "0.019", "Dist::Zilla::Plugin::TestRelease" : "0", "Dist::Zilla::Plugin::UploadToCPAN" : "0", "Dist::Zilla::PluginBundle::Author::ETHER" : "0.094", "File::Spec" : "0", "IO::Handle" : "0", "IPC::Open3" : "0", "MooseX::Meta::Method::Authorized" : "0", "MooseX::Meta::Method::Transactional" : "0", "Pod::Wordlist" : "0", "Software::License::Perl_5" : "0", "Test::CPAN::Changes" : "0.19", "Test::CPAN::Meta" : "0", "Test::CleanNamespaces" : "0.15", "Test::EOL" : "0", "Test::Kwalitee" : "1.21", "Test::Mojibake" : "0", "Test::Moose" : "0", "Test::More" : "0.96", "Test::NoTabs" : "0", "Test::Pod" : "1.41", "Test::Pod::No404s" : "0", "Test::Spelling" : "0.12", "blib" : "1.01", "perl" : "5.006" } }, "runtime" : { "requires" : { "B::Hooks::EndOfScope" : "0.10", "Carp" : "0", "Context::Preserve" : "0", "Devel::Declare" : "0.005011", "Devel::Declare::Context::Simple" : "0", "Eval::Closure" : "0", "Module::Runtime" : "0.012", "Moose" : "0.89", "Moose::Meta::Class" : "0", "Moose::Meta::Method" : "0", "Moose::Util" : "0", "Moose::Util::TypeConstraints" : "0", "MooseX::LazyRequire" : "0.06", "MooseX::Meta::TypeConstraint::ForceCoercion" : "0", "MooseX::Types" : "0.35", "MooseX::Types::Moose" : "0.19", "MooseX::Types::Structured" : "0.24", "MooseX::Types::Util" : "0", "Parse::Method::Signatures" : "1.003014", "Parse::Method::Signatures::Param::Named" : "0", "Parse::Method::Signatures::Param::Placeholder" : "0", "Parse::Method::Signatures::TypeConstraint" : "0", "Parse::Method::Signatures::Types" : "0", "Scalar::Util" : "0", "Sub::Name" : "0", "Task::Weaken" : "0", "Text::Balanced" : "0", "aliased" : "0", "if" : "0", "namespace::autoclean" : "0", "perl" : "5.006", "strict" : "0", "warnings" : "0" } }, "test" : { "recommends" : { "CPAN::Meta" : "2.120900" }, "requires" : { "ExtUtils::MakeMaker" : "0", "File::Spec" : "0", "Moose::Role" : "0", "Test::Deep" : "0", "Test::Fatal" : "0", "Test::Moose" : "0", "Test::More" : "0.89", "attributes" : "0", "lib" : "0", "metaclass" : "0", "namespace::clean" : "0.19", "perl" : "5.006" } } }, "provides" : { "MooseX::Method::Signatures" : { "file" : "lib/MooseX/Method/Signatures.pm", "version" : "0.49" }, "MooseX::Method::Signatures::Meta::Method" : { "file" : "lib/MooseX/Method/Signatures/Meta/Method.pm", "version" : "0.49" }, "MooseX::Method::Signatures::Types" : { "file" : "lib/MooseX/Method/Signatures/Types.pm", "version" : "0.49" } }, "release_status" : "stable", "resources" : { "bugtracker" : { "mailto" : "bug-MooseX-Method-Signatures@rt.cpan.org", "web" : "https://rt.cpan.org/Public/Dist/Display.html?Name=MooseX-Method-Signatures" }, "homepage" : "https://github.com/moose/MooseX-Method-Signatures", "repository" : { "type" : "git", "url" : "https://github.com/moose/MooseX-Method-Signatures.git", "web" : "https://github.com/moose/MooseX-Method-Signatures" }, "x_IRC" : "irc://irc.perl.org/#moose", "x_MailingList" : "http://lists.perl.org/list/moose.html" }, "version" : "0.49", "x_Dist_Zilla" : { "perl" : { "version" : "5.023003" }, "plugins" : [ { "class" : "Dist::Zilla::Plugin::Prereqs", "config" : { "Dist::Zilla::Plugin::Prereqs" : { "phase" : "develop", "type" : "requires" } }, "name" : "@Author::ETHER/bundle_plugins", "version" : "5.039" }, { "class" : "Dist::Zilla::Plugin::RewriteVersion::Transitional", "config" : { "Dist::Zilla::Plugin::RewriteVersion" : { "add_tarball_name" : 0, "finders" : [ ":ExecFiles", ":InstallModules" ], "global" : 1, "skip_version_provider" : 0 }, "Dist::Zilla::Plugin::RewriteVersion::Transitional" : {} }, "name" : "@Author::ETHER/RewriteVersion::Transitional", "version" : "0.007" }, { "class" : "Dist::Zilla::Plugin::PromptIfStale", "config" : { "Dist::Zilla::Plugin::PromptIfStale" : { "check_all_plugins" : 0, "check_all_prereqs" : 0, "modules" : [ "Dist::Zilla::PluginBundle::Author::ETHER" ], "phase" : "build", "skip" : [] } }, "name" : "@Author::ETHER/stale modules, build", "version" : "0.047" }, { "class" : "Dist::Zilla::Plugin::PromptIfStale", "config" : { "Dist::Zilla::Plugin::PromptIfStale" : { "check_all_plugins" : 1, "check_all_prereqs" : 1, "modules" : [], "phase" : "release", "skip" : [] } }, "name" : "@Author::ETHER/stale modules, release", "version" : "0.047" }, { "class" : "Dist::Zilla::Plugin::FileFinder::ByName", "name" : "@Author::ETHER/Examples", "version" : "5.039" }, { "class" : "Dist::Zilla::Plugin::FileFinder::ByName", "name" : "@Author::ETHER/ExtraTestFiles", "version" : "5.039" }, { "class" : "Dist::Zilla::Plugin::Git::GatherDir", "config" : { "Dist::Zilla::Plugin::GatherDir" : { "exclude_filename" : [ "CONTRIBUTING", "LICENSE", "README.pod" ], "exclude_match" : [], "follow_symlinks" : 0, "include_dotfiles" : 0, "prefix" : "", "prune_directory" : [], "root" : "." }, "Dist::Zilla::Plugin::Git::GatherDir" : { "include_untracked" : 0 } }, "name" : "@Author::ETHER/Git::GatherDir", "version" : "2.036" }, { "class" : "Dist::Zilla::Plugin::MetaYAML", "name" : "@Author::ETHER/MetaYAML", "version" : "5.039" }, { "class" : "Dist::Zilla::Plugin::MetaJSON", "name" : "@Author::ETHER/MetaJSON", "version" : "5.039" }, { "class" : "Dist::Zilla::Plugin::Readme", "name" : "@Author::ETHER/Readme", "version" : "5.039" }, { "class" : "Dist::Zilla::Plugin::Manifest", "name" : "@Author::ETHER/Manifest", "version" : "5.039" }, { "class" : "Dist::Zilla::Plugin::License", "name" : "@Author::ETHER/License", "version" : "5.039" }, { "class" : "Dist::Zilla::Plugin::GenerateFile::ShareDir", "config" : { "Dist::Zilla::Plugin::GenerateFile::ShareDir" : { "destination_filename" : "CONTRIBUTING", "dist" : "Dist-Zilla-PluginBundle-Author-ETHER", "encoding" : "UTF-8", "has_xs" : 0, "location" : "build", "source_filename" : "CONTRIBUTING" } }, "name" : "@Author::ETHER/generate CONTRIBUTING", "version" : "0.006" }, { "class" : "Dist::Zilla::Plugin::InstallGuide", "name" : "@Author::ETHER/InstallGuide", "version" : "1.200006" }, { "class" : "Dist::Zilla::Plugin::Test::Compile", "config" : { "Dist::Zilla::Plugin::Test::Compile" : { "bail_out_on_fail" : "1", "fail_on_warning" : "author", "fake_home" : 0, "filename" : "xt/author/00-compile.t", "module_finder" : [ ":InstallModules" ], "needs_display" : 0, "phase" : "develop", "script_finder" : [ ":PerlExecFiles", "@Author::ETHER/Examples" ], "skips" : [] } }, "name" : "@Author::ETHER/Test::Compile", "version" : "2.054" }, { "class" : "Dist::Zilla::Plugin::Test::NoTabs", "config" : { "Dist::Zilla::Plugin::Test::NoTabs" : { "filename" : "xt/author/no-tabs.t", "finder" : [ ":InstallModules", ":ExecFiles", "@Author::ETHER/Examples", ":TestFiles", "@Author::ETHER/ExtraTestFiles" ] } }, "name" : "@Author::ETHER/Test::NoTabs", "version" : "0.15" }, { "class" : "Dist::Zilla::Plugin::Test::EOL", "config" : { "Dist::Zilla::Plugin::Test::EOL" : { "filename" : "xt/author/eol.t", "finder" : [ ":InstallModules", ":ExecFiles", "@Author::ETHER/Examples", ":TestFiles", "@Author::ETHER/ExtraTestFiles" ], "trailing_whitespace" : "1" } }, "name" : "@Author::ETHER/Test::EOL", "version" : "0.18" }, { "class" : "Dist::Zilla::Plugin::MetaTests", "name" : "@Author::ETHER/MetaTests", "version" : "5.039" }, { "class" : "Dist::Zilla::Plugin::Test::CPAN::Changes", "name" : "@Author::ETHER/Test::CPAN::Changes", "version" : "0.009" }, { "class" : "Dist::Zilla::Plugin::Test::ChangesHasContent", "name" : "@Author::ETHER/Test::ChangesHasContent", "version" : "0.008" }, { "class" : "Dist::Zilla::Plugin::Test::MinimumVersion", "name" : "@Author::ETHER/Test::MinimumVersion", "version" : "2.000006" }, { "class" : "Dist::Zilla::Plugin::PodSyntaxTests", "name" : "@Author::ETHER/PodSyntaxTests", "version" : "5.039" }, { "class" : "Dist::Zilla::Plugin::Test::PodSpelling", "name" : "@Author::ETHER/Test::PodSpelling", "version" : "2.006009" }, { "class" : "Dist::Zilla::Plugin::Test::Pod::No404s", "name" : "@Author::ETHER/Test::Pod::No404s", "version" : "1.002" }, { "class" : "Dist::Zilla::Plugin::Test::Kwalitee", "config" : { "Dist::Zilla::Plugin::Test::Kwalitee" : { "filename" : "xt/author/kwalitee.t", "skiptest" : [] } }, "name" : "@Author::ETHER/Test::Kwalitee", "version" : "2.12" }, { "class" : "Dist::Zilla::Plugin::MojibakeTests", "name" : "@Author::ETHER/MojibakeTests", "version" : "0.8" }, { "class" : "Dist::Zilla::Plugin::Test::ReportPrereqs", "name" : "@Author::ETHER/Test::ReportPrereqs", "version" : "0.021" }, { "class" : "Dist::Zilla::Plugin::Test::Portability", "name" : "@Author::ETHER/Test::Portability", "version" : "2.000006" }, { "class" : "Dist::Zilla::Plugin::Test::CleanNamespaces", "config" : { "Dist::Zilla::Plugin::Test::CleanNamespaces" : { "filename" : "xt/author/clean-namespaces.t", "skips" : [] } }, "name" : "@Author::ETHER/Test::CleanNamespaces", "version" : "0.006" }, { "class" : "Dist::Zilla::Plugin::Git::Describe", "name" : "@Author::ETHER/Git::Describe", "version" : "0.006" }, { "class" : "Dist::Zilla::Plugin::PodWeaver", "config" : { "Dist::Zilla::Plugin::PodWeaver" : { "config_plugins" : [ "@Author::ETHER" ], "finder" : [ ":InstallModules", ":ExecFiles" ], "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" : "@Author::ETHER/SingleEncoding", "version" : "4.012" }, { "class" : "Pod::Weaver::Plugin::Transformer", "name" : "@Author::ETHER/List", "version" : "4.012" }, { "class" : "Pod::Weaver::Plugin::Transformer", "name" : "@Author::ETHER/Verbatim", "version" : "4.012" }, { "class" : "Pod::Weaver::Section::Region", "name" : "@Author::ETHER/header", "version" : "4.012" }, { "class" : "Pod::Weaver::Section::Name", "name" : "@Author::ETHER/Name", "version" : "4.012" }, { "class" : "Pod::Weaver::Section::Version", "name" : "@Author::ETHER/Version", "version" : "4.012" }, { "class" : "Pod::Weaver::Section::Region", "name" : "@Author::ETHER/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::Collect", "name" : "TYPES", "version" : "4.012" }, { "class" : "Pod::Weaver::Section::Leftovers", "name" : "@Author::ETHER/Leftovers", "version" : "4.012" }, { "class" : "Pod::Weaver::Section::Region", "name" : "@Author::ETHER/postlude", "version" : "4.012" }, { "class" : "Pod::Weaver::Section::GenerateSection", "name" : "@Author::ETHER/generate SUPPORT", "version" : "1.01" }, { "class" : "Pod::Weaver::Section::AllowOverride", "name" : "@Author::ETHER/allow override SUPPORT", "version" : "0.05" }, { "class" : "Pod::Weaver::Section::Authors", "name" : "@Author::ETHER/Authors", "version" : "4.012" }, { "class" : "Pod::Weaver::Section::Contributors", "name" : "@Author::ETHER/Contributors", "version" : "0.009" }, { "class" : "Pod::Weaver::Section::Legal", "name" : "@Author::ETHER/Legal", "version" : "4.012" }, { "class" : "Pod::Weaver::Section::Region", "name" : "@Author::ETHER/footer", "version" : "4.012" } ] } }, "name" : "@Author::ETHER/PodWeaver", "version" : "4.006" }, { "class" : "Dist::Zilla::Plugin::GithubMeta", "name" : "@Author::ETHER/GithubMeta", "version" : "0.54" }, { "class" : "Dist::Zilla::Plugin::AutoMetaResources", "name" : "@Author::ETHER/AutoMetaResources", "version" : "1.21" }, { "class" : "Dist::Zilla::Plugin::AuthorityFromModule", "config" : { "Dist::Zilla::Plugin::AuthorityFromModule" : { "module" : "MooseX::Method::Signatures" }, "Dist::Zilla::Role::ModuleMetadata" : { "Module::Metadata" : "1.000029", "version" : "0.003" } }, "name" : "@Author::ETHER/AuthorityFromModule", "version" : "0.006" }, { "class" : "Dist::Zilla::Plugin::Authority", "name" : "@Author::ETHER/Authority", "version" : "1.009" }, { "class" : "Dist::Zilla::Plugin::MetaNoIndex", "name" : "@Author::ETHER/MetaNoIndex", "version" : "5.039" }, { "class" : "Dist::Zilla::Plugin::MetaProvides::Package", "config" : { "Dist::Zilla::Plugin::MetaProvides::Package" : { "finder" : [ ":InstallModules" ], "finder_objects" : [ { "class" : "Dist::Zilla::Plugin::FinderCode", "name" : ":InstallModules", "version" : "5.039" } ] }, "Dist::Zilla::Role::MetaProvider::Provider" : { "inherit_missing" : "0", "inherit_version" : "0", "meta_noindex" : "1" } }, "name" : "@Author::ETHER/MetaProvides::Package", "version" : "2.003001" }, { "class" : "Dist::Zilla::Plugin::MetaConfig", "name" : "@Author::ETHER/MetaConfig", "version" : "5.039" }, { "class" : "Dist::Zilla::Plugin::Keywords", "config" : { "Dist::Zilla::Plugin::Keywords" : { "keywords" : [ "moose", "extension", "method", "declaration", "signature", "prototype", "syntax", "sugar", "deprecated" ] } }, "name" : "@Author::ETHER/Keywords", "version" : "0.006" }, { "class" : "Dist::Zilla::Plugin::Git::Contributors", "config" : { "Dist::Zilla::Plugin::Git::Contributors" : { "include_authors" : 0, "include_releaser" : 1, "order_by" : "commits", "paths" : [ "." ] } }, "name" : "@Author::ETHER/Git::Contributors", "version" : "0.014" }, { "class" : "Dist::Zilla::Plugin::AutoPrereqs", "name" : "@Author::ETHER/AutoPrereqs", "version" : "5.039" }, { "class" : "Dist::Zilla::Plugin::Prereqs::AuthorDeps", "name" : "@Author::ETHER/Prereqs::AuthorDeps", "version" : "0.005" }, { "class" : "Dist::Zilla::Plugin::MinimumPerl", "name" : "@Author::ETHER/MinimumPerl", "version" : "1.006" }, { "class" : "Dist::Zilla::Plugin::Prereqs", "config" : { "Dist::Zilla::Plugin::Prereqs" : { "phase" : "develop", "type" : "recommends" } }, "name" : "@Author::ETHER/pluginbundle_version", "version" : "5.039" }, { "class" : "Dist::Zilla::Plugin::MakeMaker::Fallback", "config" : { "Dist::Zilla::Plugin::MakeMaker::Awesome" : { "version" : "0.35" }, "Dist::Zilla::Role::TestRunner" : { "default_jobs" : 9 } }, "name" : "@Author::ETHER/MakeMaker::Fallback", "version" : "0.021" }, { "class" : "Dist::Zilla::Plugin::ModuleBuildTiny::Fallback", "config" : { "Dist::Zilla::Plugin::ModuleBuildTiny::Fallback" : { "mb_version" : "0.28", "plugins" : [ { "class" : "Dist::Zilla::Plugin::ModuleBuild", "config" : { "Dist::Zilla::Role::TestRunner" : { "default_jobs" : 9 } }, "name" : "ModuleBuild, via ModuleBuildTiny::Fallback", "version" : "5.039" }, { "class" : "Dist::Zilla::Plugin::ModuleBuildTiny", "config" : { "Dist::Zilla::Role::TestRunner" : { "default_jobs" : 9 } }, "name" : "ModuleBuildTiny, via ModuleBuildTiny::Fallback", "version" : "0.014" } ] }, "Dist::Zilla::Role::TestRunner" : { "default_jobs" : 9 } }, "name" : "@Author::ETHER/ModuleBuildTiny::Fallback", "version" : "0.020" }, { "class" : "Dist::Zilla::Plugin::StaticInstall", "config" : { "Dist::Zilla::Plugin::StaticInstall" : { "dry_run" : 0, "mode" : "auto" } }, "name" : "@Author::ETHER/StaticInstall", "version" : "0.008" }, { "class" : "Dist::Zilla::Plugin::RunExtraTests", "config" : { "Dist::Zilla::Role::TestRunner" : { "default_jobs" : 9 } }, "name" : "@Author::ETHER/RunExtraTests", "version" : "0.028" }, { "class" : "Dist::Zilla::Plugin::CheckSelfDependency", "config" : { "Dist::Zilla::Plugin::CheckSelfDependency" : { "finder" : [ ":InstallModules" ] }, "Dist::Zilla::Role::ModuleMetadata" : { "Module::Metadata" : "1.000029", "version" : "0.003" } }, "name" : "@Author::ETHER/CheckSelfDependency", "version" : "0.011" }, { "class" : "Dist::Zilla::Plugin::Run::AfterBuild", "config" : { "Dist::Zilla::Plugin::Run::Role::Runner" : { "fatal_errors" : 1, "quiet" : 1, "run" : [ "bash -c \"test -e .ackrc && grep -q -- '--ignore-dir=.latest' .ackrc || echo '--ignore-dir=.latest' >> .ackrc; if [[ `dirname '%d'` != .build ]]; then test -e .ackrc && grep -q -- '--ignore-dir=%d' .ackrc || echo '--ignore-dir=%d' >> .ackrc; fi\"" ] } }, "name" : "@Author::ETHER/.ackrc", "version" : "0.042" }, { "class" : "Dist::Zilla::Plugin::Run::AfterBuild", "config" : { "Dist::Zilla::Plugin::Run::Role::Runner" : { "eval" : [ "if ('%d' =~ /^%n-[.[:xdigit:]]+$/) { unlink '.latest'; symlink '%d', '.latest'; }" ], "fatal_errors" : 1, "quiet" : 1 } }, "name" : "@Author::ETHER/.latest", "version" : "0.042" }, { "class" : "Dist::Zilla::Plugin::CheckStrictVersion", "name" : "@Author::ETHER/CheckStrictVersion", "version" : "0.001" }, { "class" : "Dist::Zilla::Plugin::Git::Check", "config" : { "Dist::Zilla::Plugin::Git::Check" : { "untracked_files" : "die" }, "Dist::Zilla::Role::Git::DirtyFiles" : { "allow_dirty" : [], "allow_dirty_match" : [], "changelog" : "Changes" }, "Dist::Zilla::Role::Git::Repo" : { "repo_root" : "." } }, "name" : "@Author::ETHER/initial check", "version" : "2.036" }, { "class" : "Dist::Zilla::Plugin::Git::CheckFor::MergeConflicts", "config" : { "Dist::Zilla::Role::Git::Repo" : { "repo_root" : "." } }, "name" : "@Author::ETHER/Git::CheckFor::MergeConflicts", "version" : "0.013" }, { "class" : "Dist::Zilla::Plugin::Git::CheckFor::CorrectBranch", "config" : { "Dist::Zilla::Role::Git::Repo" : { "repo_root" : "." } }, "name" : "@Author::ETHER/Git::CheckFor::CorrectBranch", "version" : "0.013" }, { "class" : "Dist::Zilla::Plugin::Git::Remote::Check", "name" : "@Author::ETHER/Git::Remote::Check", "version" : "0.2.0" }, { "class" : "Dist::Zilla::Plugin::CheckPrereqsIndexed", "name" : "@Author::ETHER/CheckPrereqsIndexed", "version" : "0.016" }, { "class" : "Dist::Zilla::Plugin::TestRelease", "name" : "@Author::ETHER/TestRelease", "version" : "5.039" }, { "class" : "Dist::Zilla::Plugin::Git::Check", "config" : { "Dist::Zilla::Plugin::Git::Check" : { "untracked_files" : "die" }, "Dist::Zilla::Role::Git::DirtyFiles" : { "allow_dirty" : [], "allow_dirty_match" : [], "changelog" : "Changes" }, "Dist::Zilla::Role::Git::Repo" : { "repo_root" : "." } }, "name" : "@Author::ETHER/after tests", "version" : "2.036" }, { "class" : "Dist::Zilla::Plugin::CheckIssues", "name" : "@Author::ETHER/CheckIssues", "version" : "0.009" }, { "class" : "Dist::Zilla::Plugin::UploadToCPAN", "name" : "@Author::ETHER/UploadToCPAN", "version" : "5.039" }, { "class" : "Dist::Zilla::Plugin::Run::AfterRelease", "config" : { "Dist::Zilla::Plugin::Run::Role::Runner" : { "eval" : [ "unlink 'LICENSE'" ], "fatal_errors" : 1, "quiet" : 1 } }, "name" : "@Author::ETHER/remove old LICENSE", "version" : "0.042" }, { "class" : "Dist::Zilla::Plugin::CopyFilesFromRelease", "config" : { "Dist::Zilla::Plugin::CopyFilesFromRelease" : { "filename" : [ "CONTRIBUTING", "Changes", "INSTALL", "LICENCE", "LICENSE", "ppport.h" ], "match" : [] } }, "name" : "@Author::ETHER/CopyFilesFromRelease", "version" : "0.006" }, { "class" : "Dist::Zilla::Plugin::ReadmeAnyFromPod", "config" : { "Dist::Zilla::Role::FileWatcher" : { "version" : "0.006" } }, "name" : "@Author::ETHER/ReadmeAnyFromPod", "version" : "0.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", "Changes", "LICENSE", "README.pod" ], "allow_dirty_match" : [], "changelog" : "Changes" }, "Dist::Zilla::Role::Git::Repo" : { "repo_root" : "." }, "Dist::Zilla::Role::Git::StringFormatter" : { "time_zone" : "local" } }, "name" : "@Author::ETHER/release snapshot", "version" : "2.036" }, { "class" : "Dist::Zilla::Plugin::Git::Tag", "config" : { "Dist::Zilla::Plugin::Git::Tag" : { "branch" : null, "changelog" : "Changes", "signed" : 0, "tag" : "v0.49", "tag_format" : "v%v", "tag_message" : "v%v%t" }, "Dist::Zilla::Role::Git::Repo" : { "repo_root" : "." }, "Dist::Zilla::Role::Git::StringFormatter" : { "time_zone" : "local" } }, "name" : "@Author::ETHER/Git::Tag", "version" : "2.036" }, { "class" : "Dist::Zilla::Plugin::GitHub::Update", "config" : { "Dist::Zilla::Plugin::GitHub::Update" : { "metacpan" : 1 } }, "name" : "@Author::ETHER/GitHub::Update", "version" : "0.41" }, { "class" : "Dist::Zilla::Plugin::BumpVersionAfterRelease::Transitional", "config" : { "Dist::Zilla::Plugin::BumpVersionAfterRelease" : { "finders" : [ ":ExecFiles", ":InstallModules" ], "global" : 1, "munge_makefile_pl" : 1 }, "Dist::Zilla::Plugin::BumpVersionAfterRelease::Transitional" : {} }, "name" : "@Author::ETHER/BumpVersionAfterRelease::Transitional", "version" : "0.007" }, { "class" : "Dist::Zilla::Plugin::NextRelease", "name" : "@Author::ETHER/NextRelease", "version" : "5.039" }, { "class" : "Dist::Zilla::Plugin::Git::Commit", "config" : { "Dist::Zilla::Plugin::Git::Commit" : { "add_files_in" : [], "commit_msg" : "increment $VERSION after %v release" }, "Dist::Zilla::Role::Git::DirtyFiles" : { "allow_dirty" : [ "Changes" ], "allow_dirty_match" : [ "(?^:^lib/.*\\.pm$)" ], "changelog" : "Changes" }, "Dist::Zilla::Role::Git::Repo" : { "repo_root" : "." }, "Dist::Zilla::Role::Git::StringFormatter" : { "time_zone" : "local" } }, "name" : "@Author::ETHER/post-release commit", "version" : "2.036" }, { "class" : "Dist::Zilla::Plugin::Git::Push", "config" : { "Dist::Zilla::Plugin::Git::Push" : { "push_to" : [ "origin" ], "remotes_must_exist" : 1 }, "Dist::Zilla::Role::Git::Repo" : { "repo_root" : "." } }, "name" : "@Author::ETHER/Git::Push", "version" : "2.036" }, { "class" : "Dist::Zilla::Plugin::Run::AfterRelease", "config" : { "Dist::Zilla::Plugin::Run::Role::Runner" : { "fatal_errors" : 0, "quiet" : 0, "run" : [ "REDACTED" ] } }, "name" : "@Author::ETHER/install release", "version" : "0.042" }, { "class" : "Dist::Zilla::Plugin::Run::AfterRelease", "config" : { "Dist::Zilla::Plugin::Run::Role::Runner" : { "eval" : [ "print \"release complete!\\xa\"" ], "fatal_errors" : 1, "quiet" : 1 } }, "name" : "@Author::ETHER/release complete", "version" : "0.042" }, { "class" : "Dist::Zilla::Plugin::ConfirmRelease", "name" : "@Author::ETHER/ConfirmRelease", "version" : "5.039" }, { "class" : "Dist::Zilla::Plugin::MetaResources", "name" : "MetaResources", "version" : "5.039" }, { "class" : "Dist::Zilla::Plugin::Prereqs", "config" : { "Dist::Zilla::Plugin::Prereqs" : { "phase" : "runtime", "type" : "requires" } }, "name" : "Prereqs", "version" : "5.039" }, { "class" : "Dist::Zilla::Plugin::Prereqs", "config" : { "Dist::Zilla::Plugin::Prereqs" : { "phase" : "develop", "type" : "requires" } }, "name" : "DevelopRequires", "version" : "5.039" }, { "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.012" }, { "class" : "Dist::Zilla::Plugin::Deprecated", "config" : { "Dist::Zilla::Plugin::Deprecated" : { "all" : "1", "modules" : [] } }, "name" : "Deprecated", "version" : "0.004" }, { "class" : "Dist::Zilla::Plugin::FinderCode", "name" : ":InstallModules", "version" : "5.039" }, { "class" : "Dist::Zilla::Plugin::FinderCode", "name" : ":IncModules", "version" : "5.039" }, { "class" : "Dist::Zilla::Plugin::FinderCode", "name" : ":TestFiles", "version" : "5.039" }, { "class" : "Dist::Zilla::Plugin::FinderCode", "name" : ":ExtraTestFiles", "version" : "5.039" }, { "class" : "Dist::Zilla::Plugin::FinderCode", "name" : ":ExecFiles", "version" : "5.039" }, { "class" : "Dist::Zilla::Plugin::FinderCode", "name" : ":PerlExecFiles", "version" : "5.039" }, { "class" : "Dist::Zilla::Plugin::FinderCode", "name" : ":ShareFiles", "version" : "5.039" }, { "class" : "Dist::Zilla::Plugin::FinderCode", "name" : ":MainModule", "version" : "5.039" }, { "class" : "Dist::Zilla::Plugin::FinderCode", "name" : ":AllFiles", "version" : "5.039" }, { "class" : "Dist::Zilla::Plugin::FinderCode", "name" : ":NoFiles", "version" : "5.039" }, { "class" : "Dist::Zilla::Plugin::VerifyPhases", "name" : "@Author::ETHER/PHASE VERIFICATION", "version" : "0.013" } ], "zilla" : { "class" : "Dist::Zilla::Dist::Builder", "config" : { "is_trial" : "0" }, "version" : "5.039" } }, "x_authority" : "cpan:ETHER", "x_authority_from_module" : "MooseX::Method::Signatures", "x_contributors" : [ "Karen Etheridge ", "Ash Berlin ", "Daniel Ruoso ", "Justin Hunter ", "Nicholas Perez ", "Dagfinn Ilmari Mannsåker ", "Rhesa Rozendaal ", "Yanick Champoux ", "Cory Watson ", "Kent Fredric ", "Lukas Mai ", "Matt Kraai ", "Jonathan Scott Duff ", "Jesse Luehrs ", "Hakim Cassimally ", "Dave Rolsky ", "Ricardo SIGNES ", "Sebastian Willert ", "Steffen Schwigon " ], "x_deprecated" : 1, "x_permissions_from_module" : "MooseX::Method::Signatures", "x_static_install" : 1 } MooseX-Method-Signatures-0.49/META.yml000644 000766 000024 00000065635 12605070147 017765 0ustar00etherstaff000000 000000 --- abstract: '(DEPRECATED) Method declarations with type constraints and no source filter' author: - 'Florian Ragwitz ' build_requires: ExtUtils::MakeMaker: '0' File::Spec: '0' Moose::Role: '0' Test::Deep: '0' Test::Fatal: '0' Test::Moose: '0' Test::More: '0.89' attributes: '0' lib: '0' metaclass: '0' namespace::clean: '0.19' perl: '5.006' configure_requires: Module::Build::Tiny: '0.034' perl: '5.006' dynamic_config: 0 generated_by: 'Dist::Zilla version 5.039, CPAN::Meta::Converter version 2.150005' keywords: - moose - extension - method - declaration - signature - prototype - syntax - sugar - deprecated license: perl meta-spec: url: http://module-build.sourceforge.net/META-spec-v1.4.html version: '1.4' name: MooseX-Method-Signatures no_index: directory: - t - xt provides: MooseX::Method::Signatures: file: lib/MooseX/Method/Signatures.pm version: '0.49' MooseX::Method::Signatures::Meta::Method: file: lib/MooseX/Method/Signatures/Meta/Method.pm version: '0.49' MooseX::Method::Signatures::Types: file: lib/MooseX/Method/Signatures/Types.pm version: '0.49' requires: B::Hooks::EndOfScope: '0.10' Carp: '0' Context::Preserve: '0' Devel::Declare: '0.005011' Devel::Declare::Context::Simple: '0' Eval::Closure: '0' Module::Runtime: '0.012' Moose: '0.89' Moose::Meta::Class: '0' Moose::Meta::Method: '0' Moose::Util: '0' Moose::Util::TypeConstraints: '0' MooseX::LazyRequire: '0.06' MooseX::Meta::TypeConstraint::ForceCoercion: '0' MooseX::Types: '0.35' MooseX::Types::Moose: '0.19' MooseX::Types::Structured: '0.24' MooseX::Types::Util: '0' Parse::Method::Signatures: '1.003014' Parse::Method::Signatures::Param::Named: '0' Parse::Method::Signatures::Param::Placeholder: '0' Parse::Method::Signatures::TypeConstraint: '0' Parse::Method::Signatures::Types: '0' Scalar::Util: '0' Sub::Name: '0' Task::Weaken: '0' Text::Balanced: '0' aliased: '0' if: '0' namespace::autoclean: '0' perl: '5.006' strict: '0' warnings: '0' resources: IRC: irc://irc.perl.org/#moose MailingList: http://lists.perl.org/list/moose.html bugtracker: https://rt.cpan.org/Public/Dist/Display.html?Name=MooseX-Method-Signatures homepage: https://github.com/moose/MooseX-Method-Signatures repository: https://github.com/moose/MooseX-Method-Signatures.git version: '0.49' x_Dist_Zilla: perl: version: '5.023003' plugins: - class: Dist::Zilla::Plugin::Prereqs config: Dist::Zilla::Plugin::Prereqs: phase: develop type: requires name: '@Author::ETHER/bundle_plugins' version: '5.039' - class: Dist::Zilla::Plugin::RewriteVersion::Transitional config: Dist::Zilla::Plugin::RewriteVersion: add_tarball_name: 0 finders: - ':ExecFiles' - ':InstallModules' global: 1 skip_version_provider: 0 Dist::Zilla::Plugin::RewriteVersion::Transitional: {} name: '@Author::ETHER/RewriteVersion::Transitional' version: '0.007' - class: Dist::Zilla::Plugin::PromptIfStale config: Dist::Zilla::Plugin::PromptIfStale: check_all_plugins: 0 check_all_prereqs: 0 modules: - Dist::Zilla::PluginBundle::Author::ETHER phase: build skip: [] name: '@Author::ETHER/stale modules, build' version: '0.047' - class: Dist::Zilla::Plugin::PromptIfStale config: Dist::Zilla::Plugin::PromptIfStale: check_all_plugins: 1 check_all_prereqs: 1 modules: [] phase: release skip: [] name: '@Author::ETHER/stale modules, release' version: '0.047' - class: Dist::Zilla::Plugin::FileFinder::ByName name: '@Author::ETHER/Examples' version: '5.039' - class: Dist::Zilla::Plugin::FileFinder::ByName name: '@Author::ETHER/ExtraTestFiles' version: '5.039' - class: Dist::Zilla::Plugin::Git::GatherDir config: Dist::Zilla::Plugin::GatherDir: exclude_filename: - CONTRIBUTING - LICENSE - README.pod exclude_match: [] follow_symlinks: 0 include_dotfiles: 0 prefix: '' prune_directory: [] root: . Dist::Zilla::Plugin::Git::GatherDir: include_untracked: 0 name: '@Author::ETHER/Git::GatherDir' version: '2.036' - class: Dist::Zilla::Plugin::MetaYAML name: '@Author::ETHER/MetaYAML' version: '5.039' - class: Dist::Zilla::Plugin::MetaJSON name: '@Author::ETHER/MetaJSON' version: '5.039' - class: Dist::Zilla::Plugin::Readme name: '@Author::ETHER/Readme' version: '5.039' - class: Dist::Zilla::Plugin::Manifest name: '@Author::ETHER/Manifest' version: '5.039' - class: Dist::Zilla::Plugin::License name: '@Author::ETHER/License' version: '5.039' - class: Dist::Zilla::Plugin::GenerateFile::ShareDir config: Dist::Zilla::Plugin::GenerateFile::ShareDir: destination_filename: CONTRIBUTING dist: Dist-Zilla-PluginBundle-Author-ETHER encoding: UTF-8 has_xs: 0 location: build source_filename: CONTRIBUTING name: '@Author::ETHER/generate CONTRIBUTING' version: '0.006' - class: Dist::Zilla::Plugin::InstallGuide name: '@Author::ETHER/InstallGuide' version: '1.200006' - class: Dist::Zilla::Plugin::Test::Compile config: Dist::Zilla::Plugin::Test::Compile: bail_out_on_fail: '1' fail_on_warning: author fake_home: 0 filename: xt/author/00-compile.t module_finder: - ':InstallModules' needs_display: 0 phase: develop script_finder: - ':PerlExecFiles' - '@Author::ETHER/Examples' skips: [] name: '@Author::ETHER/Test::Compile' version: '2.054' - class: Dist::Zilla::Plugin::Test::NoTabs config: Dist::Zilla::Plugin::Test::NoTabs: filename: xt/author/no-tabs.t finder: - ':InstallModules' - ':ExecFiles' - '@Author::ETHER/Examples' - ':TestFiles' - '@Author::ETHER/ExtraTestFiles' name: '@Author::ETHER/Test::NoTabs' version: '0.15' - class: Dist::Zilla::Plugin::Test::EOL config: Dist::Zilla::Plugin::Test::EOL: filename: xt/author/eol.t finder: - ':InstallModules' - ':ExecFiles' - '@Author::ETHER/Examples' - ':TestFiles' - '@Author::ETHER/ExtraTestFiles' trailing_whitespace: '1' name: '@Author::ETHER/Test::EOL' version: '0.18' - class: Dist::Zilla::Plugin::MetaTests name: '@Author::ETHER/MetaTests' version: '5.039' - class: Dist::Zilla::Plugin::Test::CPAN::Changes name: '@Author::ETHER/Test::CPAN::Changes' version: '0.009' - class: Dist::Zilla::Plugin::Test::ChangesHasContent name: '@Author::ETHER/Test::ChangesHasContent' version: '0.008' - class: Dist::Zilla::Plugin::Test::MinimumVersion name: '@Author::ETHER/Test::MinimumVersion' version: '2.000006' - class: Dist::Zilla::Plugin::PodSyntaxTests name: '@Author::ETHER/PodSyntaxTests' version: '5.039' - class: Dist::Zilla::Plugin::Test::PodSpelling name: '@Author::ETHER/Test::PodSpelling' version: '2.006009' - class: Dist::Zilla::Plugin::Test::Pod::No404s name: '@Author::ETHER/Test::Pod::No404s' version: '1.002' - class: Dist::Zilla::Plugin::Test::Kwalitee config: Dist::Zilla::Plugin::Test::Kwalitee: filename: xt/author/kwalitee.t skiptest: [] name: '@Author::ETHER/Test::Kwalitee' version: '2.12' - class: Dist::Zilla::Plugin::MojibakeTests name: '@Author::ETHER/MojibakeTests' version: '0.8' - class: Dist::Zilla::Plugin::Test::ReportPrereqs name: '@Author::ETHER/Test::ReportPrereqs' version: '0.021' - class: Dist::Zilla::Plugin::Test::Portability name: '@Author::ETHER/Test::Portability' version: '2.000006' - class: Dist::Zilla::Plugin::Test::CleanNamespaces config: Dist::Zilla::Plugin::Test::CleanNamespaces: filename: xt/author/clean-namespaces.t skips: [] name: '@Author::ETHER/Test::CleanNamespaces' version: '0.006' - class: Dist::Zilla::Plugin::Git::Describe name: '@Author::ETHER/Git::Describe' version: '0.006' - class: Dist::Zilla::Plugin::PodWeaver config: Dist::Zilla::Plugin::PodWeaver: config_plugins: - '@Author::ETHER' finder: - ':InstallModules' - ':ExecFiles' 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: '@Author::ETHER/SingleEncoding' version: '4.012' - class: Pod::Weaver::Plugin::Transformer name: '@Author::ETHER/List' version: '4.012' - class: Pod::Weaver::Plugin::Transformer name: '@Author::ETHER/Verbatim' version: '4.012' - class: Pod::Weaver::Section::Region name: '@Author::ETHER/header' version: '4.012' - class: Pod::Weaver::Section::Name name: '@Author::ETHER/Name' version: '4.012' - class: Pod::Weaver::Section::Version name: '@Author::ETHER/Version' version: '4.012' - class: Pod::Weaver::Section::Region name: '@Author::ETHER/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::Collect name: TYPES version: '4.012' - class: Pod::Weaver::Section::Leftovers name: '@Author::ETHER/Leftovers' version: '4.012' - class: Pod::Weaver::Section::Region name: '@Author::ETHER/postlude' version: '4.012' - class: Pod::Weaver::Section::GenerateSection name: '@Author::ETHER/generate SUPPORT' version: '1.01' - class: Pod::Weaver::Section::AllowOverride name: '@Author::ETHER/allow override SUPPORT' version: '0.05' - class: Pod::Weaver::Section::Authors name: '@Author::ETHER/Authors' version: '4.012' - class: Pod::Weaver::Section::Contributors name: '@Author::ETHER/Contributors' version: '0.009' - class: Pod::Weaver::Section::Legal name: '@Author::ETHER/Legal' version: '4.012' - class: Pod::Weaver::Section::Region name: '@Author::ETHER/footer' version: '4.012' name: '@Author::ETHER/PodWeaver' version: '4.006' - class: Dist::Zilla::Plugin::GithubMeta name: '@Author::ETHER/GithubMeta' version: '0.54' - class: Dist::Zilla::Plugin::AutoMetaResources name: '@Author::ETHER/AutoMetaResources' version: '1.21' - class: Dist::Zilla::Plugin::AuthorityFromModule config: Dist::Zilla::Plugin::AuthorityFromModule: module: MooseX::Method::Signatures Dist::Zilla::Role::ModuleMetadata: Module::Metadata: '1.000029' version: '0.003' name: '@Author::ETHER/AuthorityFromModule' version: '0.006' - class: Dist::Zilla::Plugin::Authority name: '@Author::ETHER/Authority' version: '1.009' - class: Dist::Zilla::Plugin::MetaNoIndex name: '@Author::ETHER/MetaNoIndex' version: '5.039' - class: Dist::Zilla::Plugin::MetaProvides::Package config: Dist::Zilla::Plugin::MetaProvides::Package: finder: - ':InstallModules' finder_objects: - class: Dist::Zilla::Plugin::FinderCode name: ':InstallModules' version: '5.039' Dist::Zilla::Role::MetaProvider::Provider: inherit_missing: '0' inherit_version: '0' meta_noindex: '1' name: '@Author::ETHER/MetaProvides::Package' version: '2.003001' - class: Dist::Zilla::Plugin::MetaConfig name: '@Author::ETHER/MetaConfig' version: '5.039' - class: Dist::Zilla::Plugin::Keywords config: Dist::Zilla::Plugin::Keywords: keywords: - moose - extension - method - declaration - signature - prototype - syntax - sugar - deprecated name: '@Author::ETHER/Keywords' version: '0.006' - class: Dist::Zilla::Plugin::Git::Contributors config: Dist::Zilla::Plugin::Git::Contributors: include_authors: 0 include_releaser: 1 order_by: commits paths: - . name: '@Author::ETHER/Git::Contributors' version: '0.014' - class: Dist::Zilla::Plugin::AutoPrereqs name: '@Author::ETHER/AutoPrereqs' version: '5.039' - class: Dist::Zilla::Plugin::Prereqs::AuthorDeps name: '@Author::ETHER/Prereqs::AuthorDeps' version: '0.005' - class: Dist::Zilla::Plugin::MinimumPerl name: '@Author::ETHER/MinimumPerl' version: '1.006' - class: Dist::Zilla::Plugin::Prereqs config: Dist::Zilla::Plugin::Prereqs: phase: develop type: recommends name: '@Author::ETHER/pluginbundle_version' version: '5.039' - class: Dist::Zilla::Plugin::MakeMaker::Fallback config: Dist::Zilla::Plugin::MakeMaker::Awesome: version: '0.35' Dist::Zilla::Role::TestRunner: default_jobs: 9 name: '@Author::ETHER/MakeMaker::Fallback' version: '0.021' - class: Dist::Zilla::Plugin::ModuleBuildTiny::Fallback config: Dist::Zilla::Plugin::ModuleBuildTiny::Fallback: mb_version: '0.28' plugins: - class: Dist::Zilla::Plugin::ModuleBuild config: Dist::Zilla::Role::TestRunner: default_jobs: 9 name: 'ModuleBuild, via ModuleBuildTiny::Fallback' version: '5.039' - class: Dist::Zilla::Plugin::ModuleBuildTiny config: Dist::Zilla::Role::TestRunner: default_jobs: 9 name: 'ModuleBuildTiny, via ModuleBuildTiny::Fallback' version: '0.014' Dist::Zilla::Role::TestRunner: default_jobs: 9 name: '@Author::ETHER/ModuleBuildTiny::Fallback' version: '0.020' - class: Dist::Zilla::Plugin::StaticInstall config: Dist::Zilla::Plugin::StaticInstall: dry_run: 0 mode: auto name: '@Author::ETHER/StaticInstall' version: '0.008' - class: Dist::Zilla::Plugin::RunExtraTests config: Dist::Zilla::Role::TestRunner: default_jobs: 9 name: '@Author::ETHER/RunExtraTests' version: '0.028' - class: Dist::Zilla::Plugin::CheckSelfDependency config: Dist::Zilla::Plugin::CheckSelfDependency: finder: - ':InstallModules' Dist::Zilla::Role::ModuleMetadata: Module::Metadata: '1.000029' version: '0.003' name: '@Author::ETHER/CheckSelfDependency' version: '0.011' - class: Dist::Zilla::Plugin::Run::AfterBuild config: Dist::Zilla::Plugin::Run::Role::Runner: fatal_errors: 1 quiet: 1 run: - "bash -c \"test -e .ackrc && grep -q -- '--ignore-dir=.latest' .ackrc || echo '--ignore-dir=.latest' >> .ackrc; if [[ `dirname '%d'` != .build ]]; then test -e .ackrc && grep -q -- '--ignore-dir=%d' .ackrc || echo '--ignore-dir=%d' >> .ackrc; fi\"" name: '@Author::ETHER/.ackrc' version: '0.042' - class: Dist::Zilla::Plugin::Run::AfterBuild config: Dist::Zilla::Plugin::Run::Role::Runner: eval: - "if ('%d' =~ /^%n-[.[:xdigit:]]+$/) { unlink '.latest'; symlink '%d', '.latest'; }" fatal_errors: 1 quiet: 1 name: '@Author::ETHER/.latest' version: '0.042' - class: Dist::Zilla::Plugin::CheckStrictVersion name: '@Author::ETHER/CheckStrictVersion' version: '0.001' - class: Dist::Zilla::Plugin::Git::Check config: Dist::Zilla::Plugin::Git::Check: untracked_files: die Dist::Zilla::Role::Git::DirtyFiles: allow_dirty: [] allow_dirty_match: [] changelog: Changes Dist::Zilla::Role::Git::Repo: repo_root: . name: '@Author::ETHER/initial check' version: '2.036' - class: Dist::Zilla::Plugin::Git::CheckFor::MergeConflicts config: Dist::Zilla::Role::Git::Repo: repo_root: . name: '@Author::ETHER/Git::CheckFor::MergeConflicts' version: '0.013' - class: Dist::Zilla::Plugin::Git::CheckFor::CorrectBranch config: Dist::Zilla::Role::Git::Repo: repo_root: . name: '@Author::ETHER/Git::CheckFor::CorrectBranch' version: '0.013' - class: Dist::Zilla::Plugin::Git::Remote::Check name: '@Author::ETHER/Git::Remote::Check' version: 0.2.0 - class: Dist::Zilla::Plugin::CheckPrereqsIndexed name: '@Author::ETHER/CheckPrereqsIndexed' version: '0.016' - class: Dist::Zilla::Plugin::TestRelease name: '@Author::ETHER/TestRelease' version: '5.039' - class: Dist::Zilla::Plugin::Git::Check config: Dist::Zilla::Plugin::Git::Check: untracked_files: die Dist::Zilla::Role::Git::DirtyFiles: allow_dirty: [] allow_dirty_match: [] changelog: Changes Dist::Zilla::Role::Git::Repo: repo_root: . name: '@Author::ETHER/after tests' version: '2.036' - class: Dist::Zilla::Plugin::CheckIssues name: '@Author::ETHER/CheckIssues' version: '0.009' - class: Dist::Zilla::Plugin::UploadToCPAN name: '@Author::ETHER/UploadToCPAN' version: '5.039' - class: Dist::Zilla::Plugin::Run::AfterRelease config: Dist::Zilla::Plugin::Run::Role::Runner: eval: - "unlink 'LICENSE'" fatal_errors: 1 quiet: 1 name: '@Author::ETHER/remove old LICENSE' version: '0.042' - class: Dist::Zilla::Plugin::CopyFilesFromRelease config: Dist::Zilla::Plugin::CopyFilesFromRelease: filename: - CONTRIBUTING - Changes - INSTALL - LICENCE - LICENSE - ppport.h match: [] name: '@Author::ETHER/CopyFilesFromRelease' version: '0.006' - class: Dist::Zilla::Plugin::ReadmeAnyFromPod config: Dist::Zilla::Role::FileWatcher: version: '0.006' name: '@Author::ETHER/ReadmeAnyFromPod' version: '0.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 - Changes - LICENSE - README.pod allow_dirty_match: [] changelog: Changes Dist::Zilla::Role::Git::Repo: repo_root: . Dist::Zilla::Role::Git::StringFormatter: time_zone: local name: '@Author::ETHER/release snapshot' version: '2.036' - class: Dist::Zilla::Plugin::Git::Tag config: Dist::Zilla::Plugin::Git::Tag: branch: ~ changelog: Changes signed: 0 tag: v0.49 tag_format: v%v tag_message: v%v%t Dist::Zilla::Role::Git::Repo: repo_root: . Dist::Zilla::Role::Git::StringFormatter: time_zone: local name: '@Author::ETHER/Git::Tag' version: '2.036' - class: Dist::Zilla::Plugin::GitHub::Update config: Dist::Zilla::Plugin::GitHub::Update: metacpan: 1 name: '@Author::ETHER/GitHub::Update' version: '0.41' - class: Dist::Zilla::Plugin::BumpVersionAfterRelease::Transitional config: Dist::Zilla::Plugin::BumpVersionAfterRelease: finders: - ':ExecFiles' - ':InstallModules' global: 1 munge_makefile_pl: 1 Dist::Zilla::Plugin::BumpVersionAfterRelease::Transitional: {} name: '@Author::ETHER/BumpVersionAfterRelease::Transitional' version: '0.007' - class: Dist::Zilla::Plugin::NextRelease name: '@Author::ETHER/NextRelease' version: '5.039' - class: Dist::Zilla::Plugin::Git::Commit config: Dist::Zilla::Plugin::Git::Commit: add_files_in: [] commit_msg: 'increment $VERSION after %v release' Dist::Zilla::Role::Git::DirtyFiles: allow_dirty: - Changes allow_dirty_match: - (?^:^lib/.*\.pm$) changelog: Changes Dist::Zilla::Role::Git::Repo: repo_root: . Dist::Zilla::Role::Git::StringFormatter: time_zone: local name: '@Author::ETHER/post-release commit' version: '2.036' - class: Dist::Zilla::Plugin::Git::Push config: Dist::Zilla::Plugin::Git::Push: push_to: - origin remotes_must_exist: 1 Dist::Zilla::Role::Git::Repo: repo_root: . name: '@Author::ETHER/Git::Push' version: '2.036' - class: Dist::Zilla::Plugin::Run::AfterRelease config: Dist::Zilla::Plugin::Run::Role::Runner: fatal_errors: 0 quiet: 0 run: - REDACTED name: '@Author::ETHER/install release' version: '0.042' - class: Dist::Zilla::Plugin::Run::AfterRelease config: Dist::Zilla::Plugin::Run::Role::Runner: eval: - 'print "release complete!\xa"' fatal_errors: 1 quiet: 1 name: '@Author::ETHER/release complete' version: '0.042' - class: Dist::Zilla::Plugin::ConfirmRelease name: '@Author::ETHER/ConfirmRelease' version: '5.039' - class: Dist::Zilla::Plugin::MetaResources name: MetaResources version: '5.039' - class: Dist::Zilla::Plugin::Prereqs config: Dist::Zilla::Plugin::Prereqs: phase: runtime type: requires name: Prereqs version: '5.039' - class: Dist::Zilla::Plugin::Prereqs config: Dist::Zilla::Plugin::Prereqs: phase: develop type: requires name: DevelopRequires version: '5.039' - 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.012' - class: Dist::Zilla::Plugin::Deprecated config: Dist::Zilla::Plugin::Deprecated: all: '1' modules: [] name: Deprecated version: '0.004' - class: Dist::Zilla::Plugin::FinderCode name: ':InstallModules' version: '5.039' - class: Dist::Zilla::Plugin::FinderCode name: ':IncModules' version: '5.039' - class: Dist::Zilla::Plugin::FinderCode name: ':TestFiles' version: '5.039' - class: Dist::Zilla::Plugin::FinderCode name: ':ExtraTestFiles' version: '5.039' - class: Dist::Zilla::Plugin::FinderCode name: ':ExecFiles' version: '5.039' - class: Dist::Zilla::Plugin::FinderCode name: ':PerlExecFiles' version: '5.039' - class: Dist::Zilla::Plugin::FinderCode name: ':ShareFiles' version: '5.039' - class: Dist::Zilla::Plugin::FinderCode name: ':MainModule' version: '5.039' - class: Dist::Zilla::Plugin::FinderCode name: ':AllFiles' version: '5.039' - class: Dist::Zilla::Plugin::FinderCode name: ':NoFiles' version: '5.039' - class: Dist::Zilla::Plugin::VerifyPhases name: '@Author::ETHER/PHASE VERIFICATION' version: '0.013' zilla: class: Dist::Zilla::Dist::Builder config: is_trial: '0' version: '5.039' x_authority: cpan:ETHER x_authority_from_module: MooseX::Method::Signatures x_contributors: - 'Karen Etheridge ' - 'Ash Berlin ' - 'Daniel Ruoso ' - 'Justin Hunter ' - 'Nicholas Perez ' - 'Dagfinn Ilmari Mannsåker ' - 'Rhesa Rozendaal ' - 'Yanick Champoux ' - 'Cory Watson ' - 'Kent Fredric ' - 'Lukas Mai ' - 'Matt Kraai ' - 'Jonathan Scott Duff ' - 'Jesse Luehrs ' - 'Hakim Cassimally ' - 'Dave Rolsky ' - 'Ricardo SIGNES ' - 'Sebastian Willert ' - 'Steffen Schwigon ' x_deprecated: 1 x_permissions_from_module: MooseX::Method::Signatures x_static_install: 1 MooseX-Method-Signatures-0.49/README000644 000766 000024 00000000652 12605070147 017360 0ustar00etherstaff000000 000000 This archive contains the distribution MooseX-Method-Signatures, version 0.49: (DEPRECATED) Method declarations with type constraints and no source filter This software is copyright (c) 2008 by Florian Ragwitz. This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. This README file was generated by Dist::Zilla::Plugin::Readme v5.039. MooseX-Method-Signatures-0.49/t/000700 000766 000024 00000000000 12605070147 016726 5ustar00etherstaff000000 000000 MooseX-Method-Signatures-0.49/xt/000700 000766 000024 00000000000 12605070147 017116 5ustar00etherstaff000000 000000 MooseX-Method-Signatures-0.49/xt/author/000700 000766 000024 00000000000 12605070147 020420 5ustar00etherstaff000000 000000 MooseX-Method-Signatures-0.49/xt/release/000700 000766 000024 00000000000 12605070147 020536 5ustar00etherstaff000000 000000 MooseX-Method-Signatures-0.49/xt/release/changes_has_content.t000644 000766 000024 00000002010 12605070147 024723 0ustar00etherstaff000000 000000 #!perl use Test::More tests => 2; note 'Checking Changes'; my $changes_file = 'Changes'; my $newver = '0.49'; my $trial_token = '-TRIAL'; SKIP: { ok(-e $changes_file, "$changes_file file exists") or skip 'Changes is missing', 1; ok(_get_changes($newver), "$changes_file has content for $newver"); } done_testing; # _get_changes copied and adapted from Dist::Zilla::Plugin::Git::Commit # by Jerome Quelin sub _get_changes { my $newver = shift; # parse changelog to find commit message open(my $fh, '<', $changes_file) or die "cannot open $changes_file: $!"; my $changelog = join('', <$fh>); close $fh; my @content = grep { /^$newver(?:$trial_token)?(?:\s+|$)/ ... /^\S/ } # from newver to un-indented split /\n/, $changelog; shift @content; # drop the version line # drop unindented last line and trailing blank lines pop @content while ( @content && $content[-1] =~ /^(?:\S|\s*$)/ ); # return number of non-blank lines return scalar @content; } MooseX-Method-Signatures-0.49/xt/release/cpan-changes.t000644 000766 000024 00000000263 12605070147 023265 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(); MooseX-Method-Signatures-0.49/xt/release/distmeta.t000644 000766 000024 00000000172 12605070147 022547 0ustar00etherstaff000000 000000 #!perl # This file was automatically generated by Dist::Zilla::Plugin::MetaTests. use Test::CPAN::Meta; meta_yaml_ok(); MooseX-Method-Signatures-0.49/xt/release/minimum-version.t000644 000766 000024 00000000271 12605070147 024073 0ustar00etherstaff000000 000000 #!perl use Test::More; eval "use Test::MinimumVersion"; plan skip_all => "Test::MinimumVersion required for testing minimum versions" if $@; all_minimum_version_ok( qq{5.008003} ); MooseX-Method-Signatures-0.49/xt/release/pod-no404s.t000644 000766 000024 00000000527 12605070147 022550 0ustar00etherstaff000000 000000 #!perl use strict; use warnings; use Test::More; foreach my $env_skip ( qw( SKIP_POD_NO404S AUTOMATED_TESTING ) ){ plan skip_all => "\$ENV{$env_skip} is set, skipping" if $ENV{$env_skip}; } eval "use Test::Pod::No404s"; if ( $@ ) { plan skip_all => 'Test::Pod::No404s required for testing POD'; } else { all_pod_files_ok(); } MooseX-Method-Signatures-0.49/xt/release/pod-syntax.t000644 000766 000024 00000000220 12605070147 023035 0ustar00etherstaff000000 000000 #!perl # This file was automatically generated by Dist::Zilla::Plugin::PodSyntaxTests. use Test::More; use Test::Pod 1.41; all_pod_files_ok(); MooseX-Method-Signatures-0.49/xt/release/portability.t000644 000766 000024 00000000277 12605070147 023305 0ustar00etherstaff000000 000000 #!perl use strict; use warnings; use Test::More; eval 'use Test::Portability::Files'; plan skip_all => 'Test::Portability::Files required for testing portability' if $@; run_tests(); MooseX-Method-Signatures-0.49/xt/author/00-compile.t000644 000766 000024 00000002405 12605070147 022465 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 => 4; my @module_files = ( 'MooseX/Method/Signatures.pm', 'MooseX/Method/Signatures/Meta/Method.pm', 'MooseX/Method/Signatures/Types.pm' ); # no fake home requested my $inc_switch = -d 'blib' ? '-Mblib' : '-Ilib'; use File::Spec; use IPC::Open3; use IO::Handle; open my $stdin, '<', File::Spec->devnull or die "can't open devnull: $!"; my @warnings; for my $lib (@module_files) { # see L my $stderr = IO::Handle->new; my $pid = open3($stdin, '>&STDERR', $stderr, $^X, $inc_switch, '-e', "require q[$lib]"); binmode $stderr, ':crlf' if $^O eq 'MSWin32'; my @_warnings = <$stderr>; waitpid($pid, 0); is($?, 0, "$lib loaded ok"); shift @_warnings if @_warnings and $_warnings[0] =~ /^Using .*\bblib/ and not eval { require blib; blib->VERSION('1.01') }; if (@_warnings) { warn @_warnings; push @warnings, @_warnings; } } is(scalar(@warnings), 0, 'no warnings found') or diag 'got warnings: ', explain(\@warnings); BAIL_OUT("Compilation problems") if !Test::More->builder->is_passing; MooseX-Method-Signatures-0.49/xt/author/clean-namespaces.t000644 000766 000024 00000000361 12605070147 024016 0ustar00etherstaff000000 000000 use strict; use warnings; # this test was generated with Dist::Zilla::Plugin::Test::CleanNamespaces 0.006 use Test::More 0.94; use Test::CleanNamespaces 0.15; subtest all_namespaces_clean => sub { all_namespaces_clean() }; done_testing; MooseX-Method-Signatures-0.49/xt/author/eol.t000644 000766 000024 00000003410 12605070147 021374 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 = ( 'lib/MooseX/Method/Signatures.pm', 'lib/MooseX/Method/Signatures/Meta/Method.pm', 'lib/MooseX/Method/Signatures/Types.pm', 't/00-load.t', 't/00-report-prereqs.dd', 't/00-report-prereqs.t', 't/attributes.t', 't/basic.t', 't/caller.t', 't/closure.t', 't/declarators.t', 't/errors.t', 't/eval.t', 't/lib/InvalidCase01.pm', 't/lib/InvalidCase02.pm', 't/lib/MXMSLabeled.pm', 't/lib/MXMSMoody.pm', 't/lib/My/Annoyingly/Long/Name/Space.pm', 't/lib/Redefined.pm', 't/lib/TestClass.pm', 't/lib/TestClassTrait.pm', 't/lib/TestClassWithMxTypes.pm', 't/list.t', 't/meta.t', 't/method-trait.t', 't/named_defaults.t', 't/no_signature.t', 't/placeholders.t', 't/precedence.t', 't/quoted_name.t', 't/return_value.t', 't/signatures.t', 't/sigs-optional.t', 't/structured.t', 't/synopsis.t', 't/too_many_args.t', 't/traits.t', 't/type_alias.t', 't/types.t', 't/undef_method_arg.t', 't/undef_method_arg2.t', 't/where.t', 't/zzz-check-breaks.t', 'xt/author/00-compile.t', 'xt/author/clean-namespaces.t', 'xt/author/eol.t', 'xt/author/kwalitee.t', 'xt/author/mojibake.t', 'xt/author/no-tabs.t', 'xt/author/pod-spell.t', 'xt/author/transactional-authorized.t', 'xt/release/changes_has_content.t', 'xt/release/cpan-changes.t', 'xt/release/distmeta.t', 'xt/release/minimum-version.t', 'xt/release/pod-no404s.t', 'xt/release/pod-syntax.t', 'xt/release/portability.t' ); eol_unix_ok($_, { trailing_whitespace => 1 }) foreach @files; done_testing; MooseX-Method-Signatures-0.49/xt/author/kwalitee.t000644 000766 000024 00000000275 12605070147 022430 0ustar00etherstaff000000 000000 # this test was generated with Dist::Zilla::Plugin::Test::Kwalitee 2.12 use strict; use warnings; use Test::More 0.88; use Test::Kwalitee 1.21 'kwalitee_ok'; kwalitee_ok(); done_testing; MooseX-Method-Signatures-0.49/xt/author/mojibake.t000644 000766 000024 00000000151 12605070147 022375 0ustar00etherstaff000000 000000 #!perl use strict; use warnings qw(all); use Test::More; use Test::Mojibake; all_files_encoding_ok(); MooseX-Method-Signatures-0.49/xt/author/no-tabs.t000644 000766 000024 00000003356 12605070147 022171 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 = ( 'lib/MooseX/Method/Signatures.pm', 'lib/MooseX/Method/Signatures/Meta/Method.pm', 'lib/MooseX/Method/Signatures/Types.pm', 't/00-load.t', 't/00-report-prereqs.dd', 't/00-report-prereqs.t', 't/attributes.t', 't/basic.t', 't/caller.t', 't/closure.t', 't/declarators.t', 't/errors.t', 't/eval.t', 't/lib/InvalidCase01.pm', 't/lib/InvalidCase02.pm', 't/lib/MXMSLabeled.pm', 't/lib/MXMSMoody.pm', 't/lib/My/Annoyingly/Long/Name/Space.pm', 't/lib/Redefined.pm', 't/lib/TestClass.pm', 't/lib/TestClassTrait.pm', 't/lib/TestClassWithMxTypes.pm', 't/list.t', 't/meta.t', 't/method-trait.t', 't/named_defaults.t', 't/no_signature.t', 't/placeholders.t', 't/precedence.t', 't/quoted_name.t', 't/return_value.t', 't/signatures.t', 't/sigs-optional.t', 't/structured.t', 't/synopsis.t', 't/too_many_args.t', 't/traits.t', 't/type_alias.t', 't/types.t', 't/undef_method_arg.t', 't/undef_method_arg2.t', 't/where.t', 't/zzz-check-breaks.t', 'xt/author/00-compile.t', 'xt/author/clean-namespaces.t', 'xt/author/eol.t', 'xt/author/kwalitee.t', 'xt/author/mojibake.t', 'xt/author/no-tabs.t', 'xt/author/pod-spell.t', 'xt/author/transactional-authorized.t', 'xt/release/changes_has_content.t', 'xt/release/cpan-changes.t', 'xt/release/distmeta.t', 'xt/release/minimum-version.t', 'xt/release/pod-no404s.t', 'xt/release/pod-syntax.t', 'xt/release/portability.t' ); notabs_ok($_) foreach @files; done_testing; MooseX-Method-Signatures-0.49/xt/author/pod-spell.t000644 000766 000024 00000001276 12605070147 022524 0ustar00etherstaff000000 000000 use strict; use warnings; use Test::More; # generated by Dist::Zilla::Plugin::Test::PodSpelling 2.006009 use Test::Spelling 0.12; use Pod::Wordlist; add_stopwords(); all_pod_files_spelling_ok( qw( bin lib ) ); __DATA__ irc Florian Ragwitz rafl Karen Etheridge ether Ash Berlin ash Daniel Ruoso daniel Justin Hunter justin Nicholas Perez nperez Dagfinn Ilmari Mannsåker ilmari Rhesa Rozendaal rhesa Yanick Champoux yanick Cory Watson gphat Kent Fredric kentfredric Lukas Mai mai Matt Kraai kraai Jonathan Scott Duff duff Jesse Luehrs doy Hakim Cassimally osfameron Dave Rolsky autarch Ricardo SIGNES rjbs Sebastian Willert willert Steffen Schwigon ss5 lib MooseX Method Signatures Meta Types MooseX-Method-Signatures-0.49/xt/author/transactional-authorized.t000644 000766 000024 00000002236 12605070147 025640 0ustar00etherstaff000000 000000 use Test::More; use Test::Moose; { package MyClass; use Moose; use MooseX::Method::Signatures; use aliased 'MooseX::Meta::Method::Transactional'; use aliased 'MooseX::Meta::Method::Authorized'; has user => (is => 'ro'); has schema => (is => 'ro'); # this was supposed to die, but the trait is not really applied. method m01 does Transactional does Authorized(requires => ['foo']) { 'm01' } method m02 does Transactional { 'm02' } method m03 does Authorized(requires => ['gah']) { 'm03' } method m04 does Transactional does Authorized(requires => ['gah']) { 'm01' } }; { package MySchema; use Moose; sub txn_do { my $self = shift; my $code = shift; return 'txn_do '.$code->(@_); } }; { package MyUser; use Moose; sub roles { qw } }; my $meth = MyClass->meta->get_method('m01'); my $obj = MyClass->new({user => MyUser->new, schema => MySchema->new }); is($obj->m01, 'txn_do m01', 'applying both roles work.'); is($obj->m02, 'txn_do m02', 'Applyign just Transactional'); eval { $obj->m03; }; like($@.'', qr(Access Denied)i, $@); eval { $obj->m04; }; like($@.'', qr(Access Denied)i, $@); done_testing(); 1; MooseX-Method-Signatures-0.49/t/00-load.t000644 000766 000024 00000000166 12605070147 020264 0ustar00etherstaff000000 000000 use strict; use warnings; use Test::More tests => 1; BEGIN { use_ok('MooseX::Method::Signatures') or BAIL_OUT($@) }; MooseX-Method-Signatures-0.49/t/00-report-prereqs.dd000644 000766 000024 00000026255 12605070147 022472 0ustar00etherstaff000000 000000 do { my $x = { 'configure' => { 'requires' => { 'Module::Build::Tiny' => '0.034', 'perl' => '5.006' } }, 'develop' => { 'recommends' => { 'Dist::Zilla::PluginBundle::Author::ETHER' => '0.105' }, 'requires' => { 'Dist::Zilla' => '5.000', 'Dist::Zilla::Plugin::Authority' => '1.009', 'Dist::Zilla::Plugin::AuthorityFromModule' => '0.002', 'Dist::Zilla::Plugin::AutoMetaResources' => '0', 'Dist::Zilla::Plugin::AutoPrereqs' => '5.038', 'Dist::Zilla::Plugin::BumpVersionAfterRelease::Transitional' => '0.004', 'Dist::Zilla::Plugin::CheckIssues' => '0', 'Dist::Zilla::Plugin::CheckPrereqsIndexed' => '0', 'Dist::Zilla::Plugin::CheckSelfDependency' => '0', 'Dist::Zilla::Plugin::CheckStrictVersion' => '0', 'Dist::Zilla::Plugin::ConfirmRelease' => '0', 'Dist::Zilla::Plugin::CopyFilesFromRelease' => '0', 'Dist::Zilla::Plugin::Deprecated' => '0', 'Dist::Zilla::Plugin::FileFinder::ByName' => '0', 'Dist::Zilla::Plugin::GenerateFile::ShareDir' => '0', 'Dist::Zilla::Plugin::Git::Check' => '0', 'Dist::Zilla::Plugin::Git::CheckFor::CorrectBranch' => '0.004', 'Dist::Zilla::Plugin::Git::CheckFor::MergeConflicts' => '0', 'Dist::Zilla::Plugin::Git::Commit' => '2.020', 'Dist::Zilla::Plugin::Git::Contributors' => '0.004', 'Dist::Zilla::Plugin::Git::Describe' => '0.004', 'Dist::Zilla::Plugin::Git::GatherDir' => '2.016', 'Dist::Zilla::Plugin::Git::Push' => '0', 'Dist::Zilla::Plugin::Git::Remote::Check' => '0', 'Dist::Zilla::Plugin::Git::Tag' => '0', 'Dist::Zilla::Plugin::GitHub::Update' => '0.40', 'Dist::Zilla::Plugin::GithubMeta' => '0.54', 'Dist::Zilla::Plugin::InstallGuide' => '0', 'Dist::Zilla::Plugin::Keywords' => '0.004', 'Dist::Zilla::Plugin::License' => '5.038', 'Dist::Zilla::Plugin::MakeMaker::Fallback' => '0.012', 'Dist::Zilla::Plugin::Manifest' => '0', 'Dist::Zilla::Plugin::MetaConfig' => '0', 'Dist::Zilla::Plugin::MetaJSON' => '0', 'Dist::Zilla::Plugin::MetaNoIndex' => '0', 'Dist::Zilla::Plugin::MetaProvides::Package' => '1.15000002', 'Dist::Zilla::Plugin::MetaResources' => '0', 'Dist::Zilla::Plugin::MetaTests' => '0', 'Dist::Zilla::Plugin::MetaYAML' => '0', 'Dist::Zilla::Plugin::MinimumPerl' => '1.006', 'Dist::Zilla::Plugin::ModuleBuildTiny::Fallback' => '0.018', 'Dist::Zilla::Plugin::MojibakeTests' => '0.8', 'Dist::Zilla::Plugin::NextRelease' => '5.033', 'Dist::Zilla::Plugin::PodSyntaxTests' => '0', 'Dist::Zilla::Plugin::PodWeaver' => '4.005', 'Dist::Zilla::Plugin::Prereqs' => '0', 'Dist::Zilla::Plugin::Prereqs::AuthorDeps' => '0', 'Dist::Zilla::Plugin::PromptIfStale' => '0', 'Dist::Zilla::Plugin::Readme' => '0', 'Dist::Zilla::Plugin::ReadmeAnyFromPod' => '0.142180', 'Dist::Zilla::Plugin::RewriteVersion::Transitional' => '0.004', 'Dist::Zilla::Plugin::Run::AfterBuild' => '0.038', 'Dist::Zilla::Plugin::Run::AfterRelease' => '0.038', 'Dist::Zilla::Plugin::RunExtraTests' => '0.024', 'Dist::Zilla::Plugin::StaticInstall' => '0.005', 'Dist::Zilla::Plugin::Test::CPAN::Changes' => '0.008', 'Dist::Zilla::Plugin::Test::ChangesHasContent' => '0', 'Dist::Zilla::Plugin::Test::CheckBreaks' => '0', 'Dist::Zilla::Plugin::Test::CleanNamespaces' => '0.006', 'Dist::Zilla::Plugin::Test::Compile' => '2.039', 'Dist::Zilla::Plugin::Test::EOL' => '0.17', 'Dist::Zilla::Plugin::Test::Kwalitee' => '2.10', 'Dist::Zilla::Plugin::Test::MinimumVersion' => '2.000003', 'Dist::Zilla::Plugin::Test::NoTabs' => '0.08', 'Dist::Zilla::Plugin::Test::Pod::No404s' => '1.002', 'Dist::Zilla::Plugin::Test::PodSpelling' => '2.006001', 'Dist::Zilla::Plugin::Test::Portability' => '0', 'Dist::Zilla::Plugin::Test::ReportPrereqs' => '0.019', 'Dist::Zilla::Plugin::TestRelease' => '0', 'Dist::Zilla::Plugin::UploadToCPAN' => '0', 'Dist::Zilla::PluginBundle::Author::ETHER' => '0.094', 'File::Spec' => '0', 'IO::Handle' => '0', 'IPC::Open3' => '0', 'MooseX::Meta::Method::Authorized' => '0', 'MooseX::Meta::Method::Transactional' => '0', 'Pod::Wordlist' => '0', 'Software::License::Perl_5' => '0', 'Test::CPAN::Changes' => '0.19', 'Test::CPAN::Meta' => '0', 'Test::CleanNamespaces' => '0.15', 'Test::EOL' => '0', 'Test::Kwalitee' => '1.21', 'Test::Mojibake' => '0', 'Test::Moose' => '0', 'Test::More' => '0.96', 'Test::NoTabs' => '0', 'Test::Pod' => '1.41', 'Test::Pod::No404s' => '0', 'Test::Spelling' => '0.12', 'blib' => '1.01', 'perl' => '5.006' } }, 'runtime' => { 'requires' => { 'B::Hooks::EndOfScope' => '0.10', 'Carp' => '0', 'Context::Preserve' => '0', 'Devel::Declare' => '0.005011', 'Devel::Declare::Context::Simple' => '0', 'Eval::Closure' => '0', 'Module::Runtime' => '0.012', 'Moose' => '0.89', 'Moose::Meta::Class' => '0', 'Moose::Meta::Method' => '0', 'Moose::Util' => '0', 'Moose::Util::TypeConstraints' => '0', 'MooseX::LazyRequire' => '0.06', 'MooseX::Meta::TypeConstraint::ForceCoercion' => '0', 'MooseX::Types' => '0.35', 'MooseX::Types::Moose' => '0.19', 'MooseX::Types::Structured' => '0.24', 'MooseX::Types::Util' => '0', 'Parse::Method::Signatures' => '1.003014', 'Parse::Method::Signatures::Param::Named' => '0', 'Parse::Method::Signatures::Param::Placeholder' => '0', 'Parse::Method::Signatures::TypeConstraint' => '0', 'Parse::Method::Signatures::Types' => '0', 'Scalar::Util' => '0', 'Sub::Name' => '0', 'Task::Weaken' => '0', 'Text::Balanced' => '0', 'aliased' => '0', 'if' => '0', 'namespace::autoclean' => '0', 'perl' => '5.006', 'strict' => '0', 'warnings' => '0' } }, 'test' => { 'recommends' => { 'CPAN::Meta' => '2.120900' }, 'requires' => { 'ExtUtils::MakeMaker' => '0', 'File::Spec' => '0', 'Moose::Role' => '0', 'Test::Deep' => '0', 'Test::Fatal' => '0', 'Test::Moose' => '0', 'Test::More' => '0.89', 'attributes' => '0', 'lib' => '0', 'metaclass' => '0', 'namespace::clean' => '0.19', 'perl' => '5.006' } } }; $x; }MooseX-Method-Signatures-0.49/t/00-report-prereqs.t000644 000766 000024 00000012757 12605070147 022350 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( Dist::CheckConflicts ); 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: MooseX-Method-Signatures-0.49/t/attributes.t000644 000766 000024 00000000756 12605070147 021323 0ustar00etherstaff000000 000000 use strict; use warnings; use Test::More tests => 2; use attributes; use MooseX::Method::Signatures; my $attrs; my $cb_called; sub MODIFY_CODE_ATTRIBUTES { my ($pkg, $code, @attrs) = @_; $cb_called = 1; $attrs = \@attrs; return (); } method moo ($a, $b) : Bar Baz(fubar) { } method foo : Bar :Moo(:Ko{oh) : Baz(fu{bar:): { return {} } ok($cb_called, 'attribute handler got called'); is_deeply($attrs, [qw/Bar Moo(:Ko{oh) Baz(fu{bar:)/], '... with the right attributes'); MooseX-Method-Signatures-0.49/t/basic.t000644 000766 000024 00000004640 12605070147 020212 0ustar00etherstaff000000 000000 use strict; use warnings; use Test::More 0.89; use Test::Fatal; use lib 't/lib'; use TestClass; use TestClassWithMxTypes; ok(exception { TestClass->new }); ok(exception { TestClass->new('moo', 23) }); ok(exception { TestClass->new('moo', 8) }); is(exception { TestClass->new('moo', 52) }, undef); my $o = TestClass->new('foo'); isa_ok($o, 'TestClass'); is($o->{foo}, 'foo'); is($o->{bar}, 42); is(exception { $o->set_bar(23) }, undef); is($o->{bar}, 23); ok(exception { $o->set_bar('bar') }); { my $test_hash = { foo => 1 }; is(exception { $o->affe($test_hash) }, undef); is_deeply($o->{baz}, $test_hash); } { my $test_array = [qw/a b c/]; is(exception { $o->affe($test_array) }, undef); is_deeply($o->{baz}, $test_array); } ok(exception { $o->affe('foo') }); ok(exception { $o->named }); ok(exception { $o->named(optional => 42) }); like(exception { $o->named }, qr/\b at \b .* \b line \s+ \d+/x, "dies with proper exception"); is(exception { is_deeply( [$o->named(required => 23)], [undef, 23], ); }, undef); is(exception { is_deeply( [$o->named(optional => 42, required => 23)], [42, 23], ); }, undef); ok(exception { $o->combined(1, 2) }); ok(exception { $o->combined(1, required => 2) }); is(exception { is_deeply( [$o->combined(1, 2, 3, required => 4, optional => 5)], [1, 2, 3, 5, 4], ); }, undef); is(exception { $o->with_coercion({}) }, undef); ok(exception { $o->without_coercion({}) }); is(exception { $o->named_with_coercion(foo => bless({}, 'MyType')) }, undef); is(exception { $o->named_with_coercion(foo => {}) }, undef); is(exception { $o->optional_with_coercion() }, undef); { is(exception { $o->default_with_coercion() }, undef, 'Complex default with coercion' ); } # MooseX::Meta::Signature::Combined bug? optional positional can't be omitted #lives_ok(sub { $o->combined(1, 2, required => 3) }); #lives_ok(sub { $o->combined(1, 2, required => 3, optional => 4) }); use MooseX::Method::Signatures; my $anon = method ($foo, $bar) { }; isa_ok($anon, 'Moose::Meta::Method'); my $mxt = TestClassWithMxTypes->new(); ok(exception { $mxt->with_coercion() }); is(exception { $mxt->with_coercion('Str') }, undef); isa_ok( $mxt->with_coercion('Str'), q/Moose::Meta::TypeConstraint/ ); is(exception { $mxt->optional_with_coercion() }, undef); is(exception { $mxt->optional_with_coercion('Str') }, undef); done_testing; MooseX-Method-Signatures-0.49/t/caller.t000644 000766 000024 00000000332 12605070147 020365 0ustar00etherstaff000000 000000 use strict; use warnings; use Test::More tests => 2; use lib 't/lib'; use_ok("TestClass"); my $callstack = TestClass->callstack(); unlike $callstack, qr/Test::Class::.*?__ANON__/, "No anon methods in call chain"; MooseX-Method-Signatures-0.49/t/closure.t000644 000766 000024 00000001105 12605070147 020576 0ustar00etherstaff000000 000000 use strict; use warnings; use Test::More; { package Foo; use Moose; use MooseX::Method::Signatures; for my $meth (qw/foo bar baz/) { Foo->meta->add_method("anon_$meth" => method (Str $bar) { $meth . $bar }); method "str_$meth" (Str $bar) { $meth . $bar } } } can_ok('Foo', map { ("anon_$_", "str_$_") } qw/foo bar baz/); my $foo = Foo->new; for my $meth (qw/foo bar baz/) { is($foo->${\"anon_$meth"}('bar'), $meth . 'bar'); is($foo->${\"str_$meth"}('bar'), $meth . 'bar'); } done_testing; MooseX-Method-Signatures-0.49/t/declarators.t000644 000766 000024 00000002562 12605070147 021435 0ustar00etherstaff000000 000000 use strict; use warnings; use Test::More tests => 16; package MultipleDeclarators; use Moose; use MooseX::Method::Signatures mtfnpy => ['CodeRef $flarg'], qperty => ['Str $goof'], zorbwf => ['HashRef $hakh']; use Test::More; mtfnpy foo (Int $yarg) { ok(defined($self), '$self is defined'); ok(defined($flarg), '$flarg is defined'); ok(defined($yarg), '$yarg is defined'); is(ref($flarg), 'CODE', '$flarg is a coderef'); is($yarg, 1, '$yarg is 1'); } qperty bar (ClassName $floof: Int $yarg) { ok(defined($goof), '$goof is defined'); ok(defined($floof), '$floof is defined'); ok(defined($yarg), '$yarg is defined'); is($goof, 'HELLO', '$goof is HELLO'); is($floof, 'MultipleDeclarators', '$floof is a class name'); is($yarg, 1, '$yarg is 1'); } zorbwf baz (Int $yarg) { ok(defined($self), '$self is defined'); ok(defined($hakh), '$hakh is defined'); ok(defined($yarg), '$yarg is defined'); is(ref($hakh), 'HASH', '$hahk is a HashRef'); is($yarg, 1, '$yarg is 1'); } package main; my $md = MultipleDeclarators->new(); my ($mtfnpy, $qperty, $zorbwf); { no strict 'refs'; $mtfnpy = *{'MultipleDeclarators::foo'}; $qperty = *{'MultipleDeclarators::bar'}; $zorbwf = *{'MultipleDeclarators::baz'}; } $mtfnpy->(sub { 1 }, $md, 1); $qperty->('HELLO', 'MultipleDeclarators', 1); $zorbwf->({}, $md, 1); MooseX-Method-Signatures-0.49/t/errors.t000644 000766 000024 00000001221 12605070147 020435 0ustar00etherstaff000000 000000 use strict; use warnings; use Test::More; use lib 't/lib'; eval "use InvalidCase01;"; ok($@, "Got an error"); TODO: { local $TODO = 'Devel::Declare and Eval::Closure have unresolved issues' if Eval::Closure->VERSION > 0.06; like($@, qr/^Global symbol "\$op" requires explicit package name .*?\bInvalidCase01.pm line 8\b/, "Sane error message for syntax error"); } { my $warnings = ""; local $SIG{__WARN__} = sub { $warnings .= $_[0] }; eval "use Redefined;"; is($@, '', "No error"); like($warnings, qr/^Method meth1 redefined on package main .*?\bRedefined.pm line 9\b/, "Redefined method warning"); } done_testing; MooseX-Method-Signatures-0.49/t/eval.t000644 000766 000024 00000001135 12605070147 020054 0ustar00etherstaff000000 000000 use strict; use warnings; use Test::More tests => 3; # last test to print use MooseX::Method::Signatures; my $evalcode = do { local $/ = undef; ; }; ok( do { my $r = eval $evalcode; die $@ if not $r; 1; }, 'Basic Eval Moose' ); my $foo = foo->new({}); is ($foo->example (), 1, 'First method declared'); is ($foo->example2(), 2, 'Second method declared (after injected semicolon)'); __DATA__ { package foo; use Moose; use MooseX::Method::Signatures; method example { 1 } # look Ma, no semicolon! method example2 { 2 } } 1; MooseX-Method-Signatures-0.49/t/lib/000700 000766 000024 00000000000 12605070147 017474 5ustar00etherstaff000000 000000 MooseX-Method-Signatures-0.49/t/list.t000644 000766 000024 00000005176 12605070147 020111 0ustar00etherstaff000000 000000 use strict; use warnings; use Test::More tests => 25; use Test::Fatal; use MooseX::Method::Signatures; my $o = bless {} => 'Foo'; { my %meths = ( rest_list => method ($foo, $bar, @rest) { return join q{,}, @rest; }, rest_named => method ($foo, $bar, %rest) { return join q{,}, map { $_ => $rest{$_} } sort keys %rest; }, ); for my $meth_name (keys %meths) { my $meth = $meths{$meth_name}; like(exception { $o->${\$meth->body}() }, qr/^Validation failed/, "$meth_name dies without args"); like(exception { $o->${\$meth->body}('foo') }, qr/^Validation failed/, "$meth_name dies with one arg"); is(exception { is($o->${\$meth->body}('foo', 'bar'), q{}, "$meth_name - empty \@rest list"); }, undef, '...and validates'); is(exception { is($o->${\$meth->body}('foo', 'bar', 1 .. 6), q{1,2,3,4,5,6}, "$meth_name - non-empty \@rest list"); }, undef, '...and validates'); } } { my $meth = method (Str $foo, Int $bar, Int @rest) { return join q{,}, @rest; }; is(exception { is($o->${\$meth->body}('foo', 42), q{}, 'empty @rest list passed through'); }, undef, '...and validates'); is(exception { is($o->${\$meth->body}('foo', 42, 23, 13), q{23,13}, 'non-empty int @rest list passed through'); }, undef, '...and validates'); like(exception { $o->${\$meth->body}('foo', 42, 'moo', 13, 'non-empty str @rest list passed through'); }, qr/^Validation failed/, "...and doesn't validate"); } { my $meth = method (ArrayRef[Int] @foo) { return join q{,}, map { @{ $_ } } @foo; }; is(exception { is($o->${\$meth->body}([42, 23], [12], [18]), '42,23,12,18', 'int lists passed through'); }, undef, '...and validates'); like(exception { $o->${\$meth->body}([42, 23], 12, [18]); }, qr/Validation failed/, "int doesn't validate against int list"); } { my $meth = method (Str $foo, Int @) {}; is(exception { $meth->($o, 'foo') }, undef, 'empty unnamed list validates'); is(exception { $meth->($o, 'foo', 42) }, undef, '1 element of unnamed list validates'); is(exception { $meth->($o, 'foo', 42, 23) }, undef, '2 elements of unnamed list validates'); } { eval 'my $meth = method (:$foo, :@bar) { }'; like $@, qr/arrays or hashes cannot be named/i, 'arrays or hashes cannot be named'; eval 'my $meth = method ($foo, @bar, :$baz) { }'; like $@, qr/named parameters cannot be combined with slurpy positionals/i, 'named parameters cannot be combined with slurpy positionals'; } MooseX-Method-Signatures-0.49/t/meta.t000644 000766 000024 00000004134 12605070147 020055 0ustar00etherstaff000000 000000 use strict; use warnings; use Test::More tests => 14; use Test::Fatal; use MooseX::Method::Signatures::Meta::Method; { package Foo; use metaclass; my $method = MooseX::Method::Signatures::Meta::Method->wrap( sub { my ($class, $foo, $bar) = @_; return $bar x $foo; }, signature => '($class: Int :$foo, Str :$bar)', package_name => 'Foo', name => 'bar', ); ::isa_ok($method, 'Moose::Meta::Method'); Foo->meta->add_method(bar => $method); } is(exception { is(Foo->bar(foo => 3, bar => 'baz'), 'bazbazbaz'); }, undef); ok(exception { Foo->bar(foo => 'moo', bar => 'baz'); }); # Makes sure we still support the old API. { package Bar; use metaclass; my $method = MooseX::Method::Signatures::Meta::Method->wrap( signature => '($class: Int :$foo, Str :$bar)', package_name => __PACKAGE__, name => 'bar', body => sub { my ($class, $foo, $bar) = @_; return $bar x $foo; }, ); ::isa_ok($method, 'Moose::Meta::Method'); Bar->meta->add_method(bar => $method); } is(exception { is(Bar->bar(foo => 3, bar => 'baz'), 'bazbazbaz'); }, undef); ok(exception { Bar->bar(foo => 'moo', bar => 'baz'); }); # CatalystX::Declare seems to create a method without a code at all. is(exception { package Baz; use metaclass; my $method = MooseX::Method::Signatures::Meta::Method->wrap( signature => '($class: Int :$foo, Str :$bar)', package_name => __PACKAGE__, name => 'baz', ); ::isa_ok($method, 'Moose::Meta::Method'); # CatalystX::Declare uses reify directly. too bad. my $other = $method->reify ( actual_body => sub { my ($self, $foo, $bar) = @_; return $bar x $foo; }, ); ::isa_ok($method, 'Moose::Meta::Method'); Baz->meta->add_method(baz => $other); }, undef); is(exception { is(Baz->baz(foo => 3, bar => 'baz'), 'bazbazbaz'); }, undef); ok(exception { Baz->baz(foo => 'moo', bar => 'baz'); }); MooseX-Method-Signatures-0.49/t/method-trait.t000644 000766 000024 00000001442 12605070147 021527 0ustar00etherstaff000000 000000 use strict; use warnings; use Test::More; use Test::Moose; { package Bar; use Moose::Role; BEGIN { $INC{'Bar.pm'} = 1; } } { package Baz; use Moose::Role; BEGIN { $INC{'Baz.pm'} = 1; } } { package Foo; use Moose; use MooseX::Method::Signatures; BEGIN { $INC{'Foo.pm'} = 1; } method bar ($baz) does Bar { $baz } method bla ($baz) does Bar does Baz { $baz } method boo ($baz) does (Bar, Baz) { $baz } } my $o = Foo->new; can_ok($o, 'bar'); my $method = Foo->meta->get_method('bar'); does_ok($method, 'Bar'); can_ok($o, 'bla'); $method = Foo->meta->get_method('bla'); does_ok($method, 'Bar'); does_ok($method, 'Baz'); can_ok($o, 'boo'); $method = Foo->meta->get_method('boo'); does_ok($method, 'Bar'); does_ok($method, 'Baz'); done_testing; MooseX-Method-Signatures-0.49/t/named_defaults.t000644 000766 000024 00000000361 12605070147 022100 0ustar00etherstaff000000 000000 use strict; use warnings; use Test::More; { package Foo; use Moose; use MooseX::Method::Signatures; method bar (:$baz = 42) { $baz } } my $o = Foo->new; is($o->bar, 42); is($o->bar(baz => 0xaffe), 0xaffe); done_testing; MooseX-Method-Signatures-0.49/t/no_signature.t000644 000766 000024 00000000615 12605070147 021624 0ustar00etherstaff000000 000000 use strict; use warnings; use Test::More; use Test::Fatal; { package Foo; use Moose; use MooseX::Method::Signatures; method bar { 42 } } my $foo = Foo->new; is(exception { $foo->bar }, undef, 'method without signature succeeds when called without args'); is(exception { $foo->bar(42) }, undef, 'method without signature succeeds when called with args'); done_testing; MooseX-Method-Signatures-0.49/t/placeholders.t000644 000766 000024 00000000560 12605070147 021573 0ustar00etherstaff000000 000000 use strict; use warnings; use Test::More tests => 4; use Test::Fatal; use MooseX::Method::Signatures; my $o = bless {} => 'Foo'; my $meth = method ($, $, $foo, $, $bar, $) { return $foo . $bar; }; isa_ok($meth, 'Moose::Meta::Method'); ok(exception { $meth->($o, 1, 2, 3, 4, 5); }); is(exception { is($meth->($o, 1, 2, 3, 4, 5, 6), 35); }, undef); 1; MooseX-Method-Signatures-0.49/t/precedence.t000644 000766 000024 00000000332 12605070147 021220 0ustar00etherstaff000000 000000 use strict; use warnings; use Test::More tests => 4; use MooseX::Method::Signatures; my @methods = (method { 1 }, method { 2 }, method { 3 }); is(scalar @methods, 3); isa_ok($_, 'Moose::Meta::Method') for @methods; MooseX-Method-Signatures-0.49/t/quoted_name.t000644 000766 000024 00000000327 12605070147 021430 0ustar00etherstaff000000 000000 use strict; use warnings; use Test::More tests => 2; use MooseX::Method::Signatures; my $foo = 'bar'; method "$foo" ($class:) { $foo } my $meth = __PACKAGE__->can($foo); ok($meth); is(__PACKAGE__->$meth, $foo); MooseX-Method-Signatures-0.49/t/return_value.t000644 000766 000024 00000001163 12605070147 021641 0ustar00etherstaff000000 000000 use strict; use warnings; use Test::More tests => 5; use Test::Fatal; use MooseX::Method::Signatures; my $o = bless {} => 'Foo'; { my $meth = method (Str $foo, Int $bar) returns (ArrayRef[Str]) { return [($foo) x $bar]; }; isa_ok($meth, 'Moose::Meta::Method'); ok(exception { $o->${\$meth->body}('foo') }); is(exception { my $ret = $o->${\$meth->body}('foo', 3); is_deeply($ret, [('foo') x 3]); }, undef); } { my $meth = method (Str $foo) returns (Int) { return 42.5; }; ok(exception { my $x = $o->${\$meth->body}('foo'); }); } MooseX-Method-Signatures-0.49/t/signatures.t000600 000766 000024 00000012474 12605070147 021311 0ustar00etherstaff000000 000000 use strict; use warnings; use Test::More; use MooseX::Method::Signatures; { package Bar::Foo; use Moose; } my $ISTODO = 1; my $ISFAIL = 2; # == 0 disables TODO mode my $dotodo = 1; my @signatures; @signatures = ( # basic tests. [ 0, '$arg', 'Optional(implicit) Positional' ], #1 [ 0, '$arg?', 'Optional Positional' ], [ 0, '$arg!', 'Required Positional' ], [ 0, ':$arg', 'Required(implicit) Named' ], [ 0, ':$arg?', 'Optional Named' ], [ 0, ':$arg!', 'Required Named' ], #6 # type tests [ 0, 'Str $arg', 'Positional String Type' ], #7 [ 0, 'Int $arg', 'Positional Int Type' ], [ 0, 'Bar::Foo $arg', 'Positional Class Type' ], [ 0, 'Str :$arg', 'Named String Type' ], [ 0, 'Int :$arg', 'Named Int Type' ], [ 0, 'Bar::Foo :$arg', 'Named Class Type' ], #12 # coerce does tests [ 0, 'Str $arg does coerce', 'COERCE Positional String Type' ], # 13 [ 0, 'Int $arg does coerce ', 'COERCE Positional Int Type' ], [ 0, 'Bar::Foo $arg does coerce', 'COERCE Positi Class Type' ], [ 0, 'Str :$arg does coerce', 'COERCE Named String Type' ], [ 0, 'Int :$arg does coerce', 'COERCE Named Int Type' ], [ 0, 'Bar::Foo :$arg does coerce', 'COERCE Named Class Type' ], [ 0, ':$arg does coerce', 'COERCE Named ' ], [ 0, '$arg does coerce', 'COERCE Postional ' ], # 20 # coerce is tests [ 0, 'Str $arg does coerce', 'COERCE_IS Positional String Type' ], #21 [ 0, 'Int $arg does coerce ', 'COERCE_IS Positional Int Type' ], [ 0, 'Bar::Foo $arg does coerce', 'COERCE_IS Positi Class Type' ], [ 0, 'Str :$arg does coerce', 'COERCE_IS Named String Type' ], [ 0, 'Int :$arg does coerce', 'COERCE_IS Named Int Type' ], [ 0, 'Bar::Foo :$arg does coerce', 'COERCE_IS Named Class Type' ], [ 0, ':$arg does coerce', 'COERCE_IS Named ' ], [ 0, '$arg does coerce', 'COERCE_IS Postional ' ], # 28 # coerce is where tests [ 0, 'Str $arg does coerce where { 1 } ', 'COERCE_WHERE Positional String Type' ], #29 [ 0, 'Int $arg does coerce where { 1 } ', 'COERCE_WHERE Positional Int Type' ], [ 0, 'Bar::Foo $arg does coerce where { 1 }', 'COERCE_WHERE Positi Class Type' ], [ 0, 'Str :$arg does coerce where { 1 }', 'COERCE_WHERE Named String Type' ], [ 0, 'Int :$arg does coerce where { 1 }', 'COERCE_WHERE Named Int Type' ], [ 0, 'Bar::Foo :$arg does coerce where { 1 }', 'COERCE_WHERE Named Class Type' ], [ 0, ':$arg does coerce where { 1 } ', 'COERCE_WHERE Named ' ], [ 0, '$arg does coerce where { 1 }', 'COERCE_WHERE Postional ' ], # 36 # where tests [ 0, 'Str $arg where { 1 } ', 'WHERE Positional String Type' ], #37 [ 0, 'Int $arg where { 1 } ', 'WHERE Positional Int Type' ], [ 0, 'Bar::Foo $arg where { 1 }', 'WHERE Positi Class Type' ], [ 0, 'Str :$arg where { 1 }', 'WHERE Named String Type' ], [ 0, 'Int :$arg where { 1 }', 'WHERE Named Int Type' ], [ 0, 'Bar::Foo :$arg where { 1 }', 'WHERE Named Class Type' ], [ 0, ':$arg where { 1 } ', 'WHERE Named ' ], [ 0, '$arg where { 1 }', 'WHERE Postional ' ], # 44 # defaults tests. [ 0, '$arg = 42', 'Default+ Optional(implicit) Positional' ], #45 [ 0, '$arg? = 42', 'Default+ Optional Positional' ], [ 0, '$arg! = 42', 'Default+ Required Positional' ], [ 0, ':$arg = 42', 'Default+ Required(implicit) Named' ], [ 0, ':$arg? = 42', 'Default+ Optional Named' ], [ 0, ':$arg! = 42', 'Default+ Required Named' ], #50 # invocant tests. [ 0, '$self: $arg', 'Invocant + Positional ' ], #51 [ 0, '$class: $arg', 'Nondefault Invocant + Positional ' ], [ 0, '$self: :$arg', 'Invocant + Named ' ], #53 [ 0, '$class: :$arg', 'Nondefault Invocant + Named ' ], # label tests . [ 0, ':foo($arg)', 'Label' ], #55 ); plan tests => $#signatures + 1; # --------[ EXECUTE ]------------------------------------------------------- # my $template = do { local $/ = undef; }; my $package_iteration = 'A'; for my $test (@signatures) { my $pkg = $package_iteration; $package_iteration++; my ( $stability, $signature, $description ) = @{$test}; my $dotest = sub { my $code = sprintf $template, $pkg, $signature, '$arg'; my $message = "$description (Test: $pkg Syntax: '( $signature )') "; my $res = 1; $res = eval $code; if ( $@ eq '' ) { pass($message); } else { fail($message) #. "\n------\n$@\n--------\n" ); } }; if ( $dotodo && ( $stability & $ISTODO ) ) { TODO: { local $TODO = 'Signatures/Coercion Support'; $dotest->(); } } else { $dotest->(); } } __DATA__ { package %s; use Moose; use MooseX::Method::Signatures; use Moose::Util::TypeConstraints; method alpha ( %s ){ return %s; }; } MooseX-Method-Signatures-0.49/t/sigs-optional.t000644 000766 000024 00000000534 12605070147 021717 0ustar00etherstaff000000 000000 use strict; use warnings; use Test::More tests => 4; { package Optional; use MooseX::Method::Signatures; method foo ($class: $arg?) { $arg; } method bar ($class: $hr = {}) { ++$hr->{bar}; } } is( Optional->foo(), undef); is( Optional->foo(1), 1); is( Optional->bar(), 1); is( Optional->bar({bar=>1}), 2); MooseX-Method-Signatures-0.49/t/structured.t000600 000766 000024 00000003542 12605070147 021325 0ustar00etherstaff000000 000000 use strict; use warnings; use Test::More tests => 18; use Moose::Util::TypeConstraints; use MooseX::Types::Moose qw/Any Object Maybe Str Int/; use MooseX::Types::Structured qw/Dict Tuple Optional/; use MooseX::Method::Signatures; my $o = bless {}, 'Class'; { # ($foo, $bar?) my $meth = method ($foo, $bar?) { $bar ||= 'default'; return "${\ref $self} ${foo} ${bar}"; }; my $expected = Tuple[Tuple[Object,Any,Optional[Any]], Dict[]]; is($meth->type_constraint->name, $expected->name); eval { is($o->${\$meth->body}('foo', 'bar'), 'Class foo bar'); }; ok(!$@); eval { is($o->${\$meth->body}('foo'), 'Class foo default'); }; ok(!$@); eval { $o->${\$meth->body}(); }; ok($@); } { my $meth = method (:$foo!, :$bar) { $bar ||= 'default'; return "${\ref $self} ${foo} ${bar}"; }; my $expected = Tuple[Tuple[Object], Dict[foo => Any, bar => Optional[Any]]]; is($meth->type_constraint->name, $expected->name); eval { is($o->${\$meth->body}(foo => 1, bar => 2), 'Class 1 2'); }; ok(!$@); eval { is($o->${\$meth->body}(foo => 1), 'Class 1 default'); }; ok(!$@); eval { $o->${\$meth->body}(foo => 1, bar => 2, baz => 3); }; ok($@); eval { $o->${\$meth->body}(bar => 1); }; ok($@); eval { $o->${\$meth->body}(); }; ok($@); } { my $meth = method ($class: Str $foo, Int $bar where { $_ % 2 == 0 }) { return "${class} ${foo} ${bar}"; }; my $expected = Tuple[Tuple[Any, Str, subtype(Int, where { $_ % 2 == 0 })], Dict[]]; is($meth->type_constraint->name, $expected->name); eval { is(Class->${\$meth->body}('foo', 42), 'Class foo 42'); }; ok(!$@); eval { Class->${\$meth->body}('foo', 23); }; ok($@); } MooseX-Method-Signatures-0.49/t/synopsis.t000644 000766 000024 00000005305 12605070147 021017 0ustar00etherstaff000000 000000 use strict; use warnings; use Test::More; use Test::Fatal; { package Foo; use Moose; use MooseX::Method::Signatures; method morning (Str $name) { return "Good morning ${name}!"; } method hello (Str :$who, Int :$age where { $_ > 0 }) { return "Hello ${who}, I am ${age} years old!"; } method greet (Str $name, Bool :$excited = 0) { if ($excited) { return "GREETINGS ${name}!"; } else { return "Hi ${name}!"; } } package SomeClass; use Moose; use MooseX::Method::Signatures; method foo ( SomeClass $thing where { $_->can('stuff') }: Str $bar = "apan", Int :$baz! = 42 where { $_ % 2 == 0 } where { $_ > 10 } ) { return $bar . ':' . $baz } method stuff { } # the invocant is called $thing, must be an instance of SomeClass and # has to implement a 'stuff' method # $bar is positional, required, must be a string and defaults to "apan" # $baz is named, required, must be an integer, defaults to 42 and needs # to be even and greater than 10 } my $foo = Foo->new; isa_ok($foo, 'Foo'); is(exception { is $foo->morning('Resi'), 'Good morning Resi!' }, undef, 'positional str arg'); is(exception { is $foo->hello(who => 'world', age => 42), 'Hello world, I am 42 years old!' }, undef, 'two named args'); is(exception { is $foo->greet('Resi', excited => 1), 'GREETINGS Resi!' }, undef, 'positional and named args (with named default)'); like(exception { $foo->hello(who => 'world', age => 'fortytwo') }, qr/Validation failed/, 'Str, Str sent to Str, Int'); like(exception { $foo->hello(who => 'world', age => -23) }, qr/Validation failed/, 'Int violates where'); like(exception { $foo->morning }, qr/Validation failed/, 'no required (positional) arg passed'); like(exception { $foo->greet }, qr/Validation failed/, 'no required (positional) arg passed'); my $someclass = SomeClass->new; isa_ok($someclass, 'SomeClass'); is(exception { is $someclass->foo, 'apan:42' }, undef, '$someclass->foo'); is(exception { is $someclass->foo('quux'), 'quux:42' }, undef, '$someclass->foo("quux")'); is(exception { is $someclass->foo('quux', baz => 12), 'quux:12' }, undef, '$someclass->foo("quux", baz => 12)'); like(exception { $someclass->foo(baz => 12) }, qr/Expected named arguments/, '$someclass->foo(baz => 12)'); like(exception { $someclass->foo(baz => 12, 'quux') }, qr/Validation failed/, '$someclass->foo(baz => 12, "quux")'); like(exception { $someclass->foo(baz => 41) }, qr/Expected named arguments/, '$someclass->foo(baz => 41)'); like(exception { $someclass->foo(baz => 44) }, qr/Expected named arguments/, '$someclass->foo(baz => 12)'); done_testing; MooseX-Method-Signatures-0.49/t/too_many_args.t000644 000766 000024 00000000450 12605070147 021765 0ustar00etherstaff000000 000000 use strict; use warnings; use Test::More; use Test::Fatal; { package Foo; use Moose; use MooseX::Method::Signatures; method foo ($bar) { $bar } } my $o = Foo->new; is(exception { $o->foo(42) }, undef); like(exception { $o->foo(42, 23) }, qr/Validation failed/); done_testing; MooseX-Method-Signatures-0.49/t/traits.t000644 000766 000024 00000002354 12605070147 020437 0ustar00etherstaff000000 000000 use strict; use warnings; use Test::More tests => 12; use lib 't/lib'; use TestClassTrait; use Moose::Util qw(does_role); my $c = TestClassTrait->new; my $method = $c->meta->get_method('method_with_trait'); isa_ok($method, 'MooseX::Method::Signatures::Meta::Method'); ok(does_role($method, 'MXMSMoody'), 'method has MXMSMoody trait'); cmp_ok($method->mood, 'eq', 'happy', 'method is happy'); my $tt_method = $c->meta->get_method('method_with_two_traits'); isa_ok($tt_method, 'MooseX::Method::Signatures::Meta::Method'); ok(does_role($tt_method, 'MXMSMoody'), 'method has MXMSMoody trait'); ok(does_role($tt_method, 'MXMSLabeled'), 'method has MXMSLabeled trait'); my $twois_method = $c->meta->get_method('method_with_two_is_traits'); ok(does_role($twois_method, 'MXMSMoody'), 'two is method has MXMSMoody trait'); ok(does_role($twois_method, 'MXMSLabeled'), 'two is method has MXMSLabeled trait'); my $param_method = $c->meta->get_method('method_with_two_is_param_traits'); ok(does_role($twois_method, 'MXMSMoody'), 'param method has MXMSMoody trait'); ok(does_role($twois_method, 'MXMSLabeled'), 'param method has MXMSLabeled trait'); ok($param_method->has_label, 'method has label'); cmp_ok($param_method->label, 'eq', 'happy', 'label is happy'); MooseX-Method-Signatures-0.49/t/type_alias.t000644 000766 000024 00000001036 12605070147 021257 0ustar00etherstaff000000 000000 use strict; use warnings; use Test::More; use Test::Fatal; use lib 't/lib'; { package TestClass; use Moose; use MooseX::Method::Signatures; use aliased 'My::Annoyingly::Long::Name::Space', 'Shortcut'; ::is(::exception { method alias_sig (Shortcut $affe) { } }, undef, 'method with aliased type constraint compiles'); } my $o = TestClass->new; my $affe = My::Annoyingly::Long::Name::Space->new; is(exception { $o->alias_sig($affe); }, undef, 'calling method with aliased type constraint'); done_testing; MooseX-Method-Signatures-0.49/t/types.t000600 000766 000024 00000001372 12605070147 020264 0ustar00etherstaff000000 000000 use strict; use warnings; use Test::More tests => 4; use Test::Fatal; { package MyTypes; use MooseX::Types::Moose qw/Str/; use MooseX::Types -declare => [qw/CustomType/]; BEGIN { subtype CustomType, as Str, where { length($_) == 2 }; } } { package TestClass; use MooseX::Method::Signatures; BEGIN { MyTypes->import('CustomType') }; use MooseX::Types::Moose qw/ArrayRef/; use namespace::clean 0.19; method foo (CustomType $bar) { } method bar (ArrayRef[CustomType] $baz) { } } my $o = bless {} => 'TestClass'; is(exception { $o->foo('42') }, undef); ok(exception { $o->foo('bar') }); is(exception { $o->bar(['42', '23']) }, undef); ok(exception { $o->bar(['foo', 'bar']) }); MooseX-Method-Signatures-0.49/t/undef_method_arg.t000644 000766 000024 00000001605 12605070147 022421 0ustar00etherstaff000000 000000 use strict; use warnings; use Test::More; use Test::Fatal; { package Foo; use Moose; use MooseX::Method::Signatures; method m1(:$bar!) { } method m2(:$bar?) { } method m3(:$bar ) { } method m4( $bar!) { } method m5( $bar?) { } method m6( $bar ) { } } my $foo = Foo->new; is(exception { $foo->m1(bar => undef) }, undef, 'Explicitly pass undef to named required arg'); is(exception { $foo->m2(bar => undef) }, undef, 'Explicitly pass undef to named explicit optional arg'); is(exception { $foo->m3(bar => undef) }, undef, 'Explicitly pass undef to named implicit optional arg'); is(exception { $foo->m4(undef) }, undef, 'Explicitly pass undef to required arg'); is(exception { $foo->m5(undef) }, undef, 'Explicitly pass undef to explicit required arg'); is(exception { $foo->m6(undef) }, undef, 'Explicitly pass undef to implicit required arg'); done_testing; MooseX-Method-Signatures-0.49/t/undef_method_arg2.t000644 000766 000024 00000003034 12605070147 022501 0ustar00etherstaff000000 000000 use strict; use warnings; # Can we distinguish between explicitly passing undef as an argument, # vs. not passing it at all? (in a plain hash, we would use defined vs. exists # on %args = @_.) # assigned to by each 'foo' method my $captured_args; { package Named; use Moose; use MooseX::Method::Signatures; method foo ( Str :$foo_a!, Maybe[Str] :$foo_b?) { $captured_args = \@_; } } { package Positional; use Moose; use MooseX::Method::Signatures; method foo ( Str $foo_a!, Maybe[Str] $foo_b?) { $captured_args = \@_; } } use Test::More; use Test::Deep; my $positional = Positional->new; $positional->foo('str', undef); cmp_deeply( $captured_args, [ noclass({}), 'str', undef, ], 'positional: explicit undef shows up in @_ correctly', ); $positional->foo('str'); cmp_deeply( $captured_args, [ noclass({}), 'str', ], 'positional: omitting an argument results in no entry in @_', ); my $named = Named->new; $named->foo(foo_a => 'str', foo_b => undef); cmp_deeply( $captured_args, [ noclass({}), 'str', undef, ], 'named: explicit undef shows up in @_ correctly', ); $named->foo(foo_a => 'str'); TODO: { local $TODO = 'this fails... should work the same as for positional args.'; cmp_deeply( $captured_args, [ noclass({}), 'str', ], 'named: omitting an argument results in no entry in @_', ); } done_testing; MooseX-Method-Signatures-0.49/t/where.t000644 000766 000024 00000004240 12605070147 020237 0ustar00etherstaff000000 000000 use strict; use warnings; use Test::More; use Test::Fatal; { package Foo::Bar; use Moose; has baz => (isa => 'Str', default => 'quux', is => 'ro'); package Foo; use Moose; use MooseX::Method::Signatures; method m1(Str $arg where { $_ eq 'foo' }) { $arg } method m2(Int $arg where { $_ == 1 }) { $arg } method m3(Foo::Bar $arg where { $_->baz eq 'quux' }) { $arg->baz } method m4(Str :$arg where { $_ eq 'foo' }) { $arg } method m5(Int :$arg where { $_ == 1 }) { $arg } method m6(Foo::Bar :$arg where { $_->baz eq 'quux' }) { $arg->baz } method m7($arg where { 1 }) { } method m8(:$arg where { 1 }) { } method m9(Str $arg = 'foo' where { $_ eq 'bar' }) { $arg } } my $foo = Foo->new; isa_ok($foo, 'Foo'); is(exception { is $foo->m1('foo'), 'foo' }, undef, 'where positional string type'); like(exception { $foo->m1('bar') }, qr/Validation failed/, 'where positional string type'); is(exception { is $foo->m2(1), 1 }, undef, 'where positional int type'); like(exception { $foo->m2(0) }, qr/Validation failed/, 'where positional int type'); is(exception { is $foo->m3(Foo::Bar->new), 'quux' }, undef, 'where positional class type'); like(exception { $foo->m3(Foo::Bar->new({ baz => 'affe' })) }, qr/Validation failed/, 'where positional class type'); is(exception { is $foo->m4(arg => 'foo'), 'foo' }, undef, 'where named string type'); like(exception { $foo->m4(arg => 'bar') }, qr/Validation failed/, 'where named string type'); is(exception { is $foo->m5(arg => 1), 1 }, undef, 'where named int type'); like(exception { $foo->m5(arg => 0) }, qr/Validation failed/, 'where named int type'); is(exception { is $foo->m6(arg => Foo::Bar->new), 'quux' }, undef, 'where named class type'); like(exception { $foo->m6(arg => Foo::Bar->new({ baz => 'affe' })) }, qr/Validation failed/, 'where named class type'); is(exception { $foo->m7(1) }, undef, 'where positional'); is(exception { $foo->m8(arg => 1) }, undef, 'where named'); is(exception { is $foo->m9('bar'), 'bar' }, undef, 'where positional string type with default'); like(exception { $foo->m9 }, qr/Validation failed/, 'where positional string type with default'); done_testing; MooseX-Method-Signatures-0.49/t/zzz-check-breaks.t000644 000766 000024 00000000634 12605070147 022305 0ustar00etherstaff000000 000000 use strict; use warnings; # this test was generated with Dist::Zilla::Plugin::Test::CheckBreaks 0.012 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'; } pass 'no x_breaks data to check'; done_testing; MooseX-Method-Signatures-0.49/t/lib/InvalidCase01.pm000644 000766 000024 00000000342 12605070147 022366 0ustar00etherstaff000000 000000 use MooseX::Method::Signatures; use strict; use warnings; use Carp qw/croak/; method meth1{ croak "Binary operator $op expects 2 children, got " . $#$_ if @{$_} > 3; } method meth2{ { "a" "b" } method meth3 {} 1; MooseX-Method-Signatures-0.49/t/lib/InvalidCase02.pm000644 000766 000024 00000000162 12605070147 022367 0ustar00etherstaff000000 000000 use MooseX::Method::Signatures; use strict; use warnings; method meth1 (SomeRandomTCThatDoesntExist $e) { } 1; MooseX-Method-Signatures-0.49/t/lib/MXMSLabeled.pm000644 000766 000024 00000000173 12605070147 022102 0ustar00etherstaff000000 000000 package MXMSLabeled; use Moose::Role; has label => ( is => 'rw', isa => 'Str', predicate => 'has_label' ); 1;MooseX-Method-Signatures-0.49/t/lib/MXMSMoody.pm000644 000766 000024 00000000172 12605070147 021640 0ustar00etherstaff000000 000000 package MXMSMoody; use Moose::Role; has mood => ( is => 'rw', isa => 'Str', default => sub { 'happy' } ); 1;MooseX-Method-Signatures-0.49/t/lib/My/000700 000766 000024 00000000000 12605070147 020061 5ustar00etherstaff000000 000000 MooseX-Method-Signatures-0.49/t/lib/Redefined.pm000644 000766 000024 00000000440 12605070147 021727 0ustar00etherstaff000000 000000 use MooseX::Method::Signatures; use strict; use warnings; use Carp qw/croak/; method meth1 {} method meth1 {} # this one should not trigger a redfined warning sub meth2 {} method meth2 {} # This one shouldn't either method meth3 {} { no warnings 'redefine'; method meth3 {} } 1; MooseX-Method-Signatures-0.49/t/lib/TestClass.pm000600 000766 000024 00000002456 12605070147 021750 0ustar00etherstaff000000 000000 use strict; use warnings; package TestClass; use Moose; use MooseX::Method::Signatures; use Moose::Util::TypeConstraints; method new ($class: Str $foo, Int $bar = 42 where { $_ % 2 == 0 } where { $_ > 10 }) { return bless { foo => $foo, bar => $bar, } => $class; } method foo { return $self->{foo}; } method set_bar (Int $bar) { $self->{bar} = $bar; } method affe (ArrayRef | HashRef $zomtec) { $self->{baz} = $zomtec; } method named (:$optional, :$required!) { return ($optional, $required); } method combined ($a, $b, $c?, :$optional, :$required!) { return ($a, $b, $c, $optional, $required); } method callstack_inner (ClassName $class:) { return Carp::longmess("Callstack is"); } method callstack (ClassName $class:) { return $class->callstack_inner; } BEGIN { class_type 'MyType'; coerce 'MyType', from 'HashRef', via { bless { %{$_} } => 'MyType' }; } method without_coercion (MyType $foo) { $foo } method with_coercion (MyType $foo does coerce) { $foo } method named_with_coercion (MyType :$foo does coerce) { $foo } method optional_with_coercion (MyType $foo? does coerce) { $foo } method default_with_coercion (MyType $foo={} does coerce) { $foo } no Moose; 1; MooseX-Method-Signatures-0.49/t/lib/TestClassTrait.pm000644 000766 000024 00000000720 12605070147 022754 0ustar00etherstaff000000 000000 package TestClassTrait; use Moose; use MooseX::Method::Signatures; use aliased 'MXMSLabeled', 'Label'; use aliased 'MXMSMoody', 'Moody'; method method_with_trait (Str :$name!) is Moody { return 1; } method method_with_two_traits () is (Moody, Label) { return 1; } method method_with_two_is_traits () is Moody is Label { return 1; } method method_with_two_is_param_traits () is Moody is Label(label => 'happy') { return 1; } no Moose; 1; MooseX-Method-Signatures-0.49/t/lib/TestClassWithMxTypes.pm000644 000766 000024 00000001054 12605070147 024137 0ustar00etherstaff000000 000000 use strict; use warnings; package TestClassWithMxTypes; use Moose; use MooseX::Method::Signatures; use MooseX::Types::Moose 'Str'; use MooseX::Types -declare => ['TypeConstraint']; BEGIN { subtype TypeConstraint, as class_type('Moose::Meta::TypeConstraint'); coerce TypeConstraint, from Str, via { find_type_constraint($_) }; } method new($class:) { return bless {}, $class } method with_coercion( TypeConstraint $type does coerce ) { return $type; } method optional_with_coercion( TypeConstraint $type? does coerce ) { return $type; } 1; MooseX-Method-Signatures-0.49/t/lib/My/Annoyingly/000700 000766 000024 00000000000 12605070147 022210 5ustar00etherstaff000000 000000 MooseX-Method-Signatures-0.49/t/lib/My/Annoyingly/Long/000700 000766 000024 00000000000 12605070147 023107 5ustar00etherstaff000000 000000 MooseX-Method-Signatures-0.49/t/lib/My/Annoyingly/Long/Name/000700 000766 000024 00000000000 12605070147 023767 5ustar00etherstaff000000 000000 MooseX-Method-Signatures-0.49/t/lib/My/Annoyingly/Long/Name/Space.pm000644 000766 000024 00000000071 12605070147 025370 0ustar00etherstaff000000 000000 package My::Annoyingly::Long::Name::Space; use Moose; 1; MooseX-Method-Signatures-0.49/lib/MooseX/000700 000766 000024 00000000000 12605070147 020443 5ustar00etherstaff000000 000000 MooseX-Method-Signatures-0.49/lib/MooseX/Method/000700 000766 000024 00000000000 12605070147 021663 5ustar00etherstaff000000 000000 MooseX-Method-Signatures-0.49/lib/MooseX/Method/Signatures/000700 000766 000024 00000000000 12605070147 024007 5ustar00etherstaff000000 000000 MooseX-Method-Signatures-0.49/lib/MooseX/Method/Signatures.pm000600 000766 000024 00000046702 12605070147 024360 0ustar00etherstaff000000 000000 use strict; use warnings; package MooseX::Method::Signatures; # git description: v0.48-15-gd03dfc1 # ABSTRACT: (DEPRECATED) Method declarations with type constraints and no source filter # KEYWORDS: moose extension method declaration signature prototype syntax sugar deprecated our $VERSION = '0.49'; use Moose 0.89; use Devel::Declare 0.005011 (); use B::Hooks::EndOfScope 0.10; use Moose::Meta::Class; use MooseX::LazyRequire 0.06; use MooseX::Types::Moose 0.19 qw/Str Bool CodeRef/; use Text::Balanced qw/extract_quotelike/; use MooseX::Method::Signatures::Meta::Method; use MooseX::Method::Signatures::Types qw/PrototypeInjections/; use Sub::Name; use Moose::Util 'find_meta'; use Module::Runtime 'use_module'; use Carp; use aliased 'Devel::Declare::Context::Simple', 'ContextSimple'; use namespace::autoclean; has package => ( is => 'ro', isa => Str, lazy_required => 1, ); has context => ( is => 'ro', isa => ContextSimple, lazy => 1, builder => '_build_context', ); has initialized_context => ( is => 'ro', isa => Bool, default => 0, ); has custom_method_application => ( is => 'ro', isa => CodeRef, predicate => 'has_custom_method_application', ); has prototype_injections => ( is => 'ro', isa => PrototypeInjections, predicate => 'has_prototype_injections', ); sub _build_context { my ($self) = @_; return ContextSimple->new(into => $self->package); } sub import { my ($class, %args) = @_; my $caller = caller(); $class->setup_for($caller, \%args); } sub setup_for { my ($class, $pkg, $args) = @_; # process arguments to import while (my ($declarator, $injections) = each %{ $args }) { my $obj = $class->new( package => $pkg, prototype_injections => { declarator => $declarator, injections => $injections, }, ); Devel::Declare->setup_for($pkg, { $declarator => { const => sub { $obj->parser(@_) } }, }); { no strict 'refs'; *{ "${pkg}::$declarator" } = sub {}; } } my $self = $class->new(package => $pkg); Devel::Declare->setup_for($pkg, { method => { const => sub { $self->parser(@_) } }, }); { no strict 'refs'; *{ "${pkg}::method" } = sub {}; } return; } sub strip_name { my ($self) = @_; my $ctx = $self->context; my $ret = $ctx->strip_name; return $ret if defined $ret; my $line = $ctx->get_linestr; my $offset = $ctx->offset; local $@; my $copy = substr($line, $offset); my ($str) = extract_quotelike($copy); return unless defined $str; return if ($@ && $@ =~ /^No quotelike operator found/); die $@ if $@; substr($line, $offset, length $str) = ''; $ctx->set_linestr($line); return \$str; } sub strip_traits { my ($self) = @_; my $ctx = $self->context; my $linestr = $ctx->get_linestr; unless (substr($linestr, $ctx->offset, 2) eq 'is' || substr($linestr, $ctx->offset, 4) eq 'does') { # No 'is' means no traits return; } my @traits; while (1) { if (substr($linestr, $ctx->offset, 2) eq 'is') { # Eat the 'is' so we can call strip_names_and_args substr($linestr, $ctx->offset, 2) = ''; } elsif (substr($linestr, $ctx->offset, 4) eq 'does') { # Eat the 'does' so we can call strip_names_and_args substr($linestr, $ctx->offset, 4) = ''; } else { last; } $ctx->set_linestr($linestr); push @traits, @{ $ctx->strip_names_and_args }; # Get the current linestr so that the loop can look for more 'is' $ctx->skipspace; $linestr = $ctx->get_linestr; } confess "expected traits after 'is' or 'does', found nothing" unless scalar(@traits); # Let's check to make sure these traits aren't aliased locally for my $t (@traits) { next if $t->[0] =~ /::/; my $class = $ctx->get_curstash_name; my $meta = find_meta($class) || Moose::Meta::Class->initialize($class); my $func = $meta->get_package_symbol('&' . $t->[0]); next unless $func; my $proto = prototype $func; next if !defined $proto || length $proto; $t->[0] = $func->(); } return \@traits; } sub strip_return_type_constraint { my ($self) = @_; my $ctx = $self->context; my $returns = $ctx->strip_name; return unless defined $returns; confess "expected 'returns', found '${returns}'" unless $returns eq 'returns'; return $ctx->strip_proto; } sub parser { my $self = shift; my $err; # Keep any previous compile errors from getting stepped on. But report # errors from inside MXMS nicely. { local $@; eval { $self->_parser(@_) }; $err = $@; } die $err if $err; } my $anon_counter = 1; sub _parser { my $self = shift; my $ctx = $self->context; $ctx->init(@_) unless $self->initialized_context; $ctx->skip_declarator; my $name = $self->strip_name; my $proto = $ctx->strip_proto; my $attrs = $ctx->strip_attrs || ''; my $traits = $self->strip_traits; my $ret_tc = $self->strip_return_type_constraint; my $compile_stash = $ctx->get_curstash_name; my %args = ( # This might get reset later, but its where we search for exported # symbols at compile time package_name => $compile_stash, ); $args{ signature } = qq{($proto)} if defined $proto; $args{ traits } = $traits if $traits; $args{ return_signature } = $ret_tc if defined $ret_tc; # Class::MOP::Method requires a name $args{ name } = $name || '__ANON__'.($anon_counter++).'__'; if ($self->has_prototype_injections) { confess('Configured declarator does not match context declarator') if $ctx->declarator ne $self->prototype_injections->{declarator}; $args{prototype_injections} = $self->prototype_injections->{injections}; } my $meth_class = 'MooseX::Method::Signatures::Meta::Method'; if ($args{traits}) { my @traits = (); foreach my $t (@{$args{traits}}) { use_module($t->[0]); if ($t->[1]) { %args = (%args, eval $t->[1]); }; push @traits, $t->[0]; } my $meta = Moose::Meta::Class->create_anon_class( superclasses => [ $meth_class ], roles => [ @traits ], cache => 1, ); $meth_class = $meta->name; delete $args{traits}; } my $proto_method = $meth_class->wrap(sub { }, %args); my $after_block = ')'; if ($traits) { if (my @trait_args = grep { defined } map { $_->[1] } @{ $traits }) { $after_block = q{, } . join(q{,} => @trait_args) . $after_block; } } if (defined $name) { my $name_arg = q{, } . (ref $name ? ${$name} : qq{q[${name}]}); $after_block = $name_arg . $after_block . q{;}; } my $inject = $proto_method->injectable_code; $inject = $self->scope_injector_call($after_block) . $inject; $ctx->inject_if_block($inject, "(sub ${attrs} "); my $create_meta_method = sub { my ($code, $pkg, $meth_name, @args) = @_; subname $pkg . "::" .$meth_name, $code; # we want to reinitialize with all the args, # so we give the opportunity for traits to wrap the correct # closure. my %other_args = %{$proto_method}; delete $other_args{body}; delete $other_args{actual_body}; my $ret = $meth_class->wrap( $code, %other_args, @args ); }; if (defined $name) { my $apply = $self->has_custom_method_application ? $self->custom_method_application : sub { my ($meta, $name, $method) = @_; if (warnings::enabled("redefine") && (my $meta_meth = $meta->get_method($name))) { warnings::warn("redefine", "Method $name redefined on package ${ \$meta->name }") if $meta_meth->isa('MooseX::Method::Signatures::Meta::Method'); } $meta->add_method($name => $method); }; $ctx->shadow(sub { my ($code, $name, @args) = @_; my $pkg = $compile_stash; ($pkg, $name) = $name =~ /^(.*)::([^:]+)$/ if $name =~ /::/; my $meth = $create_meta_method->($code, $pkg, $name, @args); my $meta = Moose::Meta::Class->initialize($pkg); $meta->$apply($name, $meth); return; }); } else { $ctx->shadow(sub { return $create_meta_method->(shift, $compile_stash, '__ANON__', @_); }); } } sub scope_injector_call { my ($self, $code) = @_; $code =~ s/'/\\'/g; # we're generating code that's quoted with single quotes return qq[BEGIN { ${\ref $self}->inject_scope('${code}') }]; } sub inject_scope { my ($class, $inject) = @_; on_scope_end { my $line = Devel::Declare::get_linestr(); return unless defined $line; my $offset = Devel::Declare::get_linestr_offset(); substr($line, $offset, 0) = $inject; Devel::Declare::set_linestr($line); }; } __PACKAGE__->meta->make_immutable; 1; __END__ =pod =encoding UTF-8 =head1 NAME MooseX::Method::Signatures - (DEPRECATED) Method declarations with type constraints and no source filter =head1 VERSION version 0.49 =head1 SYNOPSIS package Foo; use Moose; use MooseX::Method::Signatures; method morning (Str $name) { $self->say("Good morning ${name}!"); } method hello (Str :$who, Int :$age where { $_ > 0 }) { $self->say("Hello ${who}, I am ${age} years old!"); } method greet (Str $name, Bool :$excited = 0) { if ($excited) { $self->say("GREETINGS ${name}!"); } else { $self->say("Hi ${name}!"); } } $foo->morning('Resi'); # This works. $foo->hello(who => 'world', age => 42); # This too. $foo->greet('Resi', excited => 1); # And this as well. $foo->hello(who => 'world', age => 'fortytwo'); # This doesn't. $foo->hello(who => 'world', age => -23); # This neither. $foo->morning; # Won't work. $foo->greet; # Will fail. =head1 DESCRIPTION Provides a proper method keyword, like "sub" but specifically for making methods and validating their arguments against Moose type constraints. =head1 DEPRECATION NOTICE =for stopwords mst =for comment rafl agreed we should have a warning, and mst wrote this for MooseX::Declare, but it applies equally well here: B MooseX::Method::Signatures and L are based on L, a giant bag of crack originally implemented by mst with the goal of upsetting the perl core developers so much by its very existence that they implemented proper keyword handling in the core. As of perl5 version 14, this goal has been achieved, and modules such as L, L, and L provide mechanisms to mangle perl syntax that don't require hallucinogenic drugs to interpret the error messages they produce. If you want to use declarative syntax in new code, please for the love of kittens get yourself a recent perl and look at L and L instead. =head1 SIGNATURE SYNTAX The signature syntax is heavily based on Perl 6. However not the full Perl 6 signature syntax is supported yet and some of it never will be. =head2 Type Constraints method foo ( $affe) # no type checking method bar (Animal $affe) # $affe->isa('Animal') method baz (Animal|Human $affe) # $affe->isa('Animal') || $affe->isa('Human') =head2 Positional vs. Named method foo ( $a, $b, $c) # positional method bar (:$a, :$b, :$c) # named method baz ( $a, $b, :$c) # combined =head2 Required vs. Optional method foo ($a , $b!, :$c!, :$d!) # required method bar ($a?, $b?, :$c , :$d?) # optional =head2 Defaults method foo ($a = 42) # defaults to 42 =head2 Constraints method foo ($foo where { $_ % 2 == 0 }) # only even =for stopwords Invocant =head2 Invocant method foo ( $moo) # invocant is called $self and is required method bar ($self: $moo) # same, but explicit method baz ($class: $moo) # invocant is called $class =head2 Labels method foo (: $affe ) # called as $obj->foo(affe => $value) method bar (:apan($affe)) # called as $obj->foo(apan => $value) =head2 Traits method foo (Affe $bar does trait) method foo (Affe $bar is trait) The only currently supported trait is C, which will attempt to coerce the value provided if it doesn't satisfy the requirements of the type constraint. =head2 Placeholders method foo ($bar, $, $baz) =for stopwords sigil Sometimes you don't care about some parameters you're being called with. Just put the bare sigil instead of a full variable name into the signature to avoid an extra lexical variable to be created. =head2 Complex Example method foo ( SomeClass $thing where { $_->can('stuff') }: Str $bar = "apan", Int :$baz! = 42 where { $_ % 2 == 0 } where { $_ > 10 } ) # the invocant is called $thing, must be an instance of SomeClass and has to implement a 'stuff' method # $bar is positional, required, must be a string and defaults to "apan" # $baz is named, required, must be an integer, defaults to 42 and needs # to be even and greater than 10 =head1 CAVEATS AND NOTES This module is as stable now, but this is not to say that it is entirely bug free. If you notice any odd behaviour (messages not being as good as they could for example) then please raise a bug. =head2 Fancy signatures L is used to parse the signatures. However, some signatures that can be parsed by it aren't supported by this module (yet). =head2 No source filter While this module does rely on the hairy black magic of L it does not depend on a source filter. As such, it doesn't try to parse and rewrite your source code and there should be no weird side effects. Devel::Declare only effects compilation. After that, it's a normal subroutine. As such, for all that hairy magic, this module is surprisingly stable. =head2 What about regular subroutines? L cannot yet change the way C behaves. However, the L module can. Right now it only provides very basic signatures, but it's extendable enough that plugging MooseX::Method::Signatures signatures into that should be quite possible. =head2 What about the return value? Type constraints for return values can be declared using method foo (Int $x, Str $y) returns (Bool) { ... } however, this feature only works with scalar return values and is still considered to be experimental. =head2 Interaction with L =head3 Methods not seen by a role's C Because the processing of the L C and the L C keywords are both done at runtime, it can happen that a role will require a method before it is declared (which will cause Moose to complain very loudly and abort the program). For example, the following will not work: # in file Canine.pm package Canine; use Moose; use MooseX::Method::Signatures; with 'Watchdog'; method bark { print "Woof!\n"; } 1; # in file Watchdog.pm package Watchdog; use Moose::Role; requires 'bark'; # will assert! evaluated before 'method' is processed sub warn_intruder { my $self = shift; my $intruder = shift; $self->bark until $intruder->gone; } 1; A workaround for this problem is to use C only after the methods have been defined. To take our previous example, B could be reworked thus: package Canine; use Moose; use MooseX::Method::Signatures; method bark { print "Woof!\n"; } with 'Watchdog'; 1; A better solution is to use L instead of plain L. It defers application of roles until the end of the class definition. With it, our example would becomes: # in file Canine.pm use MooseX::Declare; class Canine with Watchdog { method bark { print "Woof!\n"; } } 1; # in file Watchdog.pm use MooseX::Declare; role Watchdog { requires 'bark'; method warn_intruder ( $intruder ) { $self->bark until $intruder->gone; } } 1; =head3 I warnings When composing a L into a class that uses L, you may get a "Subroutine redefined" warning. This happens when both the role and the class define a method/subroutine of the same name. (The way roles work, the one defined in the class takes precedence.) To eliminate this warning, make sure that your C declaration happens after any method/subroutine declarations that may have the same name as a method/subroutine within a role. =head1 SEE ALSO =over 4 =item * L =item * L =item * L =item * L =item * L =item * L =item * L =back =head1 SUPPORT Bugs may be submitted through L (or L). There is also a mailing list available for users of this distribution, at L. There is also an irc channel available for users of this distribution, at irc://irc.perl.org/#moose. I am also usually active on irc, as 'ether' at C. =head1 AUTHOR Florian Ragwitz =head1 CONTRIBUTORS =for stopwords Karen Etheridge Ash Berlin Daniel Ruoso Justin Hunter Nicholas Perez Dagfinn Ilmari Mannsåker Rhesa Rozendaal Yanick Champoux Cory Watson Kent Fredric Lukas Mai Matt Kraai Jonathan Scott Duff Jesse Luehrs Hakim Cassimally Dave Rolsky Ricardo SIGNES Sebastian Willert Steffen Schwigon =over 4 =item * Karen Etheridge =item * Ash Berlin =item * Daniel Ruoso =item * Justin Hunter =item * Nicholas Perez =item * Dagfinn Ilmari Mannsåker =item * Rhesa Rozendaal =item * Yanick Champoux =item * Cory Watson =item * Kent Fredric =item * Lukas Mai =item * Matt Kraai =item * Jonathan Scott Duff =item * Jesse Luehrs =item * Hakim Cassimally =item * Dave Rolsky =item * Ricardo SIGNES =item * Sebastian Willert =item * Steffen Schwigon =back =head1 COPYRIGHT AND LICENCE This software is copyright (c) 2008 by Florian Ragwitz. This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. =cut MooseX-Method-Signatures-0.49/lib/MooseX/Method/Signatures/Meta/000700 000766 000024 00000000000 12605070147 024675 5ustar00etherstaff000000 000000 MooseX-Method-Signatures-0.49/lib/MooseX/Method/Signatures/Types.pm000600 000766 000024 00000003111 12605070147 025447 0ustar00etherstaff000000 000000 package MooseX::Method::Signatures::Types; #ABSTRACT: (DEPRECATED) Provides common MooseX::Types used by MooseX::Method::Signatures our $VERSION = '0.49'; use MooseX::Types 0.19 -declare => [qw/ Injections PrototypeInjections Params /]; use MooseX::Types::Moose qw/Str ArrayRef/; use MooseX::Types::Structured 0.24 qw/Dict/; use Parse::Method::Signatures::Types qw/Param/; use if MooseX::Types->VERSION >= 0.42, 'namespace::autoclean'; subtype Injections, as ArrayRef[Str]; subtype PrototypeInjections, as Dict[declarator => Str, injections => Injections]; subtype Params, as ArrayRef[Param]; 1; __END__ =pod =encoding UTF-8 =head1 NAME MooseX::Method::Signatures::Types - (DEPRECATED) Provides common MooseX::Types used by MooseX::Method::Signatures =head1 VERSION version 0.49 =head1 SUPPORT Bugs may be submitted through L (or L). There is also a mailing list available for users of this distribution, at L. There is also an irc channel available for users of this distribution, at irc://irc.perl.org/#moose. I am also usually active on irc, as 'ether' at C. =head1 AUTHOR Florian Ragwitz =head1 COPYRIGHT AND LICENCE This software is copyright (c) 2008 by Florian Ragwitz. This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. =cut MooseX-Method-Signatures-0.49/lib/MooseX/Method/Signatures/Meta/Method.pm000600 000766 000024 00000030650 12605070147 026461 0ustar00etherstaff000000 000000 package MooseX::Method::Signatures::Meta::Method; # ABSTRACT: (DEPRECATED) Provides the metaclass for methods with signatures our $VERSION = '0.49'; use Moose; use Carp qw/cluck/; use Context::Preserve; use Parse::Method::Signatures 1.003014; use Parse::Method::Signatures::TypeConstraint; use Scalar::Util qw/weaken/; use Moose::Util qw/does_role/; use Moose::Util::TypeConstraints; use MooseX::Meta::TypeConstraint::ForceCoercion; use MooseX::Types::Util qw/has_available_type_export/; use MooseX::Types::Structured qw/Tuple Dict Optional slurpy/; use MooseX::Types::Moose qw/ArrayRef Str Maybe Object Any CodeRef Bool/; use MooseX::Method::Signatures::Types qw/Injections Params/; use aliased 'Parse::Method::Signatures::Param::Named'; use aliased 'Parse::Method::Signatures::Param::Placeholder'; use namespace::autoclean; extends 'Moose::Meta::Method'; has signature => ( is => 'ro', isa => Str, default => '(@)', required => 1, ); has parsed_signature => ( is => 'ro', isa => class_type('Parse::Method::Signatures::Sig'), lazy => 1, builder => '_build_parsed_signature', ); sub _parsed_signature { cluck '->_parsed_signature is deprecated. use ->parsed_signature instead.'; shift->parsed_signature; } has _lexicals => ( is => 'ro', isa => ArrayRef[Str], lazy => 1, builder => '_build__lexicals', ); has injectable_code => ( is => 'ro', isa => Str, lazy => 1, builder => '_build_injectable_code', ); has _positional_args => ( is => 'ro', isa => ArrayRef, lazy => 1, builder => '_build__positional_args', ); has _named_args => ( is => 'ro', isa => ArrayRef, lazy => 1, builder => '_build__named_args', ); has _has_slurpy_positional => ( is => 'rw', isa => Bool, ); has type_constraint => ( is => 'ro', isa => class_type('Moose::Meta::TypeConstraint'), lazy => 1, builder => '_build_type_constraint', ); has return_signature => ( is => 'ro', isa => Str, predicate => 'has_return_signature', ); has _return_type_constraint => ( is => 'ro', isa => class_type('Moose::Meta::TypeConstraint'), lazy => 1, builder => '_build__return_type_constraint', ); has actual_body => ( is => 'ro', isa => CodeRef, predicate => '_has_actual_body', ); has prototype_injections => ( is => 'rw', isa => Injections, trigger => \&_parse_prototype_injections ); has _parsed_prototype_injections => ( is => 'ro', isa => Params, predicate => '_has_parsed_prototype_injections', writer => '_set_parsed_prototype_injections', ); before actual_body => sub { my ($self) = @_; confess "method doesn't have an actual body yet" unless $self->_has_actual_body; }; around name => sub { my ($next, $self) = @_; my $ret = $self->$next; confess "method doesn't have a name yet" unless defined $ret; return $ret; }; sub _wrapped_body { my ($class, $self, %args) = @_; if (exists $args{return_signature}) { return sub { my @args = ${ $self }->validate(\@_); return preserve_context { ${ $self }->actual_body->(@args) } after => sub { if (defined (my $msg = ${ $self }->_return_type_constraint->validate(\@_))) { confess $msg; } }; }; } my $actual_body; return sub { @_ = ${ $self }->validate(\@_); $actual_body ||= ${ $self }->actual_body; goto &{ $actual_body }; }; } around wrap => sub { my $orig = shift; my $self; my ($class, $code, %args); if (ref $_[1]) { ($class, $code, %args) = @_; } else { ($class, %args) = @_; $code = delete $args{body}; } my $wrapped = $class->_wrapped_body(\$self, %args); $self = $class->$orig($wrapped, %args, $code ? (actual_body => $code) : ()); # Vivify the type constraints so TC lookups happen before namespace::clean # removes them $self->type_constraint; $self->_return_type_constraint if $self->has_return_signature; weaken($self->{associated_metaclass}) if $self->{associated_metaclass}; return $self; }; sub reify { my $self = shift; my %args = @_; my %other_args = %{$self}; delete $other_args{body}; delete $other_args{actual_body}; my $body = delete $args{body} || delete $args{actual_body} || $self->body; my %final_args = (%other_args, %args); return $self->meta->name->wrap($body, %final_args); } sub _build_parsed_signature { my ($self) = @_; return Parse::Method::Signatures->signature( input => $self->signature, from_namespace => $self->package_name, ); } sub _build__return_type_constraint { my ($self) = @_; confess 'no return type constraint' unless $self->has_return_signature; my $parser = Parse::Method::Signatures->new( input => $self->return_signature, from_namespace => $self->package_name, ); my $param = $parser->_param_typed({}); confess 'failed to parse return value type constraint' unless exists $param->{type_constraints}; return Tuple[$param->{type_constraints}->tc]; } sub _param_to_spec { my ($self, $param) = @_; my $tc = Any; { # Ensure errors get reported from the right place local $Carp::Internal{'MooseX::Method::Signatures::Meta::Method'} = 1; local $Carp::Internal{'Moose::Meta::Method::Delegation'} = 1; local $Carp::Internal{'Moose::Meta::Method::Accessor'} = 1; local $Carp::Internal{'MooseX::Method::Signatures'} = 1; local $Carp::Internal{'Devel::Declare'} = 1; $tc = $param->meta_type_constraint if $param->has_type_constraints; } if ($param->has_constraints) { my $cb = join ' && ', map { "sub {${_}}->(\\\@_)" } $param->constraints; my $code = eval "sub {${cb}}"; $tc = subtype({ as => $tc, where => $code }); } my %spec; if ($param->sigil ne '$') { $spec{slurpy} = 1; $tc = slurpy ArrayRef[$tc]; } $spec{tc} = $param->required ? $tc : Optional[$tc]; $spec{default} = $param->default_value if $param->has_default_value; if ($param->has_traits) { for my $trait (@{ $param->param_traits }) { next unless $trait->[1] eq 'coerce'; $spec{coerce} = 1; } } return \%spec; } sub _parse_prototype_injections { my $self = shift; my @params; for my $inject (@{ $self->prototype_injections }) { my $param; eval { $param = Parse::Method::Signatures->param($inject); }; confess "There was a problem parsing the prototype injection '$inject': $@" if $@ || !defined $param; push @params, $param; } my @return = reverse @params; $self->_set_parsed_prototype_injections(\@return); } sub _build__lexicals { my ($self) = @_; my ($sig) = $self->parsed_signature; my @lexicals; if ($self->_has_parsed_prototype_injections) { push @lexicals, $_->variable_name for @{ $self->_parsed_prototype_injections }; } push @lexicals, $sig->has_invocant ? $sig->invocant->variable_name : '$self'; push @lexicals, (does_role($_, Placeholder) ? 'undef' : $_->variable_name) for (($sig->has_positional_params ? $sig->positional_params : ()), ($sig->has_named_params ? $sig->named_params : ())); return \@lexicals; } sub _build_injectable_code { my ($self) = @_; my $vars = join q{,}, @{ $self->_lexicals }; return "my (${vars}) = \@_;"; } sub _build__positional_args { my ($self) = @_; my $sig = $self->parsed_signature; my @positional; if ($self->_has_parsed_prototype_injections) { push @positional, map { $self->_param_to_spec($_) } @{ $self->_parsed_prototype_injections }; } push @positional, $sig->has_invocant ? $self->_param_to_spec($sig->invocant) : { tc => Object }; my $slurpy = 0; if ($sig->has_positional_params) { for my $param ($sig->positional_params) { my $spec = $self->_param_to_spec($param); $slurpy ||= 1 if $spec->{slurpy}; push @positional, $spec; } } $self->_has_slurpy_positional($slurpy); return \@positional; } sub _build__named_args { my ($self) = @_; my $sig = $self->parsed_signature; # triggering building of positionals before named params is important # because the latter needs to know if there have been any slurpy # positionals to report errors $self->_positional_args; my @named; if ($sig->has_named_params) { confess 'Named parameters cannot be combined with slurpy positionals' if $self->_has_slurpy_positional; for my $param ($sig->named_params) { push @named, $param->label => $self->_param_to_spec($param); } } return \@named; } sub _build_type_constraint { my ($self) = @_; my ($positional, $named) = map { $self->$_ } map { "_${_}_args" } qw/positional named/; my $tc = Tuple[ Tuple[ map { $_->{tc} } @{ $positional } ], Dict[ map { ref $_ ? $_->{tc} : $_ } @{ $named } ], ]; my $coerce_param = sub { my ($spec, $value) = @_; return $value unless exists $spec->{coerce}; return $spec->{tc}->coerce($value); }; my %named = @{ $named }; coerce $tc, from ArrayRef, via { my (@positional_args, %named_args); my $i = 0; for my $param (@{ $positional }) { push @positional_args, map { $coerce_param->($param, $_) } $#{ $_ } < $i ? (exists $param->{default} ? eval $param->{default} : ()) : $_->[$i]; $i++; } if (%named) { my @rest = @{ $_ }[$i .. $#{ $_ }]; confess "Expected named arguments but didn't find an even-sized list" unless @rest % 2 == 0; my %rest = @rest; while (my ($key, $spec) = each %named) { if (exists $rest{$key}) { $named_args{$key} = $coerce_param->($spec, delete $rest{$key}); next; } if (exists $spec->{default}) { $named_args{$key} = $coerce_param->($spec, eval $spec->{default}); } } @named_args{keys %rest} = values %rest; } elsif ($#{ $_ } >= $i) { push @positional_args, @{ $_ }[$i .. $#{ $_ }]; } return [\@positional_args, \%named_args]; }; return MooseX::Meta::TypeConstraint::ForceCoercion->new( type_constraint => $tc, ); } sub validate { my ($self, $args) = @_; my @named = grep { !ref $_ } @{ $self->_named_args }; my $coerced; if (defined (my $msg = $self->type_constraint->validate($args, \$coerced))) { confess $msg; } return @{ $coerced->[0] }, map { $coerced->[1]->{$_} } @named; } __PACKAGE__->meta->make_immutable; #pod =pod #pod #pod =for stopwords metaclass #pod #pod =cut 1; __END__ =pod =encoding UTF-8 =head1 NAME MooseX::Method::Signatures::Meta::Method - (DEPRECATED) Provides the metaclass for methods with signatures =head1 VERSION version 0.49 =for stopwords metaclass =head1 SUPPORT Bugs may be submitted through L (or L). There is also a mailing list available for users of this distribution, at L. There is also an irc channel available for users of this distribution, at irc://irc.perl.org/#moose. I am also usually active on irc, as 'ether' at C. =head1 AUTHOR Florian Ragwitz =head1 COPYRIGHT AND LICENCE This software is copyright (c) 2008 by Florian Ragwitz. This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. =cut