Hello community,

here is the log from the commit of package perl-Module-Pluggable for 
openSUSE:Factory checked in at 2015-08-10 09:16:33
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/perl-Module-Pluggable (Old)
 and      /work/SRC/openSUSE:Factory/.perl-Module-Pluggable.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "perl-Module-Pluggable"

Changes:
--------
--- 
/work/SRC/openSUSE:Factory/perl-Module-Pluggable/perl-Module-Pluggable.changes  
    2015-07-03 00:13:15.000000000 +0200
+++ 
/work/SRC/openSUSE:Factory/.perl-Module-Pluggable.new/perl-Module-Pluggable.changes
 2015-08-10 09:16:34.000000000 +0200
@@ -1,0 +2,10 @@
+Sat Aug  8 08:48:49 UTC 2015 - [email protected]
+
+- updated to 5.2
+   see /usr/share/doc/packages/perl-Module-Pluggable/Changes
+
+  2015-08-05 - 5.2
+      Use Module::Runtime if it's installed (thanks to Olivier Mengué)
+      Switch to using ExtUtils::MakeMaker (thanks to Karen Etheridge and Tim 
Orling)
+
+-------------------------------------------------------------------

Old:
----
  Module-Pluggable-5.1.tar.gz

New:
----
  Module-Pluggable-5.2.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ perl-Module-Pluggable.spec ++++++
--- /var/tmp/diff_new_pack.N3wA1B/_old  2015-08-10 09:16:35.000000000 +0200
+++ /var/tmp/diff_new_pack.N3wA1B/_new  2015-08-10 09:16:35.000000000 +0200
@@ -17,7 +17,7 @@
 
 
 Name:           perl-Module-Pluggable
-Version:        5.1
+Version:        5.2
 Release:        0
 %define cpan_name Module-Pluggable
 Summary:        Automatically Give Your Module the Ability to Have Plugins
@@ -30,7 +30,7 @@
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build
 BuildRequires:  perl
 BuildRequires:  perl-macros
-BuildRequires:  perl(Module::Build) >= 0.380000
+Recommends:     perl(Module::Runtime) >= 0.012
 %{perl_requires}
 
 %description
@@ -48,14 +48,15 @@
 find . -type f -print0 | xargs -0 chmod 644
 
 %build
-%{__perl} Build.PL installdirs=vendor
-./Build build flags=%{?_smp_mflags}
+%{__perl} Makefile.PL INSTALLDIRS=vendor
+%{__make} %{?_smp_mflags}
 
 %check
-./Build test
+%{__make} test
 
 %install
-./Build install destdir=%{buildroot} create_packlist=0
+%perl_make_install
+%perl_process_packlist
 %perl_gen_filelist
 
 %files -f %{name}.files

