Change 33505 by [EMAIL PROTECTED] on 2008/03/13 13:02:05

        Upgrade to Module::Pluggable 3.7

Affected files ...

... //depot/perl/MANIFEST#1688 edit
... //depot/perl/ext/Module/Pluggable/Makefile.PL#2 edit
... //depot/perl/ext/Module/Pluggable/lib/Devel/InnerPackage.pm#2 edit
... //depot/perl/ext/Module/Pluggable/lib/Module/Pluggable.pm#2 edit
... //depot/perl/ext/Module/Pluggable/lib/Module/Pluggable/Object.pm#2 edit
... //depot/perl/t/Module_Pluggable/02alsoworks.t#2 edit
... //depot/perl/t/Module_Pluggable/02works.t#2 edit
... //depot/perl/t/Module_Pluggable/03diffname.t#2 edit
... //depot/perl/t/Module_Pluggable/04acmedir.t#2 edit
... //depot/perl/t/Module_Pluggable/04acmedir_single.t#2 edit
... //depot/perl/t/Module_Pluggable/04acmepath.t#2 edit
... //depot/perl/t/Module_Pluggable/04acmepath_single.t#2 edit
... //depot/perl/t/Module_Pluggable/05postpath.t#2 edit
... //depot/perl/t/Module_Pluggable/06multipath.t#2 edit
... //depot/perl/t/Module_Pluggable/07instantiate.t#2 edit
... //depot/perl/t/Module_Pluggable/08nothing.t#2 edit
... //depot/perl/t/Module_Pluggable/09require.t#2 edit
... //depot/perl/t/Module_Pluggable/10innerpack.t#2 edit
... //depot/perl/t/Module_Pluggable/10innerpack_inner.t#2 edit
... //depot/perl/t/Module_Pluggable/10innerpack_noinner.t#2 edit
... //depot/perl/t/Module_Pluggable/10innerpack_override.t#2 edit
... //depot/perl/t/Module_Pluggable/10innerpack_super.t#1 add
... //depot/perl/t/Module_Pluggable/11usetwice.t#2 edit
... //depot/perl/t/Module_Pluggable/12only.t#2 edit
... //depot/perl/t/Module_Pluggable/12onlyarray.t#2 edit
... //depot/perl/t/Module_Pluggable/12onlyregex.t#2 edit
... //depot/perl/t/Module_Pluggable/13except.t#2 edit
... //depot/perl/t/Module_Pluggable/13exceptarray.t#2 edit
... //depot/perl/t/Module_Pluggable/13exceptregex.t#2 edit
... //depot/perl/t/Module_Pluggable/14package.t#2 edit
... //depot/perl/t/Module_Pluggable/15topicsafe.t#2 edit
... //depot/perl/t/Module_Pluggable/16different_extension.t#2 edit
... //depot/perl/t/Module_Pluggable/17devel_inner_package.t#2 edit
... //depot/perl/t/Module_Pluggable/18skipped_package.t#2 edit
... //depot/perl/t/Module_Pluggable/19can_ok_clobber.t#2 edit
... //depot/perl/t/Module_Pluggable/20dodgy_files.t#2 edit
... //depot/perl/t/Module_Pluggable/21editor_junk.t#1 add
... //depot/perl/t/Module_Pluggable/lib/EditorJunk/Plugin/Bar.pm#1 add
... //depot/perl/t/Module_Pluggable/lib/EditorJunk/Plugin/Bar.pm.swo#1 add
... //depot/perl/t/Module_Pluggable/lib/EditorJunk/Plugin/Bar.pm.swp#1 add
... //depot/perl/t/Module_Pluggable/lib/EditorJunk/Plugin/Bar.pm~#1 add
... //depot/perl/t/Module_Pluggable/lib/EditorJunk/Plugin/Foo.pm#1 add
... //depot/perl/t/Module_Pluggable/lib/OddTest/Plugin/-Dodgy.pm#2 delete

Differences ...

==== //depot/perl/MANIFEST#1688 (text) ====
Index: perl/MANIFEST
--- perl/MANIFEST#1687~33500~   2008-03-12 12:40:01.000000000 -0700
+++ perl/MANIFEST       2008-03-13 06:02:05.000000000 -0700
@@ -3742,6 +3742,7 @@
 t/Module_Pluggable/10innerpack_inner.t Module::Pluggable tests
 t/Module_Pluggable/10innerpack_noinner.t       Module::Pluggable tests
 t/Module_Pluggable/10innerpack_override.t      Module::Pluggable tests
+t/Module_Pluggable/10innerpack_super.t         Module::Pluggable tests
 t/Module_Pluggable/10innerpack.t       Module::Pluggable tests
 t/Module_Pluggable/11usetwice.t        Module::Pluggable tests
 t/Module_Pluggable/12onlyarray.t       Module::Pluggable tests
@@ -3757,8 +3758,14 @@
 t/Module_Pluggable/18skipped_package.t Module::Pluggable tests
 t/Module_Pluggable/19can_ok_clobber.t  Module::Pluggable tests
 t/Module_Pluggable/20dodgy_files.t     Module::Pluggable tests
+t/Module_Pluggable/21editor_junk.t                     Module::Pluggable tests
 t/Module_Pluggable/acme/Acme/MyTest/Plugin/Foo.pm      Module::Pluggable tests
 t/Module_Pluggable/lib/Acme/MyTest/Plugin/Foo.pm       Module::Pluggable tests
