B-Hooks-EndOfScope-0.13/000755 000767 000024 00000000000 12263067403 015141 5ustar00etherstaff000000 000000 B-Hooks-EndOfScope-0.13/Changes000644 000767 000024 00000003636 12263067403 016444 0ustar00etherstaff000000 000000 Revision history for B-Hooks-EndOfScope 0.13 2014-01-07 21:17:39Z - Variable::Magic added as a runtime recommendation for greater visibility (RT#89245) - fixed broken logic in compiler detection on older perls - fixed inaccurate repository metadata 0.12 2012-12-04 20:13:00Z - Complete pure-perl implementation in addition to the one based on Variable::Magic. You can specify the implementation explicitly by use-ing B::Hooks::EndOfScope::PP or B::Hooks::EndOfScope::XS, or by setting $ENV{B_HOOKS_ENDOFSCOPE_IMPLEMENTATION} to either 'XS' or 'PP' - Switch from using Sub::Exporter to the more conservative Sub::Exporter::Progressive 0.11 2012-02-23 10:19:18Z - A minor efficiency improvement. 0.10 2012-02-16 08:41:54Z - Stop propagating our magic through localisation. 0.09 2010-05-07 20:11:49Z - Improve distribution metadata. 0.08 2009-04-19 17:15:44Z - Depend on Variable::Magic 0.34 so exceptions during compile time that trigger a destructor don't cause an exception on 5.10 anymore. 0.07 2009-02-20 13:22:16Z - Depend on Variable::Magic 0.31 so exceptions thrown in on_scope_end blocks don't lose their error message. 0.06 2009-01-18 23:51:45Z - Depend on Variable::Magic 0.27 to stop exceptions thrown in on_scope_end blocks from segfaulting. Also add a test for that. 0.05 2009-01-04 19:46:07Z - Use Variable::Magic and cast %^H instead Scope::Guard and relying on a timely destruction of objects within %^H. This fixes using on_scope_end in blocks where string evals are compiled as those increment the refcount of objects in %^H on 5.10. 0.04 2008-10-20 10:56:23Z - Remove an unused bit from the $^H mask. 0.03 2008-10-20 04:53:20Z - Improve testing of multiple hooks. - More documentation. - Require perl 5.8.0. 0.02 2008-10-19 08:25:15Z - Specify all dependencies. 0.01 2008-10-19 07:29:13Z - Initial release. B-Hooks-EndOfScope-0.13/CONTRIBUTING000644 000767 000024 00000005147 12263067403 017002 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/B-Hooks-EndOfScope. If you use cpanminus, you can do it without downloading the tarball first: $ cpanm --reinstall --installdeps --with-recommends B::Hooks::EndOfScope 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 B::Hooks::EndOfScope Once installed, here are some dzil commands you might try: $ dzil build $ dzil test $ dzil test --release $ dzil xtest $ dzil listdeps --json $ dzil build --notgz You can learn more about Dist::Zilla at http://dzil.org/. The code for this distribution is hosted at GitHub. The repository is: https://github.com/karenetheridge/B-Hooks-EndOfScope 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=B-Hooks-EndOfScope or via bug-B-Hooks-EndOfScope@rt.cpan.org. This is a good place to send your questions about the usage of this distribution. This file was generated via Dist::Zilla::Plugin::GenerateFile::ShareDir 0.003 from a template file originating in Dist-Zilla-PluginBundle-Author-ETHER-0.045. B-Hooks-EndOfScope-0.13/dist.ini000644 000767 000024 00000002237 12263067403 016611 0ustar00etherstaff000000 000000 name = B-Hooks-EndOfScope author = Florian Ragwitz author = Peter Rabbitson license = Perl_5 copyright_year = 2008 copyright_holder = Florian Ragwitz [@Author::ETHER] installer = none ; we supply our own, below -remove = AutoPrereqs -remove = PodCoverageTests ; TODO -remove = PodWeaver ; we are surgical instead Authority.authority = cpan:FLORA Git::Tag.tag_format = %v Git::NextVersion.version_regexp = ^(.+)$ Test::Version.has_version = 0 ; for internal modules (FIXME: new option forthcoming) Test::MinimumVersion.max_target_perl = 5.008001 [SurgicalPodWeaver] [Prereqs] Module::Runtime = 0.012 Sub::Exporter::Progressive = 0.001006 Module::Implementation = 0.05 [Prereqs / TestRequires ] ; provide done_testing() Test::More = 0.88 [Prereqs / ConfigureRequires ] ; for proper can_xs ; ribasushi, I think you want EU::CB 0.26 minimum ExtUtils::CBuilder = 0.26 [Prereqs / RuntimeRecommends] Variable::Magic = 0.48 [Prereqs / DevelopRequires] Devel::Hide = 0.0007 [Meta::Dynamic::Config] ; see Makefile.PL for lots of magic [MakeMaker::Custom] ; authordep Pod::Weaver::Section::Contributors [ContributorsFromGit] B-Hooks-EndOfScope-0.13/INSTALL000644 000767 000024 00000001750 12263067403 016175 0ustar00etherstaff000000 000000 This is the Perl distribution B-Hooks-EndOfScope. Installing B-Hooks-EndOfScope is straightforward. ## Installation with cpanm If you have cpanm, you only need one line: % cpanm B::Hooks::EndOfScope 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 B::Hooks::EndOfScope ## Installing with the CPAN shell Alternatively, if your CPAN shell is set up, you should just be able to do: % cpan B::Hooks::EndOfScope ## 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 B-Hooks-EndOfScope documentation is available as POD. You can run perldoc from a shell to read the documentation: % perldoc B::Hooks::EndOfScope B-Hooks-EndOfScope-0.13/lib/000755 000767 000024 00000000000 12263067403 015707 5ustar00etherstaff000000 000000 B-Hooks-EndOfScope-0.13/LICENSE000644 000767 000024 00000043664 12263067403 016163 0ustar00etherstaff000000 000000 This software is copyright (c) 2008 by Florian Ragwitz. This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. Terms of the Perl programming language system itself a) the GNU General Public License as published by the Free Software Foundation; either version 1, or (at your option) any later version, or b) the "Artistic License" --- The GNU General Public License, Version 1, February 1989 --- This software is Copyright (c) 2008 by Florian Ragwitz. This is free software, licensed under: The GNU General Public License, Version 1, February 1989 GNU GENERAL PUBLIC LICENSE Version 1, February 1989 Copyright (C) 1989 Free Software Foundation, Inc. 51 Franklin St, 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) 2008 by Florian Ragwitz. This is free software, licensed under: The Artistic License 1.0 The Artistic License Preamble The intent of this document is to state the conditions under which a Package may be copied, such that the Copyright Holder maintains some semblance of artistic control over the development of the package, while giving the users of the package the right to use and distribute the Package in a more-or-less customary fashion, plus the right to make reasonable modifications. Definitions: - "Package" refers to the collection of files distributed by the Copyright Holder, and derivatives of that collection of files created through textual modification. - "Standard Version" refers to such a Package if it has not been modified, or has been modified in accordance with the wishes of the Copyright Holder. - "Copyright Holder" is whoever is named in the copyright or copyrights for the package. - "You" is you, if you're thinking about copying or distributing this Package. - "Reasonable copying fee" is whatever you can justify on the basis of media cost, duplication charges, time of people involved, and so on. (You will not be required to justify it to the Copyright Holder, but only to the computing community at large as a market that must bear the fee.) - "Freely Available" means that no fee is charged for the item itself, though there may be fees involved in handling the item. It also means that recipients of the item may redistribute it under the same conditions they received it. 1. You may make and give away verbatim copies of the source form of the Standard Version of this Package without restriction, provided that you duplicate all of the original copyright notices and associated disclaimers. 2. You may apply bug fixes, portability fixes and other modifications derived from the Public Domain or from the Copyright Holder. A Package modified in such a way shall still be considered the Standard Version. 3. You may otherwise modify your copy of this Package in any way, provided that you insert a prominent notice in each changed file stating how and when you changed that file, and provided that you do at least ONE of the following: a) place your modifications in the Public Domain or otherwise make them Freely Available, such as by posting said modifications to Usenet or an equivalent medium, or placing the modifications on a major archive site such as ftp.uu.net, or by allowing the Copyright Holder to include your modifications in the Standard Version of the Package. b) use the modified Package only within your corporation or organization. c) rename any non-standard executables so the names do not conflict with standard executables, which must also be provided, and provide a separate manual page for each non-standard executable that clearly documents how it differs from the Standard Version. d) make other distribution arrangements with the Copyright Holder. 4. You may distribute the programs of this Package in object code or executable form, provided that you do at least ONE of the following: a) distribute a Standard Version of the executables and library files, together with instructions (in the manual page or equivalent) on where to get the Standard Version. b) accompany the distribution with the machine-readable source of the Package with your modifications. c) accompany any non-standard executables with their corresponding Standard Version executables, giving the non-standard executables non-standard names, and clearly documenting the differences in manual pages (or equivalent), together with instructions on where to get the Standard Version. d) make other distribution arrangements with the Copyright Holder. 5. You may charge a reasonable copying fee for any distribution of this Package. You may charge any fee you choose for support of this Package. You may not charge a fee for this Package itself. However, you may distribute this Package in aggregate with other (possibly commercial) programs as part of a larger (possibly commercial) software distribution provided that you do not advertise this Package as a product of your own. 6. The scripts and library files supplied as input to or produced as output from the programs of this Package do not automatically fall under the copyright of this Package, but belong to whomever generated them, and may be sold commercially, and may be aggregated with this Package. 7. C or perl subroutines supplied by you and linked into this Package shall not be considered part of this Package. 8. The name of the Copyright Holder may not be used to endorse or promote products derived from this software without specific prior written permission. 9. THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. The End B-Hooks-EndOfScope-0.13/Makefile.PL000644 000767 000024 00000006456 12263067403 017126 0ustar00etherstaff000000 000000 use strict; use warnings; use ExtUtils::MakeMaker; my $mymeta_works = eval { ExtUtils::MakeMaker->VERSION('6.5707'); 1 }; my $mymeta = $mymeta_works || eval { ExtUtils::MakeMaker->VERSION('6.5702'); 1 }; my %BUILD_DEPS = ( # this is liquid horror!!! (but so seems the entire MakeMaker::Custom) ); my %RUN_DEPS = ( # this is liquid horror!!! (but so seems the entire MakeMaker::Custom) 'Module::Implementation' => '0.05', 'Module::Runtime' => '0.012', 'Sub::Exporter::Progressive' => '0.001006' ); my %OPT_RUN_DEPS = (can_xs() ? ( 'Variable::Magic' => '0.48', # when changing, also update in dist.ini, B::Hooks::EndOfScope::XS # make sure we smoke the pure-perl version fallback is_smoker() ? ( 'Devel::Hide' => '0.0007' ) : (), ) : () ); my %WriteMakefileArgs = ( "NAME" => "B::Hooks::EndOfScope", "ABSTRACT" => "Execute code after a scope finished compilation", "AUTHOR" => "Florian Ragwitz ", "DISTNAME" => "B-Hooks-EndOfScope", "LICENSE" => "perl", "VERSION_FROM" => 'lib/B/Hooks/EndOfScope.pm', "test" => { "TESTS" => "t/*.t" }, 'CONFIGURE_REQUIRES' => { 'ExtUtils::CBuilder' => '0.26', 'ExtUtils::MakeMaker' => '6.30' }, "PREREQ_PM" => { %RUN_DEPS, %OPT_RUN_DEPS, $mymeta_works ? () : (%BUILD_DEPS), }, $mymeta_works ? ( # BUILD_REQUIRES makes MYMETA right, requires stops META being wrong "BUILD_REQUIRES" => \%BUILD_DEPS, "META_ADD" => { requires => \%RUN_DEPS, }, ) : ( # META_ADD both to get META right - only Makefile written "META_ADD" => { requires => \%RUN_DEPS, build_requires => \%BUILD_DEPS, }, ) , ($mymeta and !$mymeta_works) ? ( 'NO_MYMETA' => 1 ) : (), ); 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); # Secondary compile testing via ExtUtils::CBuilder sub can_xs { # Do we have the configure_requires checker? unless (eval 'require ExtUtils::CBuilder; 1') { # They don't obey configure_requires, so it is # someone old and delicate. Try to avoid hurting # them by falling back to an older simpler test. return can_cc(); } return ExtUtils::CBuilder->new( quiet => 1 )->have_compiler; } # can we locate a (the) C compiler sub can_cc { my @chunks = split(/ /, $Config::Config{cc}) or return; # $Config{cc} may contain args; try to find out the program part while (@chunks) { return can_run("@chunks") || (pop(@chunks), next); } return; } # check if we can run some command sub can_run { my ($cmd) = @_; return $cmd if -x $cmd; if (my $found_cmd = MM->maybe_command($cmd)) { return $found_cmd; } for my $dir ((split /$Config::Config{path_sep}/, $ENV{PATH}), '.') { next if $dir eq ''; my $abs = File::Spec->catfile($dir, $cmd); return $abs if (-x $abs or $abs = MM->maybe_command($abs)); } return; } # is this a smoker? sub is_smoker { return ( $ENV{AUTOMATED_TESTING} ) } B-Hooks-EndOfScope-0.13/MANIFEST000644 000767 000024 00000001565 12263067403 016301 0ustar00etherstaff000000 000000 # This file was automatically generated by Dist::Zilla::Plugin::Manifest v5.008. CONTRIBUTING Changes INSTALL LICENSE MANIFEST META.json META.yml Makefile.PL README README.md dist.ini lib/B/Hooks/EndOfScope.pm lib/B/Hooks/EndOfScope/PP.pm lib/B/Hooks/EndOfScope/PP/FieldHash.pm lib/B/Hooks/EndOfScope/PP/HintHash.pm lib/B/Hooks/EndOfScope/XS.pm t/00-basic.t t/00-report-prereqs.t t/01-eval.t t/02-localise.t t/05-exception_xs.t t/06-exception_pp.t t/10-test_without_vm_pure_pp.t t/11-direct_xs.t t/12-direct_pp.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-no404s.t xt/release/pod-syntax.t xt/release/portability.t xt/release/test-version.t xt/release/unused-vars.t B-Hooks-EndOfScope-0.13/META.json000644 000767 000024 00000061405 12263067403 016570 0ustar00etherstaff000000 000000 { "abstract" : "Execute code after a scope finished compilation", "author" : [ "Florian Ragwitz ", "Peter Rabbitson " ], "dynamic_config" : 1, "generated_by" : "Dist::Zilla version 5.008, CPAN::Meta::Converter version 2.133380", "license" : [ "perl_5" ], "meta-spec" : { "url" : "http://search.cpan.org/perldoc?CPAN::Meta::Spec", "version" : "2" }, "name" : "B-Hooks-EndOfScope", "no_index" : { "directory" : [ "t", "xt", "examples" ] }, "prereqs" : { "configure" : { "requires" : { "ExtUtils::CBuilder" : "0.26", "ExtUtils::MakeMaker" : "6.30" } }, "develop" : { "recommends" : { "Dist::Zilla::PluginBundle::Author::ETHER" : "0.045" }, "requires" : { "Devel::Hide" : "0.0007", "Dist::Zilla" : "5.008", "Dist::Zilla::Plugin::ContributorsFromGit" : "0", "Dist::Zilla::Plugin::GitHub::Update" : "0", "Dist::Zilla::Plugin::GithubMeta" : "0", "Dist::Zilla::Plugin::MakeMaker::Custom" : "0", "Dist::Zilla::Plugin::Meta::Dynamic::Config" : "0", "Dist::Zilla::Plugin::Prereqs" : "0", "Dist::Zilla::Plugin::SurgicalPodWeaver" : "0", "Dist::Zilla::PluginBundle::Author::ETHER" : "0", "File::Spec" : "0", "IO::Handle" : "0", "IPC::Open3" : "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" } }, "runtime" : { "recommends" : { "Variable::Magic" : "0.48" }, "requires" : { "Module::Implementation" : "0.05", "Module::Runtime" : "0.012", "Sub::Exporter::Progressive" : "0.001006", "perl" : "5.008001" } }, "test" : { "recommends" : { "CPAN::Meta" : "0", "CPAN::Meta::Requirements" : "0" }, "requires" : { "Test::More" : "0.88" } } }, "provides" : { "B::Hooks::EndOfScope" : { "file" : "lib/B/Hooks/EndOfScope.pm", "version" : "0.13" }, "B::Hooks::EndOfScope::PP" : { "file" : "lib/B/Hooks/EndOfScope/PP.pm", "version" : "0.13" }, "B::Hooks::EndOfScope::XS" : { "file" : "lib/B/Hooks/EndOfScope/XS.pm", "version" : "0.13" } }, "release_status" : "stable", "resources" : { "bugtracker" : { "mailto" : "bug-B-Hooks-EndOfScope@rt.cpan.org", "web" : "https://rt.cpan.org/Public/Dist/Display.html?Name=B-Hooks-EndOfScope" }, "homepage" : "https://github.com/karenetheridge/B-Hooks-EndOfScope", "repository" : { "type" : "git", "url" : "https://github.com/karenetheridge/B-Hooks-EndOfScope.git", "web" : "https://github.com/karenetheridge/B-Hooks-EndOfScope" } }, "version" : "0.13", "x_Dist_Zilla" : { "perl" : { "version" : "5.019007" }, "plugins" : [ { "class" : "Dist::Zilla::Plugin::Git::NextVersion", "name" : "@Author::ETHER/Git::NextVersion", "version" : "2.019" }, { "class" : "Dist::Zilla::Plugin::PromptIfStale", "config" : { "Dist::Zilla::Plugin::PromptIfStale" : { "check_all_plugins" : 0, "check_all_prereqs" : 0, "modules" : [ "Dist::Zilla::PluginBundle::Author::ETHER" ], "phase" : "build", "skip" : [] } }, "name" : "@Author::ETHER/build", "version" : "0.015" }, { "class" : "Dist::Zilla::Plugin::PromptIfStale", "config" : { "Dist::Zilla::Plugin::PromptIfStale" : { "check_all_plugins" : "1", "check_all_prereqs" : "1", "modules" : [], "phase" : "release", "skip" : [] } }, "name" : "@Author::ETHER/release", "version" : "0.015" }, { "class" : "Dist::Zilla::Plugin::ExecDir", "name" : "@Author::ETHER/ExecDir", "version" : "5.008" }, { "class" : "Dist::Zilla::Plugin::ShareDir", "name" : "@Author::ETHER/ShareDir", "version" : "5.008" }, { "class" : "Dist::Zilla::Plugin::FileFinder::ByName", "name" : "@Author::ETHER/Examples", "version" : "5.008" }, { "class" : "Dist::Zilla::Plugin::Git::GatherDir", "name" : "@Author::ETHER/Git::GatherDir", "version" : "2.019" }, { "class" : "Dist::Zilla::Plugin::MetaYAML", "name" : "@Author::ETHER/MetaYAML", "version" : "5.008" }, { "class" : "Dist::Zilla::Plugin::MetaJSON", "name" : "@Author::ETHER/MetaJSON", "version" : "5.008" }, { "class" : "Dist::Zilla::Plugin::License", "name" : "@Author::ETHER/License", "version" : "5.008" }, { "class" : "Dist::Zilla::Plugin::Readme", "name" : "@Author::ETHER/Readme", "version" : "5.008" }, { "class" : "Dist::Zilla::Plugin::Manifest", "name" : "@Author::ETHER/Manifest", "version" : "5.008" }, { "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.003" }, { "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.039" }, { "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.06" }, { "class" : "Dist::Zilla::Plugin::EOLTests", "name" : "@Author::ETHER/EOLTests", "version" : "0.02" }, { "class" : "Dist::Zilla::Plugin::MetaTests", "name" : "@Author::ETHER/MetaTests", "version" : "5.008" }, { "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::UnusedVars", "name" : "@Author::ETHER/Test::UnusedVars", "version" : "2.000005" }, { "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.008" }, { "class" : "Dist::Zilla::Plugin::Test::PodSpelling", "name" : "@Author::ETHER/Test::PodSpelling", "version" : "2.006002" }, { "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.011" }, { "class" : "Dist::Zilla::Plugin::Test::Portability", "name" : "@Author::ETHER/Test::Portability", "version" : "2.000005" }, { "class" : "Dist::Zilla::Plugin::PruneCruft", "name" : "@Author::ETHER/PruneCruft", "version" : "5.008" }, { "class" : "Dist::Zilla::Plugin::ManifestSkip", "name" : "@Author::ETHER/ManifestSkip", "version" : "5.008" }, { "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.008" }, { "class" : "Dist::Zilla::Plugin::NextRelease", "name" : "@Author::ETHER/NextRelease", "version" : "5.008" }, { "class" : "Dist::Zilla::Plugin::ReadmeAnyFromPod", "name" : "@Author::ETHER/ReadmeAnyFromPod", "version" : "0.133360" }, { "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.008" }, { "class" : "Dist::Zilla::Plugin::FinderCode", "name" : "@Author::ETHER/MetaProvides::Package/AUTOVIV/:InstallModulesPM", "version" : "5.008" }, { "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.15000001" }, { "class" : "Dist::Zilla::Plugin::MetaConfig", "name" : "@Author::ETHER/MetaConfig", "version" : "5.008" }, { "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.008" }, { "class" : "Dist::Zilla::Plugin::Prereqs", "config" : { "Dist::Zilla::Plugin::Prereqs" : { "phase" : "develop", "type" : "recommends" } }, "name" : "@Author::ETHER/pluginbundle_version", "version" : "5.008" }, { "class" : "Dist::Zilla::Plugin::RunExtraTests", "name" : "@Author::ETHER/RunExtraTests", "version" : "0.016" }, { "class" : "Dist::Zilla::Plugin::InstallGuide", "name" : "@Author::ETHER/InstallGuide", "version" : "1.200002" }, { "class" : "Dist::Zilla::Plugin::CheckSelfDependency", "name" : "@Author::ETHER/CheckSelfDependency", "version" : "0.006" }, { "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.019" }, { "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.2.0" }, { "class" : "Dist::Zilla::Plugin::CheckPrereqsIndexed", "name" : "@Author::ETHER/CheckPrereqsIndexed", "version" : "0.010" }, { "class" : "Dist::Zilla::Plugin::TestRelease", "name" : "@Author::ETHER/TestRelease", "version" : "5.008" }, { "class" : "Dist::Zilla::Plugin::Git::Check", "name" : "@Author::ETHER/after tests", "version" : "2.019" }, { "class" : "Dist::Zilla::Plugin::UploadToCPAN", "name" : "@Author::ETHER/UploadToCPAN", "version" : "5.008" }, { "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.019" }, { "class" : "Dist::Zilla::Plugin::Git::Tag", "name" : "@Author::ETHER/Git::Tag", "version" : "2.019" }, { "class" : "Dist::Zilla::Plugin::GitHub::Update", "name" : "@Author::ETHER/GitHub::Update", "version" : "0.36" }, { "class" : "Dist::Zilla::Plugin::Git::Push", "name" : "@Author::ETHER/Git::Push", "version" : "2.019" }, { "class" : "Dist::Zilla::Plugin::InstallRelease", "name" : "@Author::ETHER/InstallRelease", "version" : "0.008" }, { "class" : "Dist::Zilla::Plugin::Prereqs", "config" : { "Dist::Zilla::Plugin::Prereqs" : { "phase" : "develop", "type" : "requires" } }, "name" : "@Author::ETHER/via_options", "version" : "5.008" }, { "class" : "Dist::Zilla::Plugin::ConfirmRelease", "name" : "@Author::ETHER/ConfirmRelease", "version" : "5.008" }, { "class" : "Dist::Zilla::Plugin::SurgicalPodWeaver", "config" : { "Dist::Zilla::Plugin::PodWeaver" : { "finder" : [ ":InstallModules", ":ExecFiles" ], "plugins" : [ { "class" : "Pod::Weaver::Plugin::EnsurePod5", "name" : "@CorePrep/EnsurePod5", "version" : "4.005" }, { "class" : "Pod::Weaver::Plugin::H1Nester", "name" : "@CorePrep/H1Nester", "version" : "4.005" }, { "class" : "Pod::Weaver::Plugin::SingleEncoding", "name" : "@Default/SingleEncoding", "version" : "4.005" }, { "class" : "Pod::Weaver::Section::Name", "name" : "@Default/Name", "version" : "4.005" }, { "class" : "Pod::Weaver::Section::Version", "name" : "@Default/Version", "version" : "4.005" }, { "class" : "Pod::Weaver::Section::Region", "name" : "@Default/prelude", "version" : "4.005" }, { "class" : "Pod::Weaver::Section::Generic", "name" : "SYNOPSIS", "version" : "4.005" }, { "class" : "Pod::Weaver::Section::Generic", "name" : "DESCRIPTION", "version" : "4.005" }, { "class" : "Pod::Weaver::Section::Generic", "name" : "OVERVIEW", "version" : "4.005" }, { "class" : "Pod::Weaver::Section::Collect", "name" : "ATTRIBUTES", "version" : "4.005" }, { "class" : "Pod::Weaver::Section::Collect", "name" : "METHODS", "version" : "4.005" }, { "class" : "Pod::Weaver::Section::Collect", "name" : "FUNCTIONS", "version" : "4.005" }, { "class" : "Pod::Weaver::Section::Leftovers", "name" : "@Default/Leftovers", "version" : "4.005" }, { "class" : "Pod::Weaver::Section::Region", "name" : "@Default/postlude", "version" : "4.005" }, { "class" : "Pod::Weaver::Section::Authors", "name" : "@Default/Authors", "version" : "4.005" }, { "class" : "Pod::Weaver::Section::Legal", "name" : "@Default/Legal", "version" : "4.005" }, { "class" : "Pod::Weaver::Section::Contributors", "name" : "Contributors", "version" : "0.007" }, { "class" : "Pod::Weaver::Plugin::Transformer", "name" : "-Transformer", "version" : "4.005" }, { "class" : "Pod::Weaver::Plugin::StopWords", "name" : "-StopWords", "version" : "1.008" } ] } }, "name" : "SurgicalPodWeaver", "version" : "0.0021" }, { "class" : "Dist::Zilla::Plugin::Prereqs", "config" : { "Dist::Zilla::Plugin::Prereqs" : { "phase" : "runtime", "type" : "requires" } }, "name" : "Prereqs", "version" : "5.008" }, { "class" : "Dist::Zilla::Plugin::Prereqs", "config" : { "Dist::Zilla::Plugin::Prereqs" : { "phase" : "test", "type" : "requires" } }, "name" : "TestRequires", "version" : "5.008" }, { "class" : "Dist::Zilla::Plugin::Prereqs", "config" : { "Dist::Zilla::Plugin::Prereqs" : { "phase" : "configure", "type" : "requires" } }, "name" : "ConfigureRequires", "version" : "5.008" }, { "class" : "Dist::Zilla::Plugin::Prereqs", "config" : { "Dist::Zilla::Plugin::Prereqs" : { "phase" : "runtime", "type" : "recommends" } }, "name" : "RuntimeRecommends", "version" : "5.008" }, { "class" : "Dist::Zilla::Plugin::Prereqs", "config" : { "Dist::Zilla::Plugin::Prereqs" : { "phase" : "develop", "type" : "requires" } }, "name" : "DevelopRequires", "version" : "5.008" }, { "class" : "Dist::Zilla::Plugin::Meta::Dynamic::Config", "name" : "Meta::Dynamic::Config", "version" : "0.04" }, { "class" : "Dist::Zilla::Plugin::MakeMaker::Custom", "name" : "MakeMaker::Custom", "version" : "4.15" }, { "class" : "Dist::Zilla::Plugin::ContributorsFromGit", "name" : "ContributorsFromGit", "version" : "0.006" }, { "class" : "Dist::Zilla::Plugin::FinderCode", "name" : ":InstallModules", "version" : "5.008" }, { "class" : "Dist::Zilla::Plugin::FinderCode", "name" : ":IncModules", "version" : "5.008" }, { "class" : "Dist::Zilla::Plugin::FinderCode", "name" : ":TestFiles", "version" : "5.008" }, { "class" : "Dist::Zilla::Plugin::FinderCode", "name" : ":ExecFiles", "version" : "5.008" }, { "class" : "Dist::Zilla::Plugin::FinderCode", "name" : ":ShareFiles", "version" : "5.008" }, { "class" : "Dist::Zilla::Plugin::FinderCode", "name" : ":MainModule", "version" : "5.008" }, { "class" : "Dist::Zilla::Plugin::FinderCode", "name" : ":AllFiles", "version" : "5.008" }, { "class" : "Dist::Zilla::Plugin::FinderCode", "name" : ":NoFiles", "version" : "5.008" } ], "zilla" : { "class" : "Dist::Zilla::Dist::Builder", "config" : { "is_trial" : "0" }, "version" : "5.008" } }, "x_authority" : "cpan:FLORA", "x_contributors" : [ "Karen Etheridge ", "Tomas Doran " ] } B-Hooks-EndOfScope-0.13/META.yml000644 000767 000024 00000036770 12263067403 016427 0ustar00etherstaff000000 000000 --- abstract: 'Execute code after a scope finished compilation' author: - 'Florian Ragwitz ' - 'Peter Rabbitson ' build_requires: Test::More: 0.88 configure_requires: ExtUtils::CBuilder: 0.26 ExtUtils::MakeMaker: 6.30 dynamic_config: 1 generated_by: 'Dist::Zilla version 5.008, CPAN::Meta::Converter version 2.133380' license: perl meta-spec: url: http://module-build.sourceforge.net/META-spec-v1.4.html version: 1.4 name: B-Hooks-EndOfScope no_index: directory: - t - xt - examples provides: B::Hooks::EndOfScope: file: lib/B/Hooks/EndOfScope.pm version: 0.13 B::Hooks::EndOfScope::PP: file: lib/B/Hooks/EndOfScope/PP.pm version: 0.13 B::Hooks::EndOfScope::XS: file: lib/B/Hooks/EndOfScope/XS.pm version: 0.13 recommends: Variable::Magic: 0.48 requires: Module::Implementation: 0.05 Module::Runtime: 0.012 Sub::Exporter::Progressive: 0.001006 perl: 5.008001 resources: bugtracker: https://rt.cpan.org/Public/Dist/Display.html?Name=B-Hooks-EndOfScope homepage: https://github.com/karenetheridge/B-Hooks-EndOfScope repository: https://github.com/karenetheridge/B-Hooks-EndOfScope.git version: 0.13 x_Dist_Zilla: perl: version: 5.019007 plugins: - class: Dist::Zilla::Plugin::Git::NextVersion name: '@Author::ETHER/Git::NextVersion' version: 2.019 - class: Dist::Zilla::Plugin::PromptIfStale config: Dist::Zilla::Plugin::PromptIfStale: check_all_plugins: 0 check_all_prereqs: 0 modules: - Dist::Zilla::PluginBundle::Author::ETHER phase: build skip: [] name: '@Author::ETHER/build' version: 0.015 - class: Dist::Zilla::Plugin::PromptIfStale config: Dist::Zilla::Plugin::PromptIfStale: check_all_plugins: 1 check_all_prereqs: 1 modules: [] phase: release skip: [] name: '@Author::ETHER/release' version: 0.015 - class: Dist::Zilla::Plugin::ExecDir name: '@Author::ETHER/ExecDir' version: 5.008 - class: Dist::Zilla::Plugin::ShareDir name: '@Author::ETHER/ShareDir' version: 5.008 - class: Dist::Zilla::Plugin::FileFinder::ByName name: '@Author::ETHER/Examples' version: 5.008 - class: Dist::Zilla::Plugin::Git::GatherDir name: '@Author::ETHER/Git::GatherDir' version: 2.019 - class: Dist::Zilla::Plugin::MetaYAML name: '@Author::ETHER/MetaYAML' version: 5.008 - class: Dist::Zilla::Plugin::MetaJSON name: '@Author::ETHER/MetaJSON' version: 5.008 - class: Dist::Zilla::Plugin::License name: '@Author::ETHER/License' version: 5.008 - class: Dist::Zilla::Plugin::Readme name: '@Author::ETHER/Readme' version: 5.008 - class: Dist::Zilla::Plugin::Manifest name: '@Author::ETHER/Manifest' version: 5.008 - 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.003 - 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.039 - 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.06 - class: Dist::Zilla::Plugin::EOLTests name: '@Author::ETHER/EOLTests' version: 0.02 - class: Dist::Zilla::Plugin::MetaTests name: '@Author::ETHER/MetaTests' version: 5.008 - 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::UnusedVars name: '@Author::ETHER/Test::UnusedVars' version: 2.000005 - 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.008 - class: Dist::Zilla::Plugin::Test::PodSpelling name: '@Author::ETHER/Test::PodSpelling' version: 2.006002 - 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.011 - class: Dist::Zilla::Plugin::Test::Portability name: '@Author::ETHER/Test::Portability' version: 2.000005 - class: Dist::Zilla::Plugin::PruneCruft name: '@Author::ETHER/PruneCruft' version: 5.008 - class: Dist::Zilla::Plugin::ManifestSkip name: '@Author::ETHER/ManifestSkip' version: 5.008 - 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.008 - class: Dist::Zilla::Plugin::NextRelease name: '@Author::ETHER/NextRelease' version: 5.008 - class: Dist::Zilla::Plugin::ReadmeAnyFromPod name: '@Author::ETHER/ReadmeAnyFromPod' version: 0.133360 - 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.008 - class: Dist::Zilla::Plugin::FinderCode name: '@Author::ETHER/MetaProvides::Package/AUTOVIV/:InstallModulesPM' version: 5.008 - 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.15000001 - class: Dist::Zilla::Plugin::MetaConfig name: '@Author::ETHER/MetaConfig' version: 5.008 - 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.008 - class: Dist::Zilla::Plugin::Prereqs config: Dist::Zilla::Plugin::Prereqs: phase: develop type: recommends name: '@Author::ETHER/pluginbundle_version' version: 5.008 - class: Dist::Zilla::Plugin::RunExtraTests name: '@Author::ETHER/RunExtraTests' version: 0.016 - class: Dist::Zilla::Plugin::InstallGuide name: '@Author::ETHER/InstallGuide' version: 1.200002 - class: Dist::Zilla::Plugin::CheckSelfDependency name: '@Author::ETHER/CheckSelfDependency' version: 0.006 - 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.019 - 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.2.0 - class: Dist::Zilla::Plugin::CheckPrereqsIndexed name: '@Author::ETHER/CheckPrereqsIndexed' version: 0.010 - class: Dist::Zilla::Plugin::TestRelease name: '@Author::ETHER/TestRelease' version: 5.008 - class: Dist::Zilla::Plugin::Git::Check name: '@Author::ETHER/after tests' version: 2.019 - class: Dist::Zilla::Plugin::UploadToCPAN name: '@Author::ETHER/UploadToCPAN' version: 5.008 - 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.019 - class: Dist::Zilla::Plugin::Git::Tag name: '@Author::ETHER/Git::Tag' version: 2.019 - class: Dist::Zilla::Plugin::GitHub::Update name: '@Author::ETHER/GitHub::Update' version: 0.36 - class: Dist::Zilla::Plugin::Git::Push name: '@Author::ETHER/Git::Push' version: 2.019 - class: Dist::Zilla::Plugin::InstallRelease name: '@Author::ETHER/InstallRelease' version: 0.008 - class: Dist::Zilla::Plugin::Prereqs config: Dist::Zilla::Plugin::Prereqs: phase: develop type: requires name: '@Author::ETHER/via_options' version: 5.008 - class: Dist::Zilla::Plugin::ConfirmRelease name: '@Author::ETHER/ConfirmRelease' version: 5.008 - class: Dist::Zilla::Plugin::SurgicalPodWeaver config: Dist::Zilla::Plugin::PodWeaver: finder: - ':InstallModules' - ':ExecFiles' plugins: - class: Pod::Weaver::Plugin::EnsurePod5 name: '@CorePrep/EnsurePod5' version: 4.005 - class: Pod::Weaver::Plugin::H1Nester name: '@CorePrep/H1Nester' version: 4.005 - class: Pod::Weaver::Plugin::SingleEncoding name: '@Default/SingleEncoding' version: 4.005 - class: Pod::Weaver::Section::Name name: '@Default/Name' version: 4.005 - class: Pod::Weaver::Section::Version name: '@Default/Version' version: 4.005 - class: Pod::Weaver::Section::Region name: '@Default/prelude' version: 4.005 - class: Pod::Weaver::Section::Generic name: SYNOPSIS version: 4.005 - class: Pod::Weaver::Section::Generic name: DESCRIPTION version: 4.005 - class: Pod::Weaver::Section::Generic name: OVERVIEW version: 4.005 - class: Pod::Weaver::Section::Collect name: ATTRIBUTES version: 4.005 - class: Pod::Weaver::Section::Collect name: METHODS version: 4.005 - class: Pod::Weaver::Section::Collect name: FUNCTIONS version: 4.005 - class: Pod::Weaver::Section::Leftovers name: '@Default/Leftovers' version: 4.005 - class: Pod::Weaver::Section::Region name: '@Default/postlude' version: 4.005 - class: Pod::Weaver::Section::Authors name: '@Default/Authors' version: 4.005 - class: Pod::Weaver::Section::Legal name: '@Default/Legal' version: 4.005 - class: Pod::Weaver::Section::Contributors name: Contributors version: 0.007 - class: Pod::Weaver::Plugin::Transformer name: '-Transformer' version: 4.005 - class: Pod::Weaver::Plugin::StopWords name: '-StopWords' version: 1.008 name: SurgicalPodWeaver version: 0.0021 - class: Dist::Zilla::Plugin::Prereqs config: Dist::Zilla::Plugin::Prereqs: phase: runtime type: requires name: Prereqs version: 5.008 - class: Dist::Zilla::Plugin::Prereqs config: Dist::Zilla::Plugin::Prereqs: phase: test type: requires name: TestRequires version: 5.008 - class: Dist::Zilla::Plugin::Prereqs config: Dist::Zilla::Plugin::Prereqs: phase: configure type: requires name: ConfigureRequires version: 5.008 - class: Dist::Zilla::Plugin::Prereqs config: Dist::Zilla::Plugin::Prereqs: phase: runtime type: recommends name: RuntimeRecommends version: 5.008 - class: Dist::Zilla::Plugin::Prereqs config: Dist::Zilla::Plugin::Prereqs: phase: develop type: requires name: DevelopRequires version: 5.008 - class: Dist::Zilla::Plugin::Meta::Dynamic::Config name: Meta::Dynamic::Config version: 0.04 - class: Dist::Zilla::Plugin::MakeMaker::Custom name: MakeMaker::Custom version: 4.15 - class: Dist::Zilla::Plugin::ContributorsFromGit name: ContributorsFromGit version: 0.006 - class: Dist::Zilla::Plugin::FinderCode name: ':InstallModules' version: 5.008 - class: Dist::Zilla::Plugin::FinderCode name: ':IncModules' version: 5.008 - class: Dist::Zilla::Plugin::FinderCode name: ':TestFiles' version: 5.008 - class: Dist::Zilla::Plugin::FinderCode name: ':ExecFiles' version: 5.008 - class: Dist::Zilla::Plugin::FinderCode name: ':ShareFiles' version: 5.008 - class: Dist::Zilla::Plugin::FinderCode name: ':MainModule' version: 5.008 - class: Dist::Zilla::Plugin::FinderCode name: ':AllFiles' version: 5.008 - class: Dist::Zilla::Plugin::FinderCode name: ':NoFiles' version: 5.008 zilla: class: Dist::Zilla::Dist::Builder config: is_trial: 0 version: 5.008 x_authority: cpan:FLORA x_contributors: - 'Karen Etheridge ' - 'Tomas Doran ' B-Hooks-EndOfScope-0.13/README000644 000767 000024 00000000610 12263067403 016016 0ustar00etherstaff000000 000000 This archive contains the distribution B-Hooks-EndOfScope, version 0.13: Execute code after a scope finished compilation This software is copyright (c) 2008 by Florian Ragwitz. This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. This README file was generated by Dist::Zilla::Plugin::Readme v5.008. B-Hooks-EndOfScope-0.13/README.md000644 000767 000024 00000003347 12263067403 016427 0ustar00etherstaff000000 000000 # NAME B::Hooks::EndOfScope - Execute code after a scope finished compilation # VERSION version 0.13 # SYNOPSIS on_scope_end { ... }; # DESCRIPTION This module allows you to execute code when perl finished compiling the surrounding scope. # FUNCTIONS ## on\_scope\_end on_scope_end { ... }; on_scope_end $code; Registers `$code` to be executed after the surrounding scope has been compiled. This is exported by default. See [Sub::Exporter](https://metacpan.org/pod/Sub::Exporter) on how to customize it. # PURE-PERL MODE CAVEAT While [Variable::Magic](https://metacpan.org/pod/Variable::Magic) has access to some very dark sorcery to make it possible to throw an exception from within a callback, the pure-perl implementation does not have access to these hacks. Therefore, what would have been a compile-time exception is instead converted to a warning, and your execution will continue as if the exception never happened. To explicitly request an XS (or PP) implementation one has two choices. Either to import from the desired implementation explicitly: use B::Hooks::EndOfScope::XS or use B::Hooks::EndOfScope::PP or by setting `$ENV{B_HOOKS_ENDOFSCOPE_IMPLEMENTATION}` to either `XS` or `PP`. # SEE ALSO [Sub::Exporter](https://metacpan.org/pod/Sub::Exporter) [Variable::Magic](https://metacpan.org/pod/Variable::Magic) # AUTHORS - Florian Ragwitz - Peter Rabbitson # COPYRIGHT AND LICENSE This software is copyright (c) 2008 by Florian Ragwitz. This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. # CONTRIBUTORS - Karen Etheridge - Tomas Doran B-Hooks-EndOfScope-0.13/t/000755 000767 000024 00000000000 12263067403 015404 5ustar00etherstaff000000 000000 B-Hooks-EndOfScope-0.13/weaver.ini000644 000767 000024 00000000114 12263067403 017127 0ustar00etherstaff000000 000000 [@Default] [Contributors] [-Transformer] transformer = List [-StopWords] B-Hooks-EndOfScope-0.13/xt/000755 000767 000024 00000000000 12263067403 015574 5ustar00etherstaff000000 000000 B-Hooks-EndOfScope-0.13/xt/author/000755 000767 000024 00000000000 12263067403 017076 5ustar00etherstaff000000 000000 B-Hooks-EndOfScope-0.13/xt/release/000755 000767 000024 00000000000 12263067403 017214 5ustar00etherstaff000000 000000 B-Hooks-EndOfScope-0.13/xt/release/changes_has_content.t000644 000767 000024 00000002010 12263067403 023367 0ustar00etherstaff000000 000000 #!perl 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; } B-Hooks-EndOfScope-0.13/xt/release/cpan-changes.t000644 000767 000024 00000000263 12263067403 021731 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(); B-Hooks-EndOfScope-0.13/xt/release/distmeta.t000644 000767 000024 00000000332 12263067403 021211 0ustar00etherstaff000000 000000 #!perl # This file was automatically generated by Dist::Zilla::Plugin::MetaTests. use Test::More; eval "use Test::CPAN::Meta"; plan skip_all => "Test::CPAN::Meta required for testing META.yml" if $@; meta_yaml_ok(); B-Hooks-EndOfScope-0.13/xt/release/eol.t000644 000767 000024 00000000240 12263067403 020154 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 }); B-Hooks-EndOfScope-0.13/xt/release/kwalitee.t000644 000767 000024 00000000166 12263067403 021211 0ustar00etherstaff000000 000000 # this test was generated with Dist::Zilla::Plugin::Test::Kwalitee 2.07 use strict; use warnings; use Test::Kwalitee; B-Hooks-EndOfScope-0.13/xt/release/minimum-version.t000644 000767 000024 00000000271 12263067403 022537 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} ); B-Hooks-EndOfScope-0.13/xt/release/mojibake.t000644 000767 000024 00000000406 12263067403 021162 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(); B-Hooks-EndOfScope-0.13/xt/release/no-tabs.t000644 000767 000024 00000000613 12263067403 020744 0ustar00etherstaff000000 000000 use strict; use warnings; # this test was generated with Dist::Zilla::Plugin::Test::NoTabs 0.06 use Test::More 0.88; use Test::NoTabs; my @files = ( 'lib/B/Hooks/EndOfScope.pm', 'lib/B/Hooks/EndOfScope/PP.pm', 'lib/B/Hooks/EndOfScope/PP/FieldHash.pm', 'lib/B/Hooks/EndOfScope/PP/HintHash.pm', 'lib/B/Hooks/EndOfScope/XS.pm' ); notabs_ok($_) foreach @files; done_testing; B-Hooks-EndOfScope-0.13/xt/release/pod-no404s.t000644 000767 000024 00000000527 12263067403 021214 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(); } B-Hooks-EndOfScope-0.13/xt/release/pod-syntax.t000644 000767 000024 00000000332 12263067403 021505 0ustar00etherstaff000000 000000 #!perl # This file was automatically generated by Dist::Zilla::Plugin::PodSyntaxTests. 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(); B-Hooks-EndOfScope-0.13/xt/release/portability.t000644 000767 000024 00000000276 12263067403 021750 0ustar00etherstaff000000 000000 #!perl use strict; use warnings; use Test::More; eval 'use Test::Portability::Files'; plan skip_all => 'Test::Portability::Files required for testing portability' if $@; run_tests(); B-Hooks-EndOfScope-0.13/xt/release/test-version.t000644 000767 000024 00000000643 12263067403 022046 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 => 0, }; push @imports, $params if version->parse( $Test::Version::VERSION ) >= version->parse('1.002'); Test::Version->import(@imports); version_all_ok; done_testing; B-Hooks-EndOfScope-0.13/xt/release/unused-vars.t000644 000767 000024 00000000207 12263067403 021654 0ustar00etherstaff000000 000000 #!perl use Test::More; eval "use Test::Vars"; plan skip_all => "Test::Vars required for testing unused vars" if $@; all_vars_ok(); B-Hooks-EndOfScope-0.13/xt/author/00-compile.t000644 000767 000024 00000002263 12263067403 021133 0ustar00etherstaff000000 000000 use 5.006; use strict; use warnings; # this test was generated with Dist::Zilla::Plugin::Test::Compile 2.039 use Test::More 0.94 tests => 5 + ($ENV{AUTHOR_TESTING} ? 1 : 0); my @module_files = ( 'B/Hooks/EndOfScope.pm', 'B/Hooks/EndOfScope/PP.pm', 'B/Hooks/EndOfScope/PP/FieldHash.pm', 'B/Hooks/EndOfScope/PP/HintHash.pm', 'B/Hooks/EndOfScope/XS.pm' ); # no fake home requested my $inc_switch = -d 'blib' ? '-Mblib' : '-Ilib'; use File::Spec; use IPC::Open3; use IO::Handle; open my $stdin, '<', File::Spec->devnull or die "can't open devnull: $!"; my @warnings; for my $lib (@module_files) { # see L my $stderr = IO::Handle->new; my $pid = open3($stdin, '>&STDERR', $stderr, $^X, $inc_switch, '-e', "require q[$lib]"); binmode $stderr, ':crlf' if $^O eq 'MSWin32'; my @_warnings = <$stderr>; waitpid($pid, 0); is($?, 0, "$lib loaded ok"); 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; B-Hooks-EndOfScope-0.13/xt/author/pod-spell.t000644 000767 000024 00000000555 12263067403 021167 0ustar00etherstaff000000 000000 use strict; use warnings; use Test::More; # generated by Dist::Zilla::Plugin::Test::PodSpelling 2.006002 use Test::Spelling 0.12; use Pod::Wordlist; add_stopwords(); all_pod_files_spelling_ok( qw( bin lib ) ); __DATA__ Florian Ragwitz rafl Peter Rabbitson ribasushi Karen Etheridge ether Tomas Doran bobtfish lib Hooks EndOfScope XS PP HintHash FieldHash B-Hooks-EndOfScope-0.13/t/00-basic.t000644 000767 000024 00000001346 12263067403 017073 0ustar00etherstaff000000 000000 use strict; use warnings; use Test::More; BEGIN { use_ok('B::Hooks::EndOfScope') } # FIXME!!!!! this is dreadful. This test is written so loosely that we still # pass all tests if we comment out the above use_ok line and replace it with: # sub on_scope_end(&) { shift->() } BEGIN { ok(exists &on_scope_end, 'on_scope_end imported'); is(prototype('on_scope_end'), '&', '.. and has the right prototype'); } our ($i, $called); BEGIN { $i = 0 } sub foo { BEGIN { on_scope_end { $called = 1; $i = 42 }; on_scope_end { $i = 1 }; }; is($i, 1, 'value still set at runtime'); } BEGIN { ok($called, 'first callback invoked'); is($i, 1, '.. but the second is invoked later') } foo(); done_testing; B-Hooks-EndOfScope-0.13/t/00-report-prereqs.t000644 000767 000024 00000006646 12263067403 021014 0ustar00etherstaff000000 000000 #!perl use strict; use warnings; # This test was generated by Dist::Zilla::Plugin::Test::ReportPrereqs 0.011 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 ExtUtils::CBuilder ExtUtils::MakeMaker Module::Implementation Module::Runtime Sub::Exporter::Progressive Test::More Variable::Magic 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 develop/ ) { $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: B-Hooks-EndOfScope-0.13/t/01-eval.t000644 000767 000024 00000000705 12263067403 016740 0ustar00etherstaff000000 000000 use strict; use warnings; use Test::More; use B::Hooks::EndOfScope; # FIXME!!!!! this is dreadful. This test is written so loosely that we still # pass all tests if we comment out the above use_ok line and replace it with: # sub on_scope_end(&) { shift->() } our $called; sub foo { BEGIN { on_scope_end { $called = 1 } } # uncomment this to make the test pass eval '42'; } BEGIN { ok($called, 'callback invoked'); } done_testing; B-Hooks-EndOfScope-0.13/t/02-localise.t000644 000767 000024 00000001360 12263067403 017603 0ustar00etherstaff000000 000000 use strict; use warnings; use Test::More 0.89; use B::Hooks::EndOfScope; { my $fired; { BEGIN { on_scope_end { $fired++ } } BEGIN { ok(!$fired) } BEGIN { local %^H } BEGIN { ok(!$fired) } } BEGIN { ok($fired) } } { my $fired; { BEGIN { on_scope_end { $fired++ } } BEGIN { ok(!$fired) } BEGIN { local %^H; my $fired2; { BEGIN { on_scope_end { $fired2++ } } BEGIN { ok(!$fired2) } BEGIN { local %^H } BEGIN { ok(!$fired2) } } BEGIN { ok($fired2) } } BEGIN { ok(!$fired) } } BEGIN { ok($fired) } } done_testing; B-Hooks-EndOfScope-0.13/t/05-exception_xs.t000644 000767 000024 00000000473 12263067403 020527 0ustar00etherstaff000000 000000 use strict; use warnings; use Test::More; use B::Hooks::EndOfScope; plan skip_all => 'Skiping XS test in PP mode' unless $INC{'B/Hooks/EndOfScope/XS.pm'}; eval q[ sub foo { BEGIN { on_scope_end { die 'bar' }; } } ]; like($@, qr/^bar/); pass('no segfault'); done_testing; B-Hooks-EndOfScope-0.13/t/06-exception_pp.t000644 000767 000024 00000001065 12263067403 020513 0ustar00etherstaff000000 000000 use strict; use warnings; use Test::More; use B::Hooks::EndOfScope; plan skip_all => 'Skipping PP fallback test in XS mode' unless $INC{'B/Hooks/EndOfScope/PP.pm'}; my $w; local $SIG{__WARN__} = sub { $w = $_[0] if $_[0] =~ qr/\QException "bar"/ }; eval q[ sub foo { BEGIN { on_scope_end { die 'Exception "bar"' }; } } ]; like ( $w, qr/scope-end callback raised an exception, which can not be propagated when .+? operates in pure-perl mode/, 'Warning on lost callback exception correctly emited' ); done_testing; B-Hooks-EndOfScope-0.13/t/10-test_without_vm_pure_pp.t000644 000767 000024 00000003004 12263067403 023002 0ustar00etherstaff000000 000000 use strict; use warnings; use Test::More; use B::Hooks::EndOfScope; plan skip_all => "Tests already executed in pure-perl mode" if $INC{'B/Hooks/EndOfScope/PP.pm'}; use Config; use IPC::Open2 qw(open2); use File::Glob 'bsd_glob'; # in case the user had it set $ENV{B_HOOKS_ENDOFSCOPE_IMPLEMENTATION} = ''; # for the $^X-es $ENV{PERL5LIB} = join ($Config{path_sep}, @INC); my $has_dh = eval { require Devel::Hide }; die 'author tests require Devel::Hide for testing the PP path!' if not $has_dh and ($ENV{AUTHOR_TESTING} or $ENV{RELEASE_TESTING}); fail 'smokers require Devel::Hide for testing the PP path!' if not $has_dh and $ENV{AUTOMATED_TESTING}; $ENV{DEVEL_HIDE_VERBOSE} = 0 if $has_dh; $ENV{B_HOOKS_ENDOFSCOPE_IMPLEMENTATION} = 'PP' unless $has_dh; # rerun the tests under the assumption of no vm at all my @files = bsd_glob("t/0*.t"); push @files, 'xt/author/00-compile.t' if $ENV{AUTHOR_TESTING}; for my $fn (@files) { next if $fn eq 't/00-report-prereqs.t'; note "retesting $fn"; my @cmd = ( $^X, $has_dh ? '-MDevel::Hide=Variable::Magic' : (), $fn ); # this is cheating, and may even hang here and there (testing on windows passed fine) # if it does - will have to fix it somehow (really *REALLY* don't want to pull # in IPC::Cmd just for a fucking test) # the alternative would be to have an ENV check in each test to force a subtest open2(my $out, my $in, @cmd); while (my $ln = <$out>) { print " $ln"; } wait; ok (! $?, "Wstat $? from: @cmd"); } done_testing; B-Hooks-EndOfScope-0.13/t/11-direct_xs.t000644 000767 000024 00000001025 12263067403 017772 0ustar00etherstaff000000 000000 use strict; use warnings; use Test::More; BEGIN { eval { require B::Hooks::EndOfScope::XS } or plan skip_all => "XS functionality not available"; B::Hooks::EndOfScope::XS->import(); } BEGIN { ok(exists &on_scope_end, 'on_scope_end imported'); is(prototype('on_scope_end'), '&', '.. and has the right prototype'); } our $i; sub foo { BEGIN { on_scope_end { $i = 42 }; }; is($i, 42, 'value still set at runtime'); } BEGIN { is($i, 42, 'value set at compiletime') } foo(); done_testing; B-Hooks-EndOfScope-0.13/t/12-direct_pp.t000644 000767 000024 00000000634 12263067403 017765 0ustar00etherstaff000000 000000 use strict; use warnings; use Test::More; use B::Hooks::EndOfScope::PP; BEGIN { ok(exists &on_scope_end, 'on_scope_end imported'); is(prototype('on_scope_end'), '&', '.. and has the right prototype'); } our $i; sub foo { BEGIN { on_scope_end { $i = 42 }; }; is($i, 42, 'value still set at runtime'); } BEGIN { is($i, 42, 'value set at compiletime') } foo(); done_testing; B-Hooks-EndOfScope-0.13/lib/B/000755 000767 000024 00000000000 12263067403 016070 5ustar00etherstaff000000 000000 B-Hooks-EndOfScope-0.13/lib/B/Hooks/000755 000767 000024 00000000000 12263067403 017153 5ustar00etherstaff000000 000000 B-Hooks-EndOfScope-0.13/lib/B/Hooks/EndOfScope/000755 000767 000024 00000000000 12263067403 021140 5ustar00etherstaff000000 000000 B-Hooks-EndOfScope-0.13/lib/B/Hooks/EndOfScope.pm000644 000767 000024 00000005007 12263067403 021500 0ustar00etherstaff000000 000000 package B::Hooks::EndOfScope; { $B::Hooks::EndOfScope::VERSION = '0.13'; } # git description: 0.12-15-g7013f3a BEGIN { $B::Hooks::EndOfScope::AUTHORITY = 'cpan:FLORA'; } # ABSTRACT: Execute code after a scope finished compilation use strict; use warnings; # note - a %^H tie() fallback will probably work on 5.6 as well, # if you need to go that low - sane patches passing *all* tests # will be gladly accepted use 5.008001; BEGIN { require Module::Implementation; Module::Implementation::build_loader_sub( implementations => [ 'XS', 'PP' ], symbols => [ 'on_scope_end' ], )->(); } use Sub::Exporter::Progressive -setup => { exports => [ 'on_scope_end' ], groups => { default => ['on_scope_end'] }, }; 1; __END__ =pod =encoding UTF-8 =for :stopwords Florian Ragwitz Peter Rabbitson Karen Etheridge Tomas Doran =head1 NAME B::Hooks::EndOfScope - Execute code after a scope finished compilation =head1 VERSION version 0.13 =head1 SYNOPSIS on_scope_end { ... }; =head1 DESCRIPTION This module allows you to execute code when perl finished compiling the surrounding scope. =head1 FUNCTIONS =head2 on_scope_end on_scope_end { ... }; on_scope_end $code; Registers C<$code> to be executed after the surrounding scope has been compiled. This is exported by default. See L on how to customize it. =head1 PURE-PERL MODE CAVEAT While L has access to some very dark sorcery to make it possible to throw an exception from within a callback, the pure-perl implementation does not have access to these hacks. Therefore, what would have been a compile-time exception is instead converted to a warning, and your execution will continue as if the exception never happened. To explicitly request an XS (or PP) implementation one has two choices. Either to import from the desired implementation explicitly: use B::Hooks::EndOfScope::XS or use B::Hooks::EndOfScope::PP or by setting C<$ENV{B_HOOKS_ENDOFSCOPE_IMPLEMENTATION}> to either C or C. =head1 SEE ALSO L L =head1 AUTHORS =over 4 =item * Florian Ragwitz =item * Peter Rabbitson =back =head1 COPYRIGHT AND LICENSE This software is copyright (c) 2008 by Florian Ragwitz. This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. =head1 CONTRIBUTORS =over 4 =item * Karen Etheridge =item * Tomas Doran =back =cut B-Hooks-EndOfScope-0.13/lib/B/Hooks/EndOfScope/PP/000755 000767 000024 00000000000 12263067403 021457 5ustar00etherstaff000000 000000 B-Hooks-EndOfScope-0.13/lib/B/Hooks/EndOfScope/PP.pm000644 000767 000024 00000005241 12263067403 022017 0ustar00etherstaff000000 000000 package B::Hooks::EndOfScope::PP; { $B::Hooks::EndOfScope::PP::VERSION = '0.13'; } BEGIN { $B::Hooks::EndOfScope::PP::AUTHORITY = 'cpan:FLORA'; } # ABSTRACT: Execute code after a scope finished compilation - PP implementation use warnings; use strict; use Module::Runtime 'require_module'; use constant _PERL_VERSION => "$]"; BEGIN { if (_PERL_VERSION =~ /^5\.009/) { # CBA to figure out where %^H got broken and which H::U::HH is sane enough die "By design B::Hooks::EndOfScope does not operate in pure-perl mode on perl 5.9.X\n" } elsif (_PERL_VERSION < '5.010') { require_module('B::Hooks::EndOfScope::PP::HintHash'); *on_scope_end = \&B::Hooks::EndOfScope::PP::HintHash::on_scope_end; } else { require_module('B::Hooks::EndOfScope::PP::FieldHash'); *on_scope_end = \&B::Hooks::EndOfScope::PP::FieldHash::on_scope_end; } } use Sub::Exporter::Progressive -setup => { exports => ['on_scope_end'], groups => { default => ['on_scope_end'] }, }; sub __invoke_callback { local $@; eval { $_[0]->(); 1 } or do { my $err = $@; require Carp; Carp::cluck( (join ' ', 'A scope-end callback raised an exception, which can not be propagated when', 'B::Hooks::EndOfScope operates in pure-perl mode. Your program will CONTINUE', 'EXECUTION AS IF NOTHING HAPPENED AFTER THIS WARNING. Below is the complete', 'exception text, followed by a stack-trace of the callback execution:', ) . "\n\n$err\n\r" ); sleep 1 if -t *STDERR; # maybe a bad idea...? }; } 1; __END__ =pod =encoding UTF-8 =for :stopwords Florian Ragwitz Peter Rabbitson Karen Etheridge Tomas Doran =head1 NAME B::Hooks::EndOfScope::PP - Execute code after a scope finished compilation - PP implementation =head1 VERSION version 0.13 =head1 DESCRIPTION This is the pure-perl implementation of L based only on modules available as part of the perl core. Its leaner sibling L will be automatically preferred if all dependencies are available and C<$ENV{B_HOOKS_ENDOFSCOPE_IMPLEMENTATION}> is not set to C<'PP'>. =head1 FUNCTIONS =head2 on_scope_end on_scope_end { ... }; on_scope_end $code; Registers C<$code> to be executed after the surrounding scope has been compiled. This is exported by default. See L on how to customize it. =head1 AUTHORS =over 4 =item * Florian Ragwitz =item * Peter Rabbitson =back =head1 COPYRIGHT AND LICENSE This software is copyright (c) 2008 by Florian Ragwitz. This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. =cut B-Hooks-EndOfScope-0.13/lib/B/Hooks/EndOfScope/XS.pm000644 000767 000024 00000004433 12263067403 022034 0ustar00etherstaff000000 000000 package B::Hooks::EndOfScope::XS; { $B::Hooks::EndOfScope::XS::VERSION = '0.13'; } BEGIN { $B::Hooks::EndOfScope::XS::AUTHORITY = 'cpan:FLORA'; } # ABSTRACT: Execute code after a scope finished compilation - XS implementation use strict; use warnings; BEGIN { require Module::Runtime; # Adjust the Makefile.PL if changing this minimum version Module::Runtime::use_module('Variable::Magic', '0.48'); } use Sub::Exporter::Progressive -setup => { exports => ['on_scope_end'], groups => { default => ['on_scope_end'] }, }; my $wiz = Variable::Magic::wizard data => sub { [$_[1]] }, free => sub { $_->() for @{ $_[1] }; () }, # When someone localise %^H, our magic doesn't want to be copied # down. We want it to be around only for the scope we've initially # attached ourselfs to. Merely having MGf_LOCAL and a noop svt_local # callback achieves this. If anything wants to attach more magic of our # kind to a localised %^H, things will continue to just work as we'll be # attached with a new and empty callback list. local => \undef ; sub on_scope_end (&) { my $cb = shift; $^H |= 0x020000; if (my $stack = Variable::Magic::getdata %^H, $wiz) { push @{ $stack }, $cb; } else { Variable::Magic::cast %^H, $wiz, $cb; } } 1; __END__ =pod =encoding UTF-8 =for :stopwords Florian Ragwitz Peter Rabbitson =head1 NAME B::Hooks::EndOfScope::XS - Execute code after a scope finished compilation - XS implementation =head1 VERSION version 0.13 =head1 DESCRIPTION This is the implementation of L based on L, which is an XS module dependent on a compiler. It will always be automatically preferred if L is available. =head1 FUNCTIONS =head2 on_scope_end on_scope_end { ... }; on_scope_end $code; Registers C<$code> to be executed after the surrounding scope has been compiled. This is exported by default. See L on how to customize it. =head1 AUTHORS =over 4 =item * Florian Ragwitz =item * Peter Rabbitson =back =head1 COPYRIGHT AND LICENSE This software is copyright (c) 2008 by Florian Ragwitz. This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. =cut B-Hooks-EndOfScope-0.13/lib/B/Hooks/EndOfScope/PP/FieldHash.pm000644 000767 000024 00000002101 12263067403 023636 0ustar00etherstaff000000 000000 # Implementtion of a pure-perl on_scope_end for perls > 5.10 # (relies on Hash::Util:FieldHash) package # hide from pause B::Hooks::EndOfScope::PP::FieldHash; use strict; use warnings; use warnings; use strict; use Tie::Hash (); use Hash::Util::FieldHash 'fieldhash'; # Here we rely on a combination of several behaviors: # # * %^H is deallocated on scope exit, so any references to it disappear # * A lost weakref in a fieldhash causes the corresponding key to be deleted # * Deletion of a key on a tied hash triggers DELETE # # Therefore the DELETE of a tied fieldhash containing a %^H reference will # be the hook to fire all our callbacks. fieldhash my %hh; { package # hide from pause too B::Hooks::EndOfScope::PP::_TieHintHashFieldHash; use base 'Tie::StdHash'; sub DELETE { my $ret = shift->SUPER::DELETE(@_); B::Hooks::EndOfScope::PP::__invoke_callback($_) for @$ret; $ret; } } sub on_scope_end (&) { $^H |= 0x020000; tie(%hh, 'B::Hooks::EndOfScope::PP::_TieHintHashFieldHash') unless tied %hh; push @{ $hh{\%^H} ||= [] }, shift; } 1; B-Hooks-EndOfScope-0.13/lib/B/Hooks/EndOfScope/PP/HintHash.pm000644 000767 000024 00000001744 12263067403 023531 0ustar00etherstaff000000 000000 # Implementtion of a pure-perl on_scope_end for perl 5.8.X # (relies on lack of compile/runtime duality of %^H before 5.10 # which makes guard object operation possible) package # hide from the pauses B::Hooks::EndOfScope::PP::HintHash; use strict; use warnings; use Scalar::Util (); # This is the original implementation, which sadly is broken # on perl 5.10+ within string evals sub on_scope_end (&) { $^H |= 0x020000; # localised %^H behaves funny on 5.8 - a # 'local %^H;' # is in effect the same as # 'local %^H = %^H;' # therefore make sure we use different keys so that things do not # fire too early due to hashkey overwrite push @{ $^H{sprintf '__B_H_EOS__guardstack_0X%x', Scalar::Util::refaddr(\%^H) } ||= bless ([], 'B::Hooks::EndOfScope::PP::_SG_STACK') }, shift; } package # hide from the pauses B::Hooks::EndOfScope::PP::_SG_STACK; use warnings; use strict; sub DESTROY { B::Hooks::EndOfScope::PP::__invoke_callback($_) for @{$_[0]}; } 1;