++++++ Module-Pluggable-5.1.tar.gz -> Module-Pluggable-5.2.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Module-Pluggable-5.1/Build.PL 
new/Module-Pluggable-5.2/Build.PL
--- old/Module-Pluggable-5.1/Build.PL   2014-01-06 08:41:06.000000000 +0100
+++ new/Module-Pluggable-5.2/Build.PL   1970-01-01 01:00:00.000000000 +0100
@@ -1,58 +0,0 @@
-use strict;
-use Module::Build;
-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;
-unless (grep { lc($^O) eq $_ } qw(vms vos)) {
-    foreach my $test (keys %dodgy_files) {
-        my ($file) = (catfile(@path, "lib", $test)=~/^(.*)$/);
-        if (open(FH, ">$file")) {
-            my $name = $dodgy_files{$test};
-            print FH "package $name;\nsub new {}\n1;";
-            close(FH);
-            push @files, $file;
-        }
-    }
-}
-
-my $build = Module::Build
-  ->new( module_name => "Module::Pluggable",
-         license     => 'perl',
-         requires    => {
-             'if'              => '0',
-             'File::Basename'  => '0',
-             'File::Spec'      => '3.00',
-         },
-         configure_requires => {
-              'Module::Build'  => '0.38', 
-         },
-         build_requires => {
-             'Test::More'      => '0.62',
-         },
-         create_makefile_pl    => 'small',
-         installdirs           => ((($] >= 5.008009) && ($] < 5.011)) ? 'core' 
: 'site'),
-         meta_merge     => {
-           resources => {
-             repository  => 'https://github.com/simonwistow/Module-Pluggable',
-           }
-         },
-       );
-
-$build->add_to_cleanup(@files);
-$build->build_elements([grep { $_ ne 'pod' } @{$build->build_elements}]) if 
$core;
-$build->create_build_script;
-
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Module-Pluggable-5.1/Changes 
new/Module-Pluggable-5.2/Changes
--- old/Module-Pluggable-5.1/Changes    2014-01-06 08:41:06.000000000 +0100
+++ new/Module-Pluggable-5.2/Changes    2015-08-06 01:31:40.000000000 +0200
@@ -1,3 +1,7 @@
+2015-08-05 - 5.2
+    Use Module::Runtime if it's installed (thanks to Olivier Mengué)
+    Switch to using ExtUtils::MakeMaker (thanks to Karen Etheridge and Tim 
Orling)
+
 2014-01-05 - 5.1
     Add in missing files left out of the MANIFEST due to stupidity (thanks to 
Petr Pisar)
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Module-Pluggable-5.1/INSTALL 
new/Module-Pluggable-5.2/INSTALL
--- old/Module-Pluggable-5.1/INSTALL    2014-01-06 08:41:06.000000000 +0100
+++ new/Module-Pluggable-5.2/INSTALL    2015-08-06 01:31:18.000000000 +0200
@@ -1,9 +1,8 @@
 
 Same as practically every other Perl module ...
 
-        % perl Build.PL
-        % ./Build
-        % ./Build test
-        % sudo ./Build install
-
+        % perl Makefile.PL
+        % make
+        % make test
+        % sudo make install
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Module-Pluggable-5.1/MANIFEST 
new/Module-Pluggable-5.2/MANIFEST
--- old/Module-Pluggable-5.1/MANIFEST   2014-01-06 08:41:06.000000000 +0100
+++ new/Module-Pluggable-5.2/MANIFEST   2015-08-06 01:31:18.000000000 +0200
@@ -1,4 +1,3 @@
-Build.PL
 Changes
 INSTALL
 lib/Devel/InnerPackage.pm
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Module-Pluggable-5.1/META.json 
new/Module-Pluggable-5.2/META.json
--- old/Module-Pluggable-5.1/META.json  2014-01-06 08:41:06.000000000 +0100
+++ new/Module-Pluggable-5.2/META.json  2015-08-06 01:32:15.000000000 +0200
@@ -3,8 +3,8 @@
    "author" : [
       "Simon Wistow <[email protected]>"
    ],
-   "dynamic_config" : 1,
-   "generated_by" : "Module::Build version 0.4007, CPAN::Meta::Converter 
version 2.120351",
+   "dynamic_config" : 0,
+   "generated_by" : "ExtUtils::MakeMaker version 7.04, CPAN::Meta::Converter 
version 2.150005",
    "license" : [
       "perl_5"
    ],
@@ -13,47 +13,82 @@
       "version" : "2"
    },
    "name" : "Module-Pluggable",
