MooseX-Role-WithOverloading-0.13000755000767000024 012072723641 16252 5ustar00etherstaff000000000000README100644000767000024 47212072723641 17176 0ustar00etherstaff000000000000MooseX-Role-WithOverloading-0.13 This archive contains the distribution MooseX-Role-WithOverloading, version 0.13: Roles which support overloading This software is copyright (c) 2013 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. Changes100644000767000024 331212072723641 17625 0ustar00etherstaff000000000000MooseX-Role-WithOverloading-0.13Revision history for MooseX-Role-WithOverloading 0.13 2013-01-07 20:59:07 PST-0800 - Resolve failure reports in 5.17.* due to changes in SVf_AMAGIC 0.12 2013-01-05 12:10:02 PST-0800 - Bump dependency on namespace::autoclean (RT#69313) 0.11 2012-11-17 22:09:00 +0000 - Fix dependency issues from AutoPrereqs. RT#81145 0.10 2012-11-13 00:41:00 +0000 - Remove use of MooseX::Types to allow Catalyst to work on perl 5.8.5 RT#77100, RT#81124 - Fix bug causing attributes to get lost if they were added to a role before composing a ::WithOverloading role onto it. 0.09 2011-01-03 17:37:34 +0100 - get_package_symbol no longer autovififies - use get_or_add_package_symbol instead (doy). 0.08 2010-07-19 22:04:22 +0200 - Really avoid warnings from Moose 1.09 (Dave Rolsky). 0.07 2010-07-19 05:56:05 +0200 - Avoid warnings from Moose 1.09 (Dave Rolsky). 0.06 2010-05-07 19:00:11 +0200 - Improve distribution metadata. - Disable workaround for Moose < 0.94 and bump the dependency version. 0.05 2010-01-18 18:15:00 +0000 - Work around changes in composition_class_role in Moose >= 0.93_01 to be compatible with both old and new Moose versions. 0.04 2010-01-04 18:40:11 +0100 - Depend on Test::More 0.88 for done_testing. 0.03 2009-11-20 07:57:25 +0100 - Make ToInstance application work on perl older than 5.8.9. 0.02 2009-10-11 08:37:43 CEST 2009 - Fix missing dependency on MooseX::Types (Closes: RT#50386). 0.01 2009-10-07 00:22:14 +0200 - Initial release. LICENSE100644000767000024 4366412072723641 17375 0ustar00etherstaff000000000000MooseX-Role-WithOverloading-0.13This software is copyright (c) 2013 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) 2013 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) 2013 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 INSTALL100644000767000024 204712072723641 17367 0ustar00etherstaff000000000000MooseX-Role-WithOverloading-0.13 This is the Perl distribution MooseX-Role-WithOverloading. Installing MooseX-Role-WithOverloading is straightforward. ## Installation with cpanm If you have cpanm, you only need one line: % cpanm MooseX::Role::WithOverloading 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::Role::WithOverloading ## Installing with the CPAN shell Alternatively, if your CPAN shell is set up, you should just be able to do: % cpan MooseX::Role::WithOverloading ## Manual installation As a last resort, you can manually install it. Download the tarball, untar it, then build it: % perl Makefile.PL % make && make test Then install it: % make install If you are installing into a system-wide directory, you may need to run: % sudo make install ## Documentation MooseX-Role-WithOverloading documentation is available as POD. You can run perldoc from a shell to read the documentation: % perldoc MooseX::Role::WithOverloading dist.ini100644000767000024 322212072723641 17776 0ustar00etherstaff000000000000MooseX-Role-WithOverloading-0.13name = MooseX-Role-WithOverloading author = Florian Ragwitz author = Tomas Doran license = Perl_5 copyright_holder = Florian Ragwitz [@FLORA] dist = MooseX-Role-WithOverloading repository_at = github github_user = karenetheridge auto_prereqs = 0 [Prereqs] aliased = 0 Moose = 0.94 Moose::Role = 1.15 namespace::clean = 0 namespace::autoclean = 0.12 [Prereqs / TestRequires] Test::More = 0 Test::NoWarnings = 1.04 [InstallGuide] [MetaConfig] [MetaProvides::Package] [Git::Describe] [MinimumPerl] [ReadmeAnyFromPod] type = markdown filename = README.md location = root [Test::Compile] [Test::MinimumVersion] [MetaTests] [Test::CPAN::Changes] [Test::ChangesHasContent] [Test::Pod::LinkCheck] [Test::Pod::No404s] [CheckPrereqsIndexed] [Test::Version] [Test::CheckDeps] [Git::Remote::Check] remote_branch = master [Git::CheckFor::CorrectBranch] ; waiting for fix on tag formats ;[Git::CheckFor::Fixups] [Git::Check] allow_dirty = README.md ; automatically calculate the next version from the last git tag ; override with V= [Git::NextVersion] ; add the version to Changes [NextRelease] :version = 4.300018 format = %-8V %{yyyy-MM-dd HH:mm:ss ZZZZ}d ; after release, the version in Changes file will be committed ; with a message listing the changes for this release [Git::Commit] allow_dirty = Changes allow_dirty = README.md commit_msg = %N-%v%t%n%n%c ; ...and the resulting head commit will be tagged [Git::Tag] tag_format = v%v%t tag_message = v%v%t ; ...and then pushed to the origin repository [Git::Push] ; ...and installed locally [InstallRelease] install_command = cpanm . ; ... and then we do 'dzil clean' [Clean] META.yml100644000767000024 2220112072723641 17621 0ustar00etherstaff000000000000MooseX-Role-WithOverloading-0.13--- abstract: 'Roles which support overloading' author: - 'Florian Ragwitz ' - 'Tomas Doran ' build_requires: Test::CheckDeps: 0.002 Test::More: 0.88 Test::NoWarnings: 1.04 configure_requires: ExtUtils::MakeMaker: 6.30 dynamic_config: 0 generated_by: 'Dist::Zilla version 4.300028, CPAN::Meta::Converter version 2.120921' license: perl meta-spec: url: http://module-build.sourceforge.net/META-spec-v1.4.html version: 1.4 name: MooseX-Role-WithOverloading provides: MooseX::Role::WithOverloading: file: lib/MooseX/Role/WithOverloading.pm version: 0.13 MooseX::Role::WithOverloading::Meta::Role: file: lib/MooseX/Role/WithOverloading/Meta/Role.pm version: 0.13 MooseX::Role::WithOverloading::Meta::Role::Application: file: lib/MooseX/Role/WithOverloading/Meta/Role/Application.pm version: 0.13 MooseX::Role::WithOverloading::Meta::Role::Application::Composite: file: lib/MooseX/Role/WithOverloading/Meta/Role/Application/Composite.pm version: 0.13 MooseX::Role::WithOverloading::Meta::Role::Application::Composite::ToClass: file: lib/MooseX/Role/WithOverloading/Meta/Role/Application/Composite/ToClass.pm version: 0.13 MooseX::Role::WithOverloading::Meta::Role::Application::Composite::ToInstance: file: lib/MooseX/Role/WithOverloading/Meta/Role/Application/Composite/ToInstance.pm version: 0.13 MooseX::Role::WithOverloading::Meta::Role::Application::Composite::ToRole: file: lib/MooseX/Role/WithOverloading/Meta/Role/Application/Composite/ToRole.pm version: 0.13 MooseX::Role::WithOverloading::Meta::Role::Application::FixOverloadedRefs: file: lib/MooseX/Role/WithOverloading/Meta/Role/Application/FixOverloadedRefs.pm version: 0.13 MooseX::Role::WithOverloading::Meta::Role::Application::ToClass: file: lib/MooseX/Role/WithOverloading/Meta/Role/Application/ToClass.pm version: 0.13 MooseX::Role::WithOverloading::Meta::Role::Application::ToInstance: file: lib/MooseX/Role/WithOverloading/Meta/Role/Application/ToInstance.pm version: 0.13 MooseX::Role::WithOverloading::Meta::Role::Application::ToRole: file: lib/MooseX/Role/WithOverloading/Meta/Role/Application/ToRole.pm version: 0.13 MooseX::Role::WithOverloading::Meta::Role::Composite: file: lib/MooseX/Role/WithOverloading/Meta/Role/Composite.pm version: 0.13 requires: Moose: 0.94 Moose::Role: 1.15 aliased: 0 namespace::autoclean: 0.12 namespace::clean: 0 perl: 5.006 resources: bugtracker: http://rt.cpan.org/Public/Dist/Display.html?Name=MooseX-Role-WithOverloading homepage: http://metacpan.org/release/MooseX-Role-WithOverloading repository: git://github.com/karenetheridge/moosex-role-withoverloading.git version: 0.13 x_Dist_Zilla: perl: version: 5.017006 plugins: - class: Dist::Zilla::Plugin::GatherDir name: '@FLORA/@Basic/GatherDir' version: 4.300028 - class: Dist::Zilla::Plugin::PruneCruft name: '@FLORA/@Basic/PruneCruft' version: 4.300028 - class: Dist::Zilla::Plugin::ManifestSkip name: '@FLORA/@Basic/ManifestSkip' version: 4.300028 - class: Dist::Zilla::Plugin::MetaYAML name: '@FLORA/@Basic/MetaYAML' version: 4.300028 - class: Dist::Zilla::Plugin::License name: '@FLORA/@Basic/License' version: 4.300028 - class: Dist::Zilla::Plugin::Readme name: '@FLORA/@Basic/Readme' version: 4.300028 - class: Dist::Zilla::Plugin::ExtraTests name: '@FLORA/@Basic/ExtraTests' version: 4.300028 - class: Dist::Zilla::Plugin::ExecDir name: '@FLORA/@Basic/ExecDir' version: 4.300028 - class: Dist::Zilla::Plugin::ShareDir name: '@FLORA/@Basic/ShareDir' version: 4.300028 - class: Dist::Zilla::Plugin::MakeMaker name: '@FLORA/@Basic/MakeMaker' version: 4.300028 - class: Dist::Zilla::Plugin::Manifest name: '@FLORA/@Basic/Manifest' version: 4.300028 - class: Dist::Zilla::Plugin::TestRelease name: '@FLORA/@Basic/TestRelease' version: 4.300028 - class: Dist::Zilla::Plugin::ConfirmRelease name: '@FLORA/@Basic/ConfirmRelease' version: 4.300028 - class: Dist::Zilla::Plugin::UploadToCPAN name: '@FLORA/@Basic/UploadToCPAN' version: 4.300028 - class: Dist::Zilla::Plugin::MetaConfig name: '@FLORA/MetaConfig' version: 4.300028 - class: Dist::Zilla::Plugin::MetaJSON name: '@FLORA/MetaJSON' version: 4.300028 - class: Dist::Zilla::Plugin::PkgVersion name: '@FLORA/PkgVersion' version: 4.300028 - class: Dist::Zilla::Plugin::PodSyntaxTests name: '@FLORA/PodSyntaxTests' version: 4.300028 - class: Dist::Zilla::Plugin::NoTabsTests name: '@FLORA/NoTabsTests' version: 0.01 - class: Dist::Zilla::Plugin::PodCoverageTests name: '@FLORA/PodCoverageTests' version: 4.300028 - class: Dist::Zilla::Plugin::MetaResources name: '@FLORA/MetaResources' version: 4.300028 - class: Dist::Zilla::Plugin::Authority name: '@FLORA/Authority' version: 1.006 - class: Dist::Zilla::Plugin::EOLTests name: '@FLORA/EOLTests' version: 0.02 - class: Dist::Zilla::Plugin::PodWeaver name: '@FLORA/PodWeaver' version: 3.101641 - class: Dist::Zilla::Plugin::Prereqs config: Dist::Zilla::Plugin::Prereqs: phase: runtime type: requires name: Prereqs version: 4.300028 - class: Dist::Zilla::Plugin::Prereqs config: Dist::Zilla::Plugin::Prereqs: phase: test type: requires name: TestRequires version: 4.300028 - class: Dist::Zilla::Plugin::InstallGuide name: InstallGuide version: 1.200000 - class: Dist::Zilla::Plugin::MetaConfig name: MetaConfig version: 4.300028 - class: Dist::Zilla::Plugin::MetaProvides::Package name: MetaProvides::Package version: 1.14000001 - class: Dist::Zilla::Plugin::Git::Describe name: Git::Describe version: 0.002 - class: Dist::Zilla::Plugin::MinimumPerl name: MinimumPerl version: 1.003 - class: Dist::Zilla::Plugin::ReadmeAnyFromPod name: ReadmeAnyFromPod version: 0.120120 - class: Dist::Zilla::Plugin::Test::Compile name: Test::Compile version: 1.112820 - class: Dist::Zilla::Plugin::Test::MinimumVersion name: Test::MinimumVersion version: 2.000002 - class: Dist::Zilla::Plugin::MetaTests name: MetaTests version: 4.300028 - class: Dist::Zilla::Plugin::Test::CPAN::Changes name: Test::CPAN::Changes version: 0.005 - class: Dist::Zilla::Plugin::Test::ChangesHasContent name: Test::ChangesHasContent version: 0.006 - class: Dist::Zilla::Plugin::Test::Pod::LinkCheck name: Test::Pod::LinkCheck version: 1.001 - class: Dist::Zilla::Plugin::Test::Pod::No404s name: Test::Pod::No404s version: 1.001 - class: Dist::Zilla::Plugin::CheckPrereqsIndexed name: CheckPrereqsIndexed version: 0.007 - class: Dist::Zilla::Plugin::Test::Version name: Test::Version version: 0.002004 - class: Dist::Zilla::Plugin::Test::CheckDeps name: Test::CheckDeps version: 0.005 - class: Dist::Zilla::Plugin::Git::Remote::Check name: Git::Remote::Check version: 0.1.2 - class: Dist::Zilla::Plugin::Git::CheckFor::CorrectBranch name: Git::CheckFor::CorrectBranch version: 0.006 - class: Dist::Zilla::Plugin::Git::Check name: Git::Check version: 2.006 - class: Dist::Zilla::Plugin::Git::NextVersion name: Git::NextVersion version: 2.006 - class: Dist::Zilla::Plugin::NextRelease name: NextRelease version: 4.300028 - class: Dist::Zilla::Plugin::Git::Commit name: Git::Commit version: 2.006 - class: Dist::Zilla::Plugin::Git::Tag name: Git::Tag version: 2.006 - class: Dist::Zilla::Plugin::Git::Push name: Git::Push version: 2.006 - class: Dist::Zilla::Plugin::InstallRelease name: InstallRelease version: 0.008 - class: Dist::Zilla::Plugin::Clean name: Clean version: 0.07 - class: Dist::Zilla::Plugin::FinderCode name: ':InstallModules' version: 4.300028 - class: Dist::Zilla::Plugin::FinderCode name: ':IncModules' version: 4.300028 - class: Dist::Zilla::Plugin::FinderCode name: ':TestFiles' version: 4.300028 - class: Dist::Zilla::Plugin::FinderCode name: ':ExecFiles' version: 4.300028 - class: Dist::Zilla::Plugin::FinderCode name: ':ShareFiles' version: 4.300028 - class: Dist::Zilla::Plugin::FinderCode name: ':MainModule' version: 4.300028 zilla: class: Dist::Zilla::Dist::Builder config: is_trial: 0 version: 4.300028 x_authority: cpan:FLORA MANIFEST100644000767000024 266412072723641 17474 0ustar00etherstaff000000000000MooseX-Role-WithOverloading-0.13Changes INSTALL LICENSE MANIFEST META.json META.yml Makefile.PL README WithOverloading.xs dist.ini lib/MooseX/Role/WithOverloading.pm lib/MooseX/Role/WithOverloading/Meta/Role.pm lib/MooseX/Role/WithOverloading/Meta/Role/Application.pm lib/MooseX/Role/WithOverloading/Meta/Role/Application/Composite.pm lib/MooseX/Role/WithOverloading/Meta/Role/Application/Composite/ToClass.pm lib/MooseX/Role/WithOverloading/Meta/Role/Application/Composite/ToInstance.pm lib/MooseX/Role/WithOverloading/Meta/Role/Application/Composite/ToRole.pm lib/MooseX/Role/WithOverloading/Meta/Role/Application/FixOverloadedRefs.pm lib/MooseX/Role/WithOverloading/Meta/Role/Application/ToClass.pm lib/MooseX/Role/WithOverloading/Meta/Role/Application/ToInstance.pm lib/MooseX/Role/WithOverloading/Meta/Role/Application/ToRole.pm lib/MooseX/Role/WithOverloading/Meta/Role/Composite.pm t/00-check-deps.t t/00-compile.t t/combine_to_class.t t/combine_to_instance.t t/combine_to_role.t t/lib/ClassWithCombiningRole.pm t/lib/CombiningClass.pm t/lib/CombiningRole.pm t/lib/OtherClass.pm t/lib/OtherRole.pm t/lib/Role.pm t/lib/SomeClass.pm t/lib/UnrelatedRole.pm t/release-changes_has_content.t t/release-cpan-changes.t t/release-distmeta.t t/release-eol.t t/release-minimum-version.t t/release-no-tabs.t t/release-pod-coverage.t t/release-pod-linkcheck.t t/release-pod-no404s.t t/release-pod-syntax.t t/release-test-version.t t/remove_attributes_bug.t t/to_class.t t/to_instance.t t/to_role.t META.json100644000767000024 3333012072723641 17776 0ustar00etherstaff000000000000MooseX-Role-WithOverloading-0.13{ "abstract" : "Roles which support overloading", "author" : [ "Florian Ragwitz ", "Tomas Doran " ], "dynamic_config" : 0, "generated_by" : "Dist::Zilla version 4.300028, CPAN::Meta::Converter version 2.120921", "license" : [ "perl_5" ], "meta-spec" : { "url" : "http://search.cpan.org/perldoc?CPAN::Meta::Spec", "version" : "2" }, "name" : "MooseX-Role-WithOverloading", "prereqs" : { "configure" : { "requires" : { "ExtUtils::MakeMaker" : "6.30" } }, "develop" : { "requires" : { "Pod::Coverage::TrustPod" : "0", "Test::CPAN::Meta" : "0", "Test::Pod" : "1.41", "Test::Pod::Coverage" : "1.08" } }, "runtime" : { "requires" : { "Moose" : "0.94", "Moose::Role" : "1.15", "aliased" : "0", "namespace::autoclean" : "0.12", "namespace::clean" : "0", "perl" : "5.006" } }, "test" : { "requires" : { "Test::CheckDeps" : "0.002", "Test::More" : "0.88", "Test::NoWarnings" : "1.04" } } }, "provides" : { "MooseX::Role::WithOverloading" : { "file" : "lib/MooseX/Role/WithOverloading.pm", "version" : "0.13" }, "MooseX::Role::WithOverloading::Meta::Role" : { "file" : "lib/MooseX/Role/WithOverloading/Meta/Role.pm", "version" : "0.13" }, "MooseX::Role::WithOverloading::Meta::Role::Application" : { "file" : "lib/MooseX/Role/WithOverloading/Meta/Role/Application.pm", "version" : "0.13" }, "MooseX::Role::WithOverloading::Meta::Role::Application::Composite" : { "file" : "lib/MooseX/Role/WithOverloading/Meta/Role/Application/Composite.pm", "version" : "0.13" }, "MooseX::Role::WithOverloading::Meta::Role::Application::Composite::ToClass" : { "file" : "lib/MooseX/Role/WithOverloading/Meta/Role/Application/Composite/ToClass.pm", "version" : "0.13" }, "MooseX::Role::WithOverloading::Meta::Role::Application::Composite::ToInstance" : { "file" : "lib/MooseX/Role/WithOverloading/Meta/Role/Application/Composite/ToInstance.pm", "version" : "0.13" }, "MooseX::Role::WithOverloading::Meta::Role::Application::Composite::ToRole" : { "file" : "lib/MooseX/Role/WithOverloading/Meta/Role/Application/Composite/ToRole.pm", "version" : "0.13" }, "MooseX::Role::WithOverloading::Meta::Role::Application::FixOverloadedRefs" : { "file" : "lib/MooseX/Role/WithOverloading/Meta/Role/Application/FixOverloadedRefs.pm", "version" : "0.13" }, "MooseX::Role::WithOverloading::Meta::Role::Application::ToClass" : { "file" : "lib/MooseX/Role/WithOverloading/Meta/Role/Application/ToClass.pm", "version" : "0.13" }, "MooseX::Role::WithOverloading::Meta::Role::Application::ToInstance" : { "file" : "lib/MooseX/Role/WithOverloading/Meta/Role/Application/ToInstance.pm", "version" : "0.13" }, "MooseX::Role::WithOverloading::Meta::Role::Application::ToRole" : { "file" : "lib/MooseX/Role/WithOverloading/Meta/Role/Application/ToRole.pm", "version" : "0.13" }, "MooseX::Role::WithOverloading::Meta::Role::Composite" : { "file" : "lib/MooseX/Role/WithOverloading/Meta/Role/Composite.pm", "version" : "0.13" } }, "release_status" : "stable", "resources" : { "bugtracker" : { "mailto" : "bug-MooseX-Role-WithOverloading@rt.cpan.org", "web" : "http://rt.cpan.org/Public/Dist/Display.html?Name=MooseX-Role-WithOverloading" }, "homepage" : "http://metacpan.org/release/MooseX-Role-WithOverloading", "repository" : { "type" : "git", "url" : "git://github.com/karenetheridge/moosex-role-withoverloading.git", "web" : "http://github.com/karenetheridge/moosex-role-withoverloading" } }, "version" : "0.13", "x_Dist_Zilla" : { "perl" : { "version" : "5.017006" }, "plugins" : [ { "class" : "Dist::Zilla::Plugin::GatherDir", "name" : "@FLORA/@Basic/GatherDir", "version" : "4.300028" }, { "class" : "Dist::Zilla::Plugin::PruneCruft", "name" : "@FLORA/@Basic/PruneCruft", "version" : "4.300028" }, { "class" : "Dist::Zilla::Plugin::ManifestSkip", "name" : "@FLORA/@Basic/ManifestSkip", "version" : "4.300028" }, { "class" : "Dist::Zilla::Plugin::MetaYAML", "name" : "@FLORA/@Basic/MetaYAML", "version" : "4.300028" }, { "class" : "Dist::Zilla::Plugin::License", "name" : "@FLORA/@Basic/License", "version" : "4.300028" }, { "class" : "Dist::Zilla::Plugin::Readme", "name" : "@FLORA/@Basic/Readme", "version" : "4.300028" }, { "class" : "Dist::Zilla::Plugin::ExtraTests", "name" : "@FLORA/@Basic/ExtraTests", "version" : "4.300028" }, { "class" : "Dist::Zilla::Plugin::ExecDir", "name" : "@FLORA/@Basic/ExecDir", "version" : "4.300028" }, { "class" : "Dist::Zilla::Plugin::ShareDir", "name" : "@FLORA/@Basic/ShareDir", "version" : "4.300028" }, { "class" : "Dist::Zilla::Plugin::MakeMaker", "name" : "@FLORA/@Basic/MakeMaker", "version" : "4.300028" }, { "class" : "Dist::Zilla::Plugin::Manifest", "name" : "@FLORA/@Basic/Manifest", "version" : "4.300028" }, { "class" : "Dist::Zilla::Plugin::TestRelease", "name" : "@FLORA/@Basic/TestRelease", "version" : "4.300028" }, { "class" : "Dist::Zilla::Plugin::ConfirmRelease", "name" : "@FLORA/@Basic/ConfirmRelease", "version" : "4.300028" }, { "class" : "Dist::Zilla::Plugin::UploadToCPAN", "name" : "@FLORA/@Basic/UploadToCPAN", "version" : "4.300028" }, { "class" : "Dist::Zilla::Plugin::MetaConfig", "name" : "@FLORA/MetaConfig", "version" : "4.300028" }, { "class" : "Dist::Zilla::Plugin::MetaJSON", "name" : "@FLORA/MetaJSON", "version" : "4.300028" }, { "class" : "Dist::Zilla::Plugin::PkgVersion", "name" : "@FLORA/PkgVersion", "version" : "4.300028" }, { "class" : "Dist::Zilla::Plugin::PodSyntaxTests", "name" : "@FLORA/PodSyntaxTests", "version" : "4.300028" }, { "class" : "Dist::Zilla::Plugin::NoTabsTests", "name" : "@FLORA/NoTabsTests", "version" : "0.01" }, { "class" : "Dist::Zilla::Plugin::PodCoverageTests", "name" : "@FLORA/PodCoverageTests", "version" : "4.300028" }, { "class" : "Dist::Zilla::Plugin::MetaResources", "name" : "@FLORA/MetaResources", "version" : "4.300028" }, { "class" : "Dist::Zilla::Plugin::Authority", "name" : "@FLORA/Authority", "version" : "1.006" }, { "class" : "Dist::Zilla::Plugin::EOLTests", "name" : "@FLORA/EOLTests", "version" : "0.02" }, { "class" : "Dist::Zilla::Plugin::PodWeaver", "name" : "@FLORA/PodWeaver", "version" : "3.101641" }, { "class" : "Dist::Zilla::Plugin::Prereqs", "config" : { "Dist::Zilla::Plugin::Prereqs" : { "phase" : "runtime", "type" : "requires" } }, "name" : "Prereqs", "version" : "4.300028" }, { "class" : "Dist::Zilla::Plugin::Prereqs", "config" : { "Dist::Zilla::Plugin::Prereqs" : { "phase" : "test", "type" : "requires" } }, "name" : "TestRequires", "version" : "4.300028" }, { "class" : "Dist::Zilla::Plugin::InstallGuide", "name" : "InstallGuide", "version" : "1.200000" }, { "class" : "Dist::Zilla::Plugin::MetaConfig", "name" : "MetaConfig", "version" : "4.300028" }, { "class" : "Dist::Zilla::Plugin::MetaProvides::Package", "name" : "MetaProvides::Package", "version" : "1.14000001" }, { "class" : "Dist::Zilla::Plugin::Git::Describe", "name" : "Git::Describe", "version" : "0.002" }, { "class" : "Dist::Zilla::Plugin::MinimumPerl", "name" : "MinimumPerl", "version" : "1.003" }, { "class" : "Dist::Zilla::Plugin::ReadmeAnyFromPod", "name" : "ReadmeAnyFromPod", "version" : "0.120120" }, { "class" : "Dist::Zilla::Plugin::Test::Compile", "name" : "Test::Compile", "version" : "1.112820" }, { "class" : "Dist::Zilla::Plugin::Test::MinimumVersion", "name" : "Test::MinimumVersion", "version" : "2.000002" }, { "class" : "Dist::Zilla::Plugin::MetaTests", "name" : "MetaTests", "version" : "4.300028" }, { "class" : "Dist::Zilla::Plugin::Test::CPAN::Changes", "name" : "Test::CPAN::Changes", "version" : "0.005" }, { "class" : "Dist::Zilla::Plugin::Test::ChangesHasContent", "name" : "Test::ChangesHasContent", "version" : "0.006" }, { "class" : "Dist::Zilla::Plugin::Test::Pod::LinkCheck", "name" : "Test::Pod::LinkCheck", "version" : "1.001" }, { "class" : "Dist::Zilla::Plugin::Test::Pod::No404s", "name" : "Test::Pod::No404s", "version" : "1.001" }, { "class" : "Dist::Zilla::Plugin::CheckPrereqsIndexed", "name" : "CheckPrereqsIndexed", "version" : "0.007" }, { "class" : "Dist::Zilla::Plugin::Test::Version", "name" : "Test::Version", "version" : "0.002004" }, { "class" : "Dist::Zilla::Plugin::Test::CheckDeps", "name" : "Test::CheckDeps", "version" : "0.005" }, { "class" : "Dist::Zilla::Plugin::Git::Remote::Check", "name" : "Git::Remote::Check", "version" : "0.1.2" }, { "class" : "Dist::Zilla::Plugin::Git::CheckFor::CorrectBranch", "name" : "Git::CheckFor::CorrectBranch", "version" : "0.006" }, { "class" : "Dist::Zilla::Plugin::Git::Check", "name" : "Git::Check", "version" : "2.006" }, { "class" : "Dist::Zilla::Plugin::Git::NextVersion", "name" : "Git::NextVersion", "version" : "2.006" }, { "class" : "Dist::Zilla::Plugin::NextRelease", "name" : "NextRelease", "version" : "4.300028" }, { "class" : "Dist::Zilla::Plugin::Git::Commit", "name" : "Git::Commit", "version" : "2.006" }, { "class" : "Dist::Zilla::Plugin::Git::Tag", "name" : "Git::Tag", "version" : "2.006" }, { "class" : "Dist::Zilla::Plugin::Git::Push", "name" : "Git::Push", "version" : "2.006" }, { "class" : "Dist::Zilla::Plugin::InstallRelease", "name" : "InstallRelease", "version" : "0.008" }, { "class" : "Dist::Zilla::Plugin::Clean", "name" : "Clean", "version" : "0.07" }, { "class" : "Dist::Zilla::Plugin::FinderCode", "name" : ":InstallModules", "version" : "4.300028" }, { "class" : "Dist::Zilla::Plugin::FinderCode", "name" : ":IncModules", "version" : "4.300028" }, { "class" : "Dist::Zilla::Plugin::FinderCode", "name" : ":TestFiles", "version" : "4.300028" }, { "class" : "Dist::Zilla::Plugin::FinderCode", "name" : ":ExecFiles", "version" : "4.300028" }, { "class" : "Dist::Zilla::Plugin::FinderCode", "name" : ":ShareFiles", "version" : "4.300028" }, { "class" : "Dist::Zilla::Plugin::FinderCode", "name" : ":MainModule", "version" : "4.300028" } ], "zilla" : { "class" : "Dist::Zilla::Dist::Builder", "config" : { "is_trial" : "0" }, "version" : "4.300028" } }, "x_authority" : "cpan:FLORA" } t000755000767000024 012072723641 16436 5ustar00etherstaff000000000000MooseX-Role-WithOverloading-0.13to_role.t100644000767000024 116112072723641 20425 0ustar00etherstaff000000000000MooseX-Role-WithOverloading-0.13/tuse strict; use warnings; use Test::More tests => 13; use Test::NoWarnings 1.04 ':early'; use overload (); use lib 't/lib'; BEGIN { use_ok('OtherClass') } ok(OtherClass->meta->does_role('Role')); ok(OtherClass->meta->does_role('OtherRole')); ok(overload::Overloaded('Role')); ok(overload::Overloaded('OtherRole')); ok(overload::Overloaded('OtherClass')); ok(overload::Method('Role', q{""})); ok(overload::Method('OtherRole', q{""})); ok(overload::Method('OtherClass', q{""})); my $foo = OtherClass->new({ message => 'foo' }); isa_ok($foo, 'OtherClass'); is($foo->message, 'foo'); my $str = "${foo}"; is($str, 'foo'); Makefile.PL100644000767000024 237712072723641 20316 0ustar00etherstaff000000000000MooseX-Role-WithOverloading-0.13 use strict; use warnings; use 5.006; use ExtUtils::MakeMaker 6.30; my %WriteMakefileArgs = ( "ABSTRACT" => "Roles which support overloading", "AUTHOR" => "Florian Ragwitz , Tomas Doran ", "BUILD_REQUIRES" => { "Test::CheckDeps" => "0.002", "Test::More" => "0.88", "Test::NoWarnings" => "1.04" }, "CONFIGURE_REQUIRES" => { "ExtUtils::MakeMaker" => "6.30" }, "DISTNAME" => "MooseX-Role-WithOverloading", "EXE_FILES" => [], "LICENSE" => "perl", "NAME" => "MooseX::Role::WithOverloading", "PREREQ_PM" => { "Moose" => "0.94", "Moose::Role" => "1.15", "aliased" => 0, "namespace::autoclean" => "0.12", "namespace::clean" => 0 }, "VERSION" => "0.13", "test" => { "TESTS" => "t/*.t" } ); 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); to_class.t100644000767000024 75412072723641 20560 0ustar00etherstaff000000000000MooseX-Role-WithOverloading-0.13/tuse strict; use warnings; use Test::More tests => 10; use Test::NoWarnings 1.04 ':early'; use overload (); use lib 't/lib'; BEGIN { use_ok('SomeClass') } ok(SomeClass->meta->does_role('Role')); ok(overload::Overloaded('Role')); ok(overload::Overloaded('SomeClass')); ok(overload::Method('Role', q{""})); ok(overload::Method('SomeClass', q{""})); my $foo = SomeClass->new({ message => 'foo' }); isa_ok($foo, 'SomeClass'); is($foo->message, 'foo'); my $str = "${foo}"; is($str, 'foo'); lib000755000767000024 012072723641 17204 5ustar00etherstaff000000000000MooseX-Role-WithOverloading-0.13/tRole.pm100644000767000024 40012072723641 20555 0ustar00etherstaff000000000000MooseX-Role-WithOverloading-0.13/t/libpackage Role; use MooseX::Role::WithOverloading; use namespace::clean -except => 'meta'; use overload q{""} => 'as_string', fallback => 1; has message => ( is => 'rw', isa => 'Str', ); sub as_string { shift->message } 1; 00-compile.t100644000767000024 312512072723641 20631 0ustar00etherstaff000000000000MooseX-Role-WithOverloading-0.13/t#!perl use strict; use warnings; use Test::More; use File::Find; use File::Temp qw{ tempdir }; my @modules; find( sub { return if $File::Find::name !~ /\.pm\z/; my $found = $File::Find::name; $found =~ s{^lib/}{}; $found =~ s{[/\\]}{::}g; $found =~ s/\.pm$//; # nothing to skip push @modules, $found; }, 'lib', ); sub _find_scripts { my $dir = shift @_; my @found_scripts = (); find( sub { return unless -f; my $found = $File::Find::name; # nothing to skip open my $FH, '<', $_ or do { note( "Unable to open $found in ( $! ), skipping" ); return; }; my $shebang = <$FH>; return unless $shebang =~ /^#!.*?\bperl\b\s*$/; push @found_scripts, $found; }, $dir, ); return @found_scripts; } my @scripts; do { push @scripts, _find_scripts($_) if -d $_ } for qw{ bin script scripts }; my $plan = scalar(@modules) + scalar(@scripts); $plan ? (plan tests => $plan) : (plan skip_all => "no tests to run"); { # fake home for cpan-testers # no fake requested ## local $ENV{HOME} = tempdir( CLEANUP => 1 ); like( qx{ $^X -Ilib -e "require $_; print '$_ ok'" }, qr/^\s*$_ ok/s, "$_ loaded ok" ) for sort @modules; SKIP: { eval "use Test::Script 1.05; 1;"; skip "Test::Script needed to test script compilation", scalar(@scripts) if $@; foreach my $file ( @scripts ) { my $script = $file; $script =~ s!.*/!!; script_compiles( $file, "$script script compiles" ); } } } to_instance.t100644000767000024 75312072723641 21256 0ustar00etherstaff000000000000MooseX-Role-WithOverloading-0.13/tuse strict; use warnings; use Test::More tests => 7; use Test::NoWarnings 1.04 ':early'; use overload (); use lib 't/lib'; use Role; { package MyClass; use Moose; use namespace::autoclean; } my $foo = MyClass->new; Role->meta->apply($foo); isa_ok($foo, 'MyClass'); ok(overload::Overloaded('Role')); ok(overload::Overloaded(ref $foo)); ok(overload::Method('Role', q{""})); ok(overload::Method(ref $foo, q{""})); $foo->message('foo'); my $str = "${foo}"; is($str, 'foo'); release-eol.t100644000767000024 47612072723641 21147 0ustar00etherstaff000000000000MooseX-Role-WithOverloading-0.13/t BEGIN { unless ($ENV{RELEASE_TESTING}) { require Test::More; Test::More::plan(skip_all => 'these tests are for release candidate testing'); } } 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 }); 00-check-deps.t100644000767000024 24712072723641 21171 0ustar00etherstaff000000000000MooseX-Role-WithOverloading-0.13/tuse Test::More 0.88; use Test::CheckDeps; check_dependencies(); if (0) { BAIL_OUT("Missing dependencies") if !Test::More->builder->is_passing; } done_testing; WithOverloading.xs100644000767000024 333312072723641 22016 0ustar00etherstaff000000000000MooseX-Role-WithOverloading-0.13#include "EXTERN.h" #include "perl.h" #include "XSUB.h" static void S_reset_amagic (pTHX_ SV *rv, const bool on) { /* It is assumed that you've already turned magic on/off on rv */ SV *sva; SV *const target = SvRV (rv); /* Less 1 for the reference we've already dealt with. */ U32 how_many = SvREFCNT (target) - 1; MAGIC *mg; if (SvMAGICAL (target) && (mg = mg_find (target, PERL_MAGIC_backref))) { /* Back referneces also need to be found, but aren't part of the target's reference count. */ how_many += 1 + av_len ((AV *)mg->mg_obj); } if (!how_many) { /* There was only 1 reference to this object. */ return; } for (sva = PL_sv_arenaroot; sva; sva = (SV *)SvANY (sva)) { register const SV *const svend = &sva[SvREFCNT (sva)]; register SV *sv; for (sv = sva + 1; sv < svend; ++sv) { if (SvTYPE (sv) != SVTYPEMASK && ((sv->sv_flags & SVf_ROK) == SVf_ROK) && SvREFCNT (sv) && SvRV (sv) == target && sv != rv) { if (on) { SvAMAGIC_on (sv); } else { SvAMAGIC_off (sv); } if (--how_many == 0) { /* We have found them all. */ return; } } } } } MODULE = MooseX::Role::WithOverloading PACKAGE = MooseX::Role::WithOverloading::Meta::Role::Application::FixOverloadedRefs PROTOTYPES: DISABLE void reset_amagic (rv) SV *rv CODE: if (Gv_AMG (SvSTASH (SvRV (rv))) && !SvAMAGIC (rv)) { SvAMAGIC_on (rv); S_reset_amagic (aTHX_ rv, TRUE); } OtherRole.pm100644000767000024 12112072723641 21557 0ustar00etherstaff000000000000MooseX-Role-WithOverloading-0.13/t/libpackage OtherRole; use Moose::Role; use namespace::autoclean; with 'Role'; 1; SomeClass.pm100644000767000024 11312072723641 21546 0ustar00etherstaff000000000000MooseX-Role-WithOverloading-0.13/t/libpackage SomeClass; use Moose; use namespace::autoclean; with 'Role'; 1; combine_to_role.t100644000767000024 155212072723642 22126 0ustar00etherstaff000000000000MooseX-Role-WithOverloading-0.13/tuse strict; use warnings; use Test::More tests => 16; use Test::NoWarnings 1.04 ':early'; use overload (); use lib 't/lib'; BEGIN { use_ok('ClassWithCombiningRole') } ok(ClassWithCombiningRole->meta->does_role('Role')); ok(ClassWithCombiningRole->meta->does_role('UnrelatedRole')); ok(ClassWithCombiningRole->meta->does_role('CombiningRole')); ok(!overload::Overloaded('UnrelatedRole')); ok(overload::Overloaded('Role')); ok(overload::Overloaded('CombiningRole')); ok(overload::Overloaded('ClassWithCombiningRole')); ok(!overload::Method('UnrelatedRole', q{""})); ok(overload::Method('Role', q{""})); ok(overload::Method('CombiningRole', q{""})); ok(overload::Method('ClassWithCombiningRole', q{""})); my $foo = ClassWithCombiningRole->new({ message => 'foo' }); isa_ok($foo, 'ClassWithCombiningRole'); is($foo->message, 'foo'); my $str = "${foo}"; is($str, 'foo'); OtherClass.pm100644000767000024 12112072723642 21724 0ustar00etherstaff000000000000MooseX-Role-WithOverloading-0.13/t/libpackage OtherClass; use Moose; use namespace::autoclean; with 'OtherRole'; 1; release-no-tabs.t100644000767000024 45012072723642 21724 0ustar00etherstaff000000000000MooseX-Role-WithOverloading-0.13/t BEGIN { unless ($ENV{RELEASE_TESTING}) { require Test::More; Test::More::plan(skip_all => 'these tests are for release candidate testing'); } } use strict; use warnings; use Test::More; eval 'use Test::NoTabs'; plan skip_all => 'Test::NoTabs required' if $@; all_perl_files_ok(); combine_to_class.t100644000767000024 123312072723642 22266 0ustar00etherstaff000000000000MooseX-Role-WithOverloading-0.13/tuse strict; use warnings; use Test::More tests => 13; use Test::NoWarnings 1.04 ':early'; use overload (); use lib 't/lib'; BEGIN { use_ok('CombiningClass') } ok(CombiningClass->meta->does_role('UnrelatedRole')); ok(CombiningClass->meta->does_role('Role')); ok(!overload::Overloaded('UnrelatedRole')); ok(overload::Overloaded('Role')); ok(overload::Overloaded('CombiningClass')); ok(!overload::Method('UnrelatedRole', q{""})); ok(overload::Method('Role', q{""})); ok(overload::Method('CombiningClass', q{""})); my $foo = CombiningClass->new({ message => 'foo' }); isa_ok($foo, 'CombiningClass'); is($foo->message, 'foo'); my $str = "${foo}"; is($str, 'foo'); release-distmeta.t100644000767000024 45512072723642 22200 0ustar00etherstaff000000000000MooseX-Role-WithOverloading-0.13/t#!perl BEGIN { unless ($ENV{RELEASE_TESTING}) { require Test::More; Test::More::plan(skip_all => 'these tests are for release candidate testing'); } } use Test::More; eval "use Test::CPAN::Meta"; plan skip_all => "Test::CPAN::Meta required for testing META.yml" if $@; meta_yaml_ok(); CombiningRole.pm100644000767000024 14612072723642 22413 0ustar00etherstaff000000000000MooseX-Role-WithOverloading-0.13/t/libpackage CombiningRole; use Moose::Role; use namespace::autoclean; with 'Role', 'UnrelatedRole'; 1; UnrelatedRole.pm100644000767000024 10712072723642 22426 0ustar00etherstaff000000000000MooseX-Role-WithOverloading-0.13/t/libpackage UnrelatedRole; use Moose::Role; use namespace::autoclean; 1; release-pod-syntax.t100644000767000024 45012072723642 22467 0ustar00etherstaff000000000000MooseX-Role-WithOverloading-0.13/t#!perl BEGIN { unless ($ENV{RELEASE_TESTING}) { require Test::More; Test::More::plan(skip_all => 'these tests are for release candidate testing'); } } 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(); release-pod-no404s.t100644000767000024 76512072723642 22201 0ustar00etherstaff000000000000MooseX-Role-WithOverloading-0.13/t#!perl BEGIN { unless ($ENV{RELEASE_TESTING}) { require Test::More; Test::More::plan(skip_all => 'these tests are for release candidate testing'); } } 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(); } combine_to_instance.t100644000767000024 112712072723642 22767 0ustar00etherstaff000000000000MooseX-Role-WithOverloading-0.13/tuse strict; use warnings; use Test::More tests => 7; use Test::NoWarnings 1.04 ':early'; use overload (); use lib 't/lib'; use Role; use UnrelatedRole; { package MyClass; use Moose; use namespace::autoclean; } my $foo = MyClass->new; Moose::Meta::Role->combine( [ 'Role' => undef ], [ 'UnrelatedRole' => undef ], )->apply($foo); isa_ok($foo, 'MyClass'); ok(overload::Overloaded('Role')); ok(overload::Overloaded(ref $foo)); ok(overload::Method('Role', q{""})); ok(overload::Method(ref $foo, q{""})); $foo->message('foo'); my $str = "${foo}"; is($str, 'foo'); CombiningClass.pm100644000767000024 14112072723642 22552 0ustar00etherstaff000000000000MooseX-Role-WithOverloading-0.13/t/libpackage CombiningClass; use Moose; use namespace::autoclean; with 'Role', 'UnrelatedRole'; 1; release-pod-coverage.t100644000767000024 76512072723642 22745 0ustar00etherstaff000000000000MooseX-Role-WithOverloading-0.13/t#!perl BEGIN { unless ($ENV{RELEASE_TESTING}) { require Test::More; Test::More::plan(skip_all => 'these tests are for release candidate testing'); } } 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' }); release-cpan-changes.t100644000767000024 47112072723642 22713 0ustar00etherstaff000000000000MooseX-Role-WithOverloading-0.13/t#!perl BEGIN { unless ($ENV{RELEASE_TESTING}) { require Test::More; Test::More::plan(skip_all => 'these tests are for release candidate testing'); } } use Test::More; eval 'use Test::CPAN::Changes'; plan skip_all => 'Test::CPAN::Changes required for this test' if $@; changes_ok(); done_testing(); release-test-version.t100644000767000024 110112072723642 23035 0ustar00etherstaff000000000000MooseX-Role-WithOverloading-0.13/t BEGIN { unless ($ENV{RELEASE_TESTING}) { require Test::More; Test::More::plan(skip_all => 'these tests are for release candidate testing'); } } 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 => 0, 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; remove_attributes_bug.t100644000767000024 122512072723642 23364 0ustar00etherstaff000000000000MooseX-Role-WithOverloading-0.13/tuse strict; use warnings; use Test::More tests => 4; use Test::NoWarnings 1.04 ':early'; { package OverloadingRole; use MooseX::Role::WithOverloading; use overload q{""} => 'stringify', fallback => 1; sub stringify { 'moo' } } { package MyRole; use Moose::Role; has hitid => ( is => 'ro' ); # Note ordering here. If metaclass reinitialization nukes attributes, we are screwed.. with 'OverloadingRole'; } { package Class; use Moose; with 'MyRole'; } my $i = Class->new( hitid => 21 ); is("$i", 'moo', 'overloading works'); can_ok($i, 'hitid' ); is($i->hitid, 21, 'Attribute works'); release-pod-linkcheck.t100644000767000024 77512072723642 23106 0ustar00etherstaff000000000000MooseX-Role-WithOverloading-0.13/t#!perl BEGIN { unless ($ENV{RELEASE_TESTING}) { require Test::More; Test::More::plan(skip_all => 'these tests are for release candidate testing'); } } use strict; use warnings; use Test::More; foreach my $env_skip ( qw( SKIP_POD_LINKCHECK ) ){ plan skip_all => "\$ENV{$env_skip} is set, skipping" if $ENV{$env_skip}; } eval "use Test::Pod::LinkCheck"; if ( $@ ) { plan skip_all => 'Test::Pod::LinkCheck required for testing POD'; } else { Test::Pod::LinkCheck->new->all_pod_ok; } release-minimum-version.t100644000767000024 52612072723642 23523 0ustar00etherstaff000000000000MooseX-Role-WithOverloading-0.13/t#!perl BEGIN { unless ($ENV{RELEASE_TESTING}) { require Test::More; Test::More::plan(skip_all => 'these tests are for release candidate testing'); } } use Test::More; eval "use Test::MinimumVersion"; plan skip_all => "Test::MinimumVersion required for testing minimum versions" if $@; all_minimum_version_from_metayml_ok(); ClassWithCombiningRole.pm100644000767000024 14112072723642 24230 0ustar00etherstaff000000000000MooseX-Role-WithOverloading-0.13/t/libpackage ClassWithCombiningRole; use Moose; use namespace::autoclean; with 'CombiningRole'; 1; release-changes_has_content.t100644000767000024 224512072723642 24402 0ustar00etherstaff000000000000MooseX-Role-WithOverloading-0.13/t#!perl BEGIN { unless ($ENV{RELEASE_TESTING}) { require Test::More; Test::More::plan(skip_all => 'these tests are for release candidate testing'); } } use Test::More tests => 2; note 'Checking Changes'; my $changes_file = 'Changes'; my $newver = '0.13'; 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; } Role000755000767000024 012072723642 21055 5ustar00etherstaff000000000000MooseX-Role-WithOverloading-0.13/lib/MooseXWithOverloading.pm100644000767000024 460112072723642 24661 0ustar00etherstaff000000000000MooseX-Role-WithOverloading-0.13/lib/MooseX/Rolepackage MooseX::Role::WithOverloading; # git description: v0.12-2-gf2d211c BEGIN { $MooseX::Role::WithOverloading::AUTHORITY = 'cpan:FLORA'; } { $MooseX::Role::WithOverloading::VERSION = '0.13'; } # ABSTRACT: Roles which support overloading use XSLoader; use Moose::Role (); use Moose::Exporter; use Moose::Util::MetaRole; use aliased 'MooseX::Role::WithOverloading::Meta::Role', 'MetaRole'; use aliased 'MooseX::Role::WithOverloading::Meta::Role::Application::ToClass'; use aliased 'MooseX::Role::WithOverloading::Meta::Role::Application::ToRole'; use aliased 'MooseX::Role::WithOverloading::Meta::Role::Application::ToInstance'; use namespace::clean; XSLoader::load(__PACKAGE__, our $VERSION); Moose::Exporter->setup_import_methods(also => 'Moose::Role'); sub init_meta { my ($class, %opts) = @_; my $meta = Moose::Role->init_meta(%opts); return Moose::Util::MetaRole::apply_metaroles( for => $meta, role_metaroles => { role => [MetaRole], application_to_class => [ToClass], application_to_role => [ToRole], application_to_instance => [ToInstance], }, ); } 1; __END__ =pod =encoding utf-8 =head1 NAME MooseX::Role::WithOverloading - Roles which support overloading =head1 SYNOPSIS package MyRole; use MooseX::Role::WithOverloading; use overload q{""} => 'as_string', fallback => 1; has message => ( is => 'rw', isa => 'Str', ); sub as_string { shift->message } package MyClass; use Moose; use namespace::autoclean; with 'MyRole'; package main; my $i = MyClass->new( message => 'foobar' ); print $i; # Prints 'foobar' =head1 DESCRIPTION MooseX::Role::WithOverloading allows you to write a L which defines overloaded operators and allows those operator overloadings to be composed into the classes/roles/instances it's compiled to, while plain Ls would lose the overloading. =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) 2013 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 Meta000755000767000024 012072723642 25050 5ustar00etherstaff000000000000MooseX-Role-WithOverloading-0.13/lib/MooseX/Role/WithOverloadingRole.pm100644000767000024 173212072723642 26452 0ustar00etherstaff000000000000MooseX-Role-WithOverloading-0.13/lib/MooseX/Role/WithOverloading/Metapackage MooseX::Role::WithOverloading::Meta::Role; BEGIN { $MooseX::Role::WithOverloading::Meta::Role::AUTHORITY = 'cpan:FLORA'; } { $MooseX::Role::WithOverloading::Meta::Role::VERSION = '0.13'; } # ABSTRACT: Roles which support overloading use Moose 0.94 (); use Moose::Role; use aliased 'MooseX::Role::WithOverloading::Meta::Role::Composite', 'CompositionRole'; use namespace::autoclean; around composition_class_roles => sub { my ($orig, $self) = @_; return $self->$orig, CompositionRole; }; 1; __END__ =pod =encoding utf-8 =head1 NAME MooseX::Role::WithOverloading::Meta::Role - Roles which support overloading =head1 AUTHORS =over 4 =item * Florian Ragwitz =item * Tomas Doran =back =head1 COPYRIGHT AND LICENSE This software is copyright (c) 2013 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 Role000755000767000024 012072723642 25751 5ustar00etherstaff000000000000MooseX-Role-WithOverloading-0.13/lib/MooseX/Role/WithOverloading/MetaComposite.pm100644000767000024 313512072723642 30413 0ustar00etherstaff000000000000MooseX-Role-WithOverloading-0.13/lib/MooseX/Role/WithOverloading/Meta/Rolepackage MooseX::Role::WithOverloading::Meta::Role::Composite; BEGIN { $MooseX::Role::WithOverloading::Meta::Role::Composite::AUTHORITY = 'cpan:FLORA'; } { $MooseX::Role::WithOverloading::Meta::Role::Composite::VERSION = '0.13'; } # ABSTRACT: Role for composite roles which support overloading use Moose::Role; use Moose::Util::MetaRole; use aliased 'MooseX::Role::WithOverloading::Meta::Role::Application::Composite::ToClass'; use aliased 'MooseX::Role::WithOverloading::Meta::Role::Application::Composite::ToRole'; use aliased 'MooseX::Role::WithOverloading::Meta::Role::Application::Composite::ToInstance'; use namespace::autoclean; around apply_params => sub { my ($next, $self, @args) = @_; return Moose::Util::MetaRole::apply_metaroles( for => $self->$next(@args), role_metaroles => { application_to_class => [ToClass], application_to_role => [ToRole], application_to_instance => [ToInstance], }, ); }; 1; __END__ =pod =encoding utf-8 =head1 NAME MooseX::Role::WithOverloading::Meta::Role::Composite - Role for composite roles which support overloading =head1 METHODS =head2 apply_params Wrapped method to apply various metaclass roles to aid with role composition. =head1 AUTHORS =over 4 =item * Florian Ragwitz =item * Tomas Doran =back =head1 COPYRIGHT AND LICENSE This software is copyright (c) 2013 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 Application.pm100644000767000024 602212072723642 30712 0ustar00etherstaff000000000000MooseX-Role-WithOverloading-0.13/lib/MooseX/Role/WithOverloading/Meta/Rolepackage MooseX::Role::WithOverloading::Meta::Role::Application; BEGIN { $MooseX::Role::WithOverloading::Meta::Role::Application::AUTHORITY = 'cpan:FLORA'; } { $MooseX::Role::WithOverloading::Meta::Role::Application::VERSION = '0.13'; } # ABSTRACT: Role application role for Roles which support overloading use Moose::Role 1.15; use overload (); use namespace::autoclean; requires 'apply_methods'; has overload_ops => ( is => 'ro', isa => 'ArrayRef[Str]', builder => '_build_overload_ops', ); sub _build_overload_ops { return [map { split /\s+/ } values %overload::ops]; } after apply_methods => sub { my ($self, $role, $other) = @_; $self->apply_overloading($role, $other); }; sub apply_overloading { my ($self, $role, $other) = @_; return unless overload::Overloaded($role->name); # overloading predicate method $other->add_package_symbol('&()' => $role->get_package_symbol('&()')); # fallback value $other->add_package_symbol('$()' => $role->get_package_symbol('$()')) if $role->has_package_symbol('$()'); # register with magic by touching (changes to SVf_AMAGIC removed %OVERLOAD in 5.17.0) $other->get_or_add_package_symbol('%OVERLOAD')->{dummy}++ if $^V < 5.017000; for my $op (@{ $self->overload_ops }) { my $code_sym = '&(' . $op; next if overload::Method($other->name, $op); next unless $role->has_package_symbol($code_sym); my $meth = $role->get_package_symbol($code_sym); next unless $meth; # when using "use overload $op => sub { };" this is the actual method # to be called on overloading. otherwise it's \&overload::nil. see # below. $other->add_package_symbol($code_sym => $meth); # when using "use overload $op => 'method_name';" overload::nil is # installed into the code slot of the glob and the actual method called # is determined by the scalar slot of the same glob. if ($meth == \&overload::nil) { my $scalar_sym = qq{\$($op}; $other->add_package_symbol( $scalar_sym => ${ $role->get_package_symbol($scalar_sym) }, ); } } } 1; __END__ =pod =encoding utf-8 =head1 NAME MooseX::Role::WithOverloading::Meta::Role::Application - Role application role for Roles which support overloading =head1 METHODS =head2 overload_ops Returns an arrayref of the names of overloaded operations =head2 apply_methods ($role, $other) Wrapped with an after modifier which calls the C<< ->apply_overloading >> method. =head2 apply_overloading ($role, $other) Does the heavy lifting of applying overload operations to a class or role which the role is applied to. =head1 AUTHORS =over 4 =item * Florian Ragwitz =item * Tomas Doran =back =head1 COPYRIGHT AND LICENSE This software is copyright (c) 2013 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 Application000755000767000024 012072723642 30214 5ustar00etherstaff000000000000MooseX-Role-WithOverloading-0.13/lib/MooseX/Role/WithOverloading/Meta/RoleToRole.pm100644000767000024 323112072723642 32115 0ustar00etherstaff000000000000MooseX-Role-WithOverloading-0.13/lib/MooseX/Role/WithOverloading/Meta/Role/Applicationpackage MooseX::Role::WithOverloading::Meta::Role::Application::ToRole; BEGIN { $MooseX::Role::WithOverloading::Meta::Role::Application::ToRole::AUTHORITY = 'cpan:FLORA'; } { $MooseX::Role::WithOverloading::Meta::Role::Application::ToRole::VERSION = '0.13'; } # ABSTRACT: Roles which support overloading use Moose::Role; use aliased 'MooseX::Role::WithOverloading::Meta::Role::Application::ToClass'; use aliased 'MooseX::Role::WithOverloading::Meta::Role::Application::ToInstance'; use namespace::autoclean; with 'MooseX::Role::WithOverloading::Meta::Role::Application'; around apply => sub { my ($next, $self, $role1, $role2) = @_; my $new_role2 = Moose::Util::MetaRole::apply_metaroles( for => $role2, role_metaroles => { application_to_class => [ToClass], application_to_role => [__PACKAGE__], application_to_instance => [ToInstance], }, ); # Horrible hack as we have just got a new metaclass with no attributes foreach my $name ( $role2->get_attribute_list ) { $new_role2->add_attribute($role2->get_attribute($name)); } return $self->$next($role1, $new_role2); }; 1; __END__ =pod =encoding utf-8 =head1 NAME MooseX::Role::WithOverloading::Meta::Role::Application::ToRole - Roles which support overloading =head1 AUTHORS =over 4 =item * Florian Ragwitz =item * Tomas Doran =back =head1 COPYRIGHT AND LICENSE This software is copyright (c) 2013 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 ToClass.pm100644000767000024 162612072723642 32267 0ustar00etherstaff000000000000MooseX-Role-WithOverloading-0.13/lib/MooseX/Role/WithOverloading/Meta/Role/Applicationpackage MooseX::Role::WithOverloading::Meta::Role::Application::ToClass; BEGIN { $MooseX::Role::WithOverloading::Meta::Role::Application::ToClass::AUTHORITY = 'cpan:FLORA'; } { $MooseX::Role::WithOverloading::Meta::Role::Application::ToClass::VERSION = '0.13'; } # ABSTRACT: Roles which support overloading use Moose::Role; use namespace::autoclean; with 'MooseX::Role::WithOverloading::Meta::Role::Application'; 1; __END__ =pod =encoding utf-8 =head1 NAME MooseX::Role::WithOverloading::Meta::Role::Application::ToClass - Roles which support overloading =head1 AUTHORS =over 4 =item * Florian Ragwitz =item * Tomas Doran =back =head1 COPYRIGHT AND LICENSE This software is copyright (c) 2013 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 Composite.pm100644000767000024 211712072723642 32655 0ustar00etherstaff000000000000MooseX-Role-WithOverloading-0.13/lib/MooseX/Role/WithOverloading/Meta/Role/Applicationpackage MooseX::Role::WithOverloading::Meta::Role::Application::Composite; BEGIN { $MooseX::Role::WithOverloading::Meta::Role::Application::Composite::AUTHORITY = 'cpan:FLORA'; } { $MooseX::Role::WithOverloading::Meta::Role::Application::Composite::VERSION = '0.13'; } # ABSTRACT: Roles which support overloading use Moose::Role; use namespace::autoclean; with 'MooseX::Role::WithOverloading::Meta::Role::Application'; around apply_overloading => sub { my ($next, $self, $composite, $other) = @_; for my $role (@{ $composite->get_roles }) { $self->$next($role, $other); } }; 1; __END__ =pod =encoding utf-8 =head1 NAME MooseX::Role::WithOverloading::Meta::Role::Application::Composite - Roles which support overloading =head1 AUTHORS =over 4 =item * Florian Ragwitz =item * Tomas Doran =back =head1 COPYRIGHT AND LICENSE This software is copyright (c) 2013 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 ToInstance.pm100644000767000024 177012072723642 32766 0ustar00etherstaff000000000000MooseX-Role-WithOverloading-0.13/lib/MooseX/Role/WithOverloading/Meta/Role/Applicationpackage MooseX::Role::WithOverloading::Meta::Role::Application::ToInstance; BEGIN { $MooseX::Role::WithOverloading::Meta::Role::Application::ToInstance::AUTHORITY = 'cpan:FLORA'; } { $MooseX::Role::WithOverloading::Meta::Role::Application::ToInstance::VERSION = '0.13'; } # ABSTRACT: Roles which support overloading use Moose::Role; use namespace::autoclean; with qw( MooseX::Role::WithOverloading::Meta::Role::Application MooseX::Role::WithOverloading::Meta::Role::Application::FixOverloadedRefs ); 1; __END__ =pod =encoding utf-8 =head1 NAME MooseX::Role::WithOverloading::Meta::Role::Application::ToInstance - Roles which support overloading =head1 AUTHORS =over 4 =item * Florian Ragwitz =item * Tomas Doran =back =head1 COPYRIGHT AND LICENSE This software is copyright (c) 2013 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 Composite000755000767000024 012072723642 32156 5ustar00etherstaff000000000000MooseX-Role-WithOverloading-0.13/lib/MooseX/Role/WithOverloading/Meta/Role/ApplicationToRole.pm100644000767000024 202412072723642 34056 0ustar00etherstaff000000000000MooseX-Role-WithOverloading-0.13/lib/MooseX/Role/WithOverloading/Meta/Role/Application/Compositepackage MooseX::Role::WithOverloading::Meta::Role::Application::Composite::ToRole; BEGIN { $MooseX::Role::WithOverloading::Meta::Role::Application::Composite::ToRole::AUTHORITY = 'cpan:FLORA'; } { $MooseX::Role::WithOverloading::Meta::Role::Application::Composite::ToRole::VERSION = '0.13'; } # ABSTRACT: Roles which support overloading use Moose::Role; use namespace::autoclean; with qw( MooseX::Role::WithOverloading::Meta::Role::Application::Composite MooseX::Role::WithOverloading::Meta::Role::Application::ToRole ); 1; __END__ =pod =encoding utf-8 =head1 NAME MooseX::Role::WithOverloading::Meta::Role::Application::Composite::ToRole - Roles which support overloading =head1 AUTHORS =over 4 =item * Florian Ragwitz =item * Tomas Doran =back =head1 COPYRIGHT AND LICENSE This software is copyright (c) 2013 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 FixOverloadedRefs.pm100644000767000024 210112072723642 34257 0ustar00etherstaff000000000000MooseX-Role-WithOverloading-0.13/lib/MooseX/Role/WithOverloading/Meta/Role/Applicationpackage MooseX::Role::WithOverloading::Meta::Role::Application::FixOverloadedRefs; BEGIN { $MooseX::Role::WithOverloading::Meta::Role::Application::FixOverloadedRefs::AUTHORITY = 'cpan:FLORA'; } { $MooseX::Role::WithOverloading::Meta::Role::Application::FixOverloadedRefs::VERSION = '0.13'; } # ABSTRACT: Fix up magic when applying roles to instances with magic on old perls use Moose::Role; use namespace::autoclean; if ($] < 5.008009) { after apply => sub { reset_amagic($_[2]); }; } 1; __END__ =pod =encoding utf-8 =head1 NAME MooseX::Role::WithOverloading::Meta::Role::Application::FixOverloadedRefs - Fix up magic when applying roles to instances with magic on old perls =for Pod::Coverage reset_amagic =head1 AUTHORS =over 4 =item * Florian Ragwitz =item * Tomas Doran =back =head1 COPYRIGHT AND LICENSE This software is copyright (c) 2013 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 ToClass.pm100644000767000024 171512072723642 34230 0ustar00etherstaff000000000000MooseX-Role-WithOverloading-0.13/lib/MooseX/Role/WithOverloading/Meta/Role/Application/Compositepackage MooseX::Role::WithOverloading::Meta::Role::Application::Composite::ToClass; BEGIN { $MooseX::Role::WithOverloading::Meta::Role::Application::Composite::ToClass::AUTHORITY = 'cpan:FLORA'; } { $MooseX::Role::WithOverloading::Meta::Role::Application::Composite::ToClass::VERSION = '0.13'; } # ABSTRACT: Roles which support overloading use Moose::Role; use namespace::autoclean; with 'MooseX::Role::WithOverloading::Meta::Role::Application::Composite'; 1; __END__ =pod =encoding utf-8 =head1 NAME MooseX::Role::WithOverloading::Meta::Role::Application::Composite::ToClass - Roles which support overloading =head1 AUTHORS =over 4 =item * Florian Ragwitz =item * Tomas Doran =back =head1 COPYRIGHT AND LICENSE This software is copyright (c) 2013 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 ToInstance.pm100644000767000024 205712072723642 34727 0ustar00etherstaff000000000000MooseX-Role-WithOverloading-0.13/lib/MooseX/Role/WithOverloading/Meta/Role/Application/Compositepackage MooseX::Role::WithOverloading::Meta::Role::Application::Composite::ToInstance; BEGIN { $MooseX::Role::WithOverloading::Meta::Role::Application::Composite::ToInstance::AUTHORITY = 'cpan:FLORA'; } { $MooseX::Role::WithOverloading::Meta::Role::Application::Composite::ToInstance::VERSION = '0.13'; } # ABSTRACT: Roles which support overloading use Moose::Role; use namespace::autoclean; with qw( MooseX::Role::WithOverloading::Meta::Role::Application::Composite MooseX::Role::WithOverloading::Meta::Role::Application::FixOverloadedRefs ); 1; __END__ =pod =encoding utf-8 =head1 NAME MooseX::Role::WithOverloading::Meta::Role::Application::Composite::ToInstance - Roles which support overloading =head1 AUTHORS =over 4 =item * Florian Ragwitz =item * Tomas Doran =back =head1 COPYRIGHT AND LICENSE This software is copyright (c) 2013 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