r52230 - in /branches/upstream/libtest-checkmanifest-perl: 1.2/ current/ current/data/ current/lib/Test/ current/t/

jawnsy-guest at users.alioth.debian.org jawnsy-guest at users.alioth.debian.org
Sat Feb 6 21:57:41 UTC 2010


Author: jawnsy-guest
Date: Sat Feb  6 21:57:30 2010
New Revision: 52230

URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=52230
Log:
revert half-upgraded package, needs an updated watch file

Removed:
    branches/upstream/libtest-checkmanifest-perl/1.2/
    branches/upstream/libtest-checkmanifest-perl/current/MANIFEST.SKIP
    branches/upstream/libtest-checkmanifest-perl/current/Test.txt
    branches/upstream/libtest-checkmanifest-perl/current/data/
Modified:
    branches/upstream/libtest-checkmanifest-perl/current/Changes
    branches/upstream/libtest-checkmanifest-perl/current/MANIFEST
    branches/upstream/libtest-checkmanifest-perl/current/META.yml
    branches/upstream/libtest-checkmanifest-perl/current/Makefile.PL
    branches/upstream/libtest-checkmanifest-perl/current/lib/Test/CheckManifest.pm
    branches/upstream/libtest-checkmanifest-perl/current/t/00_load.t
    branches/upstream/libtest-checkmanifest-perl/current/t/01_selftest.t
    branches/upstream/libtest-checkmanifest-perl/current/t/99_pod.t
    branches/upstream/libtest-checkmanifest-perl/current/t/99_pod_coverage.t

Modified: branches/upstream/libtest-checkmanifest-perl/current/Changes
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libtest-checkmanifest-perl/current/Changes?rev=52230&op=diff
==============================================================================
--- branches/upstream/libtest-checkmanifest-perl/current/Changes (original)
+++ branches/upstream/libtest-checkmanifest-perl/current/Changes Sat Feb  6 21:57:30 2010
@@ -1,24 +1,35 @@
 Revision history for Perl extension Test::CheckManifest.
 
-1.2   Wed Feb 03 2010
-      + moved from SVN to Git (and adapted the filters in testfiles)
-      + added support for MANIFEST.SKIP
-      + small code improvements
+0.1   Fri Sep 29 09:18:09 2006
+      - original version; created by h2xs 1.23 with options
+        -XA -n Test::CheckManifest
+      + added tests for Pod coverage, Pod, Manifest
 
-1.1   Sun Nov 22 13:18:12 2009
-      - CHECK as a label is not allowed in Perl > 5.11.x, so replace it
-      + switched license to Artistic 2.0
-      + bugfix in 01_selftest.t
+0.2  
+      - bugfix: some files excluded from test
 
-1.01  Sat Dec 29 00:28:13 2007
-      - fixes in test scripts
-        - require 5.006001
-        - allow more characters in path
-      + added license to Makefile.PL
-      + changed META.yml
+0.3   Wed Oct 18 21:36:32
+      - bugfix: CheckManifest works under Solaris now
 