+   "no_index" : {
+      "directory" : [
+         "t",
+         "inc"
+      ]
+   },
+   "optional_features" : {
+      "module_runtime" : {
+         "description" : "Optionally use Module::Runtime for requiring plugins 
rather than homegrown system",
+         "prereqs" : {
+            "runtime" : {
+               "requires" : {
+                  "Module::Runtime" : "0.012"
+               }
+            }
+         }
+      }
+   },
    "prereqs" : {
       "build" : {
          "requires" : {
-            "Test::More" : "0.62"
+            "ExtUtils::MakeMaker" : "0"
          }
       },
       "configure" : {
          "requires" : {
-            "Module::Build" : "0.38"
+            "ExtUtils::MakeMaker" : "0"
          }
       },
       "runtime" : {
+         "recommends" : {
+            "Module::Runtime" : "0.012"
+         },
          "requires" : {
+            "Exporter" : "5.57",
             "File::Basename" : "0",
+            "File::Find" : "0",
             "File::Spec" : "3.00",
-            "if" : "0"
+            "File::Spec::Functions" : "0",
+            "if" : "0",
+            "perl" : "5.00503",
+            "strict" : "0"
          }
-      }
-   },
-   "provides" : {
-      "Devel::InnerPackage" : {
-         "file" : "lib/Devel/InnerPackage.pm",
-         "version" : "0.4"
-      },
-      "Module::Pluggable" : {
-         "file" : "lib/Module/Pluggable.pm",
-         "version" : "5.1"
       },
-      "Module::Pluggable::Object" : {
-         "file" : "lib/Module/Pluggable/Object.pm",
-         "version" : "5.1"
+      "test" : {
+         "requires" : {
+            "Cwd" : "0",
+            "Data::Dumper" : "0",
+            "File::Copy" : "0",
+            "File::Find" : "0",
+            "File::Path" : "0",
+            "File::Spec::Functions" : "0",
+            "File::Temp" : "0",
+            "FindBin" : "0",
+            "Test::More" : "0",
+            "base" : "0",
+            "strict" : "0",
+            "warnings" : "0"
+         },
+         "suggests" : {
+            "App::Fatpacker" : "0.010000"
+         }
       }
    },
    "release_status" : "stable",
    "resources" : {
-      "license" : [
-         "http://dev.perl.org/licenses/";
-      ],
+      "bugtracker" : {
+         "mailto" : "[email protected]",
+         "web" : 
"https://rt.cpan.org/Public/Dist/Display.html?Name=Module-Pluggable";
+      },
       "repository" : {
-         "url" : "https://github.com/simonwistow/Module-Pluggable";
+         "type" : "git",
+         "url" : "https://github.com/simonwistow/Module-Pluggable.git";,
+         "web" : "https://github.com/simonwistow/Module-Pluggable";
       }
    },
-   "version" : "5.1"
+   "version" : "5.2",
+   "x_serialization_backend" : "JSON::PP version 2.27203"
 }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Module-Pluggable-5.1/META.yml 
new/Module-Pluggable-5.2/META.yml
--- old/Module-Pluggable-5.1/META.yml   2014-01-06 08:41:06.000000000 +0100
+++ new/Module-Pluggable-5.2/META.yml   2015-08-06 01:32:15.000000000 +0200
@@ -3,31 +3,50 @@
 author:
   - 'Simon Wistow <[email protected]>'
 build_requires:
-  Test::More: 0.62
+  Cwd: '0'
+  Data::Dumper: '0'
+  ExtUtils::MakeMaker: '0'
+  File::Copy: '0'
+  File::Find: '0'
+  File::Path: '0'
+  File::Spec::Functions: '0'
+  File::Temp: '0'
+  FindBin: '0'
+  Test::More: '0'
+  base: '0'
+  strict: '0'
+  warnings: '0'
 configure_requires:
-  Module::Build: 0.38
-dynamic_config: 1
-generated_by: 'Module::Build version 0.4007, CPAN::Meta::Converter version 
2.120351'
+  ExtUtils::MakeMaker: '0'
+dynamic_config: 0
+generated_by: 'ExtUtils::MakeMaker version 7.04, CPAN::Meta::Converter version 
2.150005'
 license: perl
 meta-spec:
   url: http://module-build.sourceforge.net/META-spec-v1.4.html
-  version: 1.4
+  version: '1.4'
 name: Module-Pluggable
-provides:
-  Devel::InnerPackage:
-    file: lib/Devel/InnerPackage.pm
-    version: 0.4
-  Module::Pluggable:
-    file: lib/Module/Pluggable.pm
-    version: 5.1
-  Module::Pluggable::Object:
-    file: lib/Module/Pluggable/Object.pm
-    version: 5.1
+no_index:
+  directory:
+    - t
+    - inc
+optional_features:
+  module_runtime:
+    description: 'Optionally use Module::Runtime for requiring plugins rather 
than homegrown system'
+    requires:
+      Module::Runtime: '0.012'
+recommends:
+  Module::Runtime: '0.012'
 requires:
-  File::Basename: 0
-  File::Spec: 3.00
-  if: 0
+  Exporter: '5.57'
+  File::Basename: '0'
+  File::Find: '0'
+  File::Spec: '3.00'
+  File::Spec::Functions: '0'
+  if: '0'
+  perl: '5.00503'
+  strict: '0'
 resources:
-  license: http://dev.perl.org/licenses/
-  repository: https://github.com/simonwistow/Module-Pluggable
-version: 5.1
+  bugtracker: 
https://rt.cpan.org/Public/Dist/Display.html?Name=Module-Pluggable
+  repository: https://github.com/simonwistow/Module-Pluggable.git
+version: '5.2'
+x_serialization_backend: 'CPAN::Meta::YAML version 0.016'
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Module-Pluggable-5.1/Makefile.PL 
new/Module-Pluggable-5.2/Makefile.PL
--- old/Module-Pluggable-5.1/Makefile.PL        2014-01-06 08:41:06.000000000 
+0100
+++ new/Module-Pluggable-5.2/Makefile.PL        2015-08-06 01:31:18.000000000 
+0200
@@ -1,6 +1,122 @@
-# Note: this file was auto-generated by Module::Build::Compat version 0.4007
-    use Module::Build::Compat 0.02;
-    
-    Module::Build::Compat->run_build_pl(args => \@ARGV);
-    require Module::Build;
-    Module::Build::Compat->write_makefile(build_class => 'Module::Build');
+use strict;
+use warnings;
+
+use ExtUtils::MakeMaker;
+use File::Spec::Functions qw(catfile);
+
+ExtUtils::MakeMaker->VERSION(6.98) if -f '.gitignore';
+
+# 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('OddTest', 'Plugin', '-Dodgy.pm')   => 'OddTest::Plugin::-Dodgy',
+    catfile('EditorJunk', 'Plugin', '#Bar.pm#') => 'EditorJunk::Bar',
+    catfile('EditorJunk', 'Plugin', '.#Bar.pm') => 'EditorJunk::Bar',
+);
+
+my @files;
+unless (grep { lc($^O) eq $_ } qw(vms vos)) {
+    foreach my $test (keys %dodgy_files) {
+        my ($file) = (catfile("t", "lib", $test)=~/^(.*)$/);
+        if (open(FH, ">$file")) {
+            my $name = $dodgy_files{$test};
+            print FH "package $name;\nsub new {}\n1;";
+            close(FH);
+            push @files, $file;
+        }
+    }
+}
+
+my %WriteMakefileArgs = (
+    NAME                => 'Module::Pluggable',
+    VERSION_FROM        => 'lib/Module/Pluggable.pm',
+    ABSTRACT_FROM       => 'lib/Module/Pluggable.pm',
+    AUTHOR              => 'Simon Wistow <[email protected]>',
+    LICENSE             => 'perl_5',
+    MIN_PERL_VERSION    => '5.00503',
+    INSTALLDIRS         => ($] >= 5.008009 && $] <= 5.011000 ? 'perl' : 
'site'),
+
+    CONFIGURE_REQUIRES => {
+        'ExtUtils::MakeMaker'   => '0',
+    },
+    PREREQ_PM => {
+        'if'                    => '0',
+        'File::Basename'        => '0',
+        'File::Spec'            => '3.00',
+        'Exporter'              => '5.57',  # use Exporter 'import'
+        'File::Find'            => '0',
+        'File::Spec::Functions' => '0',
+        'strict'                => '0',
+    },
+    TEST_REQUIRES => {
+        'Test::More'            => '0',
+        'Cwd'                   => '0',
+        'Data::Dumper'          => '0',
+        'File::Copy'            => '0',
+        'File::Find'            => '0',
+        'File::Path'            => '0',
+        'File::Spec::Functions' => '0',
+        'File::Temp'            => '0',
+        'base'                  => '0',
+        'FindBin'               => '0',
+        'strict'                => '0',
+        'warnings'              => '0',
+    },
+
+    META_MERGE => {
+        'meta-spec' => { version => 2 },
+        dynamic_config => 0,
+        resources => {
+            repository => {
+                url => 'https://github.com/simonwistow/Module-Pluggable.git',
+                web => 'https://github.com/simonwistow/Module-Pluggable',
+                type => 'git',
+            },
+            bugtracker => {
+                mailto => '[email protected]',
+                web => 
'https://rt.cpan.org/Public/Dist/Display.html?Name=Module-Pluggable',
+            },
+        },
+        prereqs => {
+            runtime => {
+                recommends => {
+                    'Module::Runtime' => '0.012',
+                },
+            },
+            test => {
+                suggests => {
+                    'App::Fatpacker' => '0.010000',
+                },
+            },
+        },
+        optional_features => {
+            module_runtime => {
+                description => "Optionally use Module::Runtime for requiring 
plugins rather than homegrown system",
+                prereqs => {
+                    runtime => {
+                        requires => {
+                            'Module::Runtime' => '0.012',
+                        }
+                    }
+                }
+            }
+        }
+    },
+);
+
+# degrade gracefully for older EUMM/older perls
+
+if (!eval { ExtUtils::MakeMaker->VERSION('6.6303') }) {
+    $WriteMakefileArgs{BUILD_REQUIRES} = $WriteMakefileArgs{TEST_REQUIRES};
+    delete $WriteMakefileArgs{TEST_REQUIRES};
+}
+
+if (!eval { ExtUtils::MakeMaker->VERSION('6.5501') }) {
+    @{$WriteMakefileArgs{PREREQ_PM}}{ keys 
%{$WriteMakefileArgs{BUILD_REQUIRES}} } =
+        @{$WriteMakefileArgs{BUILD_REQUIRES}}{ keys 
%{$WriteMakefileArgs{BUILD_REQUIRES}} };
+
+    delete $WriteMakefileArgs{BUILD_REQUIRES};
+}
+
+WriteMakefile(%WriteMakefileArgs);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Module-Pluggable-5.1/lib/Devel/InnerPackage.pm 
new/Module-Pluggable-5.2/lib/Devel/InnerPackage.pm
--- old/Module-Pluggable-5.1/lib/Devel/InnerPackage.pm  2014-01-06 
08:41:06.000000000 +0100
+++ new/Module-Pluggable-5.2/lib/Devel/InnerPackage.pm  2015-08-05 
01:50:04.000000000 +0200
@@ -1,7 +1,7 @@
 package Devel::InnerPackage;
 
 use strict;
