r53277 - /trunk/dh-make-perl/lib/DhMakePerl.pm
dmn at users.alioth.debian.org
dmn at users.alioth.debian.org
Tue Feb 23 20:15:11 UTC 2010
Author: dmn
Date: Tue Feb 23 20:15:00 2010
New Revision: 53277
URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=53277
Log:
separate the check whether Makefile.PL is M::B::C one
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=53277&op=diff
==============================================================================
--- trunk/dh-make-perl/lib/DhMakePerl.pm (original)
+++ trunk/dh-make-perl/lib/DhMakePerl.pm Tue Feb 23 20:15:00 2010
@@ -2284,18 +2284,12 @@
if ( -e $self->main_file('Makefile.PL')
and -e $self->main_file('Build.PL') )
{
- my $mf = $self->_file_r( $self->main_file('Makefile.PL') );
- while( defined( $_ = <$mf> ) ) {
- if ( /Module::Build::Compat/ ) {
- $self->explained_dependency(
- 'Compatibility Makefile.PL',
- $deps,
- 'debhelper (>= 7.0.17)',
- 'perl (>= 5.10) | libmodule-build-perl'
- );
- last;
- }
- }
+ $self->explained_dependency(
+ 'Compatibility Makefile.PL',
+ $deps,
+ 'debhelper (>= 7.0.17)',
+ 'perl (>= 5.10) | libmodule-build-perl'
+ ) if $self->makefile_pl_is_MBC;
}
# there are old packages that still build-depend on libmodule-build-perl
@@ -2307,6 +2301,32 @@
}
}
+=item makefile_pl_is_MBC
+
+Checks if F<Makefile.PL> is a compatibility wrapper around Build.PL provided by
+Module::Build::Compat.
+
+=cut
+
+sub makefile_pl_is_MBC
+{
+ my $self = shift;
+
+ my $mf = $self->makefile_pl;
+
+ return undef unless -e $mf;
+
+ my $fh = $self->_file_r($mf);
+
+ while( defined( $_ = <$fh> ) ) {
+ if ( /Module::Build::Compat/ ) {
+ return 1;
+ }
+ }
+
+ return 0;
+}
+
sub _warn_incomplete_copyright {
my $self = shift;
More information about the Pkg-perl-cvs-commits
mailing list