r29552 - /trunk/dh-make-perl/lib/DhMakePerl.pm
dmn at users.alioth.debian.org
dmn at users.alioth.debian.org
Sat Jan 10 20:05:48 UTC 2009
Author: dmn
Date: Sat Jan 10 20:05:45 2009
New Revision: 29552
URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=29552
Log:
rework is_core_module to return the version since which the module is core
Modified:
trunk/dh-make-perl/lib/DhMakePerl.pm
Modified: trunk/dh-make-perl/lib/DhMakePerl.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/dh-make-perl/lib/DhMakePerl.pm?rev=29552&op=diff
==============================================================================
--- trunk/dh-make-perl/lib/DhMakePerl.pm (original)
+++ trunk/dh-make-perl/lib/DhMakePerl.pm Sat Jan 10 20:05:45 2009
@@ -309,15 +309,14 @@
sub is_core_module {
my ( $self, $module ) = @_;
- my $perl_version = qv( $Config{version} )->numify + 0;
-
- my $core = $Module::CoreList::version{$perl_version};
-
- $core
- or die
- "Internal error: \$Module::CoreList::version{$perl_version} is empty";
-
- return exists( $core->{$module} );
+ my $v = Module::CoreList->first_release($module); # 5.009002
+
+ return undef unless defined $v;
+
+ $v = version->new($v); # v5.9.2
+ ( $v = $v->normal ) =~ s/^v//; # "5.9.2"
+
+ return $v;
}
sub setup_dir {
More information about the Pkg-perl-cvs-commits
mailing list