Bug#571646: "Depends: perl (>= 5.11.4)" as result of is_core_module()
Jozef Kutej
jozef at kutej.net
Fri Feb 26 18:22:13 UTC 2010
Package: dh-make-perl
Version: 0.63
Severity: minor
is_core_module() is properly reporting core modules but also in future versions of Perl.
For example module that is dependent on "Module::Build: 0.3603".
$ perl -MDhMakePerl -le 'print DhMakePerl->is_core_module("Module::Build", "0.3603")'
5.11.4
here is a patch that will not consider any higher version than currently running Perl
a core module:
--- cut ---
--- a/lib/DhMakePerl.pm
+++ b/lib/DhMakePerl.pm
@@ -77,6 +77,7 @@ use User::pwent qw(:FIELDS);
use WWW::Mechanize ();
use YAML ();
use version qw( qv );
+use Config;
# TODO:
# * get more info from the package (maybe using CPAN methods)
@@ -443,6 +444,10 @@ sub is_core_module {
return unless defined $v;
$v = version->new($v); # v5.9.2
+
+ # not a core module if the module is in future version of Perl
+ return if $v > version->new($Config::Config{'version'});
+
( $v = $v->normal ) =~ s/^v//; # "5.9.2"
return $v;
--- cut ---
-- System Information:
Debian Release: squeeze/sid
APT prefers testing
APT policy: (700, 'testing'), (700, 'stable'), (600, 'unstable'), (500, 'oldstable')
Architecture: i386 (i686)
Kernel: Linux 2.6.32-trunk-686 (SMP w/2 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Versions of packages dh-make-perl depends on:
ii debhelper 7.4.13 helper programs for debian/rules
ii dpkg-dev 1.15.5.6 Debian package development tools
ii fakeroot 1.14.4-1 Gives a fake root environment
ii libapt-pkg-perl 0.1.24 Perl interface to libapt-pkg
ii libarray-unique-perl 0.08-1 Tie-able array that allows only un
ii libclass-accessor-perl 0.34-1 Perl module that automatically gen
ii libemail-date-format-perl 1.002-1 Module to generate RFC-2822-valid
ii liblist-moreutils-perl 0.25~02-1 Perl module with additional list f
ii libmodule-corelist-perl 2.25-1 module to determine modules shippe
ii libmodule-depends-perl 0.14-3 identify the dependencies of a dis
ii libparse-debcontrol-perl 2.005-2 Easy OO parsing of Debian control-
ii libparse-debianchangelog-perl 1.1.1-2 parse Debian changelogs and output
ii libtie-ixhash-perl 1.21-2 ordered associative arrays for Per
ii libwww-mechanize-perl 1.58-1 module to automate interaction wit
ii libyaml-perl 0.71-1 YAML Ain't Markup Language
ii make 3.81-7 An utility for Directing compilati
ii perl 5.10.1-11 Larry Wall's Practical Extraction
ii perl-modules [libmodule-corel 5.10.1-11 Core Perl modules
Versions of packages dh-make-perl recommends:
ii apt-file 2.3.3 search for files within Debian pac
dh-make-perl suggests no packages.
-- no debconf information
More information about the pkg-perl-maintainers
mailing list