r46305 - in /branches/upstream/libmodule-load-conditional-perl/current: CHANGES META.yml Makefile.PL lib/Module/Load/Conditional.pm

jawnsy-guest at users.alioth.debian.org jawnsy-guest at users.alioth.debian.org
Sat Oct 24 14:12:15 UTC 2009


Author: jawnsy-guest
Date: Sat Oct 24 14:11:46 2009
New Revision: 46305

URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=46305
Log:
[svn-upgrade] Integrating new upstream version, libmodule-load-conditional-perl (0.32)

Modified:
    branches/upstream/libmodule-load-conditional-perl/current/CHANGES
    branches/upstream/libmodule-load-conditional-perl/current/META.yml
    branches/upstream/libmodule-load-conditional-perl/current/Makefile.PL
    branches/upstream/libmodule-load-conditional-perl/current/lib/Module/Load/Conditional.pm

Modified: branches/upstream/libmodule-load-conditional-perl/current/CHANGES
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libmodule-load-conditional-perl/current/CHANGES?rev=46305&op=diff
==============================================================================
--- branches/upstream/libmodule-load-conditional-perl/current/CHANGES (original)
+++ branches/upstream/libmodule-load-conditional-perl/current/CHANGES Sat Oct 24 14:11:46 2009
@@ -1,3 +1,13 @@
+Changes for 0.32    Fri Oct 23 21:56:11 BST 2009
+=================================================
+* Version bump
+
+Changes for 0.31_01 Fri Oct 23 09:47:12 BST 2009
+=================================================
+* Added DEPRECATED and support for determining if
+  a core module is loaded from perl lib path and
+  setting uptodate accordingly.
+
 Changes for 0.30    Mon Jan 19 16:25:55 CET 2009
 =================================================
 * This is a test-suite fix release only. Users of

Modified: branches/upstream/libmodule-load-conditional-perl/current/META.yml
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libmodule-load-conditional-perl/current/META.yml?rev=46305&op=diff
==============================================================================
--- branches/upstream/libmodule-load-conditional-perl/current/META.yml (original)
+++ branches/upstream/libmodule-load-conditional-perl/current/META.yml Sat Oct 24 14:11:46 2009
@@ -1,6 +1,6 @@
 --- #YAML:1.0
 name:               Module-Load-Conditional
-version:            0.30
+version:            0.32
 abstract:           Looking up module information / loading at runtime
 author:
     - Jos Boumans <kane[at]cpan.org>
@@ -8,8 +8,11 @@
 distribution_type:  module
 configure_requires:
     ExtUtils::MakeMaker:  0
+build_requires:
+    ExtUtils::MakeMaker:  0
 requires:
     Locale::Maketext::Simple:  0
+    Module::CoreList:     2.22
     Module::Load:         0.11
     Params::Check:        0
     Test::More:           0
@@ -18,7 +21,7 @@
     directory:
         - t
         - inc
-generated_by:       ExtUtils::MakeMaker version 6.48
+generated_by:       ExtUtils::MakeMaker version 6.54
 meta-spec:
     url:      http://module-build.sourceforge.net/META-spec-v1.4.html
     version:  1.4

Modified: branches/upstream/libmodule-load-conditional-perl/current/Makefile.PL
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libmodule-load-conditional-perl/current/Makefile.PL?rev=46305&op=diff
==============================================================================
--- branches/upstream/libmodule-load-conditional-perl/current/Makefile.PL (original)
+++ branches/upstream/libmodule-load-conditional-perl/current/Makefile.PL Sat Oct 24 14:11:46 2009
@@ -13,6 +13,8 @@
                             ### tests under 5.6.2. XS version is OK
                             ### see t/02_Parse_Version.t for details
                             'version'                   => '0.69',
+                            ### We need 2.22 for is_deprecated()
+                            'Module::CoreList'          => '2.22',
                     },
     INSTALLDIRS     => ( $] >= 5.009005 ? 'perl' : 'site' ),
     AUTHOR          => 'Jos Boumans <kane[at]cpan.org>',

Modified: branches/upstream/libmodule-load-conditional-perl/current/lib/Module/Load/Conditional.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libmodule-load-conditional-perl/current/lib/Module/Load/Conditional.pm?rev=46305&op=diff
==============================================================================
--- branches/upstream/libmodule-load-conditional-perl/current/lib/Module/Load/Conditional.pm (original)
+++ branches/upstream/libmodule-load-conditional-perl/current/lib/Module/Load/Conditional.pm Sat Oct 24 14:11:46 2009
@@ -14,12 +14,13 @@
 use constant ON_VMS  => $^O eq 'VMS';
 
 BEGIN {
-    use vars        qw[ $VERSION @ISA $VERBOSE $CACHE @EXPORT_OK 
+    use vars        qw[ $VERSION @ISA $VERBOSE $CACHE @EXPORT_OK $DEPRECATED
                         $FIND_VERSION $ERROR $CHECK_INC_HASH];
     use Exporter;
     @ISA            = qw[Exporter];
-    $VERSION        = '0.30';
+    $VERSION        = '0.32';
     $VERBOSE        = 0;
+    $DEPRECATED     = 0;
     $FIND_VERSION   = 1;
     $CHECK_INC_HASH = 0;
     @EXPORT_OK      = qw[check_install can_load requires];
@@ -135,6 +136,9 @@
 uptodate will always be true if the module was found.
 If no parsable version was found in the module, uptodate will also be
 true, since C<check_install> had no way to verify clearly.
+
+See also C<$Module::Load::Conditional::DEPRECATED>, which affects 
+the outcome of this value.
 
 =back
 
@@ -208,7 +212,7 @@
                     ($fh) = $dir->[0]->($dir, $file, @{$dir}{1..$#{$dir}})
     
                 } elsif (UNIVERSAL::can($dir, 'INC')) {
-                    ($fh) = $dir->INC->($dir, $file);
+                    ($fh) = $dir->INC($file);
                 }
     
                 if (!UNIVERSAL::isa($fh, 'GLOB')) {
@@ -298,6 +302,16 @@
             version->new( $args->{version} ) <= version->new( $href->{version} )
                 ? 1 
                 : 0;
+    }
+
+    if ( $DEPRECATED and version->new($]) >= version->new('5.011') ) {
+        require Module::CoreList;
+        require Config;
+
+        $href->{uptodate} = 0 if 
+           exists $Module::CoreList::version{ 0+$] }{ $args->{module} } and
+           Module::CoreList::is_deprecated( $args->{module} ) and
+           $Config::Config{privlibexp} eq $href->{dir};
     }
 
     return $href;
@@ -600,6 +614,15 @@
 C<can_load>. It is useful to inspect this when C<can_load> returns
 C<undef>.
 
+=head2 $Module::Load::Conditional::DEPRECATED
+
+This controls whether C<Module::Load::Conditional> checks if 
+a dual-life core module has been deprecated. If this is set to
+true C<check_install> will return false to C<uptodate>, if 
+a dual-life module is found to be loaded from C<$Config{privlibexp}>
+
+The default is 0;
+
 =head1 See Also
 
 C<Module::Load>




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