+t/Module_Pluggable/lib/EditorJunk/Plugin/Foo.pm                
Module::Pluggable tests
+t/Module_Pluggable/lib/EditorJunk/Plugin/Bar.pm~       Module::Pluggable tests
+t/Module_Pluggable/lib/EditorJunk/Plugin/Bar.pm.swp    Module::Pluggable tests
+t/Module_Pluggable/lib/EditorJunk/Plugin/Bar.pm                
Module::Pluggable tests
+t/Module_Pluggable/lib/EditorJunk/Plugin/Bar.pm.swo    Module::Pluggable tests
 t/Module_Pluggable/lib/ExtTest/Plugin/Bar.plugin       Module::Pluggable tests
 t/Module_Pluggable/lib/ExtTest/Plugin/Foo.plugin       Module::Pluggable tests
 t/Module_Pluggable/lib/ExtTest/Plugin/Quux/Foo.plugin  Module::Pluggable tests
@@ -3772,7 +3779,6 @@
 t/Module_Pluggable/lib/MyTest/Plugin/Foo.pm    Module::Pluggable tests
 t/Module_Pluggable/lib/MyTest/Plugin/Quux/Foo.pm       Module::Pluggable tests
 t/Module_Pluggable/lib/No/Middle.pm    Module::Pluggable tests
-t/Module_Pluggable/lib/OddTest/Plugin/-Dodgy.pm        Module::Pluggable tests
 t/Module_Pluggable/lib/OddTest/Plugin/Foo.pm   Module::Pluggable tests
 t/Module_Pluggable/lib/TA/C/A/I.pm     Module::Pluggable tests
 t/mro/basic_01_c3.t            mro tests

==== //depot/perl/ext/Module/Pluggable/Makefile.PL#2 (text) ====
Index: perl/ext/Module/Pluggable/Makefile.PL
--- perl/ext/Module/Pluggable/Makefile.PL#1~33499~      2008-03-12 
12:32:09.000000000 -0700
+++ perl/ext/Module/Pluggable/Makefile.PL       2008-03-13 06:02:05.000000000 
-0700
@@ -1,16 +1,48 @@
+# Note: this file was auto-generated by Module::Build::Compat version 0.03
 use ExtUtils::MakeMaker;
