Test-Compile-v2.3.1000755001750001750 013553743506 13270 5ustar00evanevan000000000000Test-Compile-v2.3.1/Build.PL000444001750001750 141013553743506 14715 0ustar00evanevan000000000000#! /usr/bin/perl use strict; use warnings; use Module::Build; my $build = Module::Build->new ( module_name => 'Test::Compile', abstract_from => 'lib/Test/Compile.pm', dist_author => 'Evan Giles ', license => 'perl', configure_requires => { 'Module::Build' => 0.38 }, requires => { 'perl' => '5.10.0', 'UNIVERSAL::require' => 0, 'version' => 0, 'parent' => '0.225', 'Exporter' => '5.68', }, recommends => { 'Devel::CheckOS' => 0, }, create_makefile_pl => 'traditional', meta_merge => { resources => { repository => "http://github.com/egiles/test-compile", } }, ); $build->create_build_script; Test-Compile-v2.3.1/Changes000444001750001750 2220013553743506 14734 0ustar00evanevan000000000000Revision history for Perl extension Test-Compile v2.3.1 2019-10-23 - RT-130694: all_pm_files_ok and all_pl_files_ok should return true/false v2.3.0 2019-10-09 - Search for perl files in blib first (Alexandr Ciornii ) - Improve tests, remove redundant code, - Refactor POD, make the deprecation of the functional interface clearer v2.2.2 2019-07-11 - Fix cpan-test failures on mswin32 v2.2.1 2019-07-09 - Ooops, the module still depends on UNIVERSAL::require - Oh, and the subprocess function now requires perl 5.10.0 v2.2.0 2019-07-08 - RT-118530: Capture (and optionally suppress) all output from subcommands - RT-102817: Change the default value for 'verbose', from 1 to undef - RT-118419: pm and pl files are now both checked using 'perl -c' - Changes to POD: fixes to escaping, update for new functionality, simplify it - The module no longer depends on UNIVERSAL::require v2.1.2 2019-07-03 - More corrections to the POD - More tests, try specifying specific files to all_pX_files() - Use the correct method in all_pl_files_ok() (Noel Maddy) v2.1.1 2019-07-01 (Evan Giles ) - Correct the POD v2.1.0 2019-06-29 (Evan Giles ) - Update copyright - Add all_pm_files_ok() and all_pl_files_ok() methods to the internal class v2.0.1 2019-06-18 (Evan Giles ) - Export most of the old functions (CPAN-RT 129888) v2.0_0 2019-06-18 Łukasz Hejnak - Replaced import() with Exporter usage. - Added all_files_ok to the procedural mode. - Added .git to list of directories ignored when looking for pm/pl files. - Added an else clause for pl_file_compiles so that it catches file not found errors. Evan Giles - Remove 'exported_to' function - Remove cleanup steps from the Build.PL file - Bump version number for backwards incompatible changes (semver.org) v1.3.0 2015-09-24 (Evan Giles ) - Announce the deprecation the procedural functions (long overdue) v1.2.2 UNRELEASED (Evan Giles ) - Remove the 'use 5.6.2' statements, they cause warnings. - Fix some spelling errors - Move the xt tests into the main test directory - Protect against strange PERL5LIB chars (CPAN-RT 104614) v1.2.1 2014-12-09 (Evan Giles ) - Fix (skip where appropriate) failing CPAN test - Avoid warnings for empty files in all_pl_files (Nigel Gregoire) v1.2.0 2014-08-08 (Evan Giles ) - Files without extension may not be perl (rt83917) - Small POD fix v1.1.0 2014-07-18 (Evan Giles ) - Allow use of Test::Compile in an object oriented manner - Promote the OO interface in the POD - Test::Compile::Internal is now verbose by default - Correct the dependancy information v1.0.1 2014-03-20 (Evan Giles ) - Fix stupid omission from the MANAIFEST (tests failed everywhere) v1.0.0 2014-03-19 (Evan Giles ) - Try to use Sematic Versioning - http://semver.org - Add diagnostics on compilation failure (Micheal G. Schwern) - require, don't use (Micheal G. Schwern) - Test for truth, not an integer. (Micheal G. Schwern) - Small POD fix (Micheal G. Schwern) - OS X is not a crazy OS from a redirection POV (Micheal G. Schwern) 0.24 2013 02 22 (Evan Giles ) - Update POD to explain more problems with Test::Compile 0.23 2013.01.23 (Evan Giles ) - Update Copyright for 2013 - CPAN-RT #82887, Sébastien Aperghis-Tramoni - Correct handling of PERL5LIB - fix regexp to detect taint mode 0.22 2012.10.31 (Evan Giles ) - Set verbose on for the Test::Compile library (rt80187) 0.21 2012.09.05 (Evan Giles ) - Finally test that the verbose method actaully works. - Update the POD - mostly to simplify it. - Remove redundant code, yet more tests. - Test::Compile::Internal is no longer 'beta'. 0.20 2012.08.08 (Evan Giles ) - Tests should also work outside unix (rt78810) 0.19 2012.08.03 (Evan Giles ) - Introduce Test::Compile::Internal.pm - Utilise Test::Compile::Internal to get better test coverage 0.18 2012.07.16 (Evan Giles ) - Fix a warning that leaks out (rt78363) 0.17 2012.02.25 (Evan Giles ) - Another few tests for taint logic 0.16_1 2012.02.23 (Evan Giles ) - Reapply patches from Nicholas Bamber (rt55837 & rt72557) 0.16 2012.02.21 (Evan Giles ) - Skip tests if there are not files to test (rt69297) - Handle taint mode correctly (rt55837) - Add 'blib/lib' to the search path for scripts (rt72557) 0.15 Fri 2012.02.03 20:33:55 NZST (Evan Giles ) - Fork, and run compile tests in the child process (rt73290 & rt73291) 0.14 Tue 2012.01.10 20:03:24 NZST (Evan Giles ) - Convert to Module::Build - Improved test for pl_file_ok() - Better test coverage (which files do we process, failed to compile, etc) - Remove duplicate code 0.13 Tue 2010.03.02 15:57:02 CET (Marcel Gruenauer ) - require Test::More 0.88 so done_testing works without no_plan (thanks jozef) 0.12 Thu 2010.02.11 15:16:22 CET (Marcel Gruenauer ) - updated skeleton files - recommend, not require, Devel::CheckOS - only needed for VMS anyway 0.11 Tue 2009.12.08 12:19:25 CET (Marcel Gruenauer ) - made author tests more robust 0.10 Thu 2009.10.08 22:29:11 CEST (Marcel Gruenauer ) - re-release with fixed inc::Module::Install::ReadmeMarkdownFromPod 0.09 Wed 2009.10.07 00:57:14 CEST (Marcel Gruenauer ) - Always report name of .pl files (thanks xsawyerx). - pm_file_ok() can now handle Windows paths (thanks clonezone). - fixed version number used in documentation (thanks JKUTEJ). - Changed dist style and Changes back to standard. People didn't like it - the nail that sticks out gets hammered down. - Added standard test files; this will also help with CPANTS. 0.08 Thu, 29 May 2008 12:08:32 -0000 (Marcel Gruenauer ) - set the version to 0.08 - we now check for Devel::CheckOS with UNIVERSAL::require so we don't use() it so Devel::CheckOS won't be included when using Test::Compile as part of Module::Install::StandardTests - .shipit: fixed svk.tagpattern 0.07 Thu, 06 Dec 2007 19:24:25 -0000 (Marcel Gruenauer ) - set the version to 0.07 - fixed bug in pl_file_ok() where a SKIP block was used when Test->skip() should have been used - added t/04_pl_file_ok-vms.t to verify that - updated MANIFEST - added t/04_pl_file_ok-vms.t 0.06 Thu, 06 Dec 2007 13:16:02 -0000 (Marcel Gruenauer ) - Converted Changes file to YAML style - .shipit: added Twitter step - Makefile.PL: added auto_install() and process_templates() - lib/*: converted to template - updated MANIFEST - updated t/perlcriticrc - added capability to test scripts as well (thanks Sagar R. Shah) - added t/03_pl_file_ok.t - added t/scripts - tags: NEWFEATURE 0.05 Sun, 21 Oct 2007 13:40:23 +0200 (Marcel Gruenauer ) - no longer uses standard tests, since they require Test::Compile themselves. Instead, copied the standard tests's pod and pod coverage test files into this distribution. Thanks Andreas Koenig for catching that circular dependency. 0.04 Thu, 18 Oct 2007 10:09:39 +0200 (Marcel Gruenauer ) - fixed version requirement of Test::More 0.03 Wed, 03 Oct 2007 22:31:43 +0200 (Marcel Gruenauer ) - made things cleaner by using UNIVERSAL::require on the suspected module - The documentation now uses Test::More->builder->BAIL_OUT() in order to stop the testsuite from running if a compilation fails. Also, the documentation now urges that Test::Compile be mandatory (like Test::Exception often is) instead of optional (like Test::Pod often is). Thanks to Rob Kinyon for the suggestion. - bumped version numbers to '0.03' 0.02 Wed, 03 Oct 2007 18:30:17 +0200 (Marcel Gruenauer ) - made things cleaner by using UNIVERSAL::require on the suspected module name instead of do() on the file name, which introduced potential bugs by running at run time what would otherwise happen at compile time - bumped version numbers to '0.02' 0.01 Sat, 22 Sep 2007 23:35:34 +0200 (Marcel Gruenauer ) - original version Test-Compile-v2.3.1/LICENSE000444001750001750 13613553743506 14412 0ustar00evanevan000000000000This software is dual-licensed under the Artistic license and the GPL, just like Perl itself. Test-Compile-v2.3.1/MANIFEST000444001750001750 177013553743506 14563 0ustar00evanevan000000000000Build.PL Changes lib/Test/Compile/Internal.pm lib/Test/Compile.pm LICENSE Makefile.PL MANIFEST This list of files META.json META.yml README t/000-compile.t t/100-internal--find-files.t t/100-internal--is-in-taint-mode.t t/100-internal--read-shebang.t t/100-internal--skip.t t/100-internal--test-methods.t t/100-internal-all-pl-files.t t/100-internal-all-pm-files.t t/100-internal-basic.t t/100-internal-mess-with-lib.t t/100-internal-pl-file-compiles.t t/100-internal-pm-file-compiles.t t/100-internal-verbose.t t/200-import-check.t t/200-pl-file-ok.t t/200-pl-file-ok-vms.t t/200-taint.t t/999-has-version.t t/999-perlcritic.t t/999-pod-coverage.t t/999-pod.t t/999-portability.t t/999-synopsis.t t/999-version.t t/perlcriticrc t/scripts/CVS/Ignore.pm t/scripts/CVS/taint2.pl t/scripts/datafile t/scripts/failure.pl t/scripts/LethalImport.pm t/scripts/lib.pl t/scripts/Module2.pm t/scripts/Module.pm t/scripts/perlscript t/scripts/shellscript t/scripts/subdir/empty t/scripts/subdir/success.pl t/scripts/taint.pl Test-Compile-v2.3.1/META.json000444001750001750 251613553743506 15052 0ustar00evanevan000000000000{ "abstract" : "Check whether Perl files compile correctly.", "author" : [ "Evan Giles " ], "dynamic_config" : 1, "generated_by" : "Module::Build version 0.4224", "license" : [ "perl_5" ], "meta-spec" : { "url" : "http://search.cpan.org/perldoc?CPAN::Meta::Spec", "version" : 2 }, "name" : "Test-Compile", "prereqs" : { "configure" : { "requires" : { "Module::Build" : "0.38" } }, "runtime" : { "recommends" : { "Devel::CheckOS" : "0" }, "requires" : { "Exporter" : "5.68", "UNIVERSAL::require" : "0", "parent" : "0.225", "perl" : "v5.10.0", "version" : "0" } } }, "provides" : { "Test::Compile" : { "file" : "lib/Test/Compile.pm", "version" : "v2.3.1" }, "Test::Compile::Internal" : { "file" : "lib/Test/Compile/Internal.pm", "version" : "v2.3.1" } }, "release_status" : "stable", "resources" : { "license" : [ "http://dev.perl.org/licenses/" ], "repository" : { "url" : "http://github.com/egiles/test-compile" } }, "version" : "v2.3.1", "x_serialization_backend" : "JSON::PP version 2.97001" } Test-Compile-v2.3.1/META.yml000444001750001750 155013553743506 14677 0ustar00evanevan000000000000--- abstract: 'Check whether Perl files compile correctly.' author: - 'Evan Giles ' build_requires: {} configure_requires: Module::Build: '0.38' dynamic_config: 1 generated_by: 'Module::Build version 0.4224, CPAN::Meta::Converter version 2.150010' license: perl meta-spec: url: http://module-build.sourceforge.net/META-spec-v1.4.html version: '1.4' name: Test-Compile provides: Test::Compile: file: lib/Test/Compile.pm version: v2.3.1 Test::Compile::Internal: file: lib/Test/Compile/Internal.pm version: v2.3.1 recommends: Devel::CheckOS: '0' requires: Exporter: '5.68' UNIVERSAL::require: '0' parent: '0.225' perl: v5.10.0 version: '0' resources: license: http://dev.perl.org/licenses/ repository: http://github.com/egiles/test-compile version: v2.3.1 x_serialization_backend: 'CPAN::Meta::YAML version 0.018' Test-Compile-v2.3.1/Makefile.PL000444001750001750 73713553743506 15366 0ustar00evanevan000000000000# Note: this file was auto-generated by Module::Build::Compat version 0.4224 require 5.010000; use ExtUtils::MakeMaker; WriteMakefile ( 'NAME' => 'Test::Compile', 'VERSION_FROM' => 'lib/Test/Compile.pm', 'PREREQ_PM' => { 'Exporter' => '5.68', 'UNIVERSAL::require' => 0, 'parent' => '0.225', 'version' => 0 }, 'INSTALLDIRS' => 'site', 'EXE_FILES' => [], 'PL_FILES' => {} ) ; Test-Compile-v2.3.1/README000444001750001750 124613553743506 14310 0ustar00evanevan000000000000DESCRIPTION Test::Compile is a Perl module that lets you check whether Perl modules or scripts compile properly, and report its results in standard Test::Simple fashion. It can test all Perl files in a distribution, or individual files. DEPENDENCIES Requires perl v5.10.0, plus * UNIVERSAL::require * version * parent * Exporter INSTALLATION Standard process for building & installing modules: perl Build.PL ./Build ./Build test ./Build install COPYRIGHT AND LICENSE Copyright 2007-2019. This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself. Test-Compile-v2.3.1/lib000755001750001750 013553743506 14036 5ustar00evanevan000000000000Test-Compile-v2.3.1/lib/Test000755001750001750 013553743506 14755 5ustar00evanevan000000000000Test-Compile-v2.3.1/lib/Test/Compile.pm000444001750001750 2237313553743506 17067 0ustar00evanevan000000000000package Test::Compile; use warnings; use strict; use version; our $VERSION = qv("v2.3.1"); use parent 'Exporter'; use UNIVERSAL::require; use Test::Compile::Internal; my $Test = Test::Compile::Internal->new(); =head1 NAME Test::Compile - Check whether Perl files compile correctly. =head1 SYNOPSIS use Test::Compile; my $test = Test::Compile->new(); $test->all_files_ok(); $test->done_testing(); =head1 DESCRIPTION C lets you check the whether your perl modules and scripts compile properly, results are reported in standard C fashion. The basic usage - as shown above, will locate your perl files and test that they all compile. Module authors can (and probably should) include the following in a F file and have C automatically find and check all Perl files in a module distribution: #!perl use strict; use warnings; use Test::Compile; my $test = Test::Compile->new(); $test->all_files_ok(); $test->done_testing(); =cut our @EXPORT = qw( pm_file_ok pl_file_ok all_pm_files_ok all_pl_files_ok all_pm_files all_pl_files ); our @EXPORT_OK = qw( pm_file_ok pl_file_ok all_files_ok all_pm_files_ok all_pl_files_ok all_pm_files all_pl_files ); our %EXPORT_TAGS = ('all' => \@EXPORT_OK); =head1 METHODS =over 4 =item C The constructor, which actually returns a L object. This gives you access to all the methods provided by C, including those listed below. =cut sub new { my $class = shift; return Test::Compile::Internal->new(@_); } =item C Looks for perl files and tests them all for compilation errors. See L for the full documentation. =item C Declares that you are done testing, no more tests will be run after this point. =item C Prints out the given C<@msgs>. Like print, arguments are simply appended together. Output will be indented and marked with a # so as not to interfere with test output. A newline will be put on the end if there isn't one already. We encourage using this rather than calling print directly. =item C Skips the current test, reporting the C<$reason>. =back =head1 FUNCTIONS The use of the following functions is deprecated and strongly discouraged. They are automatically exported to your namespace, which is no longer considered best practise. At some stage in the future, this will stop and you'll have to import them explicitly. Even then, you really should use the object oriented methods as they provide a more consistent interface. For example: C calls the C function - so you can't call multiple test functions in the same test file. You should definitely use the object oriented interface described in the L and in L instead of calling these functions. =over 4 =item C B. Please use L instead. It's pretty much the same, except it doesn't call the C function. Checks all the perl module files it can find for compilation errors. It uses C to find the perl module files. It also calls the C function for you (one test for each module), so you can't have already called C. Unfortunately, this also means you can't use this function with C. If this is a problem you should really be using the object oriented interface. Returns true if all Perl module files are ok, or false if any fail. =cut sub all_pm_files_ok { my @files = @_ ? @_ : all_pm_files(); $Test->plan(tests => scalar @files); return $Test->all_pm_files_ok(@files); } =item C B. Please use L instead. It's pretty much the same, except it doesn't call the C function. Checks all the perl script files it can find for compilation errors. It uses C to find the perl script files. It also calls the C function for you (one test for each script), so you can't have already called C. Unfortunately, this also means you can't use this function with C. If this is a problem you should really be using the object oriented interface. Returns true if all Perl script files are ok, or false if any fail. =cut sub all_pl_files_ok { my @files = @_ ? @_ : all_pl_files(); $Test->skip_all("no pl files found") unless @files; $Test->plan(tests => scalar @files); $Test->all_pl_files_ok(@files); } =item C B. Please use L instead. It's pretty much the same, except you can't specify a test name, and it can handle more than one file at a time. C will okay the test if $filename compiles as a perl module. The optional second argument C<$testname> is the name of the test. If it is omitted, C chooses a default test name C. =cut sub pm_file_ok { my ($file, $name) = @_; $name ||= "Compile test for $file"; my $ok = $Test->pm_file_compiles($file); $Test->ok($ok, $name); $Test->diag("$file does not compile") unless $ok; return $ok; } =item C B. Please use L instead. It's pretty much the same, except you can't specify a test name, and it can handle more than one file at a time. C will okay the test if $filename compiles as a perl script. You need to give the path to the script relative to this distribution's base directory. So if you put your scripts in a 'top-level' directory called script the argument would be C