Test-Apocalypse-0.05000755001750001750 011311535316 13501 5ustar00apocapoc000000000000LICENSE000444001750001750 4357411311535316 14621 0ustar00apocapoc000000000000Test-Apocalypse-0.05This software is copyright (c) 2009 by Apocalypse . This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. Terms of the Perl programming language system itself a) the GNU General Public License as published by the Free Software Foundation; either version 1, or (at your option) any later version, or b) the "Artistic License" --- The GNU General Public License, Version 1, February 1989 --- This software is Copyright (c) 2009 by Apocalypse . 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. 59 Temple Place, Suite 330, Boston, MA 02111-1307, 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. Also add information on how to contact you by electronic and paper mail. If the program is interactive, make it output a short notice like this when it starts in an interactive mode: Gnomovision version 69, Copyright (C) 19xx name of author Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, the commands you use may be called something other than `show w' and `show c'; they could even be mouse-clicks or menu items--whatever suits your program. You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the program, if necessary. Here a sample; alter the names: Yoyodyne, Inc., hereby disclaims all copyright interest in the program `Gnomovision' (a program to direct compilers to make passes at assemblers) written by James Hacker. , 1 April 1989 Ty Coon, President of Vice That's all there is to it! --- The Artistic License 1.0 --- This software is Copyright (c) 2009 by Apocalypse . 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 README000444001750001750 1253511311535316 14465 0ustar00apocapoc000000000000Test-Apocalypse-0.05NAME Test::Apocalypse - Apocalypse's favorite tests bundled into a simple interface SYNOPSIS #!/usr/bin/perl use strict; use warnings; use Test::More; eval "use Test::Apocalypse"; if ( $@ ) { plan skip_all => 'Test::Apocalypse required for validating the distribution'; } else { # lousy hack for kwalitee require Test::NoWarnings; require Test::Pod; require Test::Pod::Coverage; is_apocalypse_here(); } ABSTRACT Using this test module simplifies/bundles common distribution tests favored by the CPAN id APOCAL. DESCRIPTION This module greatly simplifies common author tests for modules heading towards CPAN. I was sick of copy/pasting the tons of t/foo.t scripts + managing them in every distro. I thought it would be nice to bundle all of it into one module and toss it on CPAN :) That way, every time I update this module all of my dists would be magically updated! This module respects the TEST_AUTHOR env variable, if it is not set it will skip the entire testsuite. Normally end-users should not run it; but you can if you want to see how bad my dists are, ha! This module uses Module::Pluggable to have custom "backends" that process various tests. We wrap them in a hackish Test::Block block per-plugin and it seems to work nicely. If you want to write your own, it should be a breeze once you look at some of my plugins and see how it works. ( more documentation to come ) Usage In order to use this, you would need to be familiar with the "standard" steps in order to fully exercise the testsuite. There are a few steps we require, because our plugins need stuff to be prepared for them. For starters, you would need a test file in your distribution similar to the one in SYNOPSIS. Once that is done and added to your MANIFEST and etc, you can do this: perl Build.PL # sets up the dist ( duh, hah ) ./Build dist # makes the tarball ( so certain plugins can process it ) TEST_AUTHOR=1 ./Build test # runs the testsuite! EXPORT Automatically exports the "is_apocalypse_here" sub. MORE IDEAS * Document the way we do plugins so others can add to this testsuite :) * Per-plugin configuration for distros so we can override the default config * POD standards check Do we have SYNOPSIS, ABSTRACT, SUPPORT, etc sections? ( PerlCritic can do that! Need to investigate more... ) * Use Test::AutoLoader to check for .al files Br0ken install at this time... * Help with version updates automatically This little snippet helps a lot, I was wondering if I could integrate it into the testsuite hah! find -name '*.pm' | grep -v /blib/ | xargs sed -i "s/\$VERSION = '[^']\+\?';/\$VERSION = '0.05';/" * Use Test::GreaterVersion to sanity check versions The problem here is that I've got to learn the CPAN backend to extract the module name from the distro tarball, and pass it on to the test... * Use Test::PerlTidy to check code style Br0ken install at this time... ( PerlCritic can do that! Need to investigate more... ) * Integrate Test::UniqueTestNames into the testsuite This would be nice, but I'm not sure if I can actually force this on other tests. Otherwise I'll be just making sure that the Test::Apocalypse tests is unique, which is worthless to $dist trying to clean itself up... * META.yml checks We should make sure that the META.yml includes the "repository", "license", and other useful keys! * Other AUTHORs As always, we should keep up on the "latest" in the perl world and look at other authors for what they are doing. * indirect syntax We should figure out how to use indirect.pm to detect this deprecated method of coding. There's a Perl::Critic plugin for this, yay! SEE ALSO None. SUPPORT You can find documentation for this module with the perldoc command. perldoc Test::Apocalypse Websites * AnnoCPAN: Annotated CPAN documentation * CPAN Ratings * RT: CPAN's request tracker * Search CPAN * CPAN Testing Service Bugs Please report any bugs or feature requests to "bug-test-apocalypse at rt.cpan.org", or through the web interface at . I will be notified, and then you'll automatically be notified of progress on your bug as I make changes. AUTHOR Apocalypse Thanks to jawnsy@cpan.org for the prodding and help in getting this package ready to be bundled into debian! COPYRIGHT AND LICENSE Copyright 2009 by Apocalypse This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself. MANIFEST000444001750001750 214611311535316 14713 0ustar00apocapoc000000000000Test-Apocalypse-0.05Build.PL MANIFEST MANIFEST.SKIP README lib/Test/Apocalypse.pm lib/Test/Apocalypse/Compile.pm lib/Test/Apocalypse/Dependencies.pm lib/Test/Apocalypse/DOSnewline.pm lib/Test/Apocalypse/Fixme.pm lib/Test/Apocalypse/HasVersion.pm lib/Test/Apocalypse/Kwalitee.pm lib/Test/Apocalypse/METAyml.pm lib/Test/Apocalypse/MinimumVersion.pm lib/Test/Apocalypse/PerlCritic.pm lib/Test/Apocalypse/PerlMetrics.pm lib/Test/Apocalypse/Pod_Coverage.pm lib/Test/Apocalypse/Pod_Spelling.pm lib/Test/Apocalypse/Pod.pm lib/Test/Apocalypse/Prereq_Build.pm lib/Test/Apocalypse/Prereq.pm lib/Test/Apocalypse/Strict.pm lib/Test/Apocalypse/UseAllModules.pm lib/Test/Apocalypse/Distribution.pm lib/Test/Apocalypse/OutdatedPrereqs.pm lib/Test/Apocalypse/PPPort.pm lib/Test/Apocalypse/CheckChanges.pm lib/Test/Apocalypse/FileChecks.pm lib/Test/Apocalypse/DirChecks.pm lib/Test/Apocalypse/Signature.pm lib/Test/Apocalypse/FilePortability.pm lib/Test/Apocalypse/DistManifest.pm lib/Test/Apocalypse/ModuleUsed.pm lib/Test/Apocalypse/CPANMeta.pm lib/Test/Apocalypse/Synopsis.pm Makefile.PL META.yml Changes LICENSE examples/simple.pl t/1_load.t t/apocalypse.t MANIFEST.SKIP000444001750001750 56311311535316 15441 0ustar00apocapoc000000000000Test-Apocalypse-0.05\.includepath$ \.project$ \.settings/ # Avoid version control files. \B\.svn\b \B\.git\b # Avoid Makemaker generated and utility files. \bMakefile$ \bblib/ \bMakeMaker-\d \bpm_to_blib$ # Avoid Module::Build generated and utility files. \bBuild$ \b_build/ # Avoid temp and backup files. ~$ \.old$ \#$ \b\.# \.bak$ # our tarballs \.tar\.gz$ Build.PL000444001750001750 410511311535316 15053 0ustar00apocapoc000000000000Test-Apocalypse-0.05# Build.PL use strict; use warnings; use Module::Build; my $build = Module::Build->new( # look up Module::Build::API for the info! 'dynamic_config' => 0, 'module_name' => 'Test::Apocalypse', 'license' => 'perl', 'dist_abstract' => "Apocalypse's favorite tests bundled into a simple interface", 'dist_author' => 'Apocalypse ', 'create_packlist' => 1, 'create_makefile_pl' => 'traditional', 'create_readme' => 1, 'create_license' => 1, 'sign' => 0, 'test_files' => 't/*.t', 'add_to_cleanup' => [ 'META.yml', 'Makefile.PL', 'README', 'Makefile', 'LICENSE' ], # automatically generated 'requires' => { # Test stuff 'Test::More' => 0, 'Test::Compile' => 0, 'Test::Perl::Critic' => 0, 'Test::Dependencies' => 0, 'Test::Distribution' => 0, 'Test::Fixme' => 0, 'Test::HasVersion' => 0, 'Test::MinimumVersion' => 0, 'Test::Pod::Coverage' => 0, 'Test::Spelling' => 0, 'Test::Pod' => 0, 'Test::Prereq' => 0, 'Test::Prereq::Build' => 0, 'Test::Strict' => 0, 'Test::UseAllModules' => 0, 'Test::YAML::Meta' => 0, 'Test::NoWarnings' => 0, 'Test::CheckChanges' => 0, 'Test::File' => 0, 'Test::Dir' => 0, 'Test::Signature' => 0, 'Test::Portability::Files' => 0, 'Test::DistManifest' => 0, 'Test::Module::Used' => 0, 'Test::Synopsis' => 0, # handy tools 'File::Spec' => 0, 'File::Find::Rule' => 0, 'Module::CPANTS::Analyse' => 0, 'Perl::Metrics::Simple' => 0, 'Test::Block' => 0, 'YAML' => 0, 'version' => 0, 'CPANPLUS::Backend' => 0, 'CPANPLUS::Configure' => 0, 'Devel::PPPort' => 0, 'Module::CoreList' => 0, # we need a recent perl 'perl' => '5.008', }, # include the standard stuff in META.yml 'meta_merge' => { 'resources' => { 'license' => 'http://dev.perl.org/licenses/', 'homepage' => 'http://search.cpan.org/dist/Test-Apocalypse', 'bugtracker' => 'http://rt.cpan.org/NoAuth/Bugs.html?Dist=Test-Apocalypse', 'repository' => 'http://github.com/apocalypse/perl-test-apocalypse', }, }, ); # all done! $build->create_build_script; META.yml000444001750001750 1012211311535316 15044 0ustar00apocapoc000000000000Test-Apocalypse-0.05--- name: Test-Apocalypse version: 0.05 author: - 'Apocalypse ' abstract: Apocalypse's favorite tests bundled into a simple interface license: perl resources: bugtracker: http://rt.cpan.org/NoAuth/Bugs.html?Dist=Test-Apocalypse homepage: http://search.cpan.org/dist/Test-Apocalypse license: http://dev.perl.org/licenses/ repository: http://github.com/apocalypse/perl-test-apocalypse requires: CPANPLUS::Backend: 0 CPANPLUS::Configure: 0 Devel::PPPort: 0 File::Find::Rule: 0 File::Spec: 0 Module::CPANTS::Analyse: 0 Module::CoreList: 0 Perl::Metrics::Simple: 0 Test::Block: 0 Test::CheckChanges: 0 Test::Compile: 0 Test::Dependencies: 0 Test::Dir: 0 Test::DistManifest: 0 Test::Distribution: 0 Test::File: 0 Test::Fixme: 0 Test::HasVersion: 0 Test::MinimumVersion: 0 Test::Module::Used: 0 Test::More: 0 Test::NoWarnings: 0 Test::Perl::Critic: 0 Test::Pod: 0 Test::Pod::Coverage: 0 Test::Portability::Files: 0 Test::Prereq: 0 Test::Prereq::Build: 0 Test::Signature: 0 Test::Spelling: 0 Test::Strict: 0 Test::Synopsis: 0 Test::UseAllModules: 0 Test::YAML::Meta: 0 YAML: 0 perl: 5.008 version: 0 configure_requires: Module::Build: 0.35 dynamic_config: 0 provides: Test::Apocalypse: file: lib/Test/Apocalypse.pm version: 0.05 Test::Apocalypse::CPANMeta: file: lib/Test/Apocalypse/CPANMeta.pm version: 0.05 Test::Apocalypse::CheckChanges: file: lib/Test/Apocalypse/CheckChanges.pm version: 0.05 Test::Apocalypse::Compile: file: lib/Test/Apocalypse/Compile.pm version: 0.05 Test::Apocalypse::DOSnewline: file: lib/Test/Apocalypse/DOSnewline.pm version: 0.05 Test::Apocalypse::Dependencies: file: lib/Test/Apocalypse/Dependencies.pm version: 0.05 Test::Apocalypse::DirChecks: file: lib/Test/Apocalypse/DirChecks.pm version: 0.05 Test::Apocalypse::DistManifest: file: lib/Test/Apocalypse/DistManifest.pm version: 0.05 Test::Apocalypse::Distribution: file: lib/Test/Apocalypse/Distribution.pm version: 0.05 Test::Apocalypse::FileChecks: file: lib/Test/Apocalypse/FileChecks.pm version: 0.05 Test::Apocalypse::FilePortability: file: lib/Test/Apocalypse/FilePortability.pm version: 0.05 Test::Apocalypse::Fixme: file: lib/Test/Apocalypse/Fixme.pm version: 0.05 Test::Apocalypse::HasVersion: file: lib/Test/Apocalypse/HasVersion.pm version: 0.05 Test::Apocalypse::Kwalitee: file: lib/Test/Apocalypse/Kwalitee.pm version: 0.05 Test::Apocalypse::METAyml: file: lib/Test/Apocalypse/METAyml.pm version: 0.05 Test::Apocalypse::MinimumVersion: file: lib/Test/Apocalypse/MinimumVersion.pm version: 0.05 Test::Apocalypse::ModuleUsed: file: lib/Test/Apocalypse/ModuleUsed.pm version: 0.05 Test::Apocalypse::OutdatedPrereqs: file: lib/Test/Apocalypse/OutdatedPrereqs.pm version: 0.05 Test::Apocalypse::PPPort: file: lib/Test/Apocalypse/PPPort.pm version: 0.05 Test::Apocalypse::PerlCritic: file: lib/Test/Apocalypse/PerlCritic.pm version: 0.05 Test::Apocalypse::PerlMetrics: file: lib/Test/Apocalypse/PerlMetrics.pm version: 0.05 Test::Apocalypse::Pod: file: lib/Test/Apocalypse/Pod.pm version: 0.05 Test::Apocalypse::Pod_Coverage: file: lib/Test/Apocalypse/Pod_Coverage.pm version: 0.05 Test::Apocalypse::Pod_Spelling: file: lib/Test/Apocalypse/Pod_Spelling.pm version: 0.05 Test::Apocalypse::Prereq: file: lib/Test/Apocalypse/Prereq.pm version: 0.05 Test::Apocalypse::Prereq_Build: file: lib/Test/Apocalypse/Prereq_Build.pm version: 0.05 Test::Apocalypse::Signature: file: lib/Test/Apocalypse/Signature.pm version: 0.05 Test::Apocalypse::Strict: file: lib/Test/Apocalypse/Strict.pm version: 0.05 Test::Apocalypse::Synopsis: file: lib/Test/Apocalypse/Synopsis.pm version: 0.05 Test::Apocalypse::UseAllModules: file: lib/Test/Apocalypse/UseAllModules.pm version: 0.05 generated_by: Module::Build version 0.35 meta-spec: url: http://module-build.sourceforge.net/META-spec-v1.4.html version: 1.4 Changes000444001750001750 101311311535316 15045 0ustar00apocapoc000000000000Test-Apocalypse-0.05Revision history for Perl extension Test::Apocalypse * 0.05 Added Test::Module::Used to the testsuite Added Test::Synopsis to the testsuite Enabled the Test::Pod::Coverage test, it was previously disabled by mistake! Changed to the new ENV var scheme, proposed by Alias ( and thanks to JAWNSY for prodding me ) * 0.04 Removed Test::CheckManifest and replaced with Test::DistManifest, thanks JAWNSY! Various POD cleanups and additions * 0.03 Added more tests :) * 0.02 fix bad test * 0.01 initial release Makefile.PL000444001750001750 425511311535316 15537 0ustar00apocapoc000000000000Test-Apocalypse-0.05# Note: this file was auto-generated by Module::Build::Compat version 0.35 require 5.008; use ExtUtils::MakeMaker; WriteMakefile ( 'NAME' => 'Test::Apocalypse', 'VERSION_FROM' => 'lib/Test/Apocalypse.pm', 'PREREQ_PM' => { 'CPANPLUS::Backend' => 0, 'CPANPLUS::Configure' => 0, 'Devel::PPPort' => 0, 'File::Find::Rule' => 0, 'File::Spec' => 0, 'Module::CPANTS::Analyse' => 0, 'Module::CoreList' => 0, 'Perl::Metrics::Simple' => 0, 'Test::Block' => 0, 'Test::CheckChanges' => 0, 'Test::Compile' => 0, 'Test::Dependencies' => 0, 'Test::Dir' => 0, 'Test::DistManifest' => 0, 'Test::Distribution' => 0, 'Test::File' => 0, 'Test::Fixme' => 0, 'Test::HasVersion' => 0, 'Test::MinimumVersion' => 0, 'Test::Module::Used' => 0, 'Test::More' => 0, 'Test::NoWarnings' => 0, 'Test::Perl::Critic' => 0, 'Test::Pod' => 0, 'Test::Pod::Coverage' => 0, 'Test::Portability::Files' => 0, 'Test::Prereq' => 0, 'Test::Prereq::Build' => 0, 'Test::Signature' => 0, 'Test::Spelling' => 0, 'Test::Strict' => 0, 'Test::Synopsis' => 0, 'Test::UseAllModules' => 0, 'Test::YAML::Meta' => 0, 'YAML' => 0, 'version' => 0 }, 'INSTALLDIRS' => 'site', 'EXE_FILES' => [], 'PL_FILES' => {} ) ; lib000755001750001750 011311535316 14170 5ustar00apocapoc000000000000Test-Apocalypse-0.05Test000755001750001750 011311535316 15107 5ustar00apocapoc000000000000Test-Apocalypse-0.05/libApocalypse.pm000444001750001750 1553111311535316 17727 0ustar00apocapoc000000000000Test-Apocalypse-0.05/lib/Test# Declare our package package Test::Apocalypse; use strict; use warnings; # Initialize our version use vars qw( $VERSION ); $VERSION = '0.05'; # setup our tests and etc use Test::Block qw( $Plan ); use Test::More; use Test::Builder; use Module::Pluggable require => 1, search_path => [ __PACKAGE__ ]; # auto-export the only sub we have use base qw( Exporter ); our @EXPORT = qw( is_apocalypse_here ); ## no critic ( ProhibitAutomaticExportation ) sub is_apocalypse_here { # arrayref of tests to skip/use/etc my $tests = shift; # should we even run those tests? unless ( $ENV{RELEASE_TESTING} or $ENV{AUTOMATED_TESTING} ) { plan skip_all => 'Author test. Please set $ENV{RELEASE_TESTING} to a true value to run.'; } else { plan 'no_plan'; # load our nifty "catch-all" tests eval "use Test::NoWarnings"; ## no critic ( ProhibitStringyEval ) } # loop through our plugins foreach my $t ( __PACKAGE__->plugins() ) { ## no critic ( RequireExplicitInclusion ) # localize the stuff local $Plan; # do nasty override of Test::Builder::plan my $oldplan = \&Test::Builder::plan; ## no critic ( ProhibitCallsToUnexportedSubs ) my $newplan = sub { my( $self, $cmd, $arg ) = @_; return unless $cmd; # handle the cmds if ( $cmd eq 'skip_all' ) { $Plan = { $t => 1 }; SKIP: { $self->skip( "skipping $t", 1 ); } } elsif ( $cmd eq 'tests' ) { $Plan = { $t => $arg }; } elsif ( $cmd eq 'no_plan' ) { # ignore it $Plan = { $t => 0 }; } return 1; }; no warnings 'redefine'; no strict 'refs'; *{'Test::Builder::plan'} = $newplan; # run it! use warnings; use strict; diag( "running $t tests..." ); $t->do_test(); # revert the override no warnings 'redefine'; no strict 'refs'; *{'Test::Builder::plan'} = $oldplan; } # done with testing return 1; } 1; __END__ =for stopwords APOCAL AUTHORs AnnoCPAN CPAN RT al backend debian distro distros dists env hackish plugins testsuite yml pm yay =head1 NAME Test::Apocalypse - Apocalypse's favorite tests bundled into a simple interface =head1 SYNOPSIS #!/usr/bin/perl use strict; use warnings; use Test::More; eval "use Test::Apocalypse"; if ( $@ ) { plan skip_all => 'Test::Apocalypse required for validating the distribution'; } else { # lousy hack for kwalitee require Test::NoWarnings; require Test::Pod; require Test::Pod::Coverage; is_apocalypse_here(); } =head1 ABSTRACT Using this test module simplifies/bundles common distribution tests favored by the CPAN id APOCAL. =head1 DESCRIPTION This module greatly simplifies common author tests for modules heading towards CPAN. I was sick of copy/pasting the tons of t/foo.t scripts + managing them in every distro. I thought it would be nice to bundle all of it into one module and toss it on CPAN :) That way, every time I update this module all of my dists would be magically updated! This module respects the TEST_AUTHOR env variable, if it is not set it will skip the entire testsuite. Normally end-users should not run it; but you can if you want to see how bad my dists are, ha! This module uses L to have custom "backends" that process various tests. We wrap them in a hackish L block per-plugin and it seems to work nicely. If you want to write your own, it should be a breeze once you look at some of my plugins and see how it works. ( more documentation to come ) =head2 Usage In order to use this, you would need to be familiar with the "standard" steps in order to fully exercise the testsuite. There are a few steps we require, because our plugins need stuff to be prepared for them. For starters, you would need a test file in your distribution similar to the one in SYNOPSIS. Once that is done and added to your MANIFEST and etc, you can do this: perl Build.PL # sets up the dist ( duh, hah ) ./Build dist # makes the tarball ( so certain plugins can process it ) TEST_AUTHOR=1 ./Build test # runs the testsuite! =head1 EXPORT Automatically exports the "is_apocalypse_here" sub. =head1 MORE IDEAS =over 4 =item * Document the way we do plugins so others can add to this testsuite :) =item * Per-plugin configuration for distros so we can override the default config =item * POD standards check Do we have SYNOPSIS, ABSTRACT, SUPPORT, etc sections? ( PerlCritic can do that! Need to investigate more... ) =item * Use Test::AutoLoader to check for .al files Br0ken install at this time... =item * Help with version updates automatically This little snippet helps a lot, I was wondering if I could integrate it into the testsuite hah! find -name '*.pm' | grep -v /blib/ | xargs sed -i "s/\$VERSION = '[^']\+\?';/\$VERSION = '0.05';/" =item * Use Test::GreaterVersion to sanity check versions The problem here is that I've got to learn the CPAN backend to extract the module name from the distro tarball, and pass it on to the test... =item * Use Test::PerlTidy to check code style Br0ken install at this time... ( PerlCritic can do that! Need to investigate more... ) =item * Integrate Test::UniqueTestNames into the testsuite This would be nice, but I'm not sure if I can actually force this on other tests. Otherwise I'll be just making sure that the Test::Apocalypse tests is unique, which is worthless to $dist trying to clean itself up... =item * META.yml checks We should make sure that the META.yml includes the "repository", "license", and other useful keys! =item * Other AUTHORs As always, we should keep up on the "latest" in the perl world and look at other authors for what they are doing. =item * indirect syntax We should figure out how to use indirect.pm to detect this deprecated method of coding. There's a L plugin for this, yay! =back =head1 SEE ALSO None. =head1 SUPPORT You can find documentation for this module with the perldoc command. perldoc Test::Apocalypse =head2 Websites =over 4 =item * AnnoCPAN: Annotated CPAN documentation L =item * CPAN Ratings L =item * RT: CPAN's request tracker L =item * Search CPAN L =item * CPAN Testing Service L =back =head2 Bugs Please report any bugs or feature requests to C, or through the web interface at L. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes. =head1 AUTHOR Apocalypse Eapocal@cpan.orgE Thanks to jawnsy@cpan.org for the prodding and help in getting this package ready to be bundled into debian! =head1 COPYRIGHT AND LICENSE Copyright 2009 by Apocalypse This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself. =cut Apocalypse000755001750001750 011311535316 17207 5ustar00apocapoc000000000000Test-Apocalypse-0.05/lib/TestSignature.pm000444001750001750 242211311535316 21643 0ustar00apocapoc000000000000Test-Apocalypse-0.05/lib/Test/Apocalypse# Declare our package package Test::Apocalypse::Signature; use strict; use warnings; # Initialize our version use vars qw( $VERSION ); $VERSION = '0.05'; use Test::More; sub do_test { my %MODULES = ( 'Test::Signature' => '1.10', ); while (my ($module, $version) = each %MODULES) { eval "use $module $version"; ## no critic ( ProhibitStringyEval ) next unless $@; if ( $ENV{RELEASE_TESTING} ) { die 'Could not load release-testing module ' . $module; } else { plan skip_all => $module . ' not available for testing'; } } # Run the test! plan tests => 1; # do we have a signature file? SKIP: { if ( -e 'SIGNATURE' ) { signature_ok(); } else { skip( 'no SIGNATURE file found', 1 ); } } return; } 1; __END__ =head1 NAME Test::Apocalypse::Signature - Plugin for Test::Signature =head1 SYNOPSIS # Please do not use this module directly. =head1 ABSTRACT Encapsulates Test::Signature functionality. =head1 DESCRIPTION Encapsulates Test::Signature functionality. =head1 SEE ALSO L L =head1 AUTHOR Apocalypse Eapocal@cpan.orgE =head1 COPYRIGHT AND LICENSE Copyright 2009 by Apocalypse This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself. =cut Strict.pm000444001750001750 277011311535316 21160 0ustar00apocapoc000000000000Test-Apocalypse-0.05/lib/Test/Apocalypse# Declare our package package Test::Apocalypse::Strict; use strict; use warnings; # Initialize our version use vars qw( $VERSION ); $VERSION = '0.05'; use Test::More; sub do_test { my %MODULES = ( 'Test::Strict' => '0.13', ); while (my ($module, $version) = each %MODULES) { eval "use $module $version"; ## no critic ( ProhibitStringyEval ) next unless $@; if ( $ENV{RELEASE_TESTING} ) { die 'Could not load release-testing module ' . $module; } else { plan skip_all => $module . ' not available for testing'; } } # Set some useful stuff local $Test::Strict::TEST_WARNINGS = 1; # to silence "used only once typo warning" local $Test::Strict::TEST_WARNINGS = 1; # local $Test::Strict::TEST_SKIP = [ 'Build.PL', 'Makefile.PL', 'Build' ]; # TODO ineffective... need to pester T::S author to fix! # Run the test! all_perl_files_ok(); return; } 1; __END__ =head1 NAME Test::Apocalypse::Strict - Plugin for Test::Strict =head1 SYNOPSIS # Please do not use this module directly. =head1 ABSTRACT Encapsulates Test::Strict functionality. =head1 DESCRIPTION Encapsulates Test::Strict functionality. We make sure that Test::Strict tests strict/warnings and exempts the Build.PL/Makefile.PL files from checks. =head1 SEE ALSO L L =head1 AUTHOR Apocalypse Eapocal@cpan.orgE =head1 COPYRIGHT AND LICENSE Copyright 2009 by Apocalypse This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself. =cut METAyml.pm000444001750001750 220011311535316 21144 0ustar00apocapoc000000000000Test-Apocalypse-0.05/lib/Test/Apocalypse# Declare our package package Test::Apocalypse::METAyml; use strict; use warnings; # Initialize our version use vars qw( $VERSION ); $VERSION = '0.05'; use Test::More; sub do_test { my %MODULES = ( 'Test::YAML::Meta' => '0.14', ); while (my ($module, $version) = each %MODULES) { eval "use $module $version"; ## no critic ( ProhibitStringyEval ) next unless $@; if ( $ENV{RELEASE_TESTING} ) { die 'Could not load release-testing module ' . $module; } else { plan skip_all => $module . ' not available for testing'; } } # Run the test! meta_yaml_ok(); return; } 1; __END__ =head1 NAME Test::Apocalypse::METAyml - Plugin for Test::YAML::Meta =head1 SYNOPSIS # Please do not use this module directly. =head1 ABSTRACT Encapsulates Test::YAML::Meta functionality. =head1 DESCRIPTION Encapsulates Test::YAML::Meta functionality. =head1 SEE ALSO L L =head1 AUTHOR Apocalypse Eapocal@cpan.orgE =head1 COPYRIGHT AND LICENSE Copyright 2009 by Apocalypse This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself. =cut DirChecks.pm000444001750001750 240111311535316 21536 0ustar00apocapoc000000000000Test-Apocalypse-0.05/lib/Test/Apocalypse# Declare our package package Test::Apocalypse::DirChecks; use strict; use warnings; # Initialize our version use vars qw( $VERSION ); $VERSION = '0.05'; use Test::More; sub do_test { my %MODULES = ( 'Test::Dir' => '1.006', ); while (my ($module, $version) = each %MODULES) { eval "use $module $version"; ## no critic ( ProhibitStringyEval ) next unless $@; if ( $ENV{RELEASE_TESTING} ) { die 'Could not load release-testing module ' . $module; } else { plan skip_all => $module . ' not available for testing'; } } # Run the test! my @dirs = qw( lib t examples ); plan tests => scalar @dirs; foreach my $d ( @dirs ) { dir_exists_ok( $d, "directory $d exists" ); } return; } 1; __END__ =for stopwords dist =head1 NAME Test::Apocalypse::DirChecks - Plugin to test for directory sanity =head1 SYNOPSIS # Please do not use this module directly. =head1 ABSTRACT Encapsulates Test::Dir functionality. =head1 DESCRIPTION Encapsulates Test::Dir functionality. =head1 SEE ALSO L L =head1 AUTHOR Apocalypse Eapocal@cpan.orgE =head1 COPYRIGHT AND LICENSE Copyright 2009 by Apocalypse This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself. =cut Pod_Spelling.pm000444001750001750 333311311535316 22263 0ustar00apocapoc000000000000Test-Apocalypse-0.05/lib/Test/Apocalypse# Declare our package package Test::Apocalypse::Pod_Spelling; use strict; use warnings; # Initialize our version use vars qw( $VERSION ); $VERSION = '0.05'; use Test::More; sub do_test { my %MODULES = ( 'Test::Spelling' => '0.11', 'File::Spec' => '3.31', ); while (my ($module, $version) = each %MODULES) { eval "use $module $version"; ## no critic ( ProhibitStringyEval ) next unless $@; if ( $ENV{RELEASE_TESTING} ) { die 'Could not load release-testing module ' . $module; } else { plan skip_all => $module . ' not available for testing'; } } # get our list of files, and add the "namespaces" as stopwords foreach my $p ( Test::Spelling::all_pod_files() ) { foreach my $word ( File::Spec->splitdir( $p ) ) { next if ! length $word; if ( $word eq 'lib' or $word eq 'blib' ) { next } if ( $word =~ /^(.+)\.pm$/ ) { $word = $1 } add_stopwords( $word ); } } # Run the test! all_pod_files_spelling_ok(); return; } 1; __END__ =for stopwords spellchecker stopword stopwords pm =head1 NAME Test::Apocalypse::Pod_Spelling - Plugin for Test::Spelling =head1 SYNOPSIS # Please do not use this module directly. =head1 ABSTRACT Encapsulates Test::Spelling functionality. =head1 DESCRIPTION Encapsulates Test::Spelling functionality. We also add each filename as a stopword, to reduce "noise" from the spellchecker. If you need to add stopwords, please look at L for ways to add it to each .pm file! =head1 SEE ALSO L L =head1 AUTHOR Apocalypse Eapocal@cpan.orgE =head1 COPYRIGHT AND LICENSE Copyright 2009 by Apocalypse This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself. =cut ModuleUsed.pm000444001750001750 226111311535316 21751 0ustar00apocapoc000000000000Test-Apocalypse-0.05/lib/Test/Apocalypse# Declare our package package Test::Apocalypse::ModuleUsed; use strict; use warnings; # Initialize our version use vars qw( $VERSION ); $VERSION = '0.05'; use Test::More; sub do_test { my %MODULES = ( 'Test::Module::Used' => '0.1.2', ); while (my ($module, $version) = each %MODULES) { eval "use $module $version"; ## no critic ( ProhibitStringyEval ) next unless $@; if ( $ENV{RELEASE_TESTING} ) { die 'Could not load release-testing module ' . $module; } else { plan skip_all => $module . ' not available for testing'; } } # Run the test! my $used = Test::Module::Used->new; $used->ok; return; } 1; __END__ =head1 NAME Test::Apocalypse::ModuleUsed - Plugin for Test::Module::Used =head1 SYNOPSIS # Please do not use this module directly. =head1 ABSTRACT Encapsulates Test::Module::Used functionality. =head1 DESCRIPTION Encapsulates Test::Module::Used functionality. =head1 SEE ALSO L L =head1 AUTHOR Apocalypse Eapocal@cpan.orgE =head1 COPYRIGHT AND LICENSE Copyright 2009 by Apocalypse This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself. =cut FilePortability.pm000444001750001750 226511311535316 23011 0ustar00apocapoc000000000000Test-Apocalypse-0.05/lib/Test/Apocalypse# Declare our package package Test::Apocalypse::FilePortability; use strict; use warnings; # Initialize our version use vars qw( $VERSION ); $VERSION = '0.05'; use Test::More; sub do_test { my %MODULES = ( 'Test::Portability::Files' => '0.05', ); while (my ($module, $version) = each %MODULES) { eval "use $module $version"; ## no critic ( ProhibitStringyEval ) next unless $@; if ( $ENV{RELEASE_TESTING} ) { die 'Could not load release-testing module ' . $module; } else { plan skip_all => $module . ' not available for testing'; } } # Run the test! run_tests(); return; } 1; __END__ =head1 NAME Test::Apocalypse::FilePortability - Plugin for Test::Portability::Files =head1 SYNOPSIS # Please do not use this module directly. =head1 ABSTRACT Encapsulates Test::Portability::Files functionality. =head1 DESCRIPTION Encapsulates Test::Portability::Files functionality. =head1 SEE ALSO L L =head1 AUTHOR Apocalypse Eapocal@cpan.orgE =head1 COPYRIGHT AND LICENSE Copyright 2009 by Apocalypse This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself. =cut PPPort.pm000444001750001750 512511311535316 21071 0ustar00apocapoc000000000000Test-Apocalypse-0.05/lib/Test/Apocalypse# Declare our package package Test::Apocalypse::PPPort; use strict; use warnings; # Initialize our version use vars qw( $VERSION ); $VERSION = '0.05'; use Test::More; sub do_test { my %MODULES = ( 'version' => '0.78', 'Devel::PPPort' => '3.19', ); while (my ($module, $version) = each %MODULES) { eval "use $module $version"; ## no critic ( ProhibitStringyEval ) next unless $@; if ( $ENV{RELEASE_TESTING} ) { die 'Could not load release-testing module ' . $module; } else { plan skip_all => $module . ' not available for testing'; } } # Run the test! plan tests => 2; # do we have an existing ppport.h file? my $haveppport = 0; my $needstrip = 0; SKIP: { if ( ! -f 'ppport.h' ) { # generate our own ppport.h file Devel::PPPort::WriteFile( 'ppport.h' ); skip( 'distro did not come with a ppport.h file', 1 ); } $haveppport++; # was it already stripped or not? my $oldver = `$^X ppport.h --version`; if ( $oldver =~ /^This is ppport\.h ([\d\.]+)$/ ) { fail( 'ppport.h file needs to be stripped' ); } else { $needstrip++; pass( 'ppport.h file was already stripped' ); } # remove it and create a new one so we have the latest one, always unlink( 'ppport.h' ) or die "unable to unlink: $!"; Devel::PPPort::WriteFile( 'ppport.h' ); } # Then, we run it :) my @result = `$^X ppport.h 2>&1`; if ( scalar @result ) { # Did we have any xs files? if ( $result[0] =~ /^No input files given/ ) { pass( 'No XS files detected' ); } else { # is the last line saying "OK" ? if ( $result[-1] =~ /^Looks good/ ) { pass( 'ppport.h says you are good to go' ); } else { fail( 'ppport.h caught some errors' ); diag( @result ); } } } else { die 'unable to run ppport.h and get the output'; } # remove our generated ppport.h file if ( ! $haveppport ) { unlink( 'ppport.h' ) or die "Unable to unlink: $!"; } else { if ( $needstrip ) { my @result = `$^X ppport.h --strip 2>&1`; if ( scalar @result ) { die 'unable to strip ppport.h file'; } } } return; } 1; __END__ =head1 NAME Test::Apocalypse::PPPort - Plugin to test for Devel::PPPort warnings =head1 SYNOPSIS # Please do not use this module directly. =head1 ABSTRACT Plugin to test for Devel::PPPort warnings. =head1 DESCRIPTION Plugin to test for Devel::PPPort warnings. =head1 SEE ALSO L L =head1 AUTHOR Apocalypse Eapocal@cpan.orgE =head1 COPYRIGHT AND LICENSE Copyright 2009 by Apocalypse This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself. =cut FileChecks.pm000444001750001750 403011311535316 21677 0ustar00apocapoc000000000000Test-Apocalypse-0.05/lib/Test/Apocalypse# Declare our package package Test::Apocalypse::FileChecks; use strict; use warnings; # Initialize our version use vars qw( $VERSION ); $VERSION = '0.05'; use Test::More; sub do_test { my %MODULES = ( 'File::Find::Rule' => '0.32', 'Test::File' => '1.29', ); while (my ($module, $version) = each %MODULES) { eval "use $module $version"; ## no critic ( ProhibitStringyEval ) next unless $@; if ( $ENV{RELEASE_TESTING} ) { die 'Could not load release-testing module ' . $module; } else { plan skip_all => $module . ' not available for testing'; } } # Run the test! my @files = qw( Changes Build.PL Makefile.PL LICENSE MANIFEST MANIFEST.SKIP README META.yml ); my @pmfiles = File::Find::Rule->file()->name( '*.pm' )->in( 'lib' ); # check SIGNATURE if it's there if ( -e 'SIGNATURE' ) { push( @files, 'SIGNATURE' ); } plan tests => ( ( scalar @files ) * 4 ) + ( ( scalar @pmfiles ) * 3 ); # ensure our basic CPAN dist contains everything we need foreach my $f ( @files ) { file_exists_ok( $f, "file $f exists" ); file_not_empty_ok( $f, "file $f got data" ); file_readable_ok( $f, "file $f is readable" ); file_not_executable_ok( $f, "file $f is not executable" ); } # check all *.pm files for executable too foreach my $f ( @pmfiles ) { file_not_empty_ok( $f, "file $f got data" ); file_readable_ok( $f, "file $f is readable" ); file_not_executable_ok( $f, "file $f is not executable" ); } return; } 1; __END__ =for stopwords dist =head1 NAME Test::Apocalypse::FileChecks - Plugin to test for file sanity =head1 SYNOPSIS # Please do not use this module directly. =head1 ABSTRACT This plugin ensures basic sanity for the files in the dist. =head1 DESCRIPTION This plugin ensures basic sanity for the files in the dist. =head1 SEE ALSO L L =head1 AUTHOR Apocalypse Eapocal@cpan.orgE =head1 COPYRIGHT AND LICENSE Copyright 2009 by Apocalypse This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself. =cut PerlCritic.pm000444001750001750 222111311535316 21737 0ustar00apocapoc000000000000Test-Apocalypse-0.05/lib/Test/Apocalypse# Declare our package package Test::Apocalypse::PerlCritic; use strict; use warnings; # Initialize our version use vars qw( $VERSION ); $VERSION = '0.05'; use Test::More; sub do_test { my %MODULES = ( 'Test::Perl::Critic' => '1.02', ); while (my ($module, $version) = each %MODULES) { eval "use $module $version"; ## no critic ( ProhibitStringyEval ) next unless $@; if ( $ENV{RELEASE_TESTING} ) { die 'Could not load release-testing module ' . $module; } else { plan skip_all => $module . ' not available for testing'; } } # Run the test! all_critic_ok(); return; } 1; __END__ =head1 NAME Test::Apocalypse::PerlCritic - Plugin for Test::Perl::Critic =head1 SYNOPSIS # Please do not use this module directly. =head1 ABSTRACT Encapsulates Test::Perl::Critic functionality. =head1 DESCRIPTION Encapsulates Test::Perl::Critic functionality. =head1 SEE ALSO L L =head1 AUTHOR Apocalypse Eapocal@cpan.orgE =head1 COPYRIGHT AND LICENSE Copyright 2009 by Apocalypse This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself. =cut DistManifest.pm000444001750001750 222411311535316 22274 0ustar00apocapoc000000000000Test-Apocalypse-0.05/lib/Test/Apocalypse# Declare our package package Test::Apocalypse::DistManifest; use strict; use warnings; # Initialize our version use vars qw( $VERSION ); $VERSION = '0.05'; use Test::More; sub do_test { my %MODULES = ( 'Test::DistManifest' => '1.005', ); while (my ($module, $version) = each %MODULES) { eval "use $module $version"; ## no critic ( ProhibitStringyEval ) next unless $@; if ( $ENV{RELEASE_TESTING} ) { die 'Could not load release-testing module ' . $module; } else { plan skip_all => $module . ' not available for testing'; } } # Run the test! manifest_ok(); return; } 1; __END__ =head1 NAME Test::Apocalypse::DistManifest - Plugin for Test::DistManifest =head1 SYNOPSIS # Please do not use this module directly. =head1 ABSTRACT Encapsulates Test::DistManifest functionality. =head1 DESCRIPTION Encapsulates Test::DistManifest functionality. =head1 SEE ALSO L L =head1 AUTHOR Apocalypse Eapocal@cpan.orgE =head1 COPYRIGHT AND LICENSE Copyright 2009 by Apocalypse This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself. =cut HasVersion.pm000444001750001750 221411311535316 21762 0ustar00apocapoc000000000000Test-Apocalypse-0.05/lib/Test/Apocalypse# Declare our package package Test::Apocalypse::HasVersion; use strict; use warnings; # Initialize our version use vars qw( $VERSION ); $VERSION = '0.05'; use Test::More; sub do_test { my %MODULES = ( 'Test::HasVersion' => '0.012', ); while (my ($module, $version) = each %MODULES) { eval "use $module $version"; ## no critic ( ProhibitStringyEval ) next unless $@; if ( $ENV{RELEASE_TESTING} ) { die 'Could not load release-testing module ' . $module; } else { plan skip_all => $module . ' not available for testing'; } } # Run the test! all_pm_version_ok(); return; } 1; __END__ =head1 NAME Test::Apocalypse::HasVersion - Plugin for Test::HasVersion =head1 SYNOPSIS # Please do not use this module directly. =head1 ABSTRACT Encapsulates Test::HasVersion functionality. =head1 DESCRIPTION Encapsulates Test::HasVersion functionality. =head1 SEE ALSO L L =head1 AUTHOR Apocalypse Eapocal@cpan.orgE =head1 COPYRIGHT AND LICENSE Copyright 2009 by Apocalypse This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself. =cut Pod_Coverage.pm000444001750001750 224711311535316 22244 0ustar00apocapoc000000000000Test-Apocalypse-0.05/lib/Test/Apocalypse# Declare our package package Test::Apocalypse::Pod_Coverage; use strict; use warnings; # Initialize our version use vars qw( $VERSION ); $VERSION = '0.05'; use Test::More; sub do_test { my %MODULES = ( 'Test::Pod::Coverage' => '1.08', ); while (my ($module, $version) = each %MODULES) { eval "use $module $version"; ## no critic ( ProhibitStringyEval ) next unless $@; if ( $ENV{RELEASE_TESTING} ) { die 'Could not load release-testing module ' . $module; } else { plan skip_all => $module . ' not available for testing'; } } # Run the test! all_pod_coverage_ok( 'lib/'); return; } 1; __END__ =head1 NAME Test::Apocalypse::Pod_Coverage - Plugin for Test::Pod::Coverage =head1 SYNOPSIS # Please do not use this module directly. =head1 ABSTRACT Encapsulates Test::Pod::Coverage functionality. =head1 DESCRIPTION Encapsulates Test::Pod::Coverage functionality. =head1 SEE ALSO L L =head1 AUTHOR Apocalypse Eapocal@cpan.orgE =head1 COPYRIGHT AND LICENSE Copyright 2009 by Apocalypse This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself. =cut Synopsis.pm000444001750001750 217311311535316 21534 0ustar00apocapoc000000000000Test-Apocalypse-0.05/lib/Test/Apocalypse# Declare our package package Test::Apocalypse::Synopsis; use strict; use warnings; # Initialize our version use vars qw( $VERSION ); $VERSION = '0.05'; use Test::More; sub do_test { my %MODULES = ( 'Test::Synopsis' => '0.06', ); while (my ($module, $version) = each %MODULES) { eval "use $module $version"; ## no critic ( ProhibitStringyEval ) next unless $@; if ( $ENV{RELEASE_TESTING} ) { die 'Could not load release-testing module ' . $module; } else { plan skip_all => $module . ' not available for testing'; } } # Run the test! all_synopsis_ok(); return; } 1; __END__ =head1 NAME Test::Apocalypse::Synopsis - Plugin for Test::Synopsis =head1 SYNOPSIS # Please do not use this module directly. =head1 ABSTRACT Encapsulates Test::Synopsis functionality. =head1 DESCRIPTION Encapsulates Test::Synopsis functionality. =head1 SEE ALSO L L =head1 AUTHOR Apocalypse Eapocal@cpan.orgE =head1 COPYRIGHT AND LICENSE Copyright 2009 by Apocalypse This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself. =cut OutdatedPrereqs.pm000444001750001750 762011311535316 23022 0ustar00apocapoc000000000000Test-Apocalypse-0.05/lib/Test/Apocalypse# Declare our package package Test::Apocalypse::OutdatedPrereqs; use strict; use warnings; # Initialize our version use vars qw( $VERSION ); $VERSION = '0.05'; use Test::More; sub do_test { my %MODULES = ( 'YAML' => '0.70', 'CPANPLUS::Configure' => '0.88', 'CPANPLUS::Backend' => '0.88', 'version' => '0.78', 'Module::CoreList' => '2.23', ); while (my ($module, $version) = each %MODULES) { eval "use $module $version"; ## no critic ( ProhibitStringyEval ) next unless $@; if ( $ENV{RELEASE_TESTING} ) { die 'Could not load release-testing module ' . $module; } else { plan skip_all => $module . ' not available for testing'; } } # Run the test! # does META.yml exist? if ( -e 'META.yml' and -f _ ) { load_yml( 'META.yml' ); } else { # maybe one directory up? if ( -e '../META.yml' and -f _ ) { load_yml( '../META.yml' ); } else { plan tests => 1; fail( 'META.yml is missing, unable to process it!' ); } } return; } # main entry point sub load_yml { # we'll load a file my $file = shift; # okay, proceed to load it! my $data; eval { $data = YAML::LoadFile( $file ); }; if ( $@ ) { plan tests => 1; fail( "Unable to load $file => $@" ); return; } # massage the data $data = $data->{'requires'}; delete $data->{'perl'} if exists $data->{'perl'}; # init the backend ( and set some options ) my $cpanconfig = CPANPLUS::Configure->new; $cpanconfig->set_conf( 'verbose' => 0 ); $cpanconfig->set_conf( 'no_update' => 1 ); my $cpanplus = CPANPLUS::Backend->new( $cpanconfig ); # silence CPANPLUS! { no warnings 'redefine'; ## no critic ( ProhibitStringyEval ) eval "sub Log::Message::Handlers::cp_msg { return }"; eval "sub Log::Message::Handlers::cp_error { return }"; } # Okay, how many prereqs do we have? plan tests => scalar keys %$data; # analyze every one of them! foreach my $prereq ( keys %$data ) { check_cpan( $cpanplus, $prereq, $data->{ $prereq } ); } return; } # checks a prereq against CPAN sub check_cpan { my $backend = shift; my $prereq = shift; my $version = shift; # check CPANPLUS my $module = $backend->parse_module( 'module' => $prereq ); if ( defined $module ) { # okay, for starters we check to see if it's version 0 then we skip it if ( $version eq '0' ) { pass( "Skipping '$prereq' because it is specified as version 0" ); return; } # Does the prereq have funky characters that we're unable to process now? if ( $version =~ /[<>=,!]+/ ) { # FIXME simplistic style of parsing my @versions = split( ',', $version ); # sort them by version, descending s/[\s<>=!]+// for @versions; @versions = sort { $b <=> $a } map { version->new( $_ ) } @versions; # pick the highest version to use as comparison $version = $versions[0]; } # convert both objects to version objects so we can compare $version = version->new( $version ) if ! ref $version; my $cpanversion = version->new( $module->version ); # check it! cmp_ok( $cpanversion, '==', $version, "Comparing '$prereq' to CPAN version" ); } else { my $release = Module::CoreList->first_release( $prereq ); if ( defined $release ) { pass( "Skipping '$prereq' because it is a CORE module" ); } else { fail( "Warning: '$prereq' is not found on CPAN!" ); } } return; } 1; __END__ =for stopwords CPAN prereq prereqs =head1 NAME Test::Apocalypse::OutdatedPrereqs - Plugin to detect outdated prereqs =head1 SYNOPSIS # Please do not use this module directly. =head1 ABSTRACT This plugin detects outdated prereqs in F specified relative to CPAN. =head1 DESCRIPTION This plugin detects outdated prereqs in F specified relative to CPAN. =head1 SEE ALSO L =head1 AUTHOR Apocalypse Eapocal@cpan.orgE =head1 COPYRIGHT AND LICENSE Copyright 2009 by Apocalypse This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself. =cut Prereq_Build.pm000444001750001750 264711311535316 22270 0ustar00apocapoc000000000000Test-Apocalypse-0.05/lib/Test/Apocalypse# Declare our package package Test::Apocalypse::Prereq_Build; use strict; use warnings; # Initialize our version use vars qw( $VERSION ); $VERSION = '0.05'; use Test::More; sub do_test { my %MODULES = ( 'Test::Prereq::Build' => '1.037', ); while (my ($module, $version) = each %MODULES) { eval "use $module $version"; ## no critic ( ProhibitStringyEval ) next unless $@; if ( $ENV{RELEASE_TESTING} ) { die 'Could not load release-testing module ' . $module; } else { plan skip_all => $module . ' not available for testing'; } } # Run the test! if ( not $ENV{PERL_TEST_PREREQ} ) { plan skip_all => 'PREREQ test ( warning: LONG! ) Sent $ENV{PERL_TEST_PREREQ} to a true value to run.'; } else { prereq_ok(); } return; } 1; __END__ =head1 NAME Test::Apocalypse::Prereq_Build - Plugin for Test::Prereq::Build =head1 SYNOPSIS # Please do not use this module directly. =head1 ABSTRACT Encapsulates Test::Prereq::Build functionality. =head1 DESCRIPTION Encapsulates Test::Prereq::Build functionality. NOTE: This test normally takes FOREVER to run! Please set $ENV{PERL_TEST_PREREQ} = 1 in order to enable this test. =head1 SEE ALSO L L =head1 AUTHOR Apocalypse Eapocal@cpan.orgE =head1 COPYRIGHT AND LICENSE Copyright 2009 by Apocalypse This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself. =cut Distribution.pm000444001750001750 232511311535316 22363 0ustar00apocapoc000000000000Test-Apocalypse-0.05/lib/Test/Apocalypse# Declare our package package Test::Apocalypse::Distribution; use strict; use warnings; # Initialize our version use vars qw( $VERSION ); $VERSION = '0.05'; use Test::More; sub do_test { my %MODULES = ( 'Test::Distribution' => '2.00', ); while (my ($module, $version) = each %MODULES) { eval "use $module $version ()"; ## no critic ( ProhibitStringyEval ) next unless $@; if ( $ENV{RELEASE_TESTING} ) { die 'Could not load release-testing module ' . $module . ' ' . $@; } else { plan skip_all => $module . ' not available for testing'; } } # Run the test! Test::Distribution->import( not => 'podcover', distversion => 1 ); return; } 1; __END__ =head1 NAME Test::Apocalypse::Distribution - Plugin for Test::Distribution =head1 SYNOPSIS # Please do not use this module directly. =head1 ABSTRACT Encapsulates Test::Distribution functionality. =head1 DESCRIPTION Encapsulates Test::Distribution functionality. =head1 SEE ALSO L L =head1 AUTHOR Apocalypse Eapocal@cpan.orgE =head1 COPYRIGHT AND LICENSE Copyright 2009 by Apocalypse This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself. =cut Kwalitee.pm000444001750001750 1070111311535316 21466 0ustar00apocapoc000000000000Test-Apocalypse-0.05/lib/Test/Apocalypse# Declare our package package Test::Apocalypse::Kwalitee; use strict; use warnings; # Initialize our version use vars qw( $VERSION ); $VERSION = '0.05'; use Test::More; sub do_test { my %MODULES = ( 'Module::CPANTS::Analyse' => '0.85', 'version' => '0.78', ); while (my ($module, $version) = each %MODULES) { eval "use $module $version"; ## no critic ( ProhibitStringyEval ) next unless $@; if ( $ENV{RELEASE_TESTING} ) { die 'Could not load release-testing module ' . $module; } else { plan skip_all => $module . ' not available for testing'; } } # Run the test! # the following code was copied/plagarized/transformed from Test::Kwalitee, thanks! # init CPANTS with the latest tarball my $analyzer = Module::CPANTS::Analyse->new({ 'dist' => get_tarball(), }); # set the number of tests / run analyzer my @indicators = $analyzer->mck()->get_indicators(); plan tests => scalar @indicators - 3; # remove the problematic tests $analyzer->unpack; $analyzer->analyse; $analyzer->calc_kwalitee; my $kwalitee_points = 0; my $available_kwalitee = 0; # loop over the kwalitee metrics foreach my $gen ( @{ $analyzer->mck()->generators() } ) { foreach my $metric ( @{ $gen->kwalitee_indicators() } ) { # skip problematic ones if ( $metric->{'name'} =~ /^(?:is_prereq|prereq_matches_use|build_prereq_matches_use)$/ ) { next } #if ( $metric->{'name'} =~ /^(?:is_prereq)$/ ) { next } # get the result my $result = $metric->{'code'}->( $analyzer->d(), $metric ); my $type = 'CORE'; if ( exists $metric->{'is_experimental'} and $metric->{'is_experimental'} ) { $type = 'EXPERIMENTAL'; } if ( exists $metric->{'is_extra'} and $metric->{'is_extra'} ) { $type = 'EXTRA'; } ok( $result, "[$type] $metric->{'name'}" ); # print more diag if it failed if ( ! $result && $ENV{TEST_VERBOSE} ) { diag( '[' . $metric->{'name'} . '] error(' . $metric->{'error'} . ') remedy(' . $metric->{'remedy'} . ')' ); if ( $metric->{'name'} eq 'prereq_matches_use' or $metric->{'name'} eq 'build_prereq_matches_use' ) { require Data::Dumper; diag( "module information: " . Data::Dumper::Dumper( $analyzer->d->{'uses'} ) ); } } # should we tally up the kwalitee? if ( ! exists $metric->{'is_experimental'} || ! $metric->{'is_experimental'} ) { # we increment available only for CORE, not extra if ( ! exists $metric->{'is_extra'} || ! $metric->{'is_extra'} ) { $available_kwalitee++; } if ( $result ) { $kwalitee_points++; } } } } # for diag, print out the kwalitee of the module diag( "Kwalitee rating: " . sprintf( "%.2f%%", 100 * ( $kwalitee_points / $available_kwalitee ) ) . " [$kwalitee_points / $available_kwalitee]" ); # That piece of crap dumps files all over :( cleanup_debian_files(); return; } sub get_tarball { # get our list of stuff, and try to find the latest tarball opendir( my $dir, '.' ) or die "unable to opendir: $!"; my @dirlist = readdir( $dir ); closedir( $dir ); # get the tarballs @dirlist = grep { /\.tar\.gz$/ } @dirlist; # get the versions @dirlist = map { [ $_, $_ ] } @dirlist; for ( @dirlist ) { $_->[0] =~ s/^.*\-([^\-]+)\.tar\.gz$/$1/; $_->[0] = version->new( $_->[0] ); } # sort by version @dirlist = sort { $b->[0] <=> $a->[0] } @dirlist; return $dirlist[0]->[1]; } # Module::CPANTS::Kwalitee::Distros suck! #t/a_manifest..............1/1 ## Failed test at t/a_manifest.t line 13. ## got: 1 ## expected: 0 ## The following files are not named in the MANIFEST file: /home/apoc/workspace/VCS-perl-trunk/VCS-2.12.2/Debian_CPANTS.txt ## Looks like you failed 1 test of 1. #t/a_manifest.............. Dubious, test returned 1 (wstat 256, 0x100) sub cleanup_debian_files { foreach my $file ( qw( Debian_CPANTS.txt ../Debian_CPANTS.txt ) ) { if ( -e $file and -f _ ) { my $status = unlink( $file ); if ( ! $status ) { warn "unable to unlink $file"; } } } return; } 1; __END__ =head1 NAME Test::Apocalypse::Kwalitee - Plugin for Test::Kwalitee =head1 SYNOPSIS # Please do not use this module directly. =head1 ABSTRACT Encapsulates Test::Kwalitee functionality. =head1 DESCRIPTION Encapsulates Test::Kwalitee functionality. =head1 SEE ALSO L L =head1 AUTHOR Apocalypse Eapocal@cpan.orgE =head1 COPYRIGHT AND LICENSE Copyright 2009 by Apocalypse This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself. =cut CheckChanges.pm000444001750001750 222211311535316 22206 0ustar00apocapoc000000000000Test-Apocalypse-0.05/lib/Test/Apocalypse# Declare our package package Test::Apocalypse::CheckChanges; use strict; use warnings; # Initialize our version use vars qw( $VERSION ); $VERSION = '0.05'; use Test::More; sub do_test { my %MODULES = ( 'Test::CheckChanges' => '0.08', ); while (my ($module, $version) = each %MODULES) { eval "use $module $version"; ## no critic ( ProhibitStringyEval ) next unless $@; if ( $ENV{RELEASE_TESTING} ) { die 'Could not load release-testing module ' . $module; } else { plan skip_all => $module . ' not available for testing'; } } # Run the test! ok_changes(); return; } 1; __END__ =head1 NAME Test::Apocalypse::CheckChanges - Plugin for Test::CheckChanges =head1 SYNOPSIS # Please do not use this module directly. =head1 ABSTRACT Encapsulates Test::CheckChanges functionality. =head1 DESCRIPTION Encapsulates Test::CheckChanges functionality. =head1 SEE ALSO L L =head1 AUTHOR Apocalypse Eapocal@cpan.orgE =head1 COPYRIGHT AND LICENSE Copyright 2009 by Apocalypse This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself. =cut PerlMetrics.pm000444001750001750 700611311535316 22136 0ustar00apocapoc000000000000Test-Apocalypse-0.05/lib/Test/Apocalypse# Declare our package package Test::Apocalypse::PerlMetrics; use strict; use warnings; # Initialize our version use vars qw( $VERSION ); $VERSION = '0.05'; use Test::More; sub do_test { my %MODULES = ( 'Perl::Metrics::Simple' => '0.13', ); while (my ($module, $version) = each %MODULES) { eval "use $module $version"; ## no critic ( ProhibitStringyEval ) next unless $@; if ( $ENV{RELEASE_TESTING} ) { die 'Could not load release-testing module ' . $module; } else { plan skip_all => $module . ' not available for testing'; } } # Run the test! plan tests => 1; my $analzyer = Perl::Metrics::Simple->new; my $analysis = $analzyer->analyze_files( 'lib/' ); my $numdisplay = 10; if ( ok( $analysis->file_count(), 'analyzed at least one file' ) ) { # only print extra stuff if necessary if ( $ENV{TEST_VERBOSE} ) { diag( '-- Perl Metrics Summary --' ); diag( ' File Count: ' . $analysis->file_count ); diag( ' Package Count: ' . $analysis->package_count ); diag( ' Subroutine Count: ' . $analysis->sub_count ); diag( ' Total Code Lines: ' . $analysis->lines ); diag( ' Non-Sub Lines: ' . $analysis->main_stats->{'lines'} ); diag( '-- Subrotuine Metrics Summary --' ); my $summary_stats = $analysis->summary_stats; diag( ' Min: lines(' . $summary_stats->{sub_length}->{min} . ') McCabe(' . $summary_stats->{sub_complexity}->{min} . ')' ); diag( ' Max: lines(' . $summary_stats->{sub_length}->{max} . ') McCabe(' . $summary_stats->{sub_complexity}->{max} . ')' ); diag( ' Mean: lines(' . $summary_stats->{sub_length}->{mean} . ') McCabe(' . $summary_stats->{sub_complexity}->{mean} . ')' ); diag( ' Standard Deviation: lines(' . $summary_stats->{sub_length}->{standard_deviation} . ') McCabe(' . $summary_stats->{sub_complexity}->{standard_deviation} . ')' ); diag( ' Median: lines(' . $summary_stats->{sub_length}->{median} . ') McCabe(' . $summary_stats->{sub_complexity}->{median} . ')' ); diag( "-- Top$numdisplay subroutines by McCabe Complexity --" ); my @sorted_subs = sort { $b->{'mccabe_complexity'} <=> $a->{'mccabe_complexity'} } @{ $analysis->subs }; foreach my $i ( 0 .. ( $numdisplay - 1 ) ) { diag( ' ' . $sorted_subs[$i]->{'path'} . ':' . $sorted_subs[$i]->{'name'} . ' ->' . ' McCabe(' . $sorted_subs[$i]->{'mccabe_complexity'} . ')' . ' lines(' . $sorted_subs[$i]->{'lines'} . ')' ); } diag( "-- Top$numdisplay subroutines by lines --" ); @sorted_subs = sort { $b->{'lines'} <=> $a->{'lines'} } @sorted_subs; foreach my $i ( 0 .. ( $numdisplay - 1 ) ) { diag( ' ' . $sorted_subs[$i]->{'path'} . ':' . $sorted_subs[$i]->{'name'} . ' ->' . ' lines(' . $sorted_subs[$i]->{'lines'} . ')' . ' McCabe(' . $sorted_subs[$i]->{'mccabe_complexity'} . ')' ); } #require Data::Dumper; #diag( 'Summary Stats: ' . Data::Dumper::Dumper( $analysis->summary_stats ) ); #diag( 'File Stats: ' . Data::Dumper::Dumper( $analysis->file_stats ) ); } } return; } 1; __END__ =head1 NAME Test::Apocalypse::PerlMetrics - Plugin for Perl::Metrics::Simple =head1 SYNOPSIS # Please do not use this module directly. =head1 ABSTRACT Encapsulates Perl::Metrics::Simple functionality. =head1 DESCRIPTION Encapsulates Perl::Metrics::Simple functionality. =head1 SEE ALSO L L =head1 AUTHOR Apocalypse Eapocal@cpan.orgE =head1 COPYRIGHT AND LICENSE Copyright 2009 by Apocalypse This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself. =cut Prereq.pm000444001750001750 257011311535316 21144 0ustar00apocapoc000000000000Test-Apocalypse-0.05/lib/Test/Apocalypse# Declare our package package Test::Apocalypse::Prereq; use strict; use warnings; # Initialize our version use vars qw( $VERSION ); $VERSION = '0.05'; use Test::More; sub do_test { my %MODULES = ( 'Test::Prereq' => '1.037', ); while (my ($module, $version) = each %MODULES) { eval "use $module $version"; ## no critic ( ProhibitStringyEval ) next unless $@; if ( $ENV{RELEASE_TESTING} ) { die 'Could not load release-testing module ' . $module; } else { plan skip_all => $module . ' not available for testing'; } } # Run the test! if ( not $ENV{PERL_TEST_PREREQ} ) { plan skip_all => 'PREREQ test ( warning: LONG! ) Sent $ENV{PERL_TEST_PREREQ} to a true value to run.'; } else { prereq_ok(); } return; } 1; __END__ =head1 NAME Test::Apocalypse::Prereq - Plugin for Test::Prereq =head1 SYNOPSIS # Please do not use this module directly. =head1 ABSTRACT Encapsulates Test::Prereq functionality. =head1 DESCRIPTION Encapsulates Test::Prereq functionality. NOTE: This test normally takes FOREVER to run! Please set $ENV{PERL_TEST_PREREQ} = 1 in order to enable this test. =head1 SEE ALSO L L =head1 AUTHOR Apocalypse Eapocal@cpan.orgE =head1 COPYRIGHT AND LICENSE Copyright 2009 by Apocalypse This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself. =cut Fixme.pm000444001750001750 237711311535316 20763 0ustar00apocapoc000000000000Test-Apocalypse-0.05/lib/Test/Apocalypse# Declare our package package Test::Apocalypse::Fixme; use strict; use warnings; # Initialize our version use vars qw( $VERSION ); $VERSION = '0.05'; use Test::More; sub do_test { my %MODULES = ( 'Test::Fixme' => '0.04', ); while (my ($module, $version) = each %MODULES) { eval "use $module $version"; ## no critic ( ProhibitStringyEval ) next unless $@; if ( $ENV{RELEASE_TESTING} ) { die 'Could not load release-testing module ' . $module; } else { plan skip_all => $module . ' not available for testing'; } } # Run the test! run_tests( 'where' => 'lib', 'match' => qr/[F]IXME|[T]ODO|[X]XX/, 'filename_match' => qr/\.(?:pm|pl|xs)$/, # specify this so we skip .c files generated by XS ); return; } 1; __END__ =head1 NAME Test::Apocalypse::Fixme - Plugin for Test::Fixme =head1 SYNOPSIS # Please do not use this module directly. =head1 ABSTRACT Encapsulates Test::Fixme functionality. =head1 DESCRIPTION Encapsulates Test::Fixme functionality. =head1 SEE ALSO L L =head1 AUTHOR Apocalypse Eapocal@cpan.orgE =head1 COPYRIGHT AND LICENSE Copyright 2009 by Apocalypse This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself. =cut MinimumVersion.pm000444001750001750 227211311535316 22666 0ustar00apocapoc000000000000Test-Apocalypse-0.05/lib/Test/Apocalypse# Declare our package package Test::Apocalypse::MinimumVersion; use strict; use warnings; # Initialize our version use vars qw( $VERSION ); $VERSION = '0.05'; use Test::More; sub do_test { my %MODULES = ( 'Test::MinimumVersion' => '0.011', ); while (my ($module, $version) = each %MODULES) { eval "use $module $version"; ## no critic ( ProhibitStringyEval ) next unless $@; if ( $ENV{RELEASE_TESTING} ) { die 'Could not load release-testing module ' . $module; } else { plan skip_all => $module . ' not available for testing'; } } # Run the test! all_minimum_version_from_metayml_ok(); return; } 1; __END__ =head1 NAME Test::Apocalypse::MinimumVersion - Plugin for Test::MinimumVersion =head1 SYNOPSIS # Please do not use this module directly. =head1 ABSTRACT Encapsulates Test::MinimumVersion functionality. =head1 DESCRIPTION Encapsulates Test::MinimumVersion functionality. =head1 SEE ALSO L L =head1 AUTHOR Apocalypse Eapocal@cpan.orgE =head1 COPYRIGHT AND LICENSE Copyright 2009 by Apocalypse This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself. =cut DOSnewline.pm000444001750001750 334211311535316 21713 0ustar00apocapoc000000000000Test-Apocalypse-0.05/lib/Test/Apocalypse# Declare our package package Test::Apocalypse::DOSnewline; use strict; use warnings; # Initialize our version use vars qw( $VERSION ); $VERSION = '0.05'; use Test::More; sub do_test { my %MODULES = ( 'File::Find::Rule' => '0.32', ); while (my ($module, $version) = each %MODULES) { eval "use $module $version"; ## no critic ( ProhibitStringyEval ) next unless $@; if ( $ENV{RELEASE_TESTING} ) { die 'Could not load release-testing module ' . $module; } else { plan skip_all => $module . ' not available for testing'; } } # Run the test! plan tests => 1; # generate the file list my $rule = File::Find::Rule->new; $rule->grep( qr/\r\n/ ); my @files = $rule->in( qw( lib t examples ) ); # FIXME sometimes we don't have examples dir, F:F:R complains! # FIXME read in MANIFEST.SKIP and use it! # for now, we skip SVN + git stuff @files = grep { $_ !~ /(?:\/\.svn\/|\/\.git\/)/ } @files; # test it! if ( scalar @files ) { fail( 'DOS-style newline detected' ); foreach my $f ( @files ) { diag( "newline check on $f" ); } } else { pass( 'no files have DOS-style newline in it' ); } return; } 1; __END__ =for stopwords dist =head1 NAME Test::Apocalypse::DOSnewline - Plugin to detect presence of DOS newlines =head1 SYNOPSIS # Please do not use this module directly. =head1 ABSTRACT This plugin detects for the presence of DOS newlines in the dist. =head1 DESCRIPTION This plugin detects for the presence of DOS newlines in the dist. =head1 SEE ALSO L =head1 AUTHOR Apocalypse Eapocal@cpan.orgE =head1 COPYRIGHT AND LICENSE Copyright 2009 by Apocalypse This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself. =cut CPANMeta.pm000444001750001750 220211311535316 21226 0ustar00apocapoc000000000000Test-Apocalypse-0.05/lib/Test/Apocalypse# Declare our package package Test::Apocalypse::CPANMeta; use strict; use warnings; # Initialize our version use vars qw( $VERSION ); $VERSION = '0.05'; use Test::More; sub do_test { my %MODULES = ( 'Test::CPAN::Meta' => '0.13', ); while (my ($module, $version) = each %MODULES) { eval "use $module $version"; ## no critic ( ProhibitStringyEval ) next unless $@; if ( $ENV{RELEASE_TESTING} ) { die 'Could not load release-testing module ' . $module; } else { plan skip_all => $module . ' not available for testing'; } } # Run the test! meta_yaml_ok(); return; } 1; __END__ =head1 NAME Test::Apocalypse::CPANMeta - Plugin for Test::CPAN::Meta =head1 SYNOPSIS # Please do not use this module directly. =head1 ABSTRACT Encapsulates Test::CPAN::Meta functionality. =head1 DESCRIPTION Encapsulates Test::CPAN::Meta functionality. =head1 SEE ALSO L L =head1 AUTHOR Apocalypse Eapocal@cpan.orgE =head1 COPYRIGHT AND LICENSE Copyright 2009 by Apocalypse This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself. =cut UseAllModules.pm000444001750001750 223211311535316 22417 0ustar00apocapoc000000000000Test-Apocalypse-0.05/lib/Test/Apocalypse# Declare our package package Test::Apocalypse::UseAllModules; use strict; use warnings; # Initialize our version use vars qw( $VERSION ); $VERSION = '0.05'; use Test::More; sub do_test { my %MODULES = ( 'Test::UseAllModules' => '0.12', ); while (my ($module, $version) = each %MODULES) { eval "use $module $version"; ## no critic ( ProhibitStringyEval ) next unless $@; if ( $ENV{RELEASE_TESTING} ) { die 'Could not load release-testing module ' . $module; } else { plan skip_all => $module . ' not available for testing'; } } # Run the test! all_uses_ok(); return; } 1; __END__ =head1 NAME Test::Apocalypse::UseAllModules - Plugin for Test::UseAllModules =head1 SYNOPSIS # Please do not use this module directly. =head1 ABSTRACT Encapsulates Test::UseAllModules functionality. =head1 DESCRIPTION Encapsulates Test::UseAllModules functionality. =head1 SEE ALSO L L =head1 AUTHOR Apocalypse Eapocal@cpan.orgE =head1 COPYRIGHT AND LICENSE Copyright 2009 by Apocalypse This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself. =cut Dependencies.pm000444001750001750 317611311535316 22277 0ustar00apocapoc000000000000Test-Apocalypse-0.05/lib/Test/Apocalypse# Declare our package package Test::Apocalypse::Dependencies; use strict; use warnings; # Initialize our version use vars qw( $VERSION ); $VERSION = '0.05'; use Test::More; sub do_test { my %MODULES = ( 'Test::Dependencies' => '0.12', ); while (my ($module, $version) = each %MODULES) { eval "use $module $version ()"; ## no critic ( ProhibitStringyEval ) next unless $@; if ( $ENV{RELEASE_TESTING} ) { die 'Could not load release-testing module ' . $module; } else { plan skip_all => $module . ' not available for testing'; } } # build up our exclude list of usual installers that we never use() but T::D is stupid to detect :( my @exclude = qw( Module::Build Module::Install ExtUtils::MakeMaker ); # Also, add some more stupid deps that T::D fucks up # FIXME we need to figure out how to exclude 'perl' or pester T::D to ignore it! push( @exclude, 'Test::More' ); # Run the test! Test::Dependencies->import( 'exclude' => \@exclude, 'style' => 'light' ); ok_dependencies(); return; } 1; __END__ =head1 NAME Test::Apocalypse::Dependencies - Plugin for Test::Dependencies =head1 SYNOPSIS # Please do not use this module directly. =head1 ABSTRACT Encapsulates Test::Dependencies functionality. =head1 DESCRIPTION Encapsulates Test::Dependencies functionality. We also add some "standard" modules to exclude from the checks. =head1 SEE ALSO L L =head1 AUTHOR Apocalypse Eapocal@cpan.orgE =head1 COPYRIGHT AND LICENSE Copyright 2009 by Apocalypse This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself. =cut Compile.pm000444001750001750 216411311535316 21275 0ustar00apocapoc000000000000Test-Apocalypse-0.05/lib/Test/Apocalypse# Declare our package package Test::Apocalypse::Compile; use strict; use warnings; # Initialize our version use vars qw( $VERSION ); $VERSION = '0.05'; use Test::More; sub do_test { my %MODULES = ( 'Test::Compile' => '0.11', ); while (my ($module, $version) = each %MODULES) { eval "use $module $version"; ## no critic ( ProhibitStringyEval ) next unless $@; if ( $ENV{RELEASE_TESTING} ) { die 'Could not load release-testing module ' . $module; } else { plan skip_all => $module . ' not available for testing'; } } # Run the test! all_pm_files_ok(); return; } 1; __END__ =head1 NAME Test::Apocalypse::Compile - Plugin for Test::Compile =head1 SYNOPSIS # Please do not use this module directly. =head1 ABSTRACT Encapsulates Test::Compile functionality. =head1 DESCRIPTION Encapsulates Test::Compile functionality. =head1 SEE ALSO L L =head1 AUTHOR Apocalypse Eapocal@cpan.orgE =head1 COPYRIGHT AND LICENSE Copyright 2009 by Apocalypse This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself. =cut Pod.pm000444001750001750 213111311535316 20421 0ustar00apocapoc000000000000Test-Apocalypse-0.05/lib/Test/Apocalypse# Declare our package package Test::Apocalypse::Pod; use strict; use warnings; # Initialize our version use vars qw( $VERSION ); $VERSION = '0.05'; use Test::More; sub do_test { my %MODULES = ( 'Test::Pod' => '1.40', ); while (my ($module, $version) = each %MODULES) { eval "use $module $version"; ## no critic ( ProhibitStringyEval ) next unless $@; if ( $ENV{RELEASE_TESTING} ) { die 'Could not load release-testing module ' . $module; } else { plan skip_all => $module . ' not available for testing'; } } # Run the test! all_pod_files_ok(); return; } 1; __END__ =head1 NAME Test::Apocalypse::Pod - Plugin for Test::Pod =head1 SYNOPSIS # Please do not use this module directly. =head1 ABSTRACT Encapsulates Test::Pod functionality. =head1 DESCRIPTION Encapsulates Test::Pod functionality. =head1 SEE ALSO L L =head1 AUTHOR Apocalypse Eapocal@cpan.orgE =head1 COPYRIGHT AND LICENSE Copyright 2009 by Apocalypse This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself. =cut examples000755001750001750 011311535316 15240 5ustar00apocapoc000000000000Test-Apocalypse-0.05simple.pl000444001750001750 47411311535316 17210 0ustar00apocapoc000000000000Test-Apocalypse-0.05/examples#!/usr/bin/perl use strict; use warnings; use Test::More; eval "use Test::Apocalypse"; if ( $@ ) { plan skip_all => 'Test::Apocalypse required for validating the distribution'; } else { # lousy hack for kwalitee require Test::NoWarnings; require Test::Pod; require Test::Pod::Coverage; is_apocalypse_here(); } t000755001750001750 011311535316 13665 5ustar00apocapoc000000000000Test-Apocalypse-0.051_load.t000444001750001750 35411311535316 15330 0ustar00apocapoc000000000000Test-Apocalypse-0.05/t#!/usr/bin/perl use strict; use warnings; my $numtests; BEGIN { $numtests = 1; eval "use Test::NoWarnings"; if ( ! $@ ) { # increment by one $numtests++; } } use Test::More tests => $numtests; use_ok( 'Test::Apocalypse' ); apocalypse.t000444001750001750 47211311535316 16332 0ustar00apocapoc000000000000Test-Apocalypse-0.05/t#!/usr/bin/perl use strict; use warnings; use Test::More; eval "use Test::Apocalypse"; if ( $@ ) { plan skip_all => 'Test::Apocalypse required for validating the distribution'; } else { require Test::NoWarnings; require Test::Pod; require Test::Pod::Coverage; # lousy hack for kwalitee is_apocalypse_here(); }