+use FindBin;
+use File::Spec::Functions qw(catfile);
+
+# VOS and VMS can't handle dodgy plugin names
+# and VOS can't even unpack them so we create them on the
+# fly and only run the tests if they're present
+my %dodgy_files = (
+    catfile(qw(OddTest Plugin -Dodgy.pm))   => 'OddTest::Plugin::-Dodgy',
+    catfile(qw(EditorJunk Plugin #Bar.pm#)) => 'EditorJunk::Bar',
+    catfile(qw(EditorJunk Plugin .#Bar.pm)) => 'EditorJunk::Bar',
+);
+
+my $core = grep { $_ eq 'PERL_CORE=1' } @ARGV;
+my @path = $core ? (File::Spec->updir, File::Spec->updir, File::Spec->updir,
+                   "t", "Module_Pluggable") : ($FindBin::Bin,"t");
+my @files;
+
+if ($^O ne 'VMS' && $^O ne 'VOS') {
+    foreach my $test (keys %dodgy_files) {
+        my ($file) = (catfile(@path, "lib", $test)=~/^(.*)$/);
+        if (open(my $fh, ">", $file)) {
+            my $name = $dodgy_files{$test};
+            print $fh "package $name;\nsub new {}\n1;";
+            close($fh);
+        push @files, $file;
+        }
+    }
+}
 
 WriteMakefile
 (
           'NAME' => 'Module::Pluggable',
           'VERSION_FROM' => 'lib/Module/Pluggable.pm',
-           MAN3PODS     => {},         # Pods will be built by installman.
           'PREREQ_PM' => {
                            'File::Basename' => '0',
                            'File::Spec' => '3.00',
                            'Test::More' => '0.62'
                          },
+          'INSTALLDIRS' => 'site',
           'EXE_FILES' => [],
-          'PL_FILES' => {}
+          'PL_FILES' => {},
+          'realclean'  => {FILES=> join ' ', @files},
+          # In the core pods will be built by installman.
+          $core ? (MAN3PODS => {}) : (),
         )
 ;

==== //depot/perl/ext/Module/Pluggable/lib/Devel/InnerPackage.pm#2 (text) ====
Index: perl/ext/Module/Pluggable/lib/Devel/InnerPackage.pm
--- perl/ext/Module/Pluggable/lib/Devel/InnerPackage.pm#1~33499~        
2008-03-12 12:32:09.000000000 -0700
+++ perl/ext/Module/Pluggable/lib/Devel/InnerPackage.pm 2008-03-13 
06:02:05.000000000 -0700
@@ -17,7 +17,7 @@
 =head1 SYNOPSIS
 
     use Foo::Bar;
-    use Devel::innerPackage qw(list_packages);
+    use Devel::InnerPackage qw(list_packages);
 
     my @inner_packages = list_packages('Foo::Bar');
 
@@ -75,7 +75,7 @@
                     !__PACKAGE__->_loaded($pack.$cand); # or @children;
                 push @packs, @children;
             }
-            return grep {$_ !~ /::::ISA::CACHE/} @packs;
+            return grep {$_ !~ /::(::ISA::CACHE|SUPER)/} @packs;
 }
 
 ### XXX this is an inlining of the Class-Inspector->loaded()

==== //depot/perl/ext/Module/Pluggable/lib/Module/Pluggable.pm#2 (text) ====
Index: perl/ext/Module/Pluggable/lib/Module/Pluggable.pm
--- perl/ext/Module/Pluggable/lib/Module/Pluggable.pm#1~33499~  2008-03-12 
12:32:09.000000000 -0700
+++ perl/ext/Module/Pluggable/lib/Module/Pluggable.pm   2008-03-13 
06:02:05.000000000 -0700
@@ -9,7 +9,7 @@
 # Peter Gibbons: I wouldn't say I've been missing it, Bob! 
 
 
-$VERSION = '3.6';
+$VERSION = '3.7';
 
 sub import {
     my $class        = shift;
@@ -60,8 +60,9 @@
 
 
     no strict 'refs';
-    no warnings 'redefine';
-    *{"$package\::$sub"}    = $subroutine;
+    no warnings qw(redefine prototype);
+    
+    *{"$package\::$sub"}        = $subroutine;
     *{"$package\::search_path"} = $searchsub;
     *{"$package\::only"}        = $onlysub;
     *{"$package\::except"}      = $exceptsub;
@@ -297,6 +298,14 @@
 
     file_regex => qr/\.plugin$/
 
+=head2 include_editor_junk
+
+By default C<Module::Pluggable> ignores files that look like they were
+left behind by editors. Currently this means files ending in F<~> (~),
+the extensions F<.swp> or F<.swo>, or files beginning with F<.#>.
+
+Setting C<include_editor_junk> changes C<Module::Pluggable> so it does
+not ignore any files it finds.
 
 
 =head1 METHODs

==== //depot/perl/ext/Module/Pluggable/lib/Module/Pluggable/Object.pm#2 (text) 
====
Index: perl/ext/Module/Pluggable/lib/Module/Pluggable/Object.pm
--- perl/ext/Module/Pluggable/lib/Module/Pluggable/Object.pm#1~33499~   
2008-03-12 12:32:09.000000000 -0700
+++ perl/ext/Module/Pluggable/lib/Module/Pluggable/Object.pm    2008-03-13 
06:02:05.000000000 -0700
@@ -20,6 +20,10 @@
 
 }
 
+### Eugggh, this code smells 
+### This is what happens when you keep adding patches
+### *sigh*
+
 
 sub plugins {
         my $self = shift;
@@ -46,7 +50,7 @@
 
 
         # check to see if we're running under test
-        my @SEARCHDIR = exists $INC{"blib.pm"} && $filename =~ m!(^|/)blib/! ? 
grep {/blib/} @INC : @INC;
+        my @SEARCHDIR = exists $INC{"blib.pm"} && defined $filename && 
$filename =~ m!(^|/)blib/! ? grep {/blib/} @INC : @INC;
 
         # add any search_dir params
         unshift @SEARCHDIR, @{$self->{'search_dirs'}} if defined 
$self->{'search_dirs'};
@@ -151,6 +155,8 @@
             # parse the file to get the name
             my ($name, $directory, $suffix) = fileparse($file, $file_regex);
 
+            next if (!$self->{include_editor_junk} && 
$self->_is_editor_junk($name));
+
             $directory = abs2rel($directory, $sp);
 
             # If we have a mixed-case package name, assume case has been 
preserved
@@ -209,6 +215,22 @@
     return @plugins;
 }
 
+sub _is_editor_junk {
+    my $self = shift;
+    my $name = shift;
+
+    # Emacs (and other Unix-y editors) leave temp files ending in a
+    # tilde as a backup.
+    return 1 if $name =~ /~$/;
+    # Emacs makes these files while a buffer is edited but not yet
+    # saved.
+    return 1 if $name =~ /^\.#/;
+    # Vim can leave these files behind if it crashes.
+    return 1 if $name =~ /\.sw[po]$/;
+
+    return 0;
+}
+
 sub handle_finding_plugin {
     my $self   = shift;
     my $plugin = shift;
@@ -299,6 +321,14 @@
 
 Optionally it instantiates those classes for you.
 
+This object is wrapped by C<Module::Pluggable>. If you want to do something
+odd or add non-general special features you're probably best to wrap this
+and produce your own subclass.
+
+=head1 OPTIONS
+
+See the C<Module::Pluggable> docs.
+
 =head1 AUTHOR
 
 Simon Wistow <[EMAIL PROTECTED]>

==== //depot/perl/t/Module_Pluggable/02alsoworks.t#2 (text) ====
Index: perl/t/Module_Pluggable/02alsoworks.t
--- perl/t/Module_Pluggable/02alsoworks.t#1~31019~      2007-04-22 
07:34:28.000000000 -0700
+++ perl/t/Module_Pluggable/02alsoworks.t       2008-03-13 06:02:05.000000000 
-0700
@@ -2,7 +2,7 @@
 
 use strict;
 use FindBin;
-use lib "$FindBin::Bin/lib";
+use lib (($FindBin::Bin."/lib")=~/^(.*)$/);
 use Test::More tests => 5;
 
 my $foo;

==== //depot/perl/t/Module_Pluggable/02works.t#2 (text) ====
Index: perl/t/Module_Pluggable/02works.t
--- perl/t/Module_Pluggable/02works.t#1~31019~  2007-04-22 07:34:28.000000000 
-0700
+++ perl/t/Module_Pluggable/02works.t   2008-03-13 06:02:05.000000000 -0700
@@ -2,7 +2,7 @@
 
 use strict;
 use FindBin;
-use lib "$FindBin::Bin/lib";
+use lib (($FindBin::Bin."/lib")=~/^(.*)$/);
 use Test::More tests => 5;
 
 my $foo;

==== //depot/perl/t/Module_Pluggable/03diffname.t#2 (text) ====
Index: perl/t/Module_Pluggable/03diffname.t
--- perl/t/Module_Pluggable/03diffname.t#1~31019~       2007-04-22 
07:34:28.000000000 -0700
+++ perl/t/Module_Pluggable/03diffname.t        2008-03-13 06:02:05.000000000 
-0700
@@ -2,7 +2,7 @@
 
 use strict;
 use FindBin;
-use lib "$FindBin::Bin/lib";
+use lib (($FindBin::Bin."/lib")=~/^(.*)$/);
 use Test::More tests => 3;
 
 my $foo;

==== //depot/perl/t/Module_Pluggable/04acmedir.t#2 (text) ====
Index: perl/t/Module_Pluggable/04acmedir.t
--- perl/t/Module_Pluggable/04acmedir.t#1~31019~        2007-04-22 
07:34:28.000000000 -0700
+++ perl/t/Module_Pluggable/04acmedir.t 2008-03-13 06:02:05.000000000 -0700
@@ -2,7 +2,7 @@
 
 use strict;
 use FindBin;
-use lib "$FindBin::Bin/lib";
+use lib (($FindBin::Bin."/lib")=~/^(.*)$/);
 use Test::More tests => 3;
 
 

==== //depot/perl/t/Module_Pluggable/04acmedir_single.t#2 (text) ====
Index: perl/t/Module_Pluggable/04acmedir_single.t
--- perl/t/Module_Pluggable/04acmedir_single.t#1~31019~ 2007-04-22 
07:34:28.000000000 -0700
+++ perl/t/Module_Pluggable/04acmedir_single.t  2008-03-13 06:02:05.000000000 
-0700
@@ -2,7 +2,7 @@
 
 use strict;
 use FindBin;
-use lib "$FindBin::Bin/lib";
+use lib (($FindBin::Bin."/lib")=~/^(.*)$/);
 use Test::More tests => 3;
 
 

==== //depot/perl/t/Module_Pluggable/04acmepath.t#2 (text) ====
Index: perl/t/Module_Pluggable/04acmepath.t
--- perl/t/Module_Pluggable/04acmepath.t#1~31019~       2007-04-22 
07:34:28.000000000 -0700
+++ perl/t/Module_Pluggable/04acmepath.t        2008-03-13 06:02:05.000000000 
-0700
@@ -2,7 +2,7 @@
 
 use strict;
 use FindBin;
-use lib "$FindBin::Bin/lib";
+use lib (($FindBin::Bin."/lib")=~/^(.*)$/);
 use Test::More tests => 3;
 
 

==== //depot/perl/t/Module_Pluggable/04acmepath_single.t#2 (text) ====
Index: perl/t/Module_Pluggable/04acmepath_single.t
--- perl/t/Module_Pluggable/04acmepath_single.t#1~31019~        2007-04-22 
07:34:28.000000000 -0700
+++ perl/t/Module_Pluggable/04acmepath_single.t 2008-03-13 06:02:05.000000000 
-0700
@@ -2,7 +2,7 @@
 
 use strict;
 use FindBin;
-use lib "$FindBin::Bin/lib";
+use lib (($FindBin::Bin."/lib")=~/^(.*)$/);
 use Test::More tests => 3;
 
 

==== //depot/perl/t/Module_Pluggable/05postpath.t#2 (text) ====
Index: perl/t/Module_Pluggable/05postpath.t
--- perl/t/Module_Pluggable/05postpath.t#1~31019~       2007-04-22 
07:34:28.000000000 -0700
+++ perl/t/Module_Pluggable/05postpath.t        2008-03-13 06:02:05.000000000 
-0700
@@ -2,7 +2,7 @@
 
 use strict;
 use FindBin;
-use lib "$FindBin::Bin/lib";
+use lib (($FindBin::Bin."/lib")=~/^(.*)$/);
 use Test::More tests => 3;
 
 

==== //depot/perl/t/Module_Pluggable/06multipath.t#2 (text) ====
Index: perl/t/Module_Pluggable/06multipath.t
--- perl/t/Module_Pluggable/06multipath.t#1~31019~      2007-04-22 
07:34:28.000000000 -0700
+++ perl/t/Module_Pluggable/06multipath.t       2008-03-13 06:02:05.000000000 
-0700
@@ -2,7 +2,7 @@
 
 use strict;
 use FindBin;
-use lib "$FindBin::Bin/lib";
+use lib (($FindBin::Bin."/lib")=~/^(.*)$/);
 use Test::More tests => 3;
 
 

==== //depot/perl/t/Module_Pluggable/07instantiate.t#2 (text) ====
Index: perl/t/Module_Pluggable/07instantiate.t
--- perl/t/Module_Pluggable/07instantiate.t#1~31019~    2007-04-22 
07:34:28.000000000 -0700
+++ perl/t/Module_Pluggable/07instantiate.t     2008-03-13 06:02:05.000000000 
-0700
@@ -2,7 +2,7 @@
 
 use strict;
 use FindBin;
-use lib "$FindBin::Bin/lib";
+use lib (($FindBin::Bin."/lib")=~/^(.*)$/);
 use Test::More tests => 6;
 
 my $foo;
@@ -26,7 +26,7 @@
 use File::Spec::Functions qw(catdir);
 use strict;
 use FindBin;
-use lib "$FindBin::Bin/lib";
+use lib (($FindBin::Bin."/lib")=~/^(.*)$/);
 use Module::Pluggable (search_path => ["MyTest::Extend::Plugin"], sub_name => 
'booga', instantiate => 'new');
 use Module::Pluggable (search_path => ["MyTest::Extend::Plugin"], sub_name => 
'wooga', instantiate => 'nosomuchmethod');
 

==== //depot/perl/t/Module_Pluggable/08nothing.t#2 (text) ====
Index: perl/t/Module_Pluggable/08nothing.t
--- perl/t/Module_Pluggable/08nothing.t#1~31019~        2007-04-22 
07:34:28.000000000 -0700
+++ perl/t/Module_Pluggable/08nothing.t 2008-03-13 06:02:05.000000000 -0700
@@ -2,7 +2,7 @@
 
 use strict;
 use FindBin;
-use lib "$FindBin::Bin/lib";
+use lib (($FindBin::Bin."/lib")=~/^(.*)$/);
 use Test::More tests => 2;
 
 

==== //depot/perl/t/Module_Pluggable/09require.t#2 (text) ====
Index: perl/t/Module_Pluggable/09require.t
--- perl/t/Module_Pluggable/09require.t#1~31019~        2007-04-22 
07:34:28.000000000 -0700
+++ perl/t/Module_Pluggable/09require.t 2008-03-13 06:02:05.000000000 -0700
@@ -2,7 +2,7 @@
 
 use strict;
 use FindBin;
-use lib "$FindBin::Bin/lib";
+use lib (($FindBin::Bin."/lib")=~/^(.*)$/);
 use Test::More tests => 2;
 
 my $t = MyTest->new();

==== //depot/perl/t/Module_Pluggable/10innerpack.t#2 (text) ====
Index: perl/t/Module_Pluggable/10innerpack.t
--- perl/t/Module_Pluggable/10innerpack.t#1~31019~      2007-04-22 
07:34:28.000000000 -0700
+++ perl/t/Module_Pluggable/10innerpack.t       2008-03-13 06:02:05.000000000 
-0700
@@ -2,7 +2,7 @@
 
 use strict;
 use FindBin;
-use lib "$FindBin::Bin/lib";
+use lib (($FindBin::Bin."/lib")=~/^(.*)$/);
 use Test::More tests => 4;
 
 

==== //depot/perl/t/Module_Pluggable/10innerpack_inner.t#2 (text) ====
Index: perl/t/Module_Pluggable/10innerpack_inner.t
--- perl/t/Module_Pluggable/10innerpack_inner.t#1~31019~        2007-04-22 
07:34:28.000000000 -0700
+++ perl/t/Module_Pluggable/10innerpack_inner.t 2008-03-13 06:02:05.000000000 
-0700
@@ -2,7 +2,7 @@
 
 use strict;
 use FindBin;
-use lib "$FindBin::Bin/lib";
+use lib (($FindBin::Bin."/lib")=~/^(.*)$/);
 use Test::More tests => 3;
 
 

==== //depot/perl/t/Module_Pluggable/10innerpack_noinner.t#2 (text) ====
Index: perl/t/Module_Pluggable/10innerpack_noinner.t
--- perl/t/Module_Pluggable/10innerpack_noinner.t#1~31019~      2007-04-22 
07:34:28.000000000 -0700
+++ perl/t/Module_Pluggable/10innerpack_noinner.t       2008-03-13 
06:02:05.000000000 -0700
@@ -2,7 +2,7 @@
 
 use strict;
 use FindBin;
-use lib "$FindBin::Bin/lib";
+use lib (($FindBin::Bin."/lib")=~/^(.*)$/);
 use Test::More tests => 3;
 
 

==== //depot/perl/t/Module_Pluggable/10innerpack_override.t#2 (text) ====
Index: perl/t/Module_Pluggable/10innerpack_override.t
--- perl/t/Module_Pluggable/10innerpack_override.t#1~31019~     2007-04-22 
07:34:28.000000000 -0700
+++ perl/t/Module_Pluggable/10innerpack_override.t      2008-03-13 
06:02:05.000000000 -0700
@@ -2,7 +2,7 @@
 
 use strict;
 use FindBin;
-use lib "$FindBin::Bin/lib";
+use lib (($FindBin::Bin."/lib")=~/^(.*)$/);
 use Test::More tests => 3;
 
 

==== //depot/perl/t/Module_Pluggable/10innerpack_super.t#1 (text) ====
Index: perl/t/Module_Pluggable/10innerpack_super.t
--- /dev/null   2008-03-12 08:50:16.603989457 -0700
+++ perl/t/Module_Pluggable/10innerpack_super.t 2008-03-13 06:02:05.000000000 
-0700
@@ -0,0 +1,29 @@
+#!perl -wT
+
+use Test::More tests => 3;
+use strict;
+use_ok('Devel::InnerPackage');
+Bar->whee;
+is_deeply([Devel::InnerPackage::list_packages("Bar")],[], "Don't pick up 
::SUPER pseudo stash"); 
+is_deeply([Devel::InnerPackage::list_packages("Foo")],['Foo::Bar'], "Still 
pick up other inner package");
+
+package Foo;
+
+sub whee {
+    1;
+}
+
+package Foo::Bar;
+
+sub whee {}
+
+package Bar;
+use base 'Foo';
+
+sub whee {
+    shift->SUPER::whee;
+    2;
+}
+
+
+1;

==== //depot/perl/t/Module_Pluggable/11usetwice.t#2 (text) ====
Index: perl/t/Module_Pluggable/11usetwice.t
--- perl/t/Module_Pluggable/11usetwice.t#1~31019~       2007-04-22 
07:34:28.000000000 -0700
+++ perl/t/Module_Pluggable/11usetwice.t        2008-03-13 06:02:05.000000000 
-0700
@@ -2,7 +2,7 @@
 
 use strict;
 use FindBin;
-use lib "$FindBin::Bin/lib";
+use lib (($FindBin::Bin."/lib")=~/^(.*)$/);
 use Test::More tests => 3;
 
 my $foo;

==== //depot/perl/t/Module_Pluggable/12only.t#2 (text) ====
Index: perl/t/Module_Pluggable/12only.t
--- perl/t/Module_Pluggable/12only.t#1~31019~   2007-04-22 07:34:28.000000000 
-0700
+++ perl/t/Module_Pluggable/12only.t    2008-03-13 06:02:05.000000000 -0700
@@ -2,7 +2,7 @@
 
 use strict;
 use FindBin;
-use lib "$FindBin::Bin/lib";
+use lib (($FindBin::Bin."/lib")=~/^(.*)$/);
 use Test::More tests => 10;
 
 {

==== //depot/perl/t/Module_Pluggable/12onlyarray.t#2 (text) ====
Index: perl/t/Module_Pluggable/12onlyarray.t
--- perl/t/Module_Pluggable/12onlyarray.t#1~31019~      2007-04-22 
07:34:28.000000000 -0700
+++ perl/t/Module_Pluggable/12onlyarray.t       2008-03-13 06:02:05.000000000 
-0700
@@ -2,7 +2,7 @@
 
 use strict;
 use FindBin;
-use lib "$FindBin::Bin/lib";
+use lib (($FindBin::Bin."/lib")=~/^(.*)$/);
 use Test::More tests => 10;
 
 {

==== //depot/perl/t/Module_Pluggable/12onlyregex.t#2 (text) ====
Index: perl/t/Module_Pluggable/12onlyregex.t
--- perl/t/Module_Pluggable/12onlyregex.t#1~31019~      2007-04-22 
07:34:28.000000000 -0700
+++ perl/t/Module_Pluggable/12onlyregex.t       2008-03-13 06:02:05.000000000 
-0700
@@ -2,7 +2,7 @@
 
 use strict;
 use FindBin;
-use lib "$FindBin::Bin/lib";
+use lib (($FindBin::Bin."/lib")=~/^(.*)$/);
 use Test::More tests => 10;
 
 {

==== //depot/perl/t/Module_Pluggable/13except.t#2 (text) ====
Index: perl/t/Module_Pluggable/13except.t
--- perl/t/Module_Pluggable/13except.t#1~31019~ 2007-04-22 07:34:28.000000000 
-0700
+++ perl/t/Module_Pluggable/13except.t  2008-03-13 06:02:05.000000000 -0700
@@ -2,7 +2,7 @@
 
 use strict;
 use FindBin;
-use lib "$FindBin::Bin/lib";
+use lib (($FindBin::Bin."/lib")=~/^(.*)$/);
 use Test::More tests => 10;
 
 {

==== //depot/perl/t/Module_Pluggable/13exceptarray.t#2 (text) ====
Index: perl/t/Module_Pluggable/13exceptarray.t
--- perl/t/Module_Pluggable/13exceptarray.t#1~31019~    2007-04-22 
07:34:28.000000000 -0700
+++ perl/t/Module_Pluggable/13exceptarray.t     2008-03-13 06:02:05.000000000 
-0700
@@ -1,8 +1,8 @@
-#!perl -w
+#!perl -wT
 
 use strict;
 use FindBin;
-use lib "$FindBin::Bin/lib";
+use lib (($FindBin::Bin."/lib")=~/^(.*)$/);
 use Test::More tests => 10;
 
 {

==== //depot/perl/t/Module_Pluggable/13exceptregex.t#2 (text) ====
Index: perl/t/Module_Pluggable/13exceptregex.t
--- perl/t/Module_Pluggable/13exceptregex.t#1~31019~    2007-04-22 
07:34:28.000000000 -0700
+++ perl/t/Module_Pluggable/13exceptregex.t     2008-03-13 06:02:05.000000000 
-0700
@@ -1,8 +1,8 @@
-#!perl -w
+#!perl -wT
 
 use strict;
 use FindBin;
-use lib "$FindBin::Bin/lib";
+use lib (($FindBin::Bin."/lib")=~/^(.*)$/);
 use Test::More tests => 10;
 
 {

==== //depot/perl/t/Module_Pluggable/14package.t#2 (text) ====
Index: perl/t/Module_Pluggable/14package.t
--- perl/t/Module_Pluggable/14package.t#1~31019~        2007-04-22 
07:34:28.000000000 -0700
+++ perl/t/Module_Pluggable/14package.t 2008-03-13 06:02:05.000000000 -0700
@@ -2,7 +2,7 @@
 
 use strict;
 use FindBin;
-use lib "$FindBin::Bin/lib";
+use lib (($FindBin::Bin."/lib")=~/^(.*)$/);
 use Test::More tests => 5;
 
 my $foo;

==== //depot/perl/t/Module_Pluggable/15topicsafe.t#2 (text) ====
Index: perl/t/Module_Pluggable/15topicsafe.t
--- perl/t/Module_Pluggable/15topicsafe.t#1~31019~      2007-04-22 
07:34:28.000000000 -0700
+++ perl/t/Module_Pluggable/15topicsafe.t       2008-03-13 06:02:05.000000000 
-0700
@@ -2,7 +2,7 @@
 
 use strict;
 use FindBin;
-use lib "$FindBin::Bin/lib";
+use lib (($FindBin::Bin."/lib")=~/^(.*)$/);
 use Test::More 'no_plan';
 
 use Module::Pluggable search_path => 'Acme::MyTest';

==== //depot/perl/t/Module_Pluggable/16different_extension.t#2 (text) ====
Index: perl/t/Module_Pluggable/16different_extension.t
--- perl/t/Module_Pluggable/16different_extension.t#1~31019~    2007-04-22 
07:34:28.000000000 -0700
+++ perl/t/Module_Pluggable/16different_extension.t     2008-03-13 
06:02:05.000000000 -0700
@@ -2,7 +2,7 @@
 
 use strict;
 use FindBin;
-use lib "$FindBin::Bin/lib";
+use lib (($FindBin::Bin."/lib")=~/^(.*)$/);
 use Test::More tests => 5;
 
 my $foo;

==== //depot/perl/t/Module_Pluggable/17devel_inner_package.t#2 (text) ====
Index: perl/t/Module_Pluggable/17devel_inner_package.t
--- perl/t/Module_Pluggable/17devel_inner_package.t#1~31019~    2007-04-22 
07:34:28.000000000 -0700
+++ perl/t/Module_Pluggable/17devel_inner_package.t     2008-03-13 
06:02:05.000000000 -0700
@@ -3,7 +3,7 @@
 
 use Devel::InnerPackage qw(list_packages);
 use FindBin;
-use lib "$FindBin::Bin/lib";
+use lib (($FindBin::Bin."/lib")=~/^(.*)$/);
 
 my @packages;
 

==== //depot/perl/t/Module_Pluggable/18skipped_package.t#2 (text) ====
Index: perl/t/Module_Pluggable/18skipped_package.t
--- perl/t/Module_Pluggable/18skipped_package.t#1~31019~        2007-04-22 
07:34:28.000000000 -0700
+++ perl/t/Module_Pluggable/18skipped_package.t 2008-03-13 06:02:05.000000000 
-0700
@@ -2,7 +2,7 @@
 
 use Test::More tests => 1;
 use FindBin;
-use lib "$FindBin::Bin/lib";
+use lib (($FindBin::Bin."/lib")=~/^(.*)$/);
 
 use Devel::InnerPackage qw(list_packages);
 use No::Middle;

==== //depot/perl/t/Module_Pluggable/19can_ok_clobber.t#2 (text) ====
Index: perl/t/Module_Pluggable/19can_ok_clobber.t
--- perl/t/Module_Pluggable/19can_ok_clobber.t#1~31019~ 2007-04-22 
07:34:28.000000000 -0700
+++ perl/t/Module_Pluggable/19can_ok_clobber.t  2008-03-13 06:02:05.000000000 
-0700
@@ -3,7 +3,7 @@
 use warnings;
 use Data::Dumper;
 use FindBin;
-use lib "$FindBin::Bin/lib";
+use lib (($FindBin::Bin."/lib")=~/^(.*)$/);
 
 use Test::More tests=>5;
 

==== //depot/perl/t/Module_Pluggable/20dodgy_files.t#2 (text) ====
Index: perl/t/Module_Pluggable/20dodgy_files.t
--- perl/t/Module_Pluggable/20dodgy_files.t#1~31019~    2007-04-22 
07:34:28.000000000 -0700
+++ perl/t/Module_Pluggable/20dodgy_files.t     2008-03-13 06:02:05.000000000 
-0700
@@ -1,7 +1,7 @@
 #!perl -w
 
 BEGIN {
-    if ($^O eq 'VMS') {
+    if ($^O eq 'VMS' || $^O eq 'VOS') {
         print "1..0 # Skip: can't handle misspelled plugin names\n";
         exit;
     }
@@ -9,8 +9,18 @@
 
 use strict;
 use FindBin;
-use lib "$FindBin::Bin/lib";
-use Test::More tests => 5;
+use Test::More;
+use lib (($FindBin::Bin."/lib")=~/^(.*)$/);
+use File::Spec::Functions qw(catfile);
+
+
+my ($dodgy_file) = (catfile($FindBin::Bin, "lib", "OddTest", "Plugin", 
"-Dodgy.pm")=~/^(.*)$/);
+unless (-f $dodgy_file) {
+        plan skip_all => "Can't handle misspelled plugin names\n";
+} else {
+        plan tests => 5;
+}
+
 
 my $foo;
 ok($foo = OddTest->new());

==== //depot/perl/t/Module_Pluggable/21editor_junk.t#1 (text) ====
Index: perl/t/Module_Pluggable/21editor_junk.t
--- /dev/null   2008-03-12 08:50:16.603989457 -0700
+++ perl/t/Module_Pluggable/21editor_junk.t     2008-03-13 06:02:05.000000000 
-0700
@@ -0,0 +1,53 @@
+#!perl -w
+
+use Test::More;
+use FindBin;
+use lib (($FindBin::Bin."/lib")=~/^(.*)$/);
+use Module::Pluggable::Object;
+use File::Spec::Functions qw(catfile);
+
+my ($dodgy_file) = (catfile($FindBin::Bin,"lib", "EditorJunk", "Plugin", 
"#Bar.pm#")=~/^(.*)$/);
+unless (-f $dodgy_file) {
+        plan skip_all => "Can't handle plugin names with octothorpes\n";
+} else {
+        plan tests => 4;
+}
+
+
+
+my $foo;
+ok($foo = EditorJunk->new());
+
+my @plugins;
+my @expected = qw(EditorJunk::Plugin::Bar EditorJunk::Plugin::Foo);
+ok(@plugins = sort $foo->plugins);
+
+is_deeply([EMAIL PROTECTED], [EMAIL PROTECTED], "is deeply");
+
+
+my $mpo = Module::Pluggable::Object->new(
+    package             => 'EditorJunk',
+    filename            => __FILE__,
+    include_editor_junk => 1,
+);
+
[EMAIL PROTECTED] = ('EditorJunk::Plugin::.#Bar', 'EditorJunk::Plugin::Bar', 
'EditorJunk::Plugin::Foo');
[EMAIL PROTECTED] = sort $mpo->plugins();
+is_deeply([EMAIL PROTECTED], [EMAIL PROTECTED], "is deeply");
+
+
+
+package EditorJunk;
+
+use strict;
+use Module::Pluggable;
+
+
+sub new {
+    my $class = shift;
+    return bless {}, $class;
+
+}
+1;
+
+

==== //depot/perl/t/Module_Pluggable/lib/EditorJunk/Plugin/Bar.pm#1 (text) ====
Index: perl/t/Module_Pluggable/lib/EditorJunk/Plugin/Bar.pm
--- /dev/null   2008-03-12 08:50:16.603989457 -0700
+++ perl/t/Module_Pluggable/lib/EditorJunk/Plugin/Bar.pm        2008-03-13 
06:02:05.000000000 -0700
@@ -0,0 +1,9 @@
+package EditorJunk::Bar;
+
+
+use strict;
+
+
+1;
+
+

==== //depot/perl/t/Module_Pluggable/lib/EditorJunk/Plugin/Bar.pm.swo#1 (text) 
====
Index: perl/t/Module_Pluggable/lib/EditorJunk/Plugin/Bar.pm.swo
--- /dev/null   2008-03-12 08:50:16.603989457 -0700
+++ perl/t/Module_Pluggable/lib/EditorJunk/Plugin/Bar.pm.swo    2008-03-13 
06:02:05.000000000 -0700
@@ -0,0 +1,9 @@
+package EditorJunk::Bar;
+
+
+use strict;
+
+
+1;
+
+

==== //depot/perl/t/Module_Pluggable/lib/EditorJunk/Plugin/Bar.pm.swp#1 (text) 
====
Index: perl/t/Module_Pluggable/lib/EditorJunk/Plugin/Bar.pm.swp
--- /dev/null   2008-03-12 08:50:16.603989457 -0700
+++ perl/t/Module_Pluggable/lib/EditorJunk/Plugin/Bar.pm.swp    2008-03-13 
06:02:05.000000000 -0700
@@ -0,0 +1,9 @@
+package EditorJunk::Bar;
+
+
+use strict;
+
+
+1;
+
+

==== //depot/perl/t/Module_Pluggable/lib/EditorJunk/Plugin/Bar.pm~#1 (text) ====
Index: perl/t/Module_Pluggable/lib/EditorJunk/Plugin/Bar.pm~
--- /dev/null   2008-03-12 08:50:16.603989457 -0700
+++ perl/t/Module_Pluggable/lib/EditorJunk/Plugin/Bar.pm~       2008-03-13 
06:02:05.000000000 -0700
@@ -0,0 +1,9 @@
+package EditorJunk::Bar;
+
+
+use strict;
+
+
+1;
+
+

==== //depot/perl/t/Module_Pluggable/lib/EditorJunk/Plugin/Foo.pm#1 (text) ====
Index: perl/t/Module_Pluggable/lib/EditorJunk/Plugin/Foo.pm
--- /dev/null   2008-03-12 08:50:16.603989457 -0700
+++ perl/t/Module_Pluggable/lib/EditorJunk/Plugin/Foo.pm        2008-03-13 
06:02:05.000000000 -0700
@@ -0,0 +1,9 @@
+package EditorJunk::Foo;
+
+
+use strict;
+
+
+1;
+
+
End of Patch.

Reply via email to