-use base qw(Exporter);
+use Exporter 5.57 'import';
 use vars qw($VERSION @EXPORT_OK);
 
 use if $] > 5.017, 'deprecate';
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Module-Pluggable-5.1/lib/Module/Pluggable/Object.pm 
new/Module-Pluggable-5.2/lib/Module/Pluggable/Object.pm
--- old/Module-Pluggable-5.1/lib/Module/Pluggable/Object.pm     2014-01-06 
08:41:06.000000000 +0100
+++ new/Module-Pluggable-5.2/lib/Module/Pluggable/Object.pm     2015-08-05 
01:50:08.000000000 +0200
@@ -6,11 +6,25 @@
 use File::Spec::Functions qw(splitdir catdir curdir catfile abs2rel);
 use Carp qw(croak carp confess);
 use Devel::InnerPackage;
-use vars qw($VERSION);
+use vars qw($VERSION $MR);
 
 use if $] > 5.017, 'deprecate';
 
-$VERSION = '5.1';
+$VERSION = '5.2';
+
+BEGIN {
+    eval {  require Module::Runtime };
+    unless ($@) {
+        Module::Runtime->import('require_module');
+    } else {
+        *require_module = sub {
+            my $module = shift;
+            my $path   = $module . ".pm";
+            $path =~ s{::}{/}g;
+            require $path;
+        };
+    }
+}
 
 
 sub new {
@@ -280,7 +294,7 @@
     $self->{before_require}->($plugin) || return if defined 
$self->{before_require};
     unless ($no_req) {
         my $tmp = $@;
-        my $res = eval { $self->_require($plugin) };
+        my $res = eval { require_module($plugin) };
         my $err = $@;
         $@      = $tmp;
         if ($err) {
@@ -355,16 +369,6 @@
 
 }
 
-
-sub _require {
-    my $self   = shift;
-    my $pack   = shift;
-    eval "CORE::require $pack";
-    die ($@) if $@;
-    return 1;
-}
-
-
 1;
 
 =pod
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Module-Pluggable-5.1/lib/Module/Pluggable.pm 
new/Module-Pluggable-5.2/lib/Module/Pluggable.pm
--- old/Module-Pluggable-5.1/lib/Module/Pluggable.pm    2014-01-06 
08:41:06.000000000 +0100
+++ new/Module-Pluggable-5.2/lib/Module/Pluggable.pm    2015-08-05 
01:50:08.000000000 +0200
@@ -7,21 +7,21 @@
 use if $] > 5.017, 'deprecate';
 
 # ObQuote:
-# Bob Porter: Looks like you've been missing a lot of work lately. 
-# Peter Gibbons: I wouldn't say I've been missing it, Bob! 
+# Bob Porter: Looks like you've been missing a lot of work lately.
+# Peter Gibbons: I wouldn't say I've been missing it, Bob!
 
 
-$VERSION = '5.1';
+$VERSION = '5.2';
 $FORCE_SEARCH_ALL_PATHS = 0;
 
 sub import {
     my $class        = shift;
     my %opts         = @_;
 
-    my ($pkg, $file) = caller; 
+    my ($pkg, $file) = caller;
     # the default name for the method is 'plugins'
     my $sub          = $opts{'sub_name'}  || 'plugins';
-    # get our package 
+    # get our package
     my ($package)    = $opts{'package'} || $pkg;
     $opts{filename}  = $file;
     $opts{package}   = $package;
@@ -48,7 +48,7 @@
         if (defined $only) {
             $finder->{'only'} = $only;
         };
-        
+
         return $finder->{'only'};
     };
 
@@ -58,14 +58,14 @@
         if (defined $except) {
             $finder->{'except'} = $except;
         };
-        
+
         return $finder->{'except'};
     };
 
 
     no strict 'refs';
     no warnings qw(redefine prototype);
