r34376 - in /branches/upstream/libtest-useallmodules-perl: ./ current/ current/lib/ current/lib/Test/ current/t/ current/t/NoMANIFEST/ current/t/NoMANIFEST/lib/ current/t/NoPM/

ryan52-guest at users.alioth.debian.org ryan52-guest at users.alioth.debian.org
Thu Apr 30 05:36:26 UTC 2009


Author: ryan52-guest
Date: Thu Apr 30 05:36:21 2009
New Revision: 34376

URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=34376
Log:
[svn-inject] Installing original source of libtest-useallmodules-perl

Added:
    branches/upstream/libtest-useallmodules-perl/
    branches/upstream/libtest-useallmodules-perl/current/
    branches/upstream/libtest-useallmodules-perl/current/Changes
    branches/upstream/libtest-useallmodules-perl/current/MANIFEST
    branches/upstream/libtest-useallmodules-perl/current/META.yml
    branches/upstream/libtest-useallmodules-perl/current/Makefile.PL
    branches/upstream/libtest-useallmodules-perl/current/README
    branches/upstream/libtest-useallmodules-perl/current/lib/
    branches/upstream/libtest-useallmodules-perl/current/lib/Test/
    branches/upstream/libtest-useallmodules-perl/current/lib/Test/UseAllModules.pm
    branches/upstream/libtest-useallmodules-perl/current/t/
    branches/upstream/libtest-useallmodules-perl/current/t/01_load.t
    branches/upstream/libtest-useallmodules-perl/current/t/02_no_pm.t
    branches/upstream/libtest-useallmodules-perl/current/t/03_no_manifest.t
    branches/upstream/libtest-useallmodules-perl/current/t/99_pod.t
    branches/upstream/libtest-useallmodules-perl/current/t/99_podcoverage.t
    branches/upstream/libtest-useallmodules-perl/current/t/NoMANIFEST/
    branches/upstream/libtest-useallmodules-perl/current/t/NoMANIFEST/lib/
    branches/upstream/libtest-useallmodules-perl/current/t/NoMANIFEST/lib/NeverTested.pm
    branches/upstream/libtest-useallmodules-perl/current/t/NoPM/
    branches/upstream/libtest-useallmodules-perl/current/t/NoPM/MANIFEST

