MooseX-MethodAttributes-0.29/000755 000767 000024 00000000000 12241303637 016420 5ustar00etherstaff000000 000000 MooseX-MethodAttributes-0.29/Build.PL000644 000767 000024 00000000066 12241303636 017715 0ustar00etherstaff000000 000000 use 5.006; use Module::Build::Tiny 0.030; Build_PL(); MooseX-MethodAttributes-0.29/Changes000644 000767 000024 00000014431 12241303636 017715 0ustar00etherstaff000000 000000 Revision history for MooseX-MethodAttributes 0.29 2013-11-15 02:31:46Z * change docs to recommending using a role to grant Inheritable behaviour rather than a superclass, and changed tests to match * converted all uses of namespace::clean to namespace::autoclean * converted all uses of Test::Exception to Test::Fatal * repository migrated to the github moose organization 0.28 2012-09-04 03:28:26Z * RT#79385: Import Carp::croak into the right package (spotted by Bill Moseley) 0.27 2012-02-13 18:28:00Z * Fix issue with new Moose and new Module::Runtime where Moose functions were not getting correctly exported to the users of this module. 0.26 2012-01-13 12:06:00Z * Fix packages relying on ->meta->make_immutable to return true. This should work, but doesn't in some occasional circumstances. 0.25 2011-06-20 10:53:00Z * Updated to avoid test issues from Moose 2.0007 (spotted by ilmari) 0.24 2010-07-19 03:23:57Z * Updated to avoid warnings from Moose 1.09 (Dave Rolsky). 0.23 2010-06-15 19:22:00Z * Fix dependency on MooseX::Types::Moose (RT#58406) 0.22 2010-05-31 19:49:00Z * Fix issues causing composing multiple (normal) roles onto a subclass of a MooseX::MethodAttributes class to fail by removing a forced metaclass reinitialization which wasn't needed. 0.21 2010-05-07 02:48:54Z * Add more metadata, including a repository url. 0.20 2010-02-10 00:46:11Z * Remove horrible code and epic comment working around Moose bugs with reinitializing anon classes now that the bug is fixed upstream in Moose (commit cf600c83). 0.19 2010-01-09 17:29:00Z * Adapt to changes in in composition_class roles in new Moose releases (>= 0.93_01) 0.18 2009-09-25 09:51:24Z * Bump Test::More dependency to 0.88 for done_testing * Require namespace::autoclean for t/late_reinitialize.t 0.17 2009-09-23 14:35:50Z * Bump MooseX::Types version to 0.20 to avoid warnings with newer Moose releases 0.16_02 2009-09-20 16:58:38Z * Also export the Moose::Role sugar from MooseX::MethodAttributes::Role 0.16_01 2009-09-18 01:29:38Z * Combining roles now works as expected when writing roles, or when applying multiple roles to a class * Bump other dependencies in line with required Moose version 0.16 2009-09-15 05:58:14Z * Fix so that MooseX::Role::Parameterized can be used in combination with roles containing method attributes + testcase from phaylon (RT#48758) * Fixes to avoid a deprecation warning from the latest Class::MOP (Dave Rolsky) 0.15 2009-07-26 * Fix test which was failing in some cases and additional test cases. * No other changes on the dev release. 0.14_01 2009-07-16 * Add TODO tests for role combination with method attributes, proving that this doesn't work. * Add nasty hack to allow the application of roles with method attributes to anon classes to work if the user does a special handwave. This is less than optimum, see big block comment in the code. :/ 0.14 2009-06-07 * Fix bugs with composing roles with method attributes into other roles with method attributes + tests 0.13 2009-05-28 00:19:00Z * Add Test::More and Test::Exception to requirements for RT#46395 and RT#46396 0.12 2009-05-25 18:33:30Z * Add additional tests for role composition behavior. * Add an error message if someone tries to exclude or alias methods from a role with attributes, which currently doesn't work. * Add tests for this error, and tests for behavior if aliasing did work. 0.11_03 2009-05-24 23:06:50Z * Fix overenthusiastic meta trait application which caused classes which already had methods with attributes to have their attributes wiped out. 0.11_02 2009-05-21 00:46:47Z * Add support for use Moose::Role -traits => 'MethodAttributes' if we've already been loaded. * Add support for composing a role containg methods with attributes into another role. 0.11_01 2009-05-17 22:50:44Z * Do not apply metaclass roles unless needed. * Add MooseX::MethodAttributes::Role::Meta::Role, for roles which contain methods with attributes. * Split attribute container functionality out into MooseX::MethodAttributes::Role::Meta::Map. 0.11 2009-05-15 16:02:27Z * Depend on Moose 079 to prevent metaclass incompatibility failure. 0.10 2009-05-13 23:08:30Z * Stop non Moose classes which inherit MooseX::MethodAttributes::Inheritable and which define a sub meta from throwing an exception. 0.09 2009-04-28 08:47:28Z * Use modifiers in the metaclass role to catch modifiers being applied to subs, and apply our wrapped method role to the generated method instance. This is horrible, but appears to be a sane way to avoid that fact that method metaclasses applied to one class aren't inherited. 0.08 2009-04-25 15:30:00Z * Fix get_nearest_methods_with_attributes to deal with wrapped methods. - Add tests for this, and how Catalyst uses the module * Add TODO tests showing that method metaclass inheritance (or lacktherof) into subclasses causes us to fail to do the right thing. 0.07 2009-04-25 12:47:05Z * Add the get_nearest_methods_with_attributes method. 0.06 2009-04-19 22:03:06Z * Fix bug when using base, as Moose doesn't automatically inherit the method metaclass from your parent class unless you use the 'extends' syntax. * Package on a different machine, due to reported unarchiving issues on win32. 0.05 2009-04-01 20:40:05Z * Ensure that we have an initialised metaclass to apply roles to in AttrContainer::Inheritable, fixing bugs with non-moose base classes which have not has a metaclass initialised for them. 0.04 2009-02-26 21:47:18Z * Depend on an MX::Types version with support for parameterisation. * Add tests for behaviour of get_all_methods_with_attributes and method modifiers. 0.03 2009-02-19 07:13:18Z * Implement metaclass methods for getting all meta methods with attributes. 0.02 2009-02-14 21:17:56Z * Depend on Moose 0.70 for wrapped_method_metaclass_roles support. * Apply a role to wrapped method metaclasses to support getting attributes of wrapped methods. * Add MooseX::MethodAttributes::Inherited as a way of capturing method attributes without explicitly using MooseX::MethodAttributes in every class. 0.01 2009-02-13 21:21:11Z * Initial release. MooseX-MethodAttributes-0.29/CONTRIBUTING000644 000767 000024 00000005236 12241303636 020257 0ustar00etherstaff000000 000000 CONTRIBUTING Thank you for considering contributing to this distribution. This file contains instructions that will help you work with the source code. The distribution is managed with Dist::Zilla. This means than many of the usual files you might expect are not in the repository, but are generated at release time (e.g. Makefile.PL). However, you can run tests directly using the 'prove' tool: $ prove -l $ prove -lv t/some_test_file.t $ prove -lvr t/ In most cases, 'prove' is entirely sufficent for you to test any patches you have. You may need to satisfy some dependencies. The easiest way to satisfy dependencies is to install the last release -- this is available at https://metacpan.org/release/MooseX-MethodAttributes. If you use cpanminus, you can do it without downloading the tarball first: $ cpanm --reinstall --installdeps --with-recommends MooseX::MethodAttributes Dist::Zilla is a very powerful authoring tool, but requires a number of author-specific plugins. If you would like to use it for contributing, install it from CPAN, then run one of the following commands, depending on your CPAN client: $ cpan `dzil authordeps --missing` $ dzil authordeps --missing | cpanm You should then also install any additional requirements not needed by the dzil build but may be needed by tests or other development: # cpan `dzil listdeps --author --missing` $ dzil listdeps --author --missing | cpanm You can also do this via cpanm directly: $ cpanm --reinstall --installdeps --with-develop --with-recommends MooseX::MethodAttributes Once installed, here are some dzil commands you might try: $ dzil build $ dzil test $ dzil test --release $ dzil xtest $ dzil listdeps --json $ dzil build --not You can learn more about Dist::Zilla at http://dzil.org/. The code for this distribution is hosted at GitHub. The main repository is: https://github.com/moose/MooseX-MethodAttributes. You can submit code changes by forking the repository, pushing your code changes to your clone, and then submitting a pull request. Detailed instructions for doing that is available here: https://help.github.com/ https://help.github.com/articles/creating-a-pull-request If you have found a bug, but do not have an accompanying patch to fix it, you can submit an issue report here: https://rt.cpan.org/Public/Dist/Display.html?Name=MooseX-MethodAttributes or via bug-MooseX-MethodAttributes@rt.cpan.org. There is also a mailing list available for users of this distribution, at http://lists.perl.org/list/moose.html. This file was generated via Dist::Zilla::Plugin::GenerateFile::ShareDir 0.002 from a template file originating in Dist-Zilla-PluginBundle-Author-ETHER-0.040. MooseX-MethodAttributes-0.29/dist.ini000644 000767 000024 00000001417 12241303636 020066 0ustar00etherstaff000000 000000 name = MooseX-MethodAttributes author = Florian Ragwitz author = Tomas Doran license = Perl_5 copyright_holder = Florian Ragwitz copyright_year = 2009 [@Author::ETHER] Authority.authority = cpan:FLORA server = github -remove = AutoPrereqs -remove = Test::UnusedVars ; we like our $class [Prereqs] Moose = 0.98 MooseX::Types::Moose = 0.21 namespace::autoclean = 0.08 Carp = 0 [Prereqs / TestRequires] Test::More = 0.88 Test::Fatal = 0 Test::Requires = 0 namespace::autoclean = 0 [Prereqs / DevelopRequires] MooseX::Role::Parameterized = 0 [MetaResources / additional] x_IRC = irc://irc.perl.org/#moose x_MailingList = http://lists.perl.org/list/moose.html ; authordep Pod::Weaver::Section::Contributors [ContributorsFromGit] MooseX-MethodAttributes-0.29/INSTALL000644 000767 000024 00000002020 12241303636 017442 0ustar00etherstaff000000 000000 This is the Perl distribution MooseX-MethodAttributes. Installing MooseX-MethodAttributes is straightforward. ## Installation with cpanm If you have cpanm, you only need one line: % cpanm MooseX::MethodAttributes 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::MethodAttributes ## Installing with the CPAN shell Alternatively, if your CPAN shell is set up, you should just be able to do: % cpan MooseX::MethodAttributes ## 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-MethodAttributes documentation is available as POD. You can run perldoc from a shell to read the documentation: % perldoc MooseX::MethodAttributes MooseX-MethodAttributes-0.29/lib/000755 000767 000024 00000000000 12241303637 017166 5ustar00etherstaff000000 000000 MooseX-MethodAttributes-0.29/LICENSE000644 000767 000024 00000043664 12241303636 017441 0ustar00etherstaff000000 000000 This software is copyright (c) 2009 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) 2009 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, Suite 500, Boston, MA 02110-1335 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The license agreements of most software companies try to keep users at the mercy of those companies. By contrast, our General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. The General Public License applies to the Free Software Foundation's software and to any other program whose authors commit to using it. You can use it for your programs, too. When we speak of free software, we are referring to freedom, not price. Specifically, the General Public License is designed to make sure that you have the freedom to give away or sell copies of free software, that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things. To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it. For example, if you distribute copies of a such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must tell them their rights. We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software. Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations. The precise terms and conditions for copying, distribution and modification follow. GNU GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License Agreement applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any work containing the Program or a portion of it, either verbatim or with modifications. Each licensee is addressed as "you". 1. You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this General Public License and to the absence of any warranty; and give any other recipients of the Program a copy of this General Public License along with the Program. You may charge a fee for the physical act of transferring a copy. 2. You may modify your copy or copies of the Program or any portion of it, and copy and distribute such modifications under the terms of Paragraph 1 above, provided that you also do the following: a) cause the modified files to carry prominent notices stating that you changed the files and the date of any change; and b) cause the whole of any work that you distribute or publish, that in whole or in part contains the Program or any part thereof, either with or without modifications, to be licensed at no charge to all third parties under the terms of this General Public License (except that you may choose to grant warranty protection to some or all third parties, at your option). c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the simplest and most usual way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this General Public License. d) You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. Mere aggregation of another independent work with the Program (or its derivative) on a volume of a storage or distribution medium does not bring the other work under the scope of these terms. 3. You may copy and distribute the Program (or a portion or derivative of it, under Paragraph 2) in object code or executable form under the terms of Paragraphs 1 and 2 above provided that you also do one of the following: a) accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Paragraphs 1 and 2 above; or, b) accompany it with a written offer, valid for at least three years, to give any third party free (except for a nominal charge for the cost of distribution) a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Paragraphs 1 and 2 above; or, c) accompany it with the information you received as to where the corresponding source code may be obtained. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form alone.) Source code for a work means the preferred form of the work for making modifications to it. For an executable file, complete source code means all the source code for all modules it contains; but, as a special exception, it need not include source code for modules which are standard libraries that accompany the operating system on which the executable file runs, or for standard header files or definitions files that accompany that operating system. 4. You may not copy, modify, sublicense, distribute or transfer the Program except as expressly provided under this General Public License. Any attempt otherwise to copy, modify, sublicense, distribute or transfer the Program is void, and will automatically terminate your rights to use the Program under this License. However, parties who have received copies, or rights to use copies, from you under this General Public License will not have their licenses terminated so long as such parties remain in full compliance. 5. By copying, distributing or modifying the Program (or any work based on the Program) you indicate your acceptance of this license to do so, and all its terms and conditions. 6. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. 7. The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies a version number of the license which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of the license, you may choose any version ever published by the Free Software Foundation. 8. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY 9. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 10. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS Appendix: How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to humanity, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) 19yy This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 1, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA Also add information on how to contact you by electronic and paper mail. If the program is interactive, make it output a short notice like this when it starts in an interactive mode: Gnomovision version 69, Copyright (C) 19xx name of author Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, the commands you use may be called something other than `show w' and `show c'; they could even be mouse-clicks or menu items--whatever suits your program. You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the program, if necessary. Here a sample; alter the names: Yoyodyne, Inc., hereby disclaims all copyright interest in the program `Gnomovision' (a program to direct compilers to make passes at assemblers) written by James Hacker. , 1 April 1989 Ty Coon, President of Vice That's all there is to it! --- The Artistic License 1.0 --- This software is Copyright (c) 2009 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-MethodAttributes-0.29/Makefile.PL000644 000767 000024 00000006006 12241303636 020373 0ustar00etherstaff000000 000000 # This Makefile.PL for MooseX-MethodAttributes was generated by # Dist::Zilla::Plugin::MakeMaker::Fallback 0.003. # Don't edit it but the dist.ini used to construct it. use strict; use warnings; BEGIN { my %configure_requires = ( 'Module::Build::Tiny' => '0.030', 'ExtUtils::MakeMaker' => '6.30', ); my @missing = grep { ! eval "require $_; $_->VERSION($configure_requires{$_}); 1" } keys %configure_requires; if (not @missing) { print "Congratulations, your toolchain understands 'configure_requires'!\n\n"; } else { 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. EOW sleep 10 if -t STDIN; } } use 5.006; use ExtUtils::MakeMaker 6.30; my %WriteMakefileArgs = ( "ABSTRACT" => "code attribute introspection", "AUTHOR" => "Florian Ragwitz , Tomas Doran ", "BUILD_REQUIRES" => {}, "CONFIGURE_REQUIRES" => { "ExtUtils::MakeMaker" => "6.30", "Module::Build::Tiny" => "0.030" }, "DISTNAME" => "MooseX-MethodAttributes", "EXE_FILES" => [], "LICENSE" => "perl", "NAME" => "MooseX::MethodAttributes", "PREREQ_PM" => { "Carp" => 0, "Moose" => "0.98", "MooseX::Types::Moose" => "0.21", "namespace::autoclean" => "0.08" }, "TEST_REQUIRES" => { "Test::Fatal" => 0, "Test::More" => "0.88", "Test::Requires" => 0, "namespace::autoclean" => "0.08" }, "VERSION" => "0.29", "test" => { "TESTS" => "t/*.t" } ); unless ( eval { ExtUtils::MakeMaker->VERSION(6.63_03) } ) { my $tr = delete $WriteMakefileArgs{TEST_REQUIRES}; my $br = $WriteMakefileArgs{BUILD_REQUIRES}; for my $mod ( keys %$tr ) { if ( exists $br->{$mod} ) { $br->{$mod} = $tr->{$mod} if $tr->{$mod} > $br->{$mod}; } else { $br->{$mod} = $tr->{$mod}; } } } unless ( eval { ExtUtils::MakeMaker->VERSION(6.56) } ) { my $br = delete $WriteMakefileArgs{BUILD_REQUIRES}; my $pp = $WriteMakefileArgs{PREREQ_PM}; for my $mod ( keys %$br ) { if ( exists $pp->{$mod} ) { $pp->{$mod} = $br->{$mod} if $br->{$mod} > $pp->{$mod}; } else { $pp->{$mod} = $br->{$mod}; } } } delete $WriteMakefileArgs{CONFIGURE_REQUIRES} unless eval { ExtUtils::MakeMaker->VERSION(6.52) }; WriteMakefile(%WriteMakefileArgs); MooseX-MethodAttributes-0.29/MANIFEST000644 000767 000024 00000003642 12241303636 017555 0ustar00etherstaff000000 000000 Build.PL CONTRIBUTING Changes INSTALL LICENSE MANIFEST META.json META.yml Makefile.PL README README.md dist.ini lib/MooseX/MethodAttributes.pm lib/MooseX/MethodAttributes/Inheritable.pm lib/MooseX/MethodAttributes/Role.pm lib/MooseX/MethodAttributes/Role/AttrContainer.pm lib/MooseX/MethodAttributes/Role/AttrContainer/Inheritable.pm lib/MooseX/MethodAttributes/Role/Meta/Class.pm lib/MooseX/MethodAttributes/Role/Meta/Map.pm lib/MooseX/MethodAttributes/Role/Meta/Method.pm lib/MooseX/MethodAttributes/Role/Meta/Method/MaybeWrapped.pm lib/MooseX/MethodAttributes/Role/Meta/Method/Wrapped.pm lib/MooseX/MethodAttributes/Role/Meta/Role.pm lib/MooseX/MethodAttributes/Role/Meta/Role/Application.pm lib/MooseX/MethodAttributes/Role/Meta/Role/Application/Summation.pm t/00-report-prereqs.t t/basic.t t/calling.t t/catalyst.t t/catalyst_role.t t/catalyst_role_method_exclusion.t t/catalyst_role_preexist_methods.t t/inherited.t t/inherited_non_moose_multilevel.t t/late_reinitialize.t t/lib/BaseClass.pm t/lib/CatalystLike/Controller.pm t/lib/CatalystLike/Controller/Moose.pm t/lib/CatalystLike/Controller/Moose/MethodModifiers.pm t/lib/ClassUsingRoleWithAttributes.pm t/lib/OtherRoleWithAttributes.pm t/lib/OtherSubClass.pm t/lib/RoleWithAttributes.pm t/lib/SubClass.pm t/lib/SubClassUseBaseAndUseMoose.pm t/lib/SubSubClass.pm t/lib/TestClass.pm t/lib/UsesMultipleRoles.pm t/multiple_roles.t t/multiple_roles_astrait.t t/override_method_with_no_attribute.t t/param_role.t t/role.t t/role_applied.t t/role_comp.t t/role_in_role.t t/role_in_role_more.t t/role_method_conflict_detection.t t/role_with_anon_class.t weaver.ini xt/author/00-compile.t xt/author/pod-spell.t xt/release/changes_has_content.t xt/release/cpan-changes.t xt/release/distmeta.t xt/release/eol.t xt/release/kwalitee.t xt/release/minimum-version.t xt/release/mojibake.t xt/release/no-tabs.t xt/release/pod-coverage.t xt/release/pod-no404s.t xt/release/pod-syntax.t xt/release/test-version.t MooseX-MethodAttributes-0.29/META.json000644 000767 000024 00000063007 12241303636 020046 0ustar00etherstaff000000 000000 { "abstract" : "code attribute introspection", "author" : [ "Florian Ragwitz ", "Tomas Doran " ], "dynamic_config" : 0, "generated_by" : "Dist::Zilla version 5.006, CPAN::Meta::Converter version 2.132830", "license" : [ "perl_5" ], "meta-spec" : { "url" : "http://search.cpan.org/perldoc?CPAN::Meta::Spec", "version" : "2" }, "name" : "MooseX-MethodAttributes", "no_index" : { "directory" : [ "t", "xt", "examples" ] }, "prereqs" : { "configure" : { "requires" : { "ExtUtils::MakeMaker" : "6.30", "Module::Build::Tiny" : "0.030" } }, "develop" : { "recommends" : { "Dist::Zilla::PluginBundle::Author::ETHER" : "0.040" }, "requires" : { "Dist::Zilla" : "5.006", "Dist::Zilla::Plugin::ContributorsFromGit" : "0", "Dist::Zilla::Plugin::GitHub::Update" : "0", "Dist::Zilla::Plugin::GithubMeta" : "0", "Dist::Zilla::Plugin::MakeMaker::Fallback" : "0", "Dist::Zilla::Plugin::MetaResources" : "0", "Dist::Zilla::Plugin::ModuleBuildTiny" : "0.004", "Dist::Zilla::Plugin::Prereqs" : "0", "Dist::Zilla::PluginBundle::Author::ETHER" : "0", "File::Spec" : "0", "IO::Handle" : "0", "IPC::Open3" : "0", "MooseX::Role::Parameterized" : "0", "Pod::Coverage::TrustPod" : "0", "Pod::Weaver::Section::Contributors" : "0", "Test::CPAN::Changes" : "0.19", "Test::CPAN::Meta" : "0", "Test::Kwalitee" : "1.12", "Test::More" : "0.94", "Test::NoTabs" : "0", "Test::Pod" : "1.41", "Test::Pod::Coverage" : "1.08" } }, "runtime" : { "requires" : { "Carp" : "0", "Moose" : "0.98", "MooseX::Types::Moose" : "0.21", "namespace::autoclean" : "0.08", "perl" : "5.006" } }, "test" : { "recommends" : { "CPAN::Meta" : "0", "CPAN::Meta::Requirements" : "0" }, "requires" : { "Test::Fatal" : "0", "Test::More" : "0.88", "Test::Requires" : "0", "namespace::autoclean" : "0.08" } } }, "provides" : { "MooseX::MethodAttributes" : { "file" : "lib/MooseX/MethodAttributes.pm", "version" : "0.29" }, "MooseX::MethodAttributes::Inheritable" : { "file" : "lib/MooseX/MethodAttributes/Inheritable.pm", "version" : "0.29" }, "MooseX::MethodAttributes::Role" : { "file" : "lib/MooseX/MethodAttributes/Role.pm", "version" : "0.29" }, "MooseX::MethodAttributes::Role::AttrContainer" : { "file" : "lib/MooseX/MethodAttributes/Role/AttrContainer.pm", "version" : "0.29" }, "MooseX::MethodAttributes::Role::AttrContainer::Inheritable" : { "file" : "lib/MooseX/MethodAttributes/Role/AttrContainer/Inheritable.pm", "version" : "0.29" }, "MooseX::MethodAttributes::Role::Meta::Class" : { "file" : "lib/MooseX/MethodAttributes/Role/Meta/Class.pm", "version" : "0.29" }, "MooseX::MethodAttributes::Role::Meta::Map" : { "file" : "lib/MooseX/MethodAttributes/Role/Meta/Map.pm", "version" : "0.29" }, "MooseX::MethodAttributes::Role::Meta::Method" : { "file" : "lib/MooseX/MethodAttributes/Role/Meta/Method.pm", "version" : "0.29" }, "MooseX::MethodAttributes::Role::Meta::Method::MaybeWrapped" : { "file" : "lib/MooseX/MethodAttributes/Role/Meta/Method/MaybeWrapped.pm", "version" : "0.29" }, "MooseX::MethodAttributes::Role::Meta::Method::Wrapped" : { "file" : "lib/MooseX/MethodAttributes/Role/Meta/Method/Wrapped.pm", "version" : "0.29" }, "MooseX::MethodAttributes::Role::Meta::Role" : { "file" : "lib/MooseX/MethodAttributes/Role/Meta/Role.pm", "version" : "0.29" }, "MooseX::MethodAttributes::Role::Meta::Role::Application" : { "file" : "lib/MooseX/MethodAttributes/Role/Meta/Role/Application.pm", "version" : "0.29" }, "MooseX::MethodAttributes::Role::Meta::Role::Application::Summation" : { "file" : "lib/MooseX/MethodAttributes/Role/Meta/Role/Application/Summation.pm", "version" : "0.29" } }, "release_status" : "stable", "resources" : { "bugtracker" : { "mailto" : "bug-MooseX-MethodAttributes@rt.cpan.org", "web" : "https://rt.cpan.org/Public/Dist/Display.html?Name=MooseX-MethodAttributes" }, "homepage" : "https://github.com/moose/MooseX-MethodAttributes", "repository" : { "type" : "git", "url" : "https://github.com/moose/MooseX-MethodAttributes.git", "web" : "https://github.com/moose/MooseX-MethodAttributes" }, "x_IRC" : "irc://irc.perl.org/#moose", "x_MailingList" : "http://lists.perl.org/list/moose.html" }, "version" : "0.29", "x_Dist_Zilla" : { "perl" : { "version" : "5.019005" }, "plugins" : [ { "class" : "Dist::Zilla::Plugin::Git::NextVersion", "name" : "@Author::ETHER/Git::NextVersion", "version" : "2.017" }, { "class" : "Dist::Zilla::Plugin::PromptIfStale", "name" : "@Author::ETHER/build", "version" : "0.012" }, { "class" : "Dist::Zilla::Plugin::PromptIfStale", "name" : "@Author::ETHER/release", "version" : "0.012" }, { "class" : "Dist::Zilla::Plugin::ExecDir", "name" : "@Author::ETHER/ExecDir", "version" : "5.006" }, { "class" : "Dist::Zilla::Plugin::ShareDir", "name" : "@Author::ETHER/ShareDir", "version" : "5.006" }, { "class" : "Dist::Zilla::Plugin::FileFinder::ByName", "name" : "@Author::ETHER/Examples", "version" : "5.006" }, { "class" : "Dist::Zilla::Plugin::Git::GatherDir", "name" : "@Author::ETHER/Git::GatherDir", "version" : "2.017" }, { "class" : "Dist::Zilla::Plugin::MetaYAML", "name" : "@Author::ETHER/MetaYAML", "version" : "5.006" }, { "class" : "Dist::Zilla::Plugin::MetaJSON", "name" : "@Author::ETHER/MetaJSON", "version" : "5.006" }, { "class" : "Dist::Zilla::Plugin::License", "name" : "@Author::ETHER/License", "version" : "5.006" }, { "class" : "Dist::Zilla::Plugin::Readme", "name" : "@Author::ETHER/Readme", "version" : "5.006" }, { "class" : "Dist::Zilla::Plugin::Manifest", "name" : "@Author::ETHER/Manifest", "version" : "5.006" }, { "class" : "Dist::Zilla::Plugin::GenerateFile::ShareDir", "config" : { "Dist::Zilla::Plugin::GenerateFile::ShareDir" : { "destination_filename" : "CONTRIBUTING", "dist" : "Dist-Zilla-PluginBundle-Author-ETHER", "encoding" : "UTF-8", "source_filename" : "CONTRIBUTING" } }, "name" : "@Author::ETHER/GenerateFile::ShareDir", "version" : "0.002" }, { "class" : "Dist::Zilla::Plugin::Test::Compile", "config" : { "Dist::Zilla::Plugin::Test::Compile" : { "filename" : "xt/author/00-compile.t", "module_finder" : [ ":InstallModules" ], "script_finder" : [ ":ExecFiles", "@Author::ETHER/Examples" ] } }, "name" : "@Author::ETHER/Test::Compile", "version" : "2.037" }, { "class" : "Dist::Zilla::Plugin::Test::NoTabs", "config" : { "Dist::Zilla::Plugin::Test::NoTabs" : { "module_finder" : [ ":InstallModules" ], "script_finder" : [ ":ExecFiles", "@Author::ETHER/Examples" ] } }, "name" : "@Author::ETHER/Test::NoTabs", "version" : "0.05" }, { "class" : "Dist::Zilla::Plugin::EOLTests", "name" : "@Author::ETHER/EOLTests", "version" : "0.02" }, { "class" : "Dist::Zilla::Plugin::MetaTests", "name" : "@Author::ETHER/MetaTests", "version" : "5.006" }, { "class" : "Dist::Zilla::Plugin::Test::Version", "name" : "@Author::ETHER/Test::Version", "version" : "0.002004" }, { "class" : "Dist::Zilla::Plugin::Test::CPAN::Changes", "name" : "@Author::ETHER/Test::CPAN::Changes", "version" : "0.008" }, { "class" : "Dist::Zilla::Plugin::Test::ChangesHasContent", "name" : "@Author::ETHER/Test::ChangesHasContent", "version" : "0.006" }, { "class" : "Dist::Zilla::Plugin::Test::MinimumVersion", "name" : "@Author::ETHER/Test::MinimumVersion", "version" : "2.000005" }, { "class" : "Dist::Zilla::Plugin::PodSyntaxTests", "name" : "@Author::ETHER/PodSyntaxTests", "version" : "5.006" }, { "class" : "Dist::Zilla::Plugin::PodCoverageTests", "name" : "@Author::ETHER/PodCoverageTests", "version" : "5.006" }, { "class" : "Dist::Zilla::Plugin::Test::PodSpelling", "name" : "@Author::ETHER/Test::PodSpelling", "version" : "2.006001" }, { "class" : "Dist::Zilla::Plugin::Test::Pod::No404s", "name" : "@Author::ETHER/Test::Pod::No404s", "version" : "1.001" }, { "class" : "Dist::Zilla::Plugin::Test::Kwalitee", "name" : "@Author::ETHER/Test::Kwalitee", "version" : "2.07" }, { "class" : "Dist::Zilla::Plugin::MojibakeTests", "name" : "@Author::ETHER/MojibakeTests", "version" : "0.5" }, { "class" : "Dist::Zilla::Plugin::Test::ReportPrereqs", "name" : "@Author::ETHER/Test::ReportPrereqs", "version" : "0.010" }, { "class" : "Dist::Zilla::Plugin::PruneCruft", "name" : "@Author::ETHER/PruneCruft", "version" : "5.006" }, { "class" : "Dist::Zilla::Plugin::ManifestSkip", "name" : "@Author::ETHER/ManifestSkip", "version" : "5.006" }, { "class" : "Dist::Zilla::Plugin::Authority", "name" : "@Author::ETHER/Authority", "version" : "1.006" }, { "class" : "Dist::Zilla::Plugin::Git::Describe", "name" : "@Author::ETHER/Git::Describe", "version" : "0.003" }, { "class" : "Dist::Zilla::Plugin::PkgVersion", "name" : "@Author::ETHER/PkgVersion", "version" : "5.006" }, { "class" : "Dist::Zilla::Plugin::PodWeaver", "config" : { "Dist::Zilla::Plugin::PodWeaver" : { "finder" : [ ":InstallModules", ":ExecFiles" ], "plugins" : [ { "class" : "Pod::Weaver::Plugin::EnsurePod5", "name" : "@CorePrep/EnsurePod5", "version" : "4.004" }, { "class" : "Pod::Weaver::Plugin::H1Nester", "name" : "@CorePrep/H1Nester", "version" : "4.004" }, { "class" : "Pod::Weaver::Plugin::SingleEncoding", "name" : "@Default/SingleEncoding", "version" : "4.004" }, { "class" : "Pod::Weaver::Section::Name", "name" : "@Default/Name", "version" : "4.004" }, { "class" : "Pod::Weaver::Section::Version", "name" : "@Default/Version", "version" : "4.004" }, { "class" : "Pod::Weaver::Section::Region", "name" : "@Default/prelude", "version" : "4.004" }, { "class" : "Pod::Weaver::Section::Generic", "name" : "SYNOPSIS", "version" : "4.004" }, { "class" : "Pod::Weaver::Section::Generic", "name" : "DESCRIPTION", "version" : "4.004" }, { "class" : "Pod::Weaver::Section::Generic", "name" : "OVERVIEW", "version" : "4.004" }, { "class" : "Pod::Weaver::Section::Collect", "name" : "ATTRIBUTES", "version" : "4.004" }, { "class" : "Pod::Weaver::Section::Collect", "name" : "METHODS", "version" : "4.004" }, { "class" : "Pod::Weaver::Section::Collect", "name" : "FUNCTIONS", "version" : "4.004" }, { "class" : "Pod::Weaver::Section::Leftovers", "name" : "@Default/Leftovers", "version" : "4.004" }, { "class" : "Pod::Weaver::Section::Region", "name" : "@Default/postlude", "version" : "4.004" }, { "class" : "Pod::Weaver::Section::Authors", "name" : "@Default/Authors", "version" : "4.004" }, { "class" : "Pod::Weaver::Section::Legal", "name" : "@Default/Legal", "version" : "4.004" }, { "class" : "Pod::Weaver::Plugin::Transformer", "name" : "-Transformer", "version" : "4.004" }, { "class" : "Pod::Weaver::Plugin::StopWords", "name" : "-StopWords", "version" : "1.008" }, { "class" : "Pod::Weaver::Plugin::Encoding", "name" : "-Encoding", "version" : "0.02" }, { "class" : "Pod::Weaver::Section::Contributors", "name" : "Contributors", "version" : "0.006" } ] } }, "name" : "@Author::ETHER/PodWeaver", "version" : "4.002" }, { "class" : "Dist::Zilla::Plugin::NextRelease", "name" : "@Author::ETHER/NextRelease", "version" : "5.006" }, { "class" : "Dist::Zilla::Plugin::ReadmeAnyFromPod", "name" : "@Author::ETHER/ReadmeAnyFromPod", "version" : "0.133060" }, { "class" : "Dist::Zilla::Plugin::GithubMeta", "name" : "@Author::ETHER/GithubMeta", "version" : "0.42" }, { "class" : "Dist::Zilla::Plugin::AutoMetaResources", "name" : "@Author::ETHER/AutoMetaResources", "version" : "1.20" }, { "class" : "Dist::Zilla::Plugin::MetaNoIndex", "name" : "@Author::ETHER/MetaNoIndex", "version" : "5.006" }, { "class" : "Dist::Zilla::Plugin::FinderCode", "name" : "@Author::ETHER/MetaProvides::Package/AUTOVIV/:InstallModulesPM", "version" : "5.006" }, { "class" : "Dist::Zilla::Plugin::MetaProvides::Package", "config" : { "Dist::Zilla::Plugin::MetaProvides::Package" : {}, "Dist::Zilla::Role::MetaProvider::Provider" : { "inherit_missing" : "1", "inherit_version" : "1", "meta_noindex" : "1" } }, "name" : "@Author::ETHER/MetaProvides::Package", "version" : "1.15000000" }, { "class" : "Dist::Zilla::Plugin::MetaConfig", "name" : "@Author::ETHER/MetaConfig", "version" : "5.006" }, { "class" : "Dist::Zilla::Plugin::Prereqs::AuthorDeps", "name" : "@Author::ETHER/Prereqs::AuthorDeps", "version" : "0.002" }, { "class" : "Dist::Zilla::Plugin::MinimumPerl", "name" : "@Author::ETHER/MinimumPerl", "version" : "1.003" }, { "class" : "Dist::Zilla::Plugin::Prereqs", "config" : { "Dist::Zilla::Plugin::Prereqs" : { "phase" : "develop", "type" : "requires" } }, "name" : "@Author::ETHER/installer_requirements", "version" : "5.006" }, { "class" : "Dist::Zilla::Plugin::Prereqs", "config" : { "Dist::Zilla::Plugin::Prereqs" : { "phase" : "develop", "type" : "recommends" } }, "name" : "@Author::ETHER/pluginbundle_version", "version" : "5.006" }, { "class" : "Dist::Zilla::Plugin::RunExtraTests", "name" : "@Author::ETHER/RunExtraTests", "version" : "0.015" }, { "class" : "Dist::Zilla::Plugin::MakeMaker::Fallback", "name" : "@Author::ETHER/MakeMaker::Fallback", "version" : "0.003" }, { "class" : "Dist::Zilla::Plugin::ModuleBuildTiny", "name" : "@Author::ETHER/ModuleBuildTiny", "version" : "0.005" }, { "class" : "Dist::Zilla::Plugin::InstallGuide", "name" : "@Author::ETHER/InstallGuide", "version" : "1.200001" }, { "class" : "Dist::Zilla::Plugin::CheckSelfDependency", "name" : "@Author::ETHER/CheckSelfDependency", "version" : "0.005" }, { "class" : "Dist::Zilla::Plugin::Run::AfterBuild", "name" : "@Author::ETHER/Run::AfterBuild", "version" : "0.020" }, { "class" : "Dist::Zilla::Plugin::Git::Check", "name" : "@Author::ETHER/initial check", "version" : "2.017" }, { "class" : "Dist::Zilla::Plugin::Git::CheckFor::MergeConflicts", "name" : "@Author::ETHER/Git::CheckFor::MergeConflicts", "version" : "0.008" }, { "class" : "Dist::Zilla::Plugin::Git::CheckFor::CorrectBranch", "name" : "@Author::ETHER/Git::CheckFor::CorrectBranch", "version" : "0.008" }, { "class" : "Dist::Zilla::Plugin::Git::Remote::Check", "name" : "@Author::ETHER/Git::Remote::Check", "version" : "0.1.2" }, { "class" : "Dist::Zilla::Plugin::CheckPrereqsIndexed", "name" : "@Author::ETHER/CheckPrereqsIndexed", "version" : "0.009" }, { "class" : "Dist::Zilla::Plugin::TestRelease", "name" : "@Author::ETHER/TestRelease", "version" : "5.006" }, { "class" : "Dist::Zilla::Plugin::Git::Check", "name" : "@Author::ETHER/after tests", "version" : "2.017" }, { "class" : "Dist::Zilla::Plugin::UploadToCPAN", "name" : "@Author::ETHER/UploadToCPAN", "version" : "5.006" }, { "class" : "Dist::Zilla::Plugin::CopyFilesFromRelease", "name" : "@Author::ETHER/CopyFilesFromRelease", "version" : "0.001" }, { "class" : "Dist::Zilla::Plugin::Git::Commit", "name" : "@Author::ETHER/Git::Commit", "version" : "2.017" }, { "class" : "Dist::Zilla::Plugin::Git::Tag", "name" : "@Author::ETHER/Git::Tag", "version" : "2.017" }, { "class" : "Dist::Zilla::Plugin::GitHub::Update", "name" : "@Author::ETHER/GitHub::Update", "version" : "0.35" }, { "class" : "Dist::Zilla::Plugin::Git::Push", "name" : "@Author::ETHER/Git::Push", "version" : "2.017" }, { "class" : "Dist::Zilla::Plugin::InstallRelease", "name" : "@Author::ETHER/InstallRelease", "version" : "0.008" }, { "class" : "Dist::Zilla::Plugin::ConfirmRelease", "name" : "@Author::ETHER/ConfirmRelease", "version" : "5.006" }, { "class" : "Dist::Zilla::Plugin::Prereqs", "config" : { "Dist::Zilla::Plugin::Prereqs" : { "phase" : "develop", "type" : "requires" } }, "name" : "@Author::ETHER/via_options", "version" : "5.006" }, { "class" : "Dist::Zilla::Plugin::Prereqs", "config" : { "Dist::Zilla::Plugin::Prereqs" : { "phase" : "runtime", "type" : "requires" } }, "name" : "Prereqs", "version" : "5.006" }, { "class" : "Dist::Zilla::Plugin::Prereqs", "config" : { "Dist::Zilla::Plugin::Prereqs" : { "phase" : "test", "type" : "requires" } }, "name" : "TestRequires", "version" : "5.006" }, { "class" : "Dist::Zilla::Plugin::Prereqs", "config" : { "Dist::Zilla::Plugin::Prereqs" : { "phase" : "develop", "type" : "requires" } }, "name" : "DevelopRequires", "version" : "5.006" }, { "class" : "Dist::Zilla::Plugin::MetaResources", "name" : "additional", "version" : "5.006" }, { "class" : "Dist::Zilla::Plugin::ContributorsFromGit", "name" : "ContributorsFromGit", "version" : "0.006" }, { "class" : "Dist::Zilla::Plugin::FinderCode", "name" : ":InstallModules", "version" : "5.006" }, { "class" : "Dist::Zilla::Plugin::FinderCode", "name" : ":IncModules", "version" : "5.006" }, { "class" : "Dist::Zilla::Plugin::FinderCode", "name" : ":TestFiles", "version" : "5.006" }, { "class" : "Dist::Zilla::Plugin::FinderCode", "name" : ":ExecFiles", "version" : "5.006" }, { "class" : "Dist::Zilla::Plugin::FinderCode", "name" : ":ShareFiles", "version" : "5.006" }, { "class" : "Dist::Zilla::Plugin::FinderCode", "name" : ":MainModule", "version" : "5.006" } ], "zilla" : { "class" : "Dist::Zilla::Dist::Builder", "config" : { "is_trial" : "0" }, "version" : "5.006" } }, "x_authority" : "cpan:FLORA", "x_contributors" : [ "Dave Rolsky ", "David Steinbrunner ", "Karen Etheridge ", "Marcus Ramberg ", "Peter E Karman ", "Tomas Doran (t0m) " ] } MooseX-MethodAttributes-0.29/META.yml000644 000767 000024 00000040411 12241303636 017670 0ustar00etherstaff000000 000000 --- abstract: 'code attribute introspection' author: - 'Florian Ragwitz ' - 'Tomas Doran ' build_requires: Test::Fatal: 0 Test::More: 0.88 Test::Requires: 0 namespace::autoclean: 0.08 configure_requires: ExtUtils::MakeMaker: 6.30 Module::Build::Tiny: 0.030 dynamic_config: 0 generated_by: 'Dist::Zilla version 5.006, CPAN::Meta::Converter version 2.132830' license: perl meta-spec: url: http://module-build.sourceforge.net/META-spec-v1.4.html version: 1.4 name: MooseX-MethodAttributes no_index: directory: - t - xt - examples provides: MooseX::MethodAttributes: file: lib/MooseX/MethodAttributes.pm version: 0.29 MooseX::MethodAttributes::Inheritable: file: lib/MooseX/MethodAttributes/Inheritable.pm version: 0.29 MooseX::MethodAttributes::Role: file: lib/MooseX/MethodAttributes/Role.pm version: 0.29 MooseX::MethodAttributes::Role::AttrContainer: file: lib/MooseX/MethodAttributes/Role/AttrContainer.pm version: 0.29 MooseX::MethodAttributes::Role::AttrContainer::Inheritable: file: lib/MooseX/MethodAttributes/Role/AttrContainer/Inheritable.pm version: 0.29 MooseX::MethodAttributes::Role::Meta::Class: file: lib/MooseX/MethodAttributes/Role/Meta/Class.pm version: 0.29 MooseX::MethodAttributes::Role::Meta::Map: file: lib/MooseX/MethodAttributes/Role/Meta/Map.pm version: 0.29 MooseX::MethodAttributes::Role::Meta::Method: file: lib/MooseX/MethodAttributes/Role/Meta/Method.pm version: 0.29 MooseX::MethodAttributes::Role::Meta::Method::MaybeWrapped: file: lib/MooseX/MethodAttributes/Role/Meta/Method/MaybeWrapped.pm version: 0.29 MooseX::MethodAttributes::Role::Meta::Method::Wrapped: file: lib/MooseX/MethodAttributes/Role/Meta/Method/Wrapped.pm version: 0.29 MooseX::MethodAttributes::Role::Meta::Role: file: lib/MooseX/MethodAttributes/Role/Meta/Role.pm version: 0.29 MooseX::MethodAttributes::Role::Meta::Role::Application: file: lib/MooseX/MethodAttributes/Role/Meta/Role/Application.pm version: 0.29 MooseX::MethodAttributes::Role::Meta::Role::Application::Summation: file: lib/MooseX/MethodAttributes/Role/Meta/Role/Application/Summation.pm version: 0.29 requires: Carp: 0 Moose: 0.98 MooseX::Types::Moose: 0.21 namespace::autoclean: 0.08 perl: 5.006 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-MethodAttributes homepage: https://github.com/moose/MooseX-MethodAttributes repository: https://github.com/moose/MooseX-MethodAttributes.git version: 0.29 x_Dist_Zilla: perl: version: 5.019005 plugins: - class: Dist::Zilla::Plugin::Git::NextVersion name: '@Author::ETHER/Git::NextVersion' version: 2.017 - class: Dist::Zilla::Plugin::PromptIfStale name: '@Author::ETHER/build' version: 0.012 - class: Dist::Zilla::Plugin::PromptIfStale name: '@Author::ETHER/release' version: 0.012 - class: Dist::Zilla::Plugin::ExecDir name: '@Author::ETHER/ExecDir' version: 5.006 - class: Dist::Zilla::Plugin::ShareDir name: '@Author::ETHER/ShareDir' version: 5.006 - class: Dist::Zilla::Plugin::FileFinder::ByName name: '@Author::ETHER/Examples' version: 5.006 - class: Dist::Zilla::Plugin::Git::GatherDir name: '@Author::ETHER/Git::GatherDir' version: 2.017 - class: Dist::Zilla::Plugin::MetaYAML name: '@Author::ETHER/MetaYAML' version: 5.006 - class: Dist::Zilla::Plugin::MetaJSON name: '@Author::ETHER/MetaJSON' version: 5.006 - class: Dist::Zilla::Plugin::License name: '@Author::ETHER/License' version: 5.006 - class: Dist::Zilla::Plugin::Readme name: '@Author::ETHER/Readme' version: 5.006 - class: Dist::Zilla::Plugin::Manifest name: '@Author::ETHER/Manifest' version: 5.006 - class: Dist::Zilla::Plugin::GenerateFile::ShareDir config: Dist::Zilla::Plugin::GenerateFile::ShareDir: destination_filename: CONTRIBUTING dist: Dist-Zilla-PluginBundle-Author-ETHER encoding: UTF-8 source_filename: CONTRIBUTING name: '@Author::ETHER/GenerateFile::ShareDir' version: 0.002 - class: Dist::Zilla::Plugin::Test::Compile config: Dist::Zilla::Plugin::Test::Compile: filename: xt/author/00-compile.t module_finder: - ':InstallModules' script_finder: - ':ExecFiles' - '@Author::ETHER/Examples' name: '@Author::ETHER/Test::Compile' version: 2.037 - class: Dist::Zilla::Plugin::Test::NoTabs config: Dist::Zilla::Plugin::Test::NoTabs: module_finder: - ':InstallModules' script_finder: - ':ExecFiles' - '@Author::ETHER/Examples' name: '@Author::ETHER/Test::NoTabs' version: 0.05 - class: Dist::Zilla::Plugin::EOLTests name: '@Author::ETHER/EOLTests' version: 0.02 - class: Dist::Zilla::Plugin::MetaTests name: '@Author::ETHER/MetaTests' version: 5.006 - class: Dist::Zilla::Plugin::Test::Version name: '@Author::ETHER/Test::Version' version: 0.002004 - class: Dist::Zilla::Plugin::Test::CPAN::Changes name: '@Author::ETHER/Test::CPAN::Changes' version: 0.008 - class: Dist::Zilla::Plugin::Test::ChangesHasContent name: '@Author::ETHER/Test::ChangesHasContent' version: 0.006 - class: Dist::Zilla::Plugin::Test::MinimumVersion name: '@Author::ETHER/Test::MinimumVersion' version: 2.000005 - class: Dist::Zilla::Plugin::PodSyntaxTests name: '@Author::ETHER/PodSyntaxTests' version: 5.006 - class: Dist::Zilla::Plugin::PodCoverageTests name: '@Author::ETHER/PodCoverageTests' version: 5.006 - class: Dist::Zilla::Plugin::Test::PodSpelling name: '@Author::ETHER/Test::PodSpelling' version: 2.006001 - class: Dist::Zilla::Plugin::Test::Pod::No404s name: '@Author::ETHER/Test::Pod::No404s' version: 1.001 - class: Dist::Zilla::Plugin::Test::Kwalitee name: '@Author::ETHER/Test::Kwalitee' version: 2.07 - class: Dist::Zilla::Plugin::MojibakeTests name: '@Author::ETHER/MojibakeTests' version: 0.5 - class: Dist::Zilla::Plugin::Test::ReportPrereqs name: '@Author::ETHER/Test::ReportPrereqs' version: 0.010 - class: Dist::Zilla::Plugin::PruneCruft name: '@Author::ETHER/PruneCruft' version: 5.006 - class: Dist::Zilla::Plugin::ManifestSkip name: '@Author::ETHER/ManifestSkip' version: 5.006 - class: Dist::Zilla::Plugin::Authority name: '@Author::ETHER/Authority' version: 1.006 - class: Dist::Zilla::Plugin::Git::Describe name: '@Author::ETHER/Git::Describe' version: 0.003 - class: Dist::Zilla::Plugin::PkgVersion name: '@Author::ETHER/PkgVersion' version: 5.006 - class: Dist::Zilla::Plugin::PodWeaver config: Dist::Zilla::Plugin::PodWeaver: finder: - ':InstallModules' - ':ExecFiles' plugins: - class: Pod::Weaver::Plugin::EnsurePod5 name: '@CorePrep/EnsurePod5' version: 4.004 - class: Pod::Weaver::Plugin::H1Nester name: '@CorePrep/H1Nester' version: 4.004 - class: Pod::Weaver::Plugin::SingleEncoding name: '@Default/SingleEncoding' version: 4.004 - class: Pod::Weaver::Section::Name name: '@Default/Name' version: 4.004 - class: Pod::Weaver::Section::Version name: '@Default/Version' version: 4.004 - class: Pod::Weaver::Section::Region name: '@Default/prelude' version: 4.004 - class: Pod::Weaver::Section::Generic name: SYNOPSIS version: 4.004 - class: Pod::Weaver::Section::Generic name: DESCRIPTION version: 4.004 - class: Pod::Weaver::Section::Generic name: OVERVIEW version: 4.004 - class: Pod::Weaver::Section::Collect name: ATTRIBUTES version: 4.004 - class: Pod::Weaver::Section::Collect name: METHODS version: 4.004 - class: Pod::Weaver::Section::Collect name: FUNCTIONS version: 4.004 - class: Pod::Weaver::Section::Leftovers name: '@Default/Leftovers' version: 4.004 - class: Pod::Weaver::Section::Region name: '@Default/postlude' version: 4.004 - class: Pod::Weaver::Section::Authors name: '@Default/Authors' version: 4.004 - class: Pod::Weaver::Section::Legal name: '@Default/Legal' version: 4.004 - class: Pod::Weaver::Plugin::Transformer name: '-Transformer' version: 4.004 - class: Pod::Weaver::Plugin::StopWords name: '-StopWords' version: 1.008 - class: Pod::Weaver::Plugin::Encoding name: '-Encoding' version: 0.02 - class: Pod::Weaver::Section::Contributors name: Contributors version: 0.006 name: '@Author::ETHER/PodWeaver' version: 4.002 - class: Dist::Zilla::Plugin::NextRelease name: '@Author::ETHER/NextRelease' version: 5.006 - class: Dist::Zilla::Plugin::ReadmeAnyFromPod name: '@Author::ETHER/ReadmeAnyFromPod' version: 0.133060 - class: Dist::Zilla::Plugin::GithubMeta name: '@Author::ETHER/GithubMeta' version: 0.42 - class: Dist::Zilla::Plugin::AutoMetaResources name: '@Author::ETHER/AutoMetaResources' version: 1.20 - class: Dist::Zilla::Plugin::MetaNoIndex name: '@Author::ETHER/MetaNoIndex' version: 5.006 - class: Dist::Zilla::Plugin::FinderCode name: '@Author::ETHER/MetaProvides::Package/AUTOVIV/:InstallModulesPM' version: 5.006 - class: Dist::Zilla::Plugin::MetaProvides::Package config: Dist::Zilla::Plugin::MetaProvides::Package: {} Dist::Zilla::Role::MetaProvider::Provider: inherit_missing: 1 inherit_version: 1 meta_noindex: 1 name: '@Author::ETHER/MetaProvides::Package' version: 1.15000000 - class: Dist::Zilla::Plugin::MetaConfig name: '@Author::ETHER/MetaConfig' version: 5.006 - class: Dist::Zilla::Plugin::Prereqs::AuthorDeps name: '@Author::ETHER/Prereqs::AuthorDeps' version: 0.002 - class: Dist::Zilla::Plugin::MinimumPerl name: '@Author::ETHER/MinimumPerl' version: 1.003 - class: Dist::Zilla::Plugin::Prereqs config: Dist::Zilla::Plugin::Prereqs: phase: develop type: requires name: '@Author::ETHER/installer_requirements' version: 5.006 - class: Dist::Zilla::Plugin::Prereqs config: Dist::Zilla::Plugin::Prereqs: phase: develop type: recommends name: '@Author::ETHER/pluginbundle_version' version: 5.006 - class: Dist::Zilla::Plugin::RunExtraTests name: '@Author::ETHER/RunExtraTests' version: 0.015 - class: Dist::Zilla::Plugin::MakeMaker::Fallback name: '@Author::ETHER/MakeMaker::Fallback' version: 0.003 - class: Dist::Zilla::Plugin::ModuleBuildTiny name: '@Author::ETHER/ModuleBuildTiny' version: 0.005 - class: Dist::Zilla::Plugin::InstallGuide name: '@Author::ETHER/InstallGuide' version: 1.200001 - class: Dist::Zilla::Plugin::CheckSelfDependency name: '@Author::ETHER/CheckSelfDependency' version: 0.005 - class: Dist::Zilla::Plugin::Run::AfterBuild name: '@Author::ETHER/Run::AfterBuild' version: 0.020 - class: Dist::Zilla::Plugin::Git::Check name: '@Author::ETHER/initial check' version: 2.017 - class: Dist::Zilla::Plugin::Git::CheckFor::MergeConflicts name: '@Author::ETHER/Git::CheckFor::MergeConflicts' version: 0.008 - class: Dist::Zilla::Plugin::Git::CheckFor::CorrectBranch name: '@Author::ETHER/Git::CheckFor::CorrectBranch' version: 0.008 - class: Dist::Zilla::Plugin::Git::Remote::Check name: '@Author::ETHER/Git::Remote::Check' version: 0.1.2 - class: Dist::Zilla::Plugin::CheckPrereqsIndexed name: '@Author::ETHER/CheckPrereqsIndexed' version: 0.009 - class: Dist::Zilla::Plugin::TestRelease name: '@Author::ETHER/TestRelease' version: 5.006 - class: Dist::Zilla::Plugin::Git::Check name: '@Author::ETHER/after tests' version: 2.017 - class: Dist::Zilla::Plugin::UploadToCPAN name: '@Author::ETHER/UploadToCPAN' version: 5.006 - class: Dist::Zilla::Plugin::CopyFilesFromRelease name: '@Author::ETHER/CopyFilesFromRelease' version: 0.001 - class: Dist::Zilla::Plugin::Git::Commit name: '@Author::ETHER/Git::Commit' version: 2.017 - class: Dist::Zilla::Plugin::Git::Tag name: '@Author::ETHER/Git::Tag' version: 2.017 - class: Dist::Zilla::Plugin::GitHub::Update name: '@Author::ETHER/GitHub::Update' version: 0.35 - class: Dist::Zilla::Plugin::Git::Push name: '@Author::ETHER/Git::Push' version: 2.017 - class: Dist::Zilla::Plugin::InstallRelease name: '@Author::ETHER/InstallRelease' version: 0.008 - class: Dist::Zilla::Plugin::ConfirmRelease name: '@Author::ETHER/ConfirmRelease' version: 5.006 - class: Dist::Zilla::Plugin::Prereqs config: Dist::Zilla::Plugin::Prereqs: phase: develop type: requires name: '@Author::ETHER/via_options' version: 5.006 - class: Dist::Zilla::Plugin::Prereqs config: Dist::Zilla::Plugin::Prereqs: phase: runtime type: requires name: Prereqs version: 5.006 - class: Dist::Zilla::Plugin::Prereqs config: Dist::Zilla::Plugin::Prereqs: phase: test type: requires name: TestRequires version: 5.006 - class: Dist::Zilla::Plugin::Prereqs config: Dist::Zilla::Plugin::Prereqs: phase: develop type: requires name: DevelopRequires version: 5.006 - class: Dist::Zilla::Plugin::MetaResources name: additional version: 5.006 - class: Dist::Zilla::Plugin::ContributorsFromGit name: ContributorsFromGit version: 0.006 - class: Dist::Zilla::Plugin::FinderCode name: ':InstallModules' version: 5.006 - class: Dist::Zilla::Plugin::FinderCode name: ':IncModules' version: 5.006 - class: Dist::Zilla::Plugin::FinderCode name: ':TestFiles' version: 5.006 - class: Dist::Zilla::Plugin::FinderCode name: ':ExecFiles' version: 5.006 - class: Dist::Zilla::Plugin::FinderCode name: ':ShareFiles' version: 5.006 - class: Dist::Zilla::Plugin::FinderCode name: ':MainModule' version: 5.006 zilla: class: Dist::Zilla::Dist::Builder config: is_trial: 0 version: 5.006 x_authority: cpan:FLORA x_contributors: - 'Dave Rolsky ' - 'David Steinbrunner ' - 'Karen Etheridge ' - 'Marcus Ramberg ' - 'Peter E Karman ' - 'Tomas Doran (t0m) ' MooseX-MethodAttributes-0.29/README000644 000767 000024 00000000463 12241303636 017302 0ustar00etherstaff000000 000000 This archive contains the distribution MooseX-MethodAttributes, version 0.29: code attribute introspection This software is copyright (c) 2009 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. MooseX-MethodAttributes-0.29/README.md000644 000767 000024 00000001724 12241303636 017702 0ustar00etherstaff000000 000000 # NAME MooseX::MethodAttributes - code attribute introspection # VERSION version 0.29 # SYNOPSIS package MyClass; use Moose; use MooseX::MethodAttributes; sub foo : Bar Baz('corge') { ... } my $attrs = MyClass->meta->get_method('foo')->attributes; # ["Bar", "Baz('corge')"] # DESCRIPTION This module allows code attributes of methods to be introspected using Moose meta method objects. # AUTHORS - Florian Ragwitz - Tomas Doran # COPYRIGHT AND LICENSE This software is copyright (c) 2009 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. # CONTRIBUTORS - Dave Rolsky - David Steinbrunner - Karen Etheridge - Marcus Ramberg - Peter E Karman - Tomas Doran (t0m) MooseX-MethodAttributes-0.29/t/000755 000767 000024 00000000000 12241303637 016663 5ustar00etherstaff000000 000000 MooseX-MethodAttributes-0.29/weaver.ini000644 000767 000024 00000000131 12241303636 020404 0ustar00etherstaff000000 000000 [@Default] [-Transformer] transformer = List [-StopWords] [-Encoding] [Contributors] MooseX-MethodAttributes-0.29/xt/000755 000767 000024 00000000000 12241303637 017053 5ustar00etherstaff000000 000000 MooseX-MethodAttributes-0.29/xt/author/000755 000767 000024 00000000000 12241303637 020355 5ustar00etherstaff000000 000000 MooseX-MethodAttributes-0.29/xt/release/000755 000767 000024 00000000000 12241303637 020473 5ustar00etherstaff000000 000000 MooseX-MethodAttributes-0.29/xt/release/changes_has_content.t000644 000767 000024 00000002010 12241303637 024646 0ustar00etherstaff000000 000000 #!perl use Test::More tests => 2; note 'Checking Changes'; my $changes_file = 'Changes'; my $newver = '0.29'; 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-MethodAttributes-0.29/xt/release/cpan-changes.t000644 000767 000024 00000000263 12241303637 023210 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-MethodAttributes-0.29/xt/release/distmeta.t000644 000767 000024 00000000217 12241303637 022472 0ustar00etherstaff000000 000000 #!perl use Test::More; eval "use Test::CPAN::Meta"; plan skip_all => "Test::CPAN::Meta required for testing META.yml" if $@; meta_yaml_ok(); MooseX-MethodAttributes-0.29/xt/release/eol.t000644 000767 000024 00000000240 12241303636 021432 0ustar00etherstaff000000 000000 use strict; use warnings; use Test::More; eval 'use Test::EOL'; plan skip_all => 'Test::EOL required' if $@; all_perl_files_ok({ trailing_whitespace => 1 }); MooseX-MethodAttributes-0.29/xt/release/kwalitee.t000644 000767 000024 00000000166 12241303637 022470 0ustar00etherstaff000000 000000 # this test was generated with Dist::Zilla::Plugin::Test::Kwalitee 2.07 use strict; use warnings; use Test::Kwalitee; MooseX-MethodAttributes-0.29/xt/release/minimum-version.t000644 000767 000024 00000000271 12241303637 024016 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.008001} ); MooseX-MethodAttributes-0.29/xt/release/mojibake.t000644 000767 000024 00000000406 12241303637 022441 0ustar00etherstaff000000 000000 #!perl use strict; use warnings qw(all); use Test::More; ## no critic (ProhibitStringyEval, RequireCheckingReturnValueOfEval) eval q(use Test::Mojibake); plan skip_all => q(Test::Mojibake required for source encoding testing) if $@; all_files_encoding_ok(); MooseX-MethodAttributes-0.29/xt/release/no-tabs.t000644 000767 000024 00000001655 12241303636 022231 0ustar00etherstaff000000 000000 use strict; use warnings; # this test was generated with Dist::Zilla::Plugin::Test::NoTabs 0.05 use Test::More 0.88; use Test::NoTabs; my @files = ( 'lib/MooseX/MethodAttributes.pm', 'lib/MooseX/MethodAttributes/Inheritable.pm', 'lib/MooseX/MethodAttributes/Role.pm', 'lib/MooseX/MethodAttributes/Role/AttrContainer.pm', 'lib/MooseX/MethodAttributes/Role/AttrContainer/Inheritable.pm', 'lib/MooseX/MethodAttributes/Role/Meta/Class.pm', 'lib/MooseX/MethodAttributes/Role/Meta/Map.pm', 'lib/MooseX/MethodAttributes/Role/Meta/Method.pm', 'lib/MooseX/MethodAttributes/Role/Meta/Method/MaybeWrapped.pm', 'lib/MooseX/MethodAttributes/Role/Meta/Method/Wrapped.pm', 'lib/MooseX/MethodAttributes/Role/Meta/Role.pm', 'lib/MooseX/MethodAttributes/Role/Meta/Role/Application.pm', 'lib/MooseX/MethodAttributes/Role/Meta/Role/Application/Summation.pm' ); notabs_ok($_) foreach @files; done_testing; MooseX-MethodAttributes-0.29/xt/release/pod-coverage.t000644 000767 000024 00000000527 12241303637 023237 0ustar00etherstaff000000 000000 #!perl use Test::More; eval "use Test::Pod::Coverage 1.08"; plan skip_all => "Test::Pod::Coverage 1.08 required for testing POD coverage" if $@; eval "use Pod::Coverage::TrustPod"; plan skip_all => "Pod::Coverage::TrustPod required for testing POD coverage" if $@; all_pod_coverage_ok({ coverage_class => 'Pod::Coverage::TrustPod' }); MooseX-MethodAttributes-0.29/xt/release/pod-no404s.t000644 000767 000024 00000000527 12241303637 022473 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-MethodAttributes-0.29/xt/release/pod-syntax.t000644 000767 000024 00000000212 12241303637 022761 0ustar00etherstaff000000 000000 #!perl use Test::More; eval "use Test::Pod 1.41"; plan skip_all => "Test::Pod 1.41 required for testing POD" if $@; all_pod_files_ok(); MooseX-MethodAttributes-0.29/xt/release/test-version.t000644 000767 000024 00000000643 12241303637 023325 0ustar00etherstaff000000 000000 use strict; use warnings; use Test::More; # generated by Dist::Zilla::Plugin::Test::Version 0.002004 BEGIN { eval "use Test::Version; 1;" or die $@; } my @imports = ( 'version_all_ok' ); my $params = { is_strict => 1, has_version => 1, }; push @imports, $params if version->parse( $Test::Version::VERSION ) >= version->parse('1.002'); Test::Version->import(@imports); version_all_ok; done_testing; MooseX-MethodAttributes-0.29/xt/author/00-compile.t000644 000767 000024 00000003256 12241303637 022415 0ustar00etherstaff000000 000000 use strict; use warnings; # this test was generated with Dist::Zilla::Plugin::Test::Compile 2.037 use Test::More 0.94 tests => 13 + ($ENV{AUTHOR_TESTING} ? 1 : 0); my @module_files = ( 'MooseX/MethodAttributes.pm', 'MooseX/MethodAttributes/Inheritable.pm', 'MooseX/MethodAttributes/Role.pm', 'MooseX/MethodAttributes/Role/AttrContainer.pm', 'MooseX/MethodAttributes/Role/AttrContainer/Inheritable.pm', 'MooseX/MethodAttributes/Role/Meta/Class.pm', 'MooseX/MethodAttributes/Role/Meta/Map.pm', 'MooseX/MethodAttributes/Role/Meta/Method.pm', 'MooseX/MethodAttributes/Role/Meta/Method/MaybeWrapped.pm', 'MooseX/MethodAttributes/Role/Meta/Method/Wrapped.pm', 'MooseX/MethodAttributes/Role/Meta/Role.pm', 'MooseX/MethodAttributes/Role/Meta/Role/Application.pm', 'MooseX/MethodAttributes/Role/Meta/Role/Application/Summation.pm' ); # no fake home requested my $inc_switch = -d 'blib' ? '-Mblib' : '-Ilib'; use File::Spec; use IPC::Open3; use IO::Handle; my @warnings; for my $lib (@module_files) { # see L open my $stdin, '<', File::Spec->devnull or die "can't open devnull: $!"; my $stderr = IO::Handle->new; my $pid = open3($stdin, '>&STDERR', $stderr, $^X, $inc_switch, '-e', "require q[$lib]"); binmode $stderr, ':crlf' if $^O eq 'MSWin32'; my @_warnings = <$stderr>; waitpid($pid, 0); is($?, 0, "$lib loaded ok"); if (@_warnings) { warn @_warnings; push @warnings, @_warnings; } } is(scalar(@warnings), 0, 'no warnings found') if $ENV{AUTHOR_TESTING}; BAIL_OUT("Compilation problems") if !Test::More->builder->is_passing; MooseX-MethodAttributes-0.29/xt/author/pod-spell.t000644 000767 000024 00000001001 12241303637 022431 0ustar00etherstaff000000 000000 use strict; use warnings; use Test::More; # generated by Dist::Zilla::Plugin::Test::PodSpelling 2.006001 use Test::Spelling 0.12; use Pod::Wordlist; add_stopwords(); all_pod_files_spelling_ok( qw( bin lib ) ); __DATA__ Florian Ragwitz rafl Tomas Doran bobtfish Dave Rolsky autarch David Steinbrunner dsteinbrunner Karen Etheridge ether Marcus Ramberg marcus Peter Karman pek t0m lib MooseX MethodAttributes Inheritable Role Meta Class Application AttrContainer Method Wrapped Map MaybeWrapped Summation MooseX-MethodAttributes-0.29/t/00-report-prereqs.t000644 000767 000024 00000006641 12241303637 022266 0ustar00etherstaff000000 000000 #!perl use strict; use warnings; # This test was generated by Dist::Zilla::Plugin::Test::ReportPrereqs 0.010 use Test::More tests => 1; use ExtUtils::MakeMaker; use File::Spec::Functions; use List::Util qw/max/; my @modules = qw( CPAN::Meta CPAN::Meta::Requirements Carp ExtUtils::MakeMaker Module::Build::Tiny Moose MooseX::Types::Moose Test::Fatal Test::More Test::Requires namespace::autoclean perl ); my %exclude = map {; $_ => 1 } qw( ); my ($source) = grep { -f $_ } qw/MYMETA.json MYMETA.yml META.json/; $source = "META.yml" unless defined $source; # replace modules with dynamic results from MYMETA.json if we can # (hide CPAN::Meta from prereq scanner) my $cpan_meta = "CPAN::Meta"; my $cpan_meta_req = "CPAN::Meta::Requirements"; my $all_requires; if ( -f $source && eval "require $cpan_meta" ) { ## no critic if ( my $meta = eval { CPAN::Meta->load_file($source) } ) { # Get ALL modules mentioned in META (any phase/type) my $prereqs = $meta->prereqs; delete $prereqs->{develop} if not $ENV{AUTHOR_TESTING}; my %uniq = map {$_ => 1} map { keys %$_ } map { values %$_ } values %$prereqs; $uniq{$_} = 1 for @modules; # don't lose any static ones @modules = sort grep { ! $exclude{$_} } keys %uniq; # If verifying, merge 'requires' only for major phases if ( 1 ) { $prereqs = $meta->effective_prereqs; # get the object, not the hash if (eval "require $cpan_meta_req; 1") { ## no critic $all_requires = $cpan_meta_req->new; for my $phase ( qw/configure build test runtime/ ) { $all_requires->add_requirements( $prereqs->requirements_for($phase, 'requires') ); } } } } } my @reports = [qw/Version Module/]; my @dep_errors; my $req_hash = defined($all_requires) ? $all_requires->as_string_hash : {}; for my $mod ( @modules ) { next if $mod eq 'perl'; my $file = $mod; $file =~ s{::}{/}g; $file .= ".pm"; my ($prefix) = grep { -e catfile($_, $file) } @INC; if ( $prefix ) { my $ver = MM->parse_version( catfile($prefix, $file) ); $ver = "undef" unless defined $ver; # Newer MM should do this anyway push @reports, [$ver, $mod]; if ( 1 && $all_requires ) { my $req = $req_hash->{$mod}; if ( defined $req && length $req ) { if ( ! defined eval { version->parse($ver) } ) { push @dep_errors, "$mod version '$ver' cannot be parsed (version '$req' required)"; } elsif ( ! $all_requires->accepts_module( $mod => $ver ) ) { push @dep_errors, "$mod version '$ver' is not in required range '$req'"; } } } } else { push @reports, ["missing", $mod]; if ( 1 && $all_requires ) { my $req = $req_hash->{$mod}; if ( defined $req && length $req ) { push @dep_errors, "$mod is not installed (version '$req' required)"; } } } } if ( @reports ) { my $vl = max map { length $_->[0] } @reports; my $ml = max map { length $_->[1] } @reports; splice @reports, 1, 0, ["-" x $vl, "-" x $ml]; diag "\nVersions for all modules listed in $source (including optional ones):\n", map {sprintf(" %*s %*s\n",$vl,$_->[0],-$ml,$_->[1])} @reports; } if ( @dep_errors ) { diag join("\n", "\n*** WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING ***\n", "The following REQUIRED prerequisites were not satisfied:\n", @dep_errors, "\n" ); } pass; # vim: ts=2 sts=2 sw=2 et: MooseX-MethodAttributes-0.29/t/basic.t000644 000767 000024 00000000465 12241303636 020135 0ustar00etherstaff000000 000000 use strict; use warnings; use Test::More tests => 2; use lib 't/lib'; use TestClass; is_deeply( TestClass->meta->get_method('foo')->attributes, [q{SomeAttribute}, q{AnotherAttribute('with argument')}], ); is_deeply( SubClass->meta->get_method('foo')->attributes, [(q{Attributes}) x 3], ); MooseX-MethodAttributes-0.29/t/calling.t000644 000767 000024 00000000373 12241303636 020463 0ustar00etherstaff000000 000000 use strict; use warnings; use lib 't/lib'; use Test::More tests => 3; use BaseClass; use SubClass; BaseClass->affe; is(BaseClass::no_calls_to_affe(), 1); SubClass->affe; is(BaseClass::no_calls_to_affe(), 2); is(SubClass::no_calls_to_affe(), 1); MooseX-MethodAttributes-0.29/t/catalyst.t000644 000767 000024 00000002316 12241303636 020675 0ustar00etherstaff000000 000000 use strict; use warnings; use lib 't/lib'; use CatalystLike::Controller; use CatalystLike::Controller::Moose; use CatalystLike::Controller::Moose::MethodModifiers; use Test::More tests => 13; use Test::Fatal; my @methods; is exception { @methods = CatalystLike::Controller::Moose::MethodModifiers->meta->get_nearest_methods_with_attributes; }, undef, 'Can get nearest methods'; is @methods, 3; my $method = (grep { $_->name eq 'get_attribute' } @methods)[0]; ok $method; is $method->body, \&CatalystLike::Controller::Moose::MethodModifiers::get_attribute; is $CatalystLike::Controller::Moose::GET_ATTRIBUTE_CALLED, 0; is $CatalystLike::Controller::Moose::MethodModifiers::GET_ATTRIBUTE_CALLED, 0; is $CatalystLike::Controller::Moose::GET_FOO_CALLED, 0; is $CatalystLike::Controller::Moose::BEFORE_GET_FOO_CALLED, 0; $method->body->(); (grep { $_->name eq 'get_foo' } @methods)[0]->body->(); is $CatalystLike::Controller::Moose::GET_ATTRIBUTE_CALLED, 1; is $CatalystLike::Controller::Moose::MethodModifiers::GET_ATTRIBUTE_CALLED, 1; is $CatalystLike::Controller::Moose::GET_FOO_CALLED, 1; is $CatalystLike::Controller::Moose::BEFORE_GET_FOO_CALLED, 1; my $other = (grep { $_->name eq 'other' } @methods)[0]; ok $other; MooseX-MethodAttributes-0.29/t/catalyst_role.t000644 000767 000024 00000006604 12241303636 021722 0ustar00etherstaff000000 000000 use strict; use warnings; { package Catalyst::Controller; use Moose; use namespace::autoclean; use MooseX::MethodAttributes; with 'MooseX::MethodAttributes::Role::AttrContainer::Inheritable'; } { package TestApp::ControllerRole; use Moose::Role -traits => 'MethodAttributes'; use namespace::autoclean; sub get_attribute : Local { $TestApp::Controller::Moose::GET_ATTRIBUTE_CALLED++ } sub get_foo : Local { $TestApp::Controller::Moose::GET_FOO_CALLED++ } # Exactly the same as last test except for modifier here before 'get_foo' => sub { $TestApp::Controller::Moose::BEFORE_GET_FOO_CALLED++ }; sub other : Local {} } { package TestApp::Controller::Moose; use Moose; use namespace::autoclean; BEGIN { extends qw/Catalyst::Controller/; } our $GET_ATTRIBUTE_CALLED = 0; our $GET_FOO_CALLED = 0; our $BEFORE_GET_FOO_CALLED = 0; with 'TestApp::ControllerRole'; } { package TestApp::Controller::Moose::MethodModifiers; use Moose; use namespace::autoclean; BEGIN { extends qw/TestApp::Controller::Moose/; } our $GET_ATTRIBUTE_CALLED = 0; after get_attribute => sub { $GET_ATTRIBUTE_CALLED++; }; # Wrapped only, should show up sub other : Local {} after other => sub {}; # Wrapped, wrapped should show up. } use Test::More tests => 21; use Test::Fatal; { my $method = TestApp::Controller::Moose->meta->get_method('get_foo'); ok $method->meta->does_role('MooseX::MethodAttributes::Role::Meta::Method::MaybeWrapped'), 'Method metaclass for get_foo in ::Moose does role MaybeWrapped'; $method = TestApp::Controller::Moose::MethodModifiers->meta->get_method('other'); ok $method->meta->does_role('MooseX::MethodAttributes::Role::Meta::Method::MaybeWrapped'), 'Method metaclass for other in ::Moose::MethodModifiers does role MaybeWrapped' } { my @methods = TestApp::Controller::Moose->meta->get_all_methods_with_attributes; my @local_methods = TestApp::Controller::Moose->meta->get_method_with_attributes_list; is @methods, 3; is @local_methods, 3; } { my @methods = TestApp::Controller::Moose::MethodModifiers->meta->get_all_methods_with_attributes; my @local_methods = TestApp::Controller::Moose::MethodModifiers->meta->get_method_with_attributes_list; is @methods, 3; is @local_methods, 1; } my @methods; is exception { @methods = TestApp::Controller::Moose::MethodModifiers->meta->get_nearest_methods_with_attributes; }, undef, 'Can get nearest methods'; is @methods, 3; my $method = (grep { $_->name eq 'get_attribute' } @methods)[0]; ok $method; is $method->body, \&TestApp::Controller::Moose::MethodModifiers::get_attribute; is $TestApp::Controller::Moose::GET_ATTRIBUTE_CALLED, 0; is $TestApp::Controller::Moose::MethodModifiers::GET_ATTRIBUTE_CALLED, 0; is $TestApp::Controller::Moose::GET_FOO_CALLED, 0; is $TestApp::Controller::Moose::BEFORE_GET_FOO_CALLED, 0; is exception { $method->body->() }, undef, 'can call $method->body sub'; is exception { (grep { $_->name eq 'get_foo' } @methods)[0]->body->(); }, undef, 'can find get_foo method'; is $TestApp::Controller::Moose::GET_ATTRIBUTE_CALLED, 1; is $TestApp::Controller::Moose::MethodModifiers::GET_ATTRIBUTE_CALLED, 1; is $TestApp::Controller::Moose::GET_FOO_CALLED, 1; is $TestApp::Controller::Moose::BEFORE_GET_FOO_CALLED, 1; my $other = (grep { $_->name eq 'other' } @methods)[0]; ok $other; MooseX-MethodAttributes-0.29/t/catalyst_role_method_exclusion.t000644 000767 000024 00000001275 12241303637 025353 0ustar00etherstaff000000 000000 use strict; use warnings; { package Catalyst::Controller; use Moose; use namespace::autoclean; use MooseX::MethodAttributes; with 'MooseX::MethodAttributes::Role::AttrContainer::Inheritable'; } { package ControllerRole; use Moose::Role -traits => 'MethodAttributes'; use namespace::autoclean; sub excluded : Local {} } { package roles::Controller::Foo; use Moose; BEGIN { extends 'Catalyst::Controller'; } with 'ControllerRole' => { -excludes => 'not_attributed' }; } use Test::More tests => 1; my $meta = roles::Controller::Foo->meta; TODO: { local $TODO = 'Aliasing and exclusion does not work'; ok !$meta->get_method('excluded'); } MooseX-MethodAttributes-0.29/t/catalyst_role_preexist_methods.t000644 000767 000024 00000002654 12241303637 025372 0ustar00etherstaff000000 000000 use strict; use warnings; { package Catalyst::Controller; use Moose; use namespace::autoclean; use MooseX::MethodAttributes; with 'MooseX::MethodAttributes::Role::AttrContainer::Inheritable'; } { package ControllerRole; use Moose::Role -traits => 'MethodAttributes'; use namespace::autoclean; sub not_attributed : Local {} # This method should _not_ get composed. } { package roles::Controller::Foo; use Moose; BEGIN { extends 'Catalyst::Controller'; } with 'ControllerRole'; sub load : Chained('base') PathPart('') CaptureArgs(1) { } sub base : Chained('/') PathPart('foo') CaptureArgs(0) { } sub entry : Chained('load') PathPart('') CaptureArgs(0) { } sub some_page : Chained('entry') { } sub not_attributed {} } use Test::More tests => 10; my $meta = roles::Controller::Foo->meta; my %expected = ( base => ["Chained('/')", "PathPart('foo')", "CaptureArgs(0)"], load => ["Chained('base')", "PathPart('')", "CaptureArgs(1)"], entry => ["Chained('load')", "PathPart('')", "CaptureArgs(0)"], some_page => ["Chained('entry')"], not_attributed => [], ); foreach my $method_name (keys %expected) { my $method = $meta->get_method($method_name); ok $method, "Have method $method_name"; my $attrs = $meta->get_method_attributes($method->body); is_deeply $attrs, $expected{$method_name}, "Attributes on $method_name as expected"; } MooseX-MethodAttributes-0.29/t/inherited.t000644 000767 000024 00000002206 12241303636 021022 0ustar00etherstaff000000 000000 use strict; use warnings; use Test::More tests => 9; use lib 't/lib'; use Moose::Util qw/does_role/; BEGIN { use_ok 'SubClass'; } BEGIN { use_ok 'SubClassUseBaseAndUseMoose'; } my $meta = SubClass->meta; my $meta2 = SubClassUseBaseAndUseMoose->meta; ok( does_role( BaseClass->meta->method_metaclass => 'MooseX::MethodAttributes::Role::Meta::Method' ) => 'BaseClass does method meta role' ); ok( does_role( $meta->method_metaclass => 'MooseX::MethodAttributes::Role::Meta::Method' ) => 'SubClass does method meta role' ); ok( does_role( $meta2->method_metaclass => 'MooseX::MethodAttributes::Role::Meta::Method' ) => 'SubClassUseBaseAndUseMoose does method meta role' ); is_deeply( $meta2->get_method('bar')->attributes, ['Bar'], ); is_deeply( $meta->get_method('bar')->attributes, ['Bar'], ); is_deeply( $meta->find_method_by_name('foo')->attributes, ['Foo'], ); is_deeply( [map { [$_->name => $_->attributes] } SubClass->meta->get_all_methods_with_attributes], [['affe', ['Birne']], ['foo', ['Foo']], ['moo', ['Moo']], ['bar', ['Bar']]], ); MooseX-MethodAttributes-0.29/t/inherited_non_moose_multilevel.t000644 000767 000024 00000000140 12241303637 025334 0ustar00etherstaff000000 000000 use strict; use warnings; use Test::More tests => 1; use lib 't/lib'; use_ok('SubSubClass'); MooseX-MethodAttributes-0.29/t/late_reinitialize.t000644 000767 000024 00000002065 12241303636 022547 0ustar00etherstaff000000 000000 use strict; use warnings; use Test::More; { package Foo; use Moose::Role; sub role_method {} } { package BaseClass; use Moose; BEGIN { with 'MooseX::MethodAttributes::Role::AttrContainer::Inheritable' } } # FIXME - This now works with later Moose versions, but needs a # bisect and a version bump to work out when it started working! TODO: { package Bar; use Test::More; BEGIN { $TODO = "Known broken" } use Moose; BEGIN { ::ok(!Bar->meta->has_method('role_method')) } BEGIN { ::ok(!Bar->can('role_method')) } BEGIN { extends 'BaseClass'; with 'Foo' } BEGIN { ::ok( Bar->meta->has_method('role_method')) } BEGIN { ::ok( Bar->can('role_method')) } use namespace::autoclean; BEGIN { ::ok( Bar->meta->has_method('role_method')) } BEGIN { ::ok( Bar->can('role_method')) } sub foo : Bar {} BEGIN { ::ok( Bar->meta->has_method('role_method')) } BEGIN { ::ok( Bar->can('role_method')) } ::ok( Bar->meta->has_method('role_method')); ::ok( Bar->can('role_method')); } done_testing; MooseX-MethodAttributes-0.29/t/lib/000755 000767 000024 00000000000 12241303637 017431 5ustar00etherstaff000000 000000 MooseX-MethodAttributes-0.29/t/multiple_roles.t000644 000767 000024 00000001176 12241303636 022113 0ustar00etherstaff000000 000000 use strict; use warnings; use lib 't/lib'; use Test::More tests => 4; use MooseX::MethodAttributes (); # Note - these test classes say use MooseX::MethodAttributes::Role, which is the new 'nicer' # way of doing things. use UsesMultipleRoles; my $meta = UsesMultipleRoles->meta; my $foo = $meta->get_method('foo'); ok $foo, 'Got foo method'; my $bar = $meta->get_method('bar'); ok $bar, 'Got bar method'; my $foo_attrs = $meta->get_method_attributes($foo->body); ok @$foo_attrs, 'foo method has some attributes'; my $bar_attrs = $meta->get_method_attributes($bar->body); ok @$bar_attrs, 'bar method has some attributes'; MooseX-MethodAttributes-0.29/t/multiple_roles_astrait.t000644 000767 000024 00000002703 12241303637 023640 0ustar00etherstaff000000 000000 use strict; use warnings; use MooseX::MethodAttributes (); use Test::More tests => 2; # This tests the 'old' form of using MooseX::MethodAttributes with -traits => 'MethodAttributes' # The new (and nicer) way is to just say use MooseX::MethodAttributes::Role { package Bar; use Moose::Role -traits => 'MethodAttributes'; use namespace::autoclean; sub item :Chained(/app/root) PathPrefix CaptureArgs(1) { } } { package Foo; use Moose::Role -traits => 'MethodAttributes'; use namespace::autoclean; sub live :Chained(item) PathPart Args(0) { } sub foo :Attr { } sub other :Attr { } } { package Catalyst::Controller; use Moose; use namespace::autoclean; with 'MooseX::MethodAttributes::Role::AttrContainer::Inheritable'; } use Moose::Util; use Moose::Meta::Class;; Moose::Meta::Class->create("MyClass", superclasses => [qw/Catalyst::Controller/], roles => ["Bar", "Foo"], ); ok MyClass->meta->can('get_all_methods_with_attributes') or skip 'Role combination and method attributes known broken', 1; my @methods; for my $method (sort { $a->name cmp $b->name } MyClass->meta->get_all_methods_with_attributes) { push(@methods, $method->name . " :" . join("|", @{ $method->attributes })); } is_deeply \@methods, [ 'foo :Attr', 'item :Chained(/app/root)|PathPrefix|CaptureArgs(1)', 'live :Chained(item)|PathPart|Args(0)', 'other :Attr', ], 'methods with expected attributes found'; MooseX-MethodAttributes-0.29/t/override_method_with_no_attribute.t000644 000767 000024 00000001461 12241303637 026043 0ustar00etherstaff000000 000000 use strict; use warnings; use Test::More tests => 7; use lib 't/lib'; use TestClass; is_deeply( TestClass->meta->get_method('bar')->attributes, [q{SomeAttribute}], ); is_deeply( SubClass->meta->get_method('bar')->attributes, [], ); my @methods = SubClass->meta->get_all_methods_with_attributes; my $bar_method = (grep { $_->name eq 'bar' } @methods)[0]; ok $bar_method; # This is correct, we get the bar method from TestClass back, # as that is the one with attributes. isnt $bar_method, SubClass->meta->get_method('bar'); is $bar_method, TestClass->meta->get_method('bar'); my @methods_filtered = SubClass->meta->get_nearest_methods_with_attributes; is( scalar(@methods_filtered), (scalar(@methods)-1) ); my $no_bar_method = (grep { $_->name eq 'bar' } @methods_filtered)[0]; is $no_bar_method, undef; MooseX-MethodAttributes-0.29/t/param_role.t000644 000767 000024 00000001025 12241303636 021166 0ustar00etherstaff000000 000000 use strict; use warnings; use Test::More; use Test::Requires 'MooseX::Role::Parameterized'; package Foo; use MooseX::Role::Parameterized -traits => 'MooseX::MethodAttributes::Role::Meta::Role'; parameter foo => ( isa => "Str", ); role { my $p = shift; method test_foo => sub { my ($self, $should_be) = @_; package main; is $p->foo, $should_be, 'parameter is correct'; }; }; package UseFoo; use Moose; with Foo => { foo => 23 }; package main; UseFoo->new->test_foo(23); done_testing; MooseX-MethodAttributes-0.29/t/role.t000644 000767 000024 00000001144 12241303636 020010 0ustar00etherstaff000000 000000 use strict; use warnings; use lib 't/lib'; use Moose::Util qw/find_meta does_role/; use Test::More tests => 4; use MooseX::MethodAttributes (); use RoleWithAttributes; my $meta = find_meta('RoleWithAttributes'); isa_ok($meta, 'Moose::Meta::Role'); ok does_role($meta, 'MooseX::MethodAttributes::Role::Meta::Role'), 'Role metaclass does the role for metaclasses with attribute decorated methods'; my $foo = $meta->get_method('foo'); ok $foo, 'Got foo method'; ok does_role($foo, 'MooseX::MethodAttributes::Role::Meta::Method'), 'foo method meta instance does the attribute decorated method role'; MooseX-MethodAttributes-0.29/t/role_applied.t000644 000767 000024 00000001073 12241303636 021507 0ustar00etherstaff000000 000000 use strict; use warnings; use lib 't/lib'; use Moose::Util qw/does_role/; use Test::More tests => 4; use MooseX::MethodAttributes (); use ClassUsingRoleWithAttributes; my $meta = ClassUsingRoleWithAttributes->meta; isa_ok($meta, 'Moose::Meta::Class'); my @methods = $meta->get_all_methods_with_attributes; ok scalar(@methods), 'Have methods with attributes'; my $foo = $meta->get_method('foo'); ok $foo, 'Got foo method'; ok does_role($foo, 'MooseX::MethodAttributes::Role::Meta::Method'), 'foo method meta instance does the attribute decorated method role'; MooseX-MethodAttributes-0.29/t/role_comp.t000644 000767 000024 00000002514 12241303636 021030 0ustar00etherstaff000000 000000 use strict; use warnings; use Test::More; use Test::Fatal; use Moose::Util qw/apply_all_roles/; { package BaseClass; use Moose; use MooseX::MethodAttributes; no Moose; } { package AClass; use Moose; BEGIN { extends 'BaseClass' } sub foo : Bar {} no Moose; } { package Role1; use Moose::Role; our $called = 0; sub pack { $called++ } no Moose::Role; } { package Role2; use Moose::Role; our $called = 0; around pack => sub { my ($orig, $self, @rest) = @_; $called++; $self->$orig(@rest); }; no Moose::Role; } { package BClass; use Moose; BEGIN { extends 'AClass' }; sub moo : Quux {} ::is ::exception { with qw/Role1 Role2/ }, undef; no Moose; } { package CClass; use Moose; BEGIN { extends 'AClass' }; sub moo : Quux {} no Moose; } my $c = CClass->new; is exception { apply_all_roles($c, qw/Role1 Role2/) }, undef; foreach my $i (BClass->new, $c) { $Role1::called = $Role2::called = 0; can_ok $i, 'pack' and $i->pack; is $Role1::called, 1; is $Role2::called, 1; is_deeply( $i->meta->find_method_by_name('foo')->attributes, [(q{Bar})], ); is_deeply( $i->meta->find_method_by_name('moo')->attributes, [(q{Quux})], ); } done_testing; MooseX-MethodAttributes-0.29/t/role_in_role.t000644 000767 000024 00000004334 12241303636 021523 0ustar00etherstaff000000 000000 use strict; use warnings; use MooseX::MethodAttributes (); { package FirstRole; use Moose::Role -traits => 'MethodAttributes'; use namespace::autoclean; our $FOO_CALLED = 0; sub foo : Local { $FOO_CALLED++; } our $BAR_CALLED = 0; sub bar : Local { $BAR_CALLED++; } our $BEFORE_BAR_CALLED = 0; before 'bar' => sub { $BEFORE_BAR_CALLED++; }; our $BAZ_CALLED = 0; sub baz : Local { $BAZ_CALLED++; } our $QUUX_CALLED = 0; sub quux : Local { $QUUX_CALLED++; } } { package SecondRole; use Moose::Role; use namespace::autoclean; with 'FirstRole'; our $BEFORE_BAZ_CALLED = 0; before 'baz' => sub { $BEFORE_BAZ_CALLED++ }; } { package MyClass; use Moose; use namespace::autoclean; with 'SecondRole'; our $BEFORE_QUUX_CALLED = 0; before 'quux' => sub { $BEFORE_QUUX_CALLED++; }; } use Test::More tests => 25; use Test::Fatal; my @method_names = qw/foo bar baz quux/; foreach my $class (qw/FirstRole SecondRole MyClass/) { foreach my $method_name (@method_names) { my $method = $class->meta->get_method($method_name); ok( ( $method->meta->does_role('MooseX::MethodAttributes::Role::Meta::Method') or $method->meta->does_role('MooseX::MethodAttributes::Role::Meta::Method::MaybeWrapped') ), sprintf( 'Method metaclass for %s in %s does role' => $method_name, $class ) ); } } foreach my $method_name (@method_names) { is exception { MyClass->$method_name(); }, undef, "Call $method_name method"; } is $FirstRole::FOO_CALLED, 1, '->foo called once'; is $FirstRole::BAR_CALLED, 1, '->bar called once'; is $FirstRole::BAZ_CALLED, 1, '->baz called once'; is $FirstRole::QUUX_CALLED, 1, '->quux called once'; is $FirstRole::BEFORE_BAR_CALLED, 1, 'modifier for ->bar called once'; is $SecondRole::BEFORE_BAZ_CALLED, 1, 'modifier for ->baz called once'; is $MyClass::BEFORE_QUUX_CALLED, 1, 'modifier for ->quux called once'; { my @methods = MyClass->meta->get_all_methods_with_attributes; my @local_methods = MyClass->meta->get_method_with_attributes_list; is @methods, 4; is @local_methods, 4; } MooseX-MethodAttributes-0.29/t/role_in_role_more.t000644 000767 000024 00000002322 12241303636 022540 0ustar00etherstaff000000 000000 use strict; use warnings; use MooseX::MethodAttributes (); { package Bar; use Moose::Role -traits => 'MethodAttributes'; use namespace::autoclean; sub item :Chained(/app/root) PathPrefix CaptureArgs(1) { } } { package Foo; use Moose::Role -traits => 'MethodAttributes'; use namespace::autoclean; with 'Bar'; sub live :Chained(item) PathPart Args(0) { } sub foo :Attr { } sub other :Attr { } } { package Catalyst::Controller; use Moose; use namespace::autoclean; with 'MooseX::MethodAttributes::Role::AttrContainer::Inheritable'; } use Test::More tests => 1; use Moose::Util; use Moose::Meta::Class;; my @roles = qw/Foo/; Moose::Meta::Class->create("MyClass", superclasses => [qw/Catalyst::Controller/], roles => \@roles, ); my @methods; for my $method (sort { $a->name cmp $b->name } MyClass->meta->get_all_methods_with_attributes) { push(@methods, $method->name . " :" . join("|", @{ $method->attributes })); } is_deeply \@methods, [ 'foo :Attr', 'item :Chained(/app/root)|PathPrefix|CaptureArgs(1)', 'live :Chained(item)|PathPart|Args(0)', 'other :Attr', ], 'methods with expected attributes found' or diag explain(\@methods); MooseX-MethodAttributes-0.29/t/role_method_conflict_detection.t000644 000767 000024 00000001553 12241303637 025274 0ustar00etherstaff000000 000000 use strict; use warnings; { package RoleOne; use MooseX::MethodAttributes::Role; sub foo {} } { package RoleTwo; use MooseX::MethodAttributes::Role; sub foo {} } { package RoleThree; use MooseX::MethodAttributes::Role; sub foo : Action {} } { package RoleFour; use MooseX::MethodAttributes::Role; sub foo : ActionRole {} } { package MyClass; use Moose; use Test::More tests => 3; use Test::Fatal; like exception { with qw/RoleOne RoleTwo/; }, qr/method name conflict/, 'Normal methods conflict detected'; like exception { with qw/RoleThree RoleFour/; }, qr/method name conflict/, 'Attributed methods conflict detected'; like exception { with qw/RoleOne RoleFour/; }, qr/method name conflict/, 'Attributed and non attributed methods combination - conflict detected'; } MooseX-MethodAttributes-0.29/t/role_with_anon_class.t000644 000767 000024 00000001662 12241303637 023251 0ustar00etherstaff000000 000000 use strict; use warnings; use Moose::Util qw/find_meta/; use Moose::Meta::Class; use MooseX::MethodAttributes (); use Test::More tests => 7; { package My::Role; use Moose::Role -traits => 'MethodAttributes'; sub foo : Bar {} } { package My::SuperClass; use Moose; sub bar {} } my $meta = Moose::Meta::Class->create_anon_class( superclasses => ['My::SuperClass'], roles => ['My::Role'], cache => 1 ); # FIXME - Note special move here, required # as you get the original metaclass # back, not the one with the roles # appled. my $other_meta = find_meta($meta->name); ok $other_meta; my $classname = $other_meta->name; isa_ok $classname->new, 'My::SuperClass'; isa_ok $classname->new, 'Moose::Object'; ok $classname->can('foo'); ok $classname->can('new'); ok $classname->can('bar'); my $attr = $other_meta->get_method_attributes( $classname->can('foo') ); is_deeply $attr, ['Bar']; MooseX-MethodAttributes-0.29/t/lib/BaseClass.pm000644 000767 000024 00000001166 12241303636 021632 0ustar00etherstaff000000 000000 use strict; use warnings; package BaseClass::Meta::Role; use Moose::Role; package BaseClass; use Moose; use Moose::Util::MetaRole; BEGIN { Moose::Util::MetaRole::apply_metaroles( for => __PACKAGE__, class_metaroles => { class => [qw/ BaseClass::Meta::Role /], }, ); with 'MooseX::MethodAttributes::Role::AttrContainer::Inheritable'; } sub moo : Moo {} { my $affe_was_run = 0; sub affe : Birne { $affe_was_run++; } sub no_calls_to_affe { $affe_was_run } } sub foo : Foo {} sub bar : Baz {} { no warnings 'redefine'; sub moo : Moo {} } 1; MooseX-MethodAttributes-0.29/t/lib/CatalystLike/000755 000767 000024 00000000000 12241303637 022022 5ustar00etherstaff000000 000000 MooseX-MethodAttributes-0.29/t/lib/ClassUsingRoleWithAttributes.pm000644 000767 000024 00000000326 12241303637 025570 0ustar00etherstaff000000 000000 package ClassUsingRoleWithAttributes; use Moose; # FIXME - This should not have to be here. use MooseX::MethodAttributes; use namespace::autoclean; with 'RoleWithAttributes'; __PACKAGE__->meta->make_immutable; MooseX-MethodAttributes-0.29/t/lib/OtherRoleWithAttributes.pm000644 000767 000024 00000000200 12241303637 024565 0ustar00etherstaff000000 000000 package OtherRoleWithAttributes; use MooseX::MethodAttributes::Role; use namespace::autoclean; sub bar : AnAttr { 'bar' } 1; MooseX-MethodAttributes-0.29/t/lib/OtherSubClass.pm000644 000767 000024 00000000305 12241303637 022506 0ustar00etherstaff000000 000000 use strict; use warnings; package OtherSubClass; use base qw/BaseClass/; # Must stay empty so that neither this class, # nor SubSubClass has a metaclass when we invoke # the attribute code. 1; MooseX-MethodAttributes-0.29/t/lib/RoleWithAttributes.pm000644 000767 000024 00000000314 12241303637 023571 0ustar00etherstaff000000 000000 package RoleWithAttributes; use MooseX::MethodAttributes::Role; use namespace::autoclean; sub foo : AnAttr { 'foo' } sub fnord {} after 'fnord' => sub {}; # Just test we get the Moose::Role sugar 1; MooseX-MethodAttributes-0.29/t/lib/SubClass.pm000644 000767 000024 00000000426 12241303636 021507 0ustar00etherstaff000000 000000 use strict; use warnings; package SubClass; use Moose; BEGIN { extends 'BaseClass'; } sub bar : Bar {} { my $no_calls_to_affe = 0; before affe => sub { $no_calls_to_affe++; }; sub no_calls_to_affe { $no_calls_to_affe; } } no Moose; 1; MooseX-MethodAttributes-0.29/t/lib/SubClassUseBaseAndUseMoose.pm000644 000767 000024 00000000234 12241303637 025060 0ustar00etherstaff000000 000000 use strict; use warnings; package SubClassUseBaseAndUseMoose; use base qw/BaseClass/; use Moose; sub bar : Bar {} before affe => sub {}; no Moose; 1; MooseX-MethodAttributes-0.29/t/lib/SubSubClass.pm000644 000767 000024 00000000226 12241303636 022157 0ustar00etherstaff000000 000000 use strict; use warnings; package SubSubClass; use base qw/OtherSubClass/; sub meta { 'foo' } # Test having a meta method.. sub bar : Quux {} 1; MooseX-MethodAttributes-0.29/t/lib/TestClass.pm000644 000767 000024 00000000522 12241303636 021672 0ustar00etherstaff000000 000000 package TestClass; use Moose; use MooseX::MethodAttributes; sub foo : SomeAttribute AnotherAttribute('with argument') {} sub bar : SomeAttribute {} after foo => sub {}; package SubClass; use Moose; use MooseX::MethodAttributes; extends qw/TestClass/; sub foo : Attributes Attributes Attributes {} sub bar {} # no attribute! 1; MooseX-MethodAttributes-0.29/t/lib/UsesMultipleRoles.pm000644 000767 000024 00000000246 12241303637 023431 0ustar00etherstaff000000 000000 package UsesMultipleRoles; use Moose; use namespace::autoclean; with qw/ RoleWithAttributes OtherRoleWithAttributes /; #__PACKAGE__->meta->make_immutable; MooseX-MethodAttributes-0.29/t/lib/CatalystLike/Controller/000755 000767 000024 00000000000 12241303637 024145 5ustar00etherstaff000000 000000 MooseX-MethodAttributes-0.29/t/lib/CatalystLike/Controller.pm000644 000767 000024 00000000254 12241303637 024504 0ustar00etherstaff000000 000000 package CatalystLike::Controller; use Moose; use namespace::autoclean; use MooseX::MethodAttributes; with 'MooseX::MethodAttributes::Role::AttrContainer::Inheritable'; 1; MooseX-MethodAttributes-0.29/t/lib/CatalystLike/Controller/Moose/000755 000767 000024 00000000000 12241303637 025227 5ustar00etherstaff000000 000000 MooseX-MethodAttributes-0.29/t/lib/CatalystLike/Controller/Moose.pm000644 000767 000024 00000000702 12241303637 025564 0ustar00etherstaff000000 000000 package CatalystLike::Controller::Moose; use Moose; use namespace::autoclean; BEGIN { extends qw/CatalystLike::Controller/; } our $GET_ATTRIBUTE_CALLED = 0; sub get_attribute : Local { $GET_ATTRIBUTE_CALLED++ } our $GET_FOO_CALLED = 0; our $BEFORE_GET_FOO_CALLED = 0; sub get_foo : Local { $GET_FOO_CALLED++ } # Exactly the same as last test except for modifier here before 'get_foo' => sub { $BEFORE_GET_FOO_CALLED++ }; sub other : Local {} 1; MooseX-MethodAttributes-0.29/t/lib/CatalystLike/Controller/Moose/MethodModifiers.pm000644 000767 000024 00000000543 12241303637 030651 0ustar00etherstaff000000 000000 package CatalystLike::Controller::Moose::MethodModifiers; use Moose; use namespace::autoclean; BEGIN { extends qw/CatalystLike::Controller::Moose/; } our $GET_ATTRIBUTE_CALLED = 0; after get_attribute => sub { $GET_ATTRIBUTE_CALLED++; }; # Wrapped only, should show up sub other : Local {} after other => sub {}; # Wrapped, wrapped should show up. 1; MooseX-MethodAttributes-0.29/lib/MooseX/000755 000767 000024 00000000000 12241303637 020400 5ustar00etherstaff000000 000000 MooseX-MethodAttributes-0.29/lib/MooseX/MethodAttributes/000755 000767 000024 00000000000 12241303637 023667 5ustar00etherstaff000000 000000 MooseX-MethodAttributes-0.29/lib/MooseX/MethodAttributes.pm000644 000767 000024 00000005504 12241303637 024231 0ustar00etherstaff000000 000000 package MooseX::MethodAttributes; { $MooseX::MethodAttributes::VERSION = '0.29'; } # git description: v0.28-17-g7c32d1f BEGIN { $MooseX::MethodAttributes::AUTHORITY = 'cpan:FLORA'; } # ABSTRACT: code attribute introspection use Moose (); use Moose::Exporter; use Moose::Util::MetaRole; use Moose::Util qw/find_meta does_role/; # Ensure trait is registered use MooseX::MethodAttributes::Role::Meta::Role (); Moose::Exporter->setup_import_methods( also => 'Moose', ); sub init_meta { my ($class, %options) = @_; my $for_class = $options{for_class}; my $meta = find_meta($for_class); return $meta if $meta && does_role($meta, 'MooseX::MethodAttributes::Role::Meta::Class') && does_role($meta->method_metaclass, 'MooseX::MethodAttributes::Role::Meta::Method') && does_role($meta->wrapped_method_metaclass, 'MooseX::MethodAttributes::Role::Meta::Method::MaybeWrapped'); $meta = Moose::Meta::Class->create( $for_class ) unless $meta; $meta = Moose::Util::MetaRole::apply_metaroles( for => $for_class, class_metaroles => { class => ['MooseX::MethodAttributes::Role::Meta::Class'], method => ['MooseX::MethodAttributes::Role::Meta::Method'], wrapped_method => [ 'MooseX::MethodAttributes::Role::Meta::Method::MaybeWrapped'], }, ); Moose::Util::MetaRole::apply_base_class_roles( for_class => $for_class, roles => ['MooseX::MethodAttributes::Role::AttrContainer'], ); return $meta; } 1; __END__ =pod =encoding UTF-8 =for :stopwords Florian Ragwitz Tomas Doran Dave Karman (t0m) Rolsky David Steinbrunner Karen Etheridge Marcus Ramberg Peter E =head1 NAME MooseX::MethodAttributes - code attribute introspection =head1 VERSION version 0.29 =head1 SYNOPSIS package MyClass; use Moose; use MooseX::MethodAttributes; sub foo : Bar Baz('corge') { ... } my $attrs = MyClass->meta->get_method('foo')->attributes; # ["Bar", "Baz('corge')"] =head1 DESCRIPTION This module allows code attributes of methods to be introspected using Moose meta method objects. =for Pod::Coverage init_meta =head1 AUTHORS =over 4 =item * Florian Ragwitz =item * Tomas Doran =back =head1 COPYRIGHT AND LICENSE This software is copyright (c) 2009 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. =head1 CONTRIBUTORS =over 4 =item * Dave Rolsky =item * David Steinbrunner =item * Karen Etheridge =item * Marcus Ramberg =item * Peter E Karman =item * Tomas Doran (t0m) =back =cut MooseX-MethodAttributes-0.29/lib/MooseX/MethodAttributes/Inheritable.pm000644 000767 000024 00000003152 12241303637 026454 0ustar00etherstaff000000 000000 package MooseX::MethodAttributes::Inheritable; { $MooseX::MethodAttributes::Inheritable::VERSION = '0.29'; } BEGIN { $MooseX::MethodAttributes::Inheritable::AUTHORITY = 'cpan:FLORA'; } # ABSTRACT: inheritable code attribute introspection # Ensure trait is registered use MooseX::MethodAttributes::Role::Meta::Role (); use Moose; use namespace::autoclean; with 'MooseX::MethodAttributes::Role::AttrContainer::Inheritable'; __PACKAGE__->meta->make_immutable; 1; __END__ =pod =encoding UTF-8 =for :stopwords Florian Ragwitz Tomas Doran =head1 NAME MooseX::MethodAttributes::Inheritable - inheritable code attribute introspection =head1 VERSION version 0.29 =head1 SYNOPSIS package BaseClass; use base qw/MooseX::MethodAttributes::Inheritable/; package SubClass; use base qw/BaseClass/; sub foo : Bar {} my $attrs = SubClass->meta->get_method('foo')->attributes; # ["Bar"] =head1 DESCRIPTION This module does the same as C, except that classes inheriting from other classes using it don't need to do anything special to get their code attributes captured. Note that instead of inheriting from this module, you can instead simply compose (C) the L role. =head1 AUTHORS =over 4 =item * Florian Ragwitz =item * Tomas Doran =back =head1 COPYRIGHT AND LICENSE This software is copyright (c) 2009 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-MethodAttributes-0.29/lib/MooseX/MethodAttributes/Role/000755 000767 000024 00000000000 12241303637 024570 5ustar00etherstaff000000 000000 MooseX-MethodAttributes-0.29/lib/MooseX/MethodAttributes/Role.pm000644 000767 000024 00000004103 12241303637 025124 0ustar00etherstaff000000 000000 package MooseX::MethodAttributes::Role; { $MooseX::MethodAttributes::Role::VERSION = '0.29'; } BEGIN { $MooseX::MethodAttributes::Role::AUTHORITY = 'cpan:FLORA'; } # ABSTRACT: code attribute introspection use Moose (); use Moose::Exporter; use Moose::Util::MetaRole; use Moose::Util qw/find_meta does_role ensure_all_roles/; # Ensure trait is registered use MooseX::MethodAttributes::Role::Meta::Role (); Moose::Exporter->setup_import_methods( also => 'Moose::Role' ); sub init_meta { my ($class, %options) = @_; my $for_class = $options{for_class}; my $meta = find_meta($for_class); return $meta if $meta && does_role($meta, 'MooseX::MethodAttributes::Role::Meta::Role'); $meta = Moose::Meta::Role->create( $for_class ) unless $meta; $meta = Moose::Util::MetaRole::apply_metaroles( for => $meta->name, role_metaroles => { role => ['MooseX::MethodAttributes::Role::Meta::Role'], }, ); ensure_all_roles($meta->name, 'MooseX::MethodAttributes::Role::AttrContainer', ); return $meta; } 1; __END__ =pod =encoding UTF-8 =for :stopwords Florian Ragwitz Tomas Doran Dave Karman (t0m) Rolsky David Steinbrunner Karen Etheridge Marcus Ramberg Peter E =head1 NAME MooseX::MethodAttributes::Role - code attribute introspection =head1 VERSION version 0.29 =head1 SYNOPSIS package MyRole; use MooseX::MethodAttributes::Role; sub foo : Bar Baz('corge') { ... } my $attrs = MyRole->meta->get_method('foo')->attributes; # ["Bar", "Baz('corge')"] =head1 DESCRIPTION This module allows you to write a Moose Role with code attributes of methods to be introspected using Moose meta method objects. =for Pod::Coverage init_meta =head1 AUTHORS =over 4 =item * Florian Ragwitz =item * Tomas Doran =back =head1 COPYRIGHT AND LICENSE This software is copyright (c) 2009 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-MethodAttributes-0.29/lib/MooseX/MethodAttributes/Role/AttrContainer/000755 000767 000024 00000000000 12241303637 027345 5ustar00etherstaff000000 000000 MooseX-MethodAttributes-0.29/lib/MooseX/MethodAttributes/Role/AttrContainer.pm000644 000767 000024 00000002447 12241303637 027712 0ustar00etherstaff000000 000000 package MooseX::MethodAttributes::Role::AttrContainer; { $MooseX::MethodAttributes::Role::AttrContainer::VERSION = '0.29'; } BEGIN { $MooseX::MethodAttributes::Role::AttrContainer::AUTHORITY = 'cpan:FLORA'; } # ABSTRACT: capture code attributes in the class' metaclass use Moose::Role; use Moose::Util qw/find_meta/; use namespace::autoclean; sub MODIFY_CODE_ATTRIBUTES { my ($class, $code, @attrs) = @_; find_meta($class)->register_method_attributes($code, \@attrs); return (); } 1; __END__ =pod =encoding UTF-8 =for :stopwords Florian Ragwitz Tomas Doran Dave Karman (t0m) Rolsky David Steinbrunner Karen Etheridge Marcus Ramberg Peter E =head1 NAME MooseX::MethodAttributes::Role::AttrContainer - capture code attributes in the class' metaclass =head1 VERSION version 0.29 =head1 METHODS =head2 MODIFY_CODE_ATTRIBUTES ($code, @attrs) Accepts a list of attributes for a coderef and stores it the class' metaclass. See L. =head1 AUTHORS =over 4 =item * Florian Ragwitz =item * Tomas Doran =back =head1 COPYRIGHT AND LICENSE This software is copyright (c) 2009 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-MethodAttributes-0.29/lib/MooseX/MethodAttributes/Role/Meta/000755 000767 000024 00000000000 12241303637 025456 5ustar00etherstaff000000 000000 MooseX-MethodAttributes-0.29/lib/MooseX/MethodAttributes/Role/Meta/Class.pm000644 000767 000024 00000007603 12241303637 027067 0ustar00etherstaff000000 000000 package MooseX::MethodAttributes::Role::Meta::Class; { $MooseX::MethodAttributes::Role::Meta::Class::VERSION = '0.29'; } BEGIN { $MooseX::MethodAttributes::Role::Meta::Class::AUTHORITY = 'cpan:FLORA'; } # ABSTRACT: metaclass role for storing code attributes use Moose::Role; use Moose::Util qw/find_meta does_role/; use namespace::autoclean; with qw/ MooseX::MethodAttributes::Role::Meta::Map /; sub get_method_with_attributes_list { my ($self) = @_; my @methods = map { $self->get_method($_) } $self->get_method_list; my %order; { my $i = 0; $order{$_} = $i++ for @{ $self->_method_attribute_list }; } return map { $_->[1] } sort { $order{ $a->[0] } <=> $order{ $b->[0] } } map { my $addr = 0 + $_->_get_attributed_coderef; exists $self->_method_attribute_map->{$addr} ? [$addr, $_] : () } grep { $_->can('_get_attributed_coderef') } @methods; } sub get_all_methods_with_attributes { my ($self) = @_; my %seen; return reverse grep { !$seen{ $_->name }++ } reverse map { my $meth; my $meta = find_meta($_); ($meta && ($meth = $meta->can('get_method_with_attributes_list'))) ? $meta->$meth : () } reverse $self->linearized_isa; } sub get_nearest_methods_with_attributes { my ($self) = @_; my @list = map { my $m = $self->find_method_by_name($_->name); my $meth = $m->can('attributes'); my $attrs = $meth ? $m->$meth() : []; scalar @{ $attrs } ? ( $m ) : ( ); } $self->get_all_methods_with_attributes; return @list; } foreach my $type (qw/after before around/) { around "add_${type}_method_modifier" => sub { my $orig = shift; my $meta = shift; my ($method_name) = @_; my $code = $meta->$orig(@_); my $method = $meta->get_method($method_name); if ( does_role($method->get_original_method, 'MooseX::MethodAttributes::Role::Meta::Method') || does_role($method->get_original_method, 'MooseX::MethodAttributes::Role::Meta::Method::Wrapped') ) { MooseX::MethodAttributes::Role::Meta::Method::Wrapped->meta->apply($method); } return $code; } } 1; __END__ =pod =encoding UTF-8 =for :stopwords Florian Ragwitz Tomas Doran =head1 NAME MooseX::MethodAttributes::Role::Meta::Class - metaclass role for storing code attributes =head1 VERSION version 0.29 =head1 METHODS =head2 get_method_with_attributes_list Gets the list of meta methods for local methods of this class that have attributes in the order they have been registered. =head2 get_all_methods_with_attributes Gets the list of meta methods of local and inherited methods of this class, that have attributes. Base class methods come before subclass methods. Methods of one class have the order they have been declared in. =head2 get_nearest_methods_with_attributes The same as get_all_methods_with_attributes, except that methods from parent classes are not included if there is an attribute-less method in a child class. For example, given: package BaseClass; sub foo : Attr {} sub bar : Attr {} package SubClass; use base qw/BaseClass/; sub foo {} after bar => sub {} C<< SubClass->meta->get_all_methods_with_attributes >> will return C<< BaseClass->meta->get_method('foo') >> for the above example, but this method will not, and will return the wrapped bar method, whereas C<< get_all_methods_with_attributes >> will return the original method. =head1 AUTHORS =over 4 =item * Florian Ragwitz =item * Tomas Doran =back =head1 COPYRIGHT AND LICENSE This software is copyright (c) 2009 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-MethodAttributes-0.29/lib/MooseX/MethodAttributes/Role/Meta/Map.pm000644 000767 000024 00000003554 12241303637 026540 0ustar00etherstaff000000 000000 package MooseX::MethodAttributes::Role::Meta::Map; { $MooseX::MethodAttributes::Role::Meta::Map::VERSION = '0.29'; } BEGIN { $MooseX::MethodAttributes::Role::Meta::Map::AUTHORITY = 'cpan:FLORA'; } # ABSTRACT: generic role for storing code attributes used by classes and roles with attributes use Moose::Role; use MooseX::Types::Moose 0.20 qw/HashRef ArrayRef Str Int/; use namespace::autoclean; has _method_attribute_map => ( is => 'ro', isa => HashRef[ArrayRef[Str]], lazy => 1, default => sub { +{} }, ); has _method_attribute_list => ( is => 'ro', isa => ArrayRef[Int], lazy => 1, default => sub { [] }, ); sub register_method_attributes { my ($self, $code, $attrs) = @_; push @{ $self->_method_attribute_list }, 0 + $code; $self->_method_attribute_map->{ 0 + $code } = $attrs; return; } sub get_method_attributes { my ($self, $code) = @_; return $self->_method_attribute_map->{ 0 + $code } || []; } 1; __END__ =pod =encoding UTF-8 =for :stopwords Florian Ragwitz Tomas Doran Dave Karman (t0m) Rolsky David Steinbrunner Karen Etheridge Marcus Ramberg Peter E =head1 NAME MooseX::MethodAttributes::Role::Meta::Map - generic role for storing code attributes used by classes and roles with attributes =head1 VERSION version 0.29 =head1 METHODS =head2 register_method_attributes ($code, $attrs) Register a list of attributes for a code reference. =head2 get_method_attributes ($code) Get a list of attributes associated with a coderef. =head1 AUTHORS =over 4 =item * Florian Ragwitz =item * Tomas Doran =back =head1 COPYRIGHT AND LICENSE This software is copyright (c) 2009 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-MethodAttributes-0.29/lib/MooseX/MethodAttributes/Role/Meta/Method/000755 000767 000024 00000000000 12241303637 026676 5ustar00etherstaff000000 000000 MooseX-MethodAttributes-0.29/lib/MooseX/MethodAttributes/Role/Meta/Method.pm000644 000767 000024 00000003063 12241303637 027236 0ustar00etherstaff000000 000000 package MooseX::MethodAttributes::Role::Meta::Method; { $MooseX::MethodAttributes::Role::Meta::Method::VERSION = '0.29'; } BEGIN { $MooseX::MethodAttributes::Role::Meta::Method::AUTHORITY = 'cpan:FLORA'; } # ABSTRACT: metamethod role allowing code attribute introspection use Moose::Role; use namespace::autoclean; has attributes => ( is => 'ro', lazy => 1, builder => '_build_attributes', ); sub _build_attributes { my ($self) = @_; return $self->associated_metaclass->get_method_attributes($self->_get_attributed_coderef); } sub _get_attributed_coderef { my ($self) = @_; return $self->body; } 1; __END__ =pod =encoding UTF-8 =for :stopwords Florian Ragwitz Tomas Doran Dave Karman (t0m) Rolsky David Steinbrunner Karen Etheridge Marcus Ramberg Peter E metamethod =head1 NAME MooseX::MethodAttributes::Role::Meta::Method - metamethod role allowing code attribute introspection =head1 VERSION version 0.29 =head1 ATTRIBUTES =head2 attributes Gets the list of code attributes of the method represented by this meta method. =head1 METHODS =head2 _build_attributes Builds the value of the C attribute based on the attributes captured in the associated meta class. =head1 AUTHORS =over 4 =item * Florian Ragwitz =item * Tomas Doran =back =head1 COPYRIGHT AND LICENSE This software is copyright (c) 2009 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-MethodAttributes-0.29/lib/MooseX/MethodAttributes/Role/Meta/Role/000755 000767 000024 00000000000 12241303637 026357 5ustar00etherstaff000000 000000 MooseX-MethodAttributes-0.29/lib/MooseX/MethodAttributes/Role/Meta/Role.pm000644 000767 000024 00000010320 12241303637 026711 0ustar00etherstaff000000 000000 package MooseX::MethodAttributes::Role::Meta::Role; { $MooseX::MethodAttributes::Role::Meta::Role::VERSION = '0.29'; } BEGIN { $MooseX::MethodAttributes::Role::Meta::Role::AUTHORITY = 'cpan:FLORA'; } # ABSTRACT: metarole role for storing code attributes use Moose (); use Moose::Util::MetaRole; use Moose::Util qw/find_meta does_role ensure_all_roles/; use Moose::Role; use MooseX::MethodAttributes (); use MooseX::MethodAttributes::Role (); use namespace::autoclean; with qw/ MooseX::MethodAttributes::Role::Meta::Map MooseX::MethodAttributes::Role::Meta::Role::Application /; $Moose::VERSION >= 0.9301 ? around composition_class_roles => sub { my ($orig, $self) = @_; return $self->$orig, 'MooseX::MethodAttributes::Role::Meta::Role::Application::Summation'; } : has '+composition_class_roles' => ( default => sub { [ 'MooseX::MethodAttributes::Role::Meta::Role::Application::Summation' ] }, ); after 'initialize' => sub { my ($self, $class, %args) = @_; ensure_all_roles($class, 'MooseX::MethodAttributes::Role::AttrContainer'); }; # FIXME - Skip this logic if the method metaclass already does the right role? around method_metaclass => sub { my $orig = shift; my $self = shift; return $self->$orig(@_) if scalar @_; Moose::Meta::Class->create_anon_class( superclasses => [ $self->$orig ], roles => [qw/ MooseX::MethodAttributes::Role::Meta::Method /], cache => 1, )->name(); }; sub _copy_attributes { my ($self, $thing) = @_; push @{ $thing->_method_attribute_list }, @{ $self->_method_attribute_list }; @{ $thing->_method_attribute_map }{ (keys(%{ $self->_method_attribute_map }), keys(%{ $thing->_method_attribute_map })) } = (values(%{ $self->_method_attribute_map }), values(%{ $thing->_method_attribute_map })); }; # This allows you to say use Moose::Role -traits => 'MethodAttributes' # This is replaced by MooseX::MethodAttributes::Role, and this trait registration # is now only present for backwards compatibility reasons. package # Hide from PAUSE Moose::Meta::Role::Custom::Trait::MethodAttributes; sub register_implementation { 'MooseX::MethodAttributes::Role::Meta::Role' } 1; __END__ =pod =encoding UTF-8 =for :stopwords Florian Ragwitz Tomas Doran Dave Karman (t0m) Rolsky David Steinbrunner Karen Etheridge Marcus Ramberg Peter E metarole initialisation =head1 NAME MooseX::MethodAttributes::Role::Meta::Role - metarole role for storing code attributes =head1 VERSION version 0.29 =head1 SYNOPSIS package MyRole; use MooseX::MethodAttributes::Role; sub foo : Bar Baz('corge') { ... } package MyClass use Moose; with 'MyRole'; my $attrs = MyClass->meta->get_method('foo')->attributes; # ["Bar", "Baz('corge')"] =head1 DESCRIPTION This module is a metaclass role which is applied by L, allowing you to add code attributes to methods in Moose roles. These attributes can then be found by introspecting the role metaclass, and are automatically copied into any classes or roles that the role is composed onto. =head1 METHODS =head2 initialize Ensures that the package containing the role methods does the L role during initialisation, which in turn is responsible for capturing the method attributes on the class and registering them with the metaclass. =head2 method_metaclass Wraps the normal method and ensures that the method metaclass performs the L role, which allows you to introspect the attributes from the method objects returned by the MOP when querying the metaclass. =head1 CAVEATS =over =item * Currently roles with attributes cannot have methods excluded or aliased, and will in turn confer this property onto any roles they are composed onto. =back =head1 AUTHORS =over 4 =item * Florian Ragwitz =item * Tomas Doran =back =head1 COPYRIGHT AND LICENSE This software is copyright (c) 2009 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-MethodAttributes-0.29/lib/MooseX/MethodAttributes/Role/Meta/Role/Application/000755 000767 000024 00000000000 12241303637 030622 5ustar00etherstaff000000 000000 MooseX-MethodAttributes-0.29/lib/MooseX/MethodAttributes/Role/Meta/Role/Application.pm000644 000767 000024 00000004442 12241303637 031164 0ustar00etherstaff000000 000000 package MooseX::MethodAttributes::Role::Meta::Role::Application; { $MooseX::MethodAttributes::Role::Meta::Role::Application::VERSION = '0.29'; } BEGIN { $MooseX::MethodAttributes::Role::Meta::Role::Application::AUTHORITY = 'cpan:FLORA'; } # ABSTRACT: generic role for applying a role with method attributes to something use Moose::Role; use Moose::Util qw/find_meta/; use MooseX::MethodAttributes (); use MooseX::MethodAttributes::Role (); use Carp qw/croak/; use namespace::autoclean; requires qw/ _copy_attributes apply /; around 'apply' => sub { my ($orig, $self, $thing, %opts) = @_; $thing = $self->_apply_metaclasses($thing); my $ret = $self->$orig($thing, %opts); $self->_copy_attributes($thing); return $ret; }; sub _apply_metaclasses { my ($self, $thing) = @_; if ($thing->isa('Moose::Meta::Class')) { $thing = MooseX::MethodAttributes->init_meta( for_class => $thing->name ); } elsif ($thing->isa('Moose::Meta::Role')) { $thing = MooseX::MethodAttributes::Role->init_meta( for_class => $thing->name ); } else { croak("Composing " . __PACKAGE__ . " onto instances is unsupported"); } # Note that the metaclass instance we started out with may have been turned # into lies by the metatrait role application process, so we explicitly # re-fetch it here. return find_meta($thing->name); } 1; __END__ =pod =encoding UTF-8 =for :stopwords Florian Ragwitz Tomas Doran =head1 NAME MooseX::MethodAttributes::Role::Meta::Role::Application - generic role for applying a role with method attributes to something =head1 VERSION version 0.29 =head1 METHODS =head2 apply The apply method is wrapped to ensure that the correct metaclasses to hold and propagate method attribute data are present on the target for role application, delegates to the original method to actually apply the role, then ensures that any attributes from the role are copied to the target class. =head1 AUTHORS =over 4 =item * Florian Ragwitz =item * Tomas Doran =back =head1 COPYRIGHT AND LICENSE This software is copyright (c) 2009 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-MethodAttributes-0.29/lib/MooseX/MethodAttributes/Role/Meta/Role/Application/Summation.pm000644 000767 000024 00000003055 12241303637 033137 0ustar00etherstaff000000 000000 package MooseX::MethodAttributes::Role::Meta::Role::Application::Summation; { $MooseX::MethodAttributes::Role::Meta::Role::Application::Summation::VERSION = '0.29'; } BEGIN { $MooseX::MethodAttributes::Role::Meta::Role::Application::Summation::AUTHORITY = 'cpan:FLORA'; } # ABSTRACT: Role applied to the class responsible for role summation which ensures method attributes propagate from the roles being summed onto the combined role. use Moose::Role; use Moose::Util qw/does_role/; use namespace::autoclean; with 'MooseX::MethodAttributes::Role::Meta::Role::Application'; sub _copy_attributes { my ($self, $thing) = @_; for my $role (@{ $self->get_roles }) { $role->_copy_attributes($thing) if does_role($role, 'MooseX::MethodAttributes::Role::Meta::Role'); } } 1; __END__ =pod =encoding UTF-8 =for :stopwords Florian Ragwitz Tomas Doran Dave Karman (t0m) Rolsky David Steinbrunner Karen Etheridge Marcus Ramberg Peter E =head1 NAME MooseX::MethodAttributes::Role::Meta::Role::Application::Summation - Role applied to the class responsible for role summation which ensures method attributes propagate from the roles being summed onto the combined role. =head1 VERSION version 0.29 =head1 AUTHORS =over 4 =item * Florian Ragwitz =item * Tomas Doran =back =head1 COPYRIGHT AND LICENSE This software is copyright (c) 2009 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-MethodAttributes-0.29/lib/MooseX/MethodAttributes/Role/Meta/Method/MaybeWrapped.pm000644 000767 000024 00000003030 12241303637 031610 0ustar00etherstaff000000 000000 package MooseX::MethodAttributes::Role::Meta::Method::MaybeWrapped; { $MooseX::MethodAttributes::Role::Meta::Method::MaybeWrapped::VERSION = '0.29'; } BEGIN { $MooseX::MethodAttributes::Role::Meta::Method::MaybeWrapped::AUTHORITY = 'cpan:FLORA'; } # ABSTRACT: proxy attributes of wrapped methods if their metaclass supports it use Moose::Role; use Moose::Util qw/does_role/; use MooseX::MethodAttributes::Role::Meta::Method::Wrapped; use namespace::autoclean; override wrap => sub { my $self = super; my $original_method = $self->get_original_method; if ( does_role($original_method, 'MooseX::MethodAttributes::Role::Meta::Method') || does_role($original_method, 'MooseX::MethodAttributes::Role::Meta::Method::Wrapped') ) { MooseX::MethodAttributes::Role::Meta::Method::Wrapped->meta->apply($self); } return $self; }; 1; __END__ =pod =encoding UTF-8 =for :stopwords Florian Ragwitz Tomas Doran Dave Karman (t0m) Rolsky David Steinbrunner Karen Etheridge Marcus Ramberg Peter E =head1 NAME MooseX::MethodAttributes::Role::Meta::Method::MaybeWrapped - proxy attributes of wrapped methods if their metaclass supports it =head1 VERSION version 0.29 =head1 AUTHORS =over 4 =item * Florian Ragwitz =item * Tomas Doran =back =head1 COPYRIGHT AND LICENSE This software is copyright (c) 2009 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-MethodAttributes-0.29/lib/MooseX/MethodAttributes/Role/Meta/Method/Wrapped.pm000644 000767 000024 00000002410 12241303637 030633 0ustar00etherstaff000000 000000 package MooseX::MethodAttributes::Role::Meta::Method::Wrapped; { $MooseX::MethodAttributes::Role::Meta::Method::Wrapped::VERSION = '0.29'; } BEGIN { $MooseX::MethodAttributes::Role::Meta::Method::Wrapped::AUTHORITY = 'cpan:FLORA'; } # ABSTRACT: wrapped metamethod role allowing code attribute introspection use Moose::Role; use namespace::autoclean; sub attributes { my ($self) = @_; return $self->get_original_method->attributes; } sub _get_attributed_coderef { my ($self) = @_; return $self->get_original_method->_get_attributed_coderef; } 1; __END__ =pod =encoding UTF-8 =for :stopwords Florian Ragwitz Tomas Doran metamethod =head1 NAME MooseX::MethodAttributes::Role::Meta::Method::Wrapped - wrapped metamethod role allowing code attribute introspection =head1 VERSION version 0.29 =head1 METHODS =head2 attributes Gets the list of code attributes of the original method this meta method wraps. =head1 AUTHORS =over 4 =item * Florian Ragwitz =item * Tomas Doran =back =head1 COPYRIGHT AND LICENSE This software is copyright (c) 2009 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-MethodAttributes-0.29/lib/MooseX/MethodAttributes/Role/AttrContainer/Inheritable.pm000644 000767 000024 00000002727 12241303637 032141 0ustar00etherstaff000000 000000 package MooseX::MethodAttributes::Role::AttrContainer::Inheritable; { $MooseX::MethodAttributes::Role::AttrContainer::Inheritable::VERSION = '0.29'; } BEGIN { $MooseX::MethodAttributes::Role::AttrContainer::Inheritable::AUTHORITY = 'cpan:FLORA'; } # ABSTRACT: capture code attributes in the automatically initialized metaclass instance use Moose::Role; use MooseX::MethodAttributes (); use namespace::autoclean; with 'MooseX::MethodAttributes::Role::AttrContainer'; before MODIFY_CODE_ATTRIBUTES => sub { my ($class, $code, @attrs) = @_; return unless @attrs; MooseX::MethodAttributes->init_meta( for_class => $class ); }; 1; __END__ =pod =encoding UTF-8 =for :stopwords Florian Ragwitz Tomas Doran =head1 NAME MooseX::MethodAttributes::Role::AttrContainer::Inheritable - capture code attributes in the automatically initialized metaclass instance =head1 VERSION version 0.29 =head1 DESCRIPTION This role extends C with the functionality of automatically initializing a metaclass for the caller and applying the meta roles relevant for capturing method attributes. =head1 AUTHORS =over 4 =item * Florian Ragwitz =item * Tomas Doran =back =head1 COPYRIGHT AND LICENSE This software is copyright (c) 2009 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