-    
+
     *{"$package\::$sub"}        = $subroutine;
     *{"$package\::search_path"} = $searchsub;
     *{"$package\::only"}        = $onlysub;
@@ -88,23 +88,23 @@
 
     package MyClass;
     use Module::Pluggable;
-    
+
 
 and then later ...
 
     use MyClass;
     my $mc = MyClass->new();
     # returns the names of all plugins installed under MyClass::Plugin::*
-    my @plugins = $mc->plugins(); 
+    my @plugins = $mc->plugins();
 
 =head1 EXAMPLE
 
 Why would you want to do this? Say you have something that wants to pass an
-object to a number of different plugins in turn. For example you may 
+object to a number of different plugins in turn. For example you may
 want to extract meta-data from every email you get sent and do something
-with it. Plugins make sense here because then you can keep adding new 
-meta data parsers and all the logic and docs for each one will be 
-self contained and new handlers are easy to add without changing the 
+with it. Plugins make sense here because then you can keep adding new
+meta data parsers and all the logic and docs for each one will be
+self contained and new handlers are easy to add without changing the
 core code. For that, you might do something like ...
 
     package Email::Examiner;
@@ -129,8 +129,8 @@
 .. and all the plugins will get a chance in turn to look at it.
 
 This can be trivially extended so that plugins could save the email
-somewhere and then no other plugin should try and do that. 
-Simply have it so that the C<examine> method returns C<1> if 
+somewhere and then no other plugin should try and do that.
+Simply have it so that the C<examine> method returns C<1> if
 it has saved the email somewhere. You might also want to be paranoid
 and check to see if the plugin has an C<examine> method.
 