Added: branches/upstream/libtest-useallmodules-perl/current/Changes
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libtest-useallmodules-perl/current/Changes?rev=34376&op=file
==============================================================================
--- branches/upstream/libtest-useallmodules-perl/current/Changes (added)
+++ branches/upstream/libtest-useallmodules-perl/current/Changes Thu Apr 30 05:36:21 2009
@@ -1,0 +1,41 @@
+Revision history for Perl extension Test::UseAllModules.
+
+0.10 2009/02/26
+  - no significant code changes
+  - updated SEE ALSO to include Test::Compile and
+    Test::LoadAllModules
+
+0.09_01 2008/10/01
+  - this is a dev release to see how PAUSE changed
+    (by the recent security/permission issue)
+  - minor pod tweak
+
+0.09  2007/11/28
+  - added ExtUtils::Manifest dependency
+
+0.08  2007/05/27
+  - maintenance release: no significant code changes
+  - added license info to Makefile.PL
+  - updated META.yml version
+
+0.07  2006/07/27
+  - skip_all if no MANIFEST should be found.
+  - added two tests to see if all_uses_ok skips properly.
+
+0.06  2006/07/27
+  - skip_all if no .pm files should be found under the lib directory. (Tatsuhiko Miyagawa's advice)
+
+0.05  2006/07/27
+  - now parses MANIFEST properly on *nix. (Tatsuhiko Miyagawa's report)
+
+0.04  2006/07/26
+  - renamed from Test::Use (brian d foy's advice)
+
+0.03  2006/07/25
+  - now tests will be bailed out if Test::Use test should fail.
+
+0.02  2006/07/24
+  - oops. forgot to modify Makefile.PL
+
+0.01  2006/07/24
+  - initial release

Added: branches/upstream/libtest-useallmodules-perl/current/MANIFEST
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libtest-useallmodules-perl/current/MANIFEST?rev=34376&op=file
==============================================================================
--- branches/upstream/libtest-useallmodules-perl/current/MANIFEST (added)
+++ branches/upstream/libtest-useallmodules-perl/current/MANIFEST Thu Apr 30 05:36:21 2009
@@ -1,0 +1,13 @@
+Changes
+Makefile.PL
+MANIFEST
+README
+lib/Test/UseAllModules.pm
+t/01_load.t
+t/02_no_pm.t
+t/03_no_manifest.t
+t/99_pod.t
+t/99_podcoverage.t
+t/NoPM/MANIFEST
+t/NoMANIFEST/lib/NeverTested.pm
+META.yml                                 Module meta-data (added by MakeMaker)

Added: branches/upstream/libtest-useallmodules-perl/current/META.yml
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libtest-useallmodules-perl/current/META.yml?rev=34376&op=file
==============================================================================
--- branches/upstream/libtest-useallmodules-perl/current/META.yml (added)
+++ branches/upstream/libtest-useallmodules-perl/current/META.yml Thu Apr 30 05:36:21 2009
@@ -1,0 +1,22 @@
+--- #YAML:1.0
+name:               Test-UseAllModules
+version:            0.10
+abstract:           do use_ok() for all the MANIFESTed modules
+author:
+    - Kenichi Ishigaki <ishigaki at cpan.org>
+license:            perl
+distribution_type:  module
+configure_requires:
+    ExtUtils::MakeMaker:  0
+requires:
+    Exporter:            0
+    ExtUtils::Manifest:  0
+    Test::More:          0
+no_index:
+    directory:
+        - t
+        - inc
+generated_by:       ExtUtils::MakeMaker version 6.48
+meta-spec:
+    url:      http://module-build.sourceforge.net/META-spec-v1.4.html
+    version:  1.4

Added: branches/upstream/libtest-useallmodules-perl/current/Makefile.PL
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libtest-useallmodules-perl/current/Makefile.PL?rev=34376&op=file
==============================================================================
--- branches/upstream/libtest-useallmodules-perl/current/Makefile.PL (added)
+++ branches/upstream/libtest-useallmodules-perl/current/Makefile.PL Thu Apr 30 05:36:21 2009
@@ -1,0 +1,20 @@
+use strict;
+use warnings;
+use ExtUtils::MakeMaker;
+
+WriteMakefile(
+    NAME              => 'Test::UseAllModules',
+    VERSION_FROM      => 'lib/Test/UseAllModules.pm',
+    PREREQ_PM         => {
+        'Exporter'           => 0,
+        'ExtUtils::Manifest' => 0,
+        'Test::More'         => 0,
+    },
+    ($] >= 5.005 ?
+      (ABSTRACT_FROM  => 'lib/Test/UseAllModules.pm',
+       AUTHOR         => 'Kenichi Ishigaki <ishigaki at cpan.org>') : ()
+    ),
+    ($ExtUtils::MakeMaker::VERSION >= 6.31 ?
+      (LICENSE        => 'perl' ) : ()
+    ),
+);

Added: branches/upstream/libtest-useallmodules-perl/current/README
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libtest-useallmodules-perl/current/README?rev=34376&op=file
==============================================================================
--- branches/upstream/libtest-useallmodules-perl/current/README (added)
+++ branches/upstream/libtest-useallmodules-perl/current/README Thu Apr 30 05:36:21 2009
@@ -1,0 +1,18 @@
+Test::UseAllModules
+=====================
+
+INSTALLATION
+
+To install this module type the following:
+
+   perl Makefile.PL
+   make
+   make test
+   make install
+
+COPYRIGHT AND LICENCE
+
+Copyright (C) 2006 by Kenichi Ishigaki
+
+This library is free software; you can redistribute it and/or modify
+it under the same terms as Perl itself.

Added: branches/upstream/libtest-useallmodules-perl/current/lib/Test/UseAllModules.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libtest-useallmodules-perl/current/lib/Test/UseAllModules.pm?rev=34376&op=file
==============================================================================
--- branches/upstream/libtest-useallmodules-perl/current/lib/Test/UseAllModules.pm (added)
+++ branches/upstream/libtest-useallmodules-perl/current/lib/Test/UseAllModules.pm Thu Apr 30 05:36:21 2009
@@ -1,0 +1,112 @@
+package Test::UseAllModules;
+
+use strict;
+use warnings;
+use ExtUtils::Manifest qw( maniread );
+
+our $VERSION = '0.10';
+
+use Exporter;
+
+our @ISA = qw/Exporter/;
+our @EXPORT = qw/all_uses_ok/;
+
+use Test::More;
+
+sub all_uses_ok {
+  shift if @_ && $_[0] eq 'except';
+
+  my @exceptions = @_;
+  my @modules;
+
+  unless (-f 'MANIFEST') {
+    plan skip_all => 'no MANIFEST';
+    exit;
+  }
+
+  my $manifest = maniread();
+
+READ:
+  foreach my $file (keys %{ $manifest }) {
+    if (my ($module) = $file =~ m|^lib/(.*)\.pm\s*$|) {
+      $module =~ s|/|::|g;
+
+      foreach my $rule (@exceptions) {
+        next READ if $module eq $rule || $module =~ /$rule/;
+      }
+
+      push @modules, $module;
+    }
+  }
+
+  unless (@modules) {
+    plan skip_all => 'no .pm files are found under the lib directory';
+    exit;
+  }
+  plan tests => scalar @modules;
+
+  my @failed;
+  foreach my $module (@modules) {
+    use_ok($module) or push @failed, $module;
+  }
+
+  BAIL_OUT( 'failed: ' . (join ',', @failed) ) if @failed;
+}
+
+1;
+__END__
+
+=head1 NAME
+
+Test::UseAllModules - do use_ok() for all the MANIFESTed modules
+
+=head1 SYNOPSIS
+
+  # basic use
+  use strict;
+  use Test::UseAllModules;
+
+  BEGIN { all_uses_ok(); }
+
+  # if you have modules that'll fail use_ok() for themselves
+  use strict;
+  use Test::UseAllModules;
+
+  BEGIN {
+    all_uses_ok except => qw(
+      Some::Dependent::Module
+      Another::Dependent::Module
+      ^Yet::Another::Dependent::.*   # you can use regex
+    )
+  }
+
+=head1 DESCRIPTION
+
+I'm sick of writing 00_load.t (or something like that) that'll do use_ok() for every module I write. I'm sicker of updating 00_load.t when I add another file to the distro. This module reads MANIFEST to find modules to be tested and does use_ok() for each of them. Now all you have to do is update MANIFEST. You don't have to modify the test any more (hopefully).
+
+=head1 EXPORTED FUNCTIONS
+
+=head2 all_uses_ok
+
+Does Test::More's use_ok() for every module found in MANIFEST. Tests only modules under the 'lib' directory. If you have modules you don't want to test, give those modules or some regex rules as the argument. The word 'except' will be ignored as shown above.
+
+=head1 NOTES
+
+As of 0.03, this module calls BAIL_OUT of Test::More if any of the use_ok tests should fail. (Thus the following tests will be ignored. Missing or unloadable modules cause a lot of errors of the same kind.)
+
+=head1 SEE ALSO
+
+There're several modules like this on the CPAN now. L<Test::Compile> and a bit confusing L<Test::LoadAllModules> try to find modules to test by traversing directories. I'm not a big fun of them as they tend to find temporary or unrelated modules as well, but they may be handier especially if you're too lazy to update MANIFEST every time.
+
+=head1 AUTHOR
+
+Kenichi Ishigaki, E<lt>ishigaki at cpan.orgE<gt>
+
+=head1 COPYRIGHT AND LICENSE
+
+Copyright (C) 2006 by Kenichi Ishigaki
+
+This library is free software; you can redistribute it and/or modify
+it under the same terms as Perl itself.
+
+=cut

Added: branches/upstream/libtest-useallmodules-perl/current/t/01_load.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libtest-useallmodules-perl/current/t/01_load.t?rev=34376&op=file
==============================================================================
--- branches/upstream/libtest-useallmodules-perl/current/t/01_load.t (added)
+++ branches/upstream/libtest-useallmodules-perl/current/t/01_load.t Thu Apr 30 05:36:21 2009
@@ -1,0 +1,7 @@
+use strict;
+use warnings;
+use Test::UseAllModules;
+
+BEGIN {
+  all_uses_ok();
+}

Added: branches/upstream/libtest-useallmodules-perl/current/t/02_no_pm.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libtest-useallmodules-perl/current/t/02_no_pm.t?rev=34376&op=file
==============================================================================
--- branches/upstream/libtest-useallmodules-perl/current/t/02_no_pm.t (added)
+++ branches/upstream/libtest-useallmodules-perl/current/t/02_no_pm.t Thu Apr 30 05:36:21 2009
@@ -1,0 +1,10 @@
+use strict;
+use warnings;
+use Test::UseAllModules;
+
+BEGIN {
+  chdir 't/NoPM';
+  all_uses_ok();
+  chdir '../..';
+}
+

Added: branches/upstream/libtest-useallmodules-perl/current/t/03_no_manifest.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libtest-useallmodules-perl/current/t/03_no_manifest.t?rev=34376&op=file
==============================================================================
--- branches/upstream/libtest-useallmodules-perl/current/t/03_no_manifest.t (added)
+++ branches/upstream/libtest-useallmodules-perl/current/t/03_no_manifest.t Thu Apr 30 05:36:21 2009
@@ -1,0 +1,10 @@
+use strict;
+use warnings;
+use Test::UseAllModules;
+
+BEGIN {
+  chdir 't/NoMANIFEST';
+  all_uses_ok();
+  chdir '../..';
+}
+

Added: branches/upstream/libtest-useallmodules-perl/current/t/99_pod.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libtest-useallmodules-perl/current/t/99_pod.t?rev=34376&op=file
==============================================================================
--- branches/upstream/libtest-useallmodules-perl/current/t/99_pod.t (added)
+++ branches/upstream/libtest-useallmodules-perl/current/t/99_pod.t Thu Apr 30 05:36:21 2009
@@ -1,0 +1,9 @@
+use strict;
+use warnings;
+use Test::More;
+
+eval "use Test::Pod 1.18";
+plan skip_all => 'Test::Pod 1.18 required' if $@;
+plan skip_all => 'set TEST_POD to enable this test' unless $ENV{TEST_POD};
+
+all_pod_files_ok();

Added: branches/upstream/libtest-useallmodules-perl/current/t/99_podcoverage.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libtest-useallmodules-perl/current/t/99_podcoverage.t?rev=34376&op=file
==============================================================================
--- branches/upstream/libtest-useallmodules-perl/current/t/99_podcoverage.t (added)
+++ branches/upstream/libtest-useallmodules-perl/current/t/99_podcoverage.t Thu Apr 30 05:36:21 2009
@@ -1,0 +1,9 @@
+use strict;
+use warnings;
+use Test::More;
+
+eval "use Test::Pod::Coverage 1.04";
+plan skip_all => 'Test::Pod::Coverage 1.04 required' if $@;
+plan skip_all => 'set TEST_POD to enable this test' unless $ENV{TEST_POD};
+
+all_pod_coverage_ok();

Added: branches/upstream/libtest-useallmodules-perl/current/t/NoMANIFEST/lib/NeverTested.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libtest-useallmodules-perl/current/t/NoMANIFEST/lib/NeverTested.pm?rev=34376&op=file
==============================================================================
--- branches/upstream/libtest-useallmodules-perl/current/t/NoMANIFEST/lib/NeverTested.pm (added)
+++ branches/upstream/libtest-useallmodules-perl/current/t/NoMANIFEST/lib/NeverTested.pm Thu Apr 30 05:36:21 2009
@@ -1,0 +1,3 @@
+package NeverTested;
+
+1;

Added: branches/upstream/libtest-useallmodules-perl/current/t/NoPM/MANIFEST
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libtest-useallmodules-perl/current/t/NoPM/MANIFEST?rev=34376&op=file
==============================================================================
--- branches/upstream/libtest-useallmodules-perl/current/t/NoPM/MANIFEST (added)
+++ branches/upstream/libtest-useallmodules-perl/current/t/NoPM/MANIFEST Thu Apr 30 05:36:21 2009
@@ -1,0 +1,1 @@
+t/00_load.t




More information about the Pkg-perl-cvs-commits mailing list