-1.0   Wed Dec 27 12:15:39 2006
-      - bugfix: ok_manifest excludes files created by Module::Build
+0.4   Thu Oct 19 10:47:27
+      - bugfix: handles different newlines (mac, win, *nix)
+      
+0.5   Sat Nov 18 18:00:00
+      - bugfix: T::CM now works under taint mode (http://rt.cpan.org/Public/Bug/Display.html?id=22927)
+      + added : ok_manifest accepts hashref where specific dirs can be excluded
+                from test
+
+0.6   Tue Nov 21 22:22:22 2006
+        Test scripts improved
+
+0.7   Thu Nov 23 12:58:54 2006
+      + added: "filter" to exclude files that match on specific regexp from test
+               (http://rt.cpan.org/Public/Bug/Display.html?id=23529)
+      + added: "bool" to combine "filter" and "exclude"
+      + added: boilerplate.t
+
+0.8   Fri Nov 24 09:17:10 2006
+      + added: T::CM now tests also on files that are not part of the distro but named in the MANIFEST
 
 0.9   Mon Nov 27 09:35:26 2006
       - bugfix: ok_manifest files without blib (http://rt.cpan.org/Public/Bug/Display.html?id=23580)
@@ -29,33 +40,12 @@
                 (http://rt.cpan.org/Public/Bug/Display.html?id=23529)
       + added:  00_load.t
 
-0.8   Fri Nov 24 09:17:10 2006
-      + added: T::CM now tests also on files that are not part of the distro but named in the MANIFEST
+1.0   Wed Dec 27 12:15:39 2006
+      - bugfix: ok_manifest excludes files created by Module::Build
 
-0.7   Thu Nov 23 12:58:54 2006
-      + added: "filter" to exclude files that match on specific regexp from test
-               (http://rt.cpan.org/Public/Bug/Display.html?id=23529)
-      + added: "bool" to combine "filter" and "exclude"
-      + added: boilerplate.t
-
-0.6   Tue Nov 21 22:22:22 2006
-        Test scripts improved
-      
-0.5   Sat Nov 18 18:00:00
-      - bugfix: T::CM now works under taint mode (http://rt.cpan.org/Public/Bug/Display.html?id=22927)
-      + added : ok_manifest accepts hashref where specific dirs can be excluded
-                from test
-
-0.4   Thu Oct 19 10:47:27
-      - bugfix: handles different newlines (mac, win, *nix)
-
-0.3   Wed Oct 18 21:36:32
-      - bugfix: CheckManifest works under Solaris now
-
-0.2  
-      - bugfix: some files excluded from test
-
-0.1   Fri Sep 29 09:18:09 2006
-      - original version; created by h2xs 1.23 with options
-        -XA -n Test::CheckManifest
-      + added tests for Pod coverage, Pod, Manifest
+1.01  Sat Dec 29 00:28:13 2007
+      - fixes in test scripts
+        - require 5.006001
+        - allow more characters in path
+      + added license to Makefile.PL
+      + changed META.yml

Modified: branches/upstream/libtest-checkmanifest-perl/current/MANIFEST
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libtest-checkmanifest-perl/current/MANIFEST?rev=52230&op=diff
==============================================================================
--- branches/upstream/libtest-checkmanifest-perl/current/MANIFEST (original)
+++ branches/upstream/libtest-checkmanifest-perl/current/MANIFEST Sat Feb  6 21:57:30 2010
@@ -2,12 +2,10 @@
 Makefile.PL
 MANIFEST
 README
-
 t/00_load.t
 t/01_selftest.t
 t/98_boilerplate.t
 t/99_pod.t
 t/99_pod_coverage.t
 lib/Test/CheckManifest.pm
-
-META.yml
+META.yml                                 Module meta-data (added by MakeMaker)

Modified: branches/upstream/libtest-checkmanifest-perl/current/META.yml
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libtest-checkmanifest-perl/current/META.yml?rev=52230&op=diff
==============================================================================
--- branches/upstream/libtest-checkmanifest-perl/current/META.yml (original)
+++ branches/upstream/libtest-checkmanifest-perl/current/META.yml Sat Feb  6 21:57:30 2010
@@ -1,10 +1,9 @@
---- #YAML:1.0
-name:                Test-CheckManifest
-version:             1.1
-abstract:            Check if your Manifest matches your distro
-license:             artistic_2
-generated_by:        ExtUtils::MakeMaker version 6.31
-distribution_type:   module
+# http://module-build.sourceforge.net/META-spec.html
+#XXXXXXX This is a prototype!!!  It will change in the future!!! XXXXX#
+name:         Test-CheckManifest
+version:      1.01
+version_from: lib/Test/CheckManifest.pm
+installdirs:  site
 requires:
     Carp:                          0
     Cwd:                           0
@@ -12,8 +11,6 @@
     File::Find:                    0
     File::Spec:                    0
     Test::Builder:                 0
-meta-spec:
-    url:     http://module-build.sourceforge.net/META-spec-v1.2.html
-    version: 1.2
-author:
-    - Renee Baecker <module at renee-baecker.de>
+
+distribution_type: module
+generated_by: ExtUtils::MakeMaker version 6.30_01

Modified: branches/upstream/libtest-checkmanifest-perl/current/Makefile.PL
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libtest-checkmanifest-perl/current/Makefile.PL?rev=52230&op=diff
==============================================================================
--- branches/upstream/libtest-checkmanifest-perl/current/Makefile.PL (original)
+++ branches/upstream/libtest-checkmanifest-perl/current/Makefile.PL Sat Feb  6 21:57:30 2010
@@ -18,5 +18,5 @@
       (ABSTRACT_FROM  => 'lib/Test/CheckManifest.pm', # retrieve abstract from module
        AUTHOR         => 'Renee Baecker <module at renee-baecker.de>') : ()),
     ($ExtUtils::MakeMaker::VERSION >= 6.31 ?
-      (LICENSE        => 'artistic_2') : ()),
+      (LICENSE        => 'perl') : ()),
 );

Modified: branches/upstream/libtest-checkmanifest-perl/current/lib/Test/CheckManifest.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libtest-checkmanifest-perl/current/lib/Test/CheckManifest.pm?rev=52230&op=diff
==============================================================================
--- branches/upstream/libtest-checkmanifest-perl/current/lib/Test/CheckManifest.pm (original)
+++ branches/upstream/libtest-checkmanifest-perl/current/lib/Test/CheckManifest.pm Sat Feb  6 21:57:30 2010
@@ -10,7 +10,7 @@
 use Test::Builder;
 use File::Find;
 
-our $VERSION = '1.2';
+our $VERSION = '1.01';
 
 my $test      = Test::Builder->new();
 my $test_bool = 1;
@@ -44,9 +44,9 @@
     $msg = $hashref unless $is_hashref;
     
     my $bool     = 1;
-    my $home     = Cwd::realpath( dirname(File::Spec->rel2abs($0)) . '/..' );
-    my $manifest = Cwd::realpath( $home . '/MANIFEST' );
-    my $skip     = Cwd::realpath( $home . '/MANIFEST.SKIP' );
+    my $dir      =
+    my $home     = Cwd::realpath(dirname(File::Spec->rel2abs($0)) . '/..');    
+    my $manifest = Cwd::realpath($home . '/MANIFEST');
     
     my @missing_files = ();
     my @files_plus    = ();
@@ -59,9 +59,9 @@
                                'and' :
                                'or'; 
                    
-    push @$arref, @{$hashref->{exclude}} 
-        if $is_hashref and exists $hashref->{exclude} and 
-            ref($hashref->{exclude}) eq 'ARRAY';
+    push @$arref, @{$hashref->{exclude}} if($is_hashref and
+                                            exists $hashref->{exclude} and 
+                                            ref($hashref->{exclude}) eq 'ARRAY');
     
     for(@$arref){
         croak 'path in excluded array must be "absolute"' unless m!^/!;
@@ -72,23 +72,12 @@
     
     @$arref = grep { defined }@$arref;
     
-    unless( open my $fh, '<', $manifest ){
+    unless( open(my $fh,'<',$manifest) ){
         $bool = 0;
         $msg  = "can't open $manifest";
     }
     else{
-        { # extra block to use "last"
-        
-        my $files_in_skip = _read_skip( $skip, \$msg, \$bool );
-        last unless $files_in_skip;
-            
-        my @files;
-        while( my $fh_line = <$fh> ){
-            if( $fh_line =~ /^\s*([^\s#]\S*)/ and $fh_line !~ /^META\.yml/ ){
-                push @files, $1;
-            }
-        }
-        #my @files = grep{!/^\s*$/ and !/^META\.yml/}<$fh>;
+        my @files = grep{!/^\s*$/ and !/^META\.yml/}<$fh>;
         close $fh;
     
         chomp @files;
@@ -108,31 +97,18 @@
         @files_hash{@files} = ();
     
         find({no_chdir => 1,
-            wanted   => sub{
-                my $file         = $File::Find::name;
-                my $is_excluded  = _is_excluded(
-                    $file,
-                    $arref,
-                    $filter,
-                    $comb,
-                    $files_in_skip,
-                    $home,
-                );
-                
-                push(@dir_files,Cwd::realpath($file)) if -f $file and !$is_excluded;
-                
-                $excluded{$file} = 1 if -f $file and $is_excluded
-            }
-        },$home);
-
-        #use Data::Dumper;
+          wanted   => sub{ my $file         = $File::Find::name;
+                           my $is_excluded  = _is_excluded($file,$arref,$filter,$comb);
+                           push(@dir_files,Cwd::realpath($file)) if -f $file and !$is_excluded;
+                           $excluded{$file} = 1 if -f $file and $is_excluded}},$home);
+
+    
         #print STDERR ">>",++$counter,":",Dumper(\@files,\@dir_files);
-        SFILE:
-        for my $file(@dir_files){
+        CHECK: for my $file(@dir_files){
             for my $check(@files){
                 if($file eq $check){
                     delete $files_hash{$check};
-                    next SFILE;
+                    next CHECK;
                 }
             }
             push(@missing_files,$file);
@@ -140,10 +116,8 @@
         }
     
         delete $files_hash{$_} for keys %excluded;
-        @files_plus = sort keys %files_hash;
-        $bool = 0 if scalar @files_plus > 0;
-        
-        } # close extra block
+        @files_plus = keys %files_hash;
+        $bool = 0 if scalar @files_plus > 0;    
     }
     
     my $diag = 'The following files are not named in the MANIFEST file: '.
@@ -163,19 +137,11 @@
 }
 
 sub _is_excluded{
-    my ($file,$dirref,$filter,$bool,$files_in_skip,$home) = @_;
+    my ($file,$dirref,$filter,$bool) = @_;
     my @excluded_files = qw(pm_to_blib Makefile META.yml Build pod2htmd.tmp
                             pod2htmi.tmp Build.bat .cvsignore);
-
-    if ( $files_in_skip and 'ARRAY' eq ref $files_in_skip ) {
-        (my $local_file = $file) =~ s{\Q$home\E/?}{};
-        for my $rx ( @{$files_in_skip} ) {
-            my $regex = qr/$rx/;
-            return 1 if $local_file =~ $regex;
-        }
-    }
         
-    my @matches = grep{ $file =~ /$_$/ }@excluded_files;
+    my @matches = grep{$file =~ /$_$/}@excluded_files;
     
     if($bool eq 'or'){
         push @matches, $file if grep{ref($_) and ref($_) eq 'Regexp' and $file =~ /$_/}@$filter;
@@ -191,39 +157,6 @@
     return scalar @matches;
 }
 
-sub _read_skip {
-    my ($skip, $msg, $bool) = @_;
-    
-    my @files;
-    if( -e $skip and not open my $skip_fh, '<', $skip ) {
-        $$bool = 0;
-        $$msg  = "can't open $skip";
-        return;
-    }
-    else {
-        while ( my $line = <$skip_fh> ) {
-            chomp $line;
-            
-            next if $line =~ m{ \A \s* \# }x;
-            
-            my ($file,$comment);
-            
-            if (($file, $comment) = $line =~ /^'(\\[\\']|.+)+'\s*(.*)/) {
-                $file =~ s/\\([\\'])/$1/g;
-            }
-            else {
-                ($file, $comment) = $line =~ /^(\S+)\s*(.*)/;
-            }
-
-            next unless $file;
-            
-            push @files, $file;
-        }
-    }
-
-    return \@files;
-}
-
 1;
 __END__
 
@@ -307,14 +240,6 @@
 
 =back
 
-=head1 EXCLUDING FILES
-
-Beside C<filter> and C<exclude> there is another way to exclude files:
-C<MANIFEST.SKIP>. This is a file with filenames that should be excluded:
-
-  t/my_very_own.t
-  file_to.skip
-
 =head1 ACKNOWLEDGEMENT
 
 Great thanks to Christopher H. Laco, who did a lot of testing stuff for me and
@@ -326,10 +251,11 @@
 
 =head1 COPYRIGHT AND LICENSE
 
-Copyright (C) 2006 - 2009 by Renee Baecker
+Copyright (C) 2006 by Renee Baecker
 
 This library is free software; you can redistribute it and/or modify
-it under the same terms as Artistic License 2.0
+it under the same terms as Perl itself, either Perl version 5.8.6 or,
+at your option, any later version of Perl 5 you may have available.
 
 
 =cut

Modified: branches/upstream/libtest-checkmanifest-perl/current/t/00_load.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libtest-checkmanifest-perl/current/t/00_load.t?rev=52230&op=diff
==============================================================================
--- branches/upstream/libtest-checkmanifest-perl/current/t/00_load.t (original)
+++ branches/upstream/libtest-checkmanifest-perl/current/t/00_load.t Sat Feb  6 21:57:30 2010
@@ -1,7 +1,7 @@
-#!/usr/bin/perl
-
-use strict;
-use warnings;
-use Test::More tests => 1;
-
+#!/usr/bin/perl
+
+use strict;
+use warnings;
+use Test::More tests => 1;
+
 use_ok('Test::CheckManifest');

Modified: branches/upstream/libtest-checkmanifest-perl/current/t/01_selftest.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libtest-checkmanifest-perl/current/t/01_selftest.t?rev=52230&op=diff
==============================================================================
--- branches/upstream/libtest-checkmanifest-perl/current/t/01_selftest.t (original)
+++ branches/upstream/libtest-checkmanifest-perl/current/t/01_selftest.t Sat Feb  6 21:57:30 2010
@@ -6,8 +6,10 @@
 use File::Basename;
 use Test::More;
 
-eval "use Test::CheckManifest tests => 9";
+eval "use Test::CheckManifest tests => 10";
 plan skip_all => "Test::CheckManifest required" if $@;
+
+ok_manifest();
 
 # create a directory and a file 
 my $home = dirname(File::Spec->rel2abs($0));
@@ -22,7 +24,7 @@
     die "Bad data in $home"; 
 }
 
-my $dir  = $home . '/.git/';
+my $dir  = $home . '/.svn/';
 my $dir2 = $home . '/test/';
 my ($file1,$file2,$file3) = ($dir.'test.txt', $home . '/test.svn', $dir2.'hallo.txt');
 
@@ -33,23 +35,23 @@
 open $fh ,'>',$file2 and close $fh;
 
 Test::CheckManifest::_not_ok_manifest('expected: Manifest not ok');
-ok_manifest({filter => [qr/\.(?:svn|git)/]},'Filter: \.(?:svn|git)');
-Test::CheckManifest::_not_ok_manifest({exclude => ['/.git/']},'expected: Manifest not ok (Exclude /.git/)');
+ok_manifest({filter => [qr/\.svn/]},'Filter: \.svn');
+Test::CheckManifest::_not_ok_manifest({exclude => ['/t/.svn/']},'expected: Manifest not ok (Exclude /t/.svn/)');
 
 mkdir $dir2;
 open $fh ,'>',$file3 and close $fh;
 Test::CheckManifest::_not_ok_manifest({filter => [qr/\.svn/]},'Filter: \.svn');
-Test::CheckManifest::_not_ok_manifest({exclude => ['/.git/']},'expected: Manifest not ok (Exclude /.git/) [2]');
-Test::CheckManifest::_not_ok_manifest({filter => [qr/\.git/], exclude => ['/.git/']},'expected: Manifest not ok (exclude OR filter)');
-Test::CheckManifest::_not_ok_manifest({filter  => [qr/\.git/],
+Test::CheckManifest::_not_ok_manifest({exclude => ['/t/.svn/']},'expected: Manifest not ok (Exclude /t/.svn/) [2]');
+Test::CheckManifest::_not_ok_manifest({filter => [qr/\.svn/], exclude => ['/t/.svn/']},'expected: Manifest not ok (exclude OR filter)');
+Test::CheckManifest::_not_ok_manifest({filter  => [qr/\.svn/],
                                        bool    => 'and',
                                        exclude => ['/t/test']}, 'filter AND exclude');
-ok_manifest({filter  => [qr/\.git/],
+ok_manifest({filter  => [qr/\.svn/],
              exclude => ['/t/test']}, 'filter OR exclude');
 
 unlink $file3;
 
-ok_manifest({filter => [qr/\.git/, qr/\.svn/ ]},'Filter \.git or \.svn');
+ok_manifest({filter => [qr/\.svn/]},'Filter \.svn');
 
 unlink $file2, $file1;
 rmdir  $dir;

Modified: branches/upstream/libtest-checkmanifest-perl/current/t/99_pod.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libtest-checkmanifest-perl/current/t/99_pod.t?rev=52230&op=diff
==============================================================================
--- branches/upstream/libtest-checkmanifest-perl/current/t/99_pod.t (original)
+++ branches/upstream/libtest-checkmanifest-perl/current/t/99_pod.t Sat Feb  6 21:57:30 2010
@@ -1,10 +1,10 @@
-#!/usr/bin/perl
-
-use strict;
-use warnings;
-use FindBin ();
-use Test::More;
-
-eval "use Test::Pod 1.00";
+#!/usr/bin/perl
+
+use strict;
+use warnings;
+use FindBin ();
+use Test::More;
+
+eval "use Test::Pod 1.00";
 plan skip_all => "Test::Pod 1.00 required" if $@;
 all_pod_files_ok();

Modified: branches/upstream/libtest-checkmanifest-perl/current/t/99_pod_coverage.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libtest-checkmanifest-perl/current/t/99_pod_coverage.t?rev=52230&op=diff
==============================================================================
--- branches/upstream/libtest-checkmanifest-perl/current/t/99_pod_coverage.t (original)
+++ branches/upstream/libtest-checkmanifest-perl/current/t/99_pod_coverage.t Sat Feb  6 21:57:30 2010
@@ -1,9 +1,9 @@
-#!/usr/bin/perl
-
-use strict;
-use warnings;
-use Test::More;
-
-eval "use Test::Pod::Coverage 1.08";
-plan skip_all => "Test::Pod::Coverage 1.08 required" if $@;
-all_pod_coverage_ok();
+#!/usr/bin/perl
+
+use strict;
+use warnings;
+use Test::More;
+
+eval "use Test::Pod::Coverage 1.08";
+plan skip_all => "Test::Pod::Coverage 1.08 required" if $@;
+all_pod_coverage_ok();




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