@@ -145,12 +145,12 @@
 
 =head1 DESCRIPTION
 
-Provides a simple but, hopefully, extensible way of having 'plugins' for 
+Provides a simple but, hopefully, extensible way of having 'plugins' for
 your module. Obviously this isn't going to be the be all and end all of
 solutions but it works for me.
 
-Essentially all it does is export a method into your namespace that 
-looks through a search path for .pm files and turn those into class names. 
+Essentially all it does is export a method into your namespace that
+looks through a search path for .pm files and turn those into class names.
 
 Optionally it instantiates those classes for you.
 
@@ -172,7 +172,7 @@
     package MyClass;
     use Module::Pluggable search_path => ['Acme::MyClass::Plugin', 
'MyClass::Extend'];
 
-or directory 
+or directory
 
     use Module::Pluggable search_dirs => ['mylibs/Foo'];
 
@@ -184,9 +184,9 @@
 
 and then
 
-    # whatever is passed to 'plugins' will be passed 
-    # to 'new' for each plugin 
-    my @plugins = $mc->plugins(@options); 
+    # whatever is passed to 'plugins' will be passed
+    # to 'new' for each plugin
+    my @plugins = $mc->plugins(@options);
 
 
 alternatively you can just require the module without instantiating it
@@ -230,11 +230,11 @@
 
     my @filters = $self->filters;
     my @plugins = $self->plugins;
-    
+
 =head1 PLUGIN SEARCHING
 
-Every time you call 'plugins' the whole search path is walked again. This 
allows 
-for dynamically loading plugins even at run time. However this can get 
expensive 
+Every time you call 'plugins' the whole search path is walked again. This 
allows
+for dynamically loading plugins even at run time. However this can get 
expensive
 and so if you don't expect to want to add new plugins at run time you could do
 
 
@@ -249,9 +249,9 @@
 =head1 INNER PACKAGES
 
 If you have, for example, a file B<lib/Something/Plugin/Foo.pm> that
-contains package definitions for both C<Something::Plugin::Foo> and 
-C<Something::Plugin::Bar> then as long as you either have either 
-the B<require> or B<instantiate> option set then we'll also find 
+contains package definitions for both C<Something::Plugin::Foo> and
+C<Something::Plugin::Bar> then as long as you either have either
+the B<require> or B<instantiate> option set then we'll also find
 C<Something::Plugin::Bar>. Nifty!
 
 =head1 OPTIONS
@@ -262,22 +262,22 @@
 
 =head2 sub_name
 
-The name of the subroutine to create in your namespace. 
+The name of the subroutine to create in your namespace.
 
 By default this is 'plugins'
 
 =head2 search_path
 
-An array ref of namespaces to look in. 
+An array ref of namespaces to look in.
 
-=head2 search_dirs 
+=head2 search_dirs
 
 An array ref of directories to look in before @INC.
 
 =head2 instantiate
 
 Call this method on the class. In general this will probably be 'new'
-but it can be whatever you want. Whatever arguments are passed to 'plugins' 
+but it can be whatever you want. Whatever arguments are passed to 'plugins'
 will be passed to the method.
 
 The default is 'undef' i.e just return the class name.
@@ -288,18 +288,18 @@
 
 =head2 inner
 
-If set to 0 will B<not> search inner packages. 
+If set to 0 will B<not> search inner packages.
 If set to 1 will override C<require>.
 
 =head2 only
 
-Takes a string, array ref or regex describing the names of the only plugins to 
-return. Whilst this may seem perverse ... well, it is. But it also 
+Takes a string, array ref or regex describing the names of the only plugins to
+return. Whilst this may seem perverse ... well, it is. But it also
 makes sense. Trust me.
 
 =head2 except
 
-Similar to C<only> it takes a description of plugins to exclude 
+Similar to C<only> it takes a description of plugins to exclude
 from returning. This is slightly less perverse.
 
 =head2 package
@@ -335,13 +335,13 @@
 
 This will allow you to set what 'depth' of plugin will be allowed.
 
-So, for example, C<MyClass::Plugin::Foo> will have a depth of 3 and 
-C<MyClass::Plugin::Foo::Bar> will have a depth of 4 so to only get the former 
+So, for example, C<MyClass::Plugin::Foo> will have a depth of 3 and
+C<MyClass::Plugin::Foo::Bar> will have a depth of 4 so to only get the former
 (i.e C<MyClass::Plugin::Foo>) do
 
         package MyClass;
         use Module::Pluggable max_depth => 3;
-        
+
 and to only get the latter (i.e C<MyClass::Plugin::Foo::Bar>)
 
         package MyClass;
@@ -356,7 +356,7 @@
 
 =head2 before_require <plugin>
 
-Gets passed the plugin name. 
+Gets passed the plugin name.
 
 If 0 is returned then this plugin will not be required either.
 
@@ -364,7 +364,7 @@
 
 Gets called when there's an error on requiring the plugin.
 
-Gets passed the plugin name and the error. 
+Gets passed the plugin name and the error.
 
 The default on_require_error handler is to C<carp> the error and return 0.
 
@@ -372,13 +372,13 @@
 
 Gets called when there's an error on instantiating the plugin.
 
-Gets passed the plugin name and the error. 
+Gets passed the plugin name and the error.
 
 The default on_instantiate_error handler is to C<carp> the error and return 0.
 
 =head2 after_require <plugin>
 
-Gets passed the plugin name. 
+Gets passed the plugin name.
 
 If 0 is returned then this plugin will be required but not returned as a 
plugin.
 
@@ -386,8 +386,8 @@
 
 =head2 search_path
 
-The method C<search_path> is exported into you namespace as well. 
-You can call that at any time to change or replace the 
+The method C<search_path> is exported into you namespace as well.
+You can call that at any time to change or replace the
 search_path.
 
     $self->search_path( add => "New::Path" ); # add
@@ -395,15 +395,15 @@
 
 =head1 BEHAVIOUR UNDER TEST ENVIRONMENT
 
-In order to make testing reliable we exclude anything not from blib if blib.pm 
is 
-in %INC. 
+In order to make testing reliable we exclude anything not from blib if blib.pm 
is
+in %INC.
 
-However if the module being tested used another module that itself used 
C<Module::Pluggable> 
-then the second module would fail. This was fixed by checking to see if the 
caller 
+However if the module being tested used another module that itself used 
C<Module::Pluggable>
+then the second module would fail. This was fixed by checking to see if the 
caller
 had (^|/)blib/ in their filename.
 
 There's an argument that this is the wrong behaviour and that modules should 
explicitly
-trigger this behaviour but that particular code has been around for 7 years 
now and I'm 
+trigger this behaviour but that particular code has been around for 7 years 
now and I'm
 reluctant to change the default behaviour.
 
 You can now (as of version 4.1) force Module::Pluggable to look outside blib 
in a test environment by doing either
@@ -425,10 +425,19 @@
 
 This should also, theoretically, allow someone to modify PAR to do the same 
thing.
 
+=head1 Module::Require recommended
+
+Up until version 5.2 L<Module::Pluggable> used a string C<eval> to require 
plugins.
+
+This has now been changed to optionally use L<Module::Runtime> and it's 
C<require_module> method when
+available and fall back to using a path based C<require> when not.
+
+It's recommended, but not required, that you install Module::Runtime.
+
 =head1 FUTURE PLANS
 
-This does everything I need and I can't really think of any other 
-features I want to add. Famous last words of course (not least 
+This does everything I need and I can't really think of any other
+features I want to add. Famous last words of course (not least
 because we're up to version 5.0 at the time of writing).
 
 However suggestions (and patches) are always welcome.
@@ -457,6 +466,6 @@
 
 L<File::Spec>, L<File::Find>, L<File::Basename>, L<Class::Factory::Util>, 
L<Module::Pluggable::Ordered>
 
-=cut 
+=cut
 
 


Reply via email to