r53178 - /trunk/dh-make-perl/lib/DhMakePerl.pm

dmn at users.alioth.debian.org dmn at users.alioth.debian.org
Mon Feb 22 09:17:15 UTC 2010


Author: dmn
Date: Mon Feb 22 09:17:09 2010
New Revision: 53178

URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=53178
Log:
convert $module_build to object method

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=53178&op=diff
==============================================================================
--- trunk/dh-make-perl/lib/DhMakePerl.pm (original)
+++ trunk/dh-make-perl/lib/DhMakePerl.pm Mon Feb 22 09:17:09 2010
@@ -110,7 +110,6 @@
 # If we're being required rather than called as a main command, then
 # return now without doing any work.  This facilitates easier testing.
 
-my ($module_build);
 my ( @docs, @examples, @args );
 
 # use Array::Unique for @docs and @examples
@@ -204,8 +203,6 @@
 
         $self->process_meta;
         $self->extract_basic();    # also detects arch-dep package
-        $module_build
-            = ( -f $self->main_file('Build.PL') ) ? "Module-Build" : "MakeMaker";
 
         $self->extract_docs if 'docs' ~~ $self->cfg->only;
         $self->extract_examples if 'examples' ~~ $self->cfg->only;
@@ -347,13 +344,12 @@
     $self->depends->add( Debian::Dependencies->new( $self->cfg->depends ) )
         if $self->cfg->depends;
 
-    $module_build = ( -f $self->main_file('Build.PL') ) ? "Module-Build" : "MakeMaker";
     $self->extract_docs;
     $self->extract_examples;
 
     $self->bdepends->add(
         Debian::Dependency->new('perl (>= 5.10) | libmodule-build-perl') )
-        if ( $module_build eq "Module-Build" );
+        if ( $self->module_build eq "Module-Build" );
 
     my ( $extrabdepends, $extrabdependsi );
     if ( $self->arch eq 'any' ) {
@@ -2156,6 +2152,12 @@
     return sprintf( "http://search.cpan.org/dist/%s/", $self->perlname );
 }
 
+sub module_build {
+    my $self = shift;
+
+    return ( -f $self->main_file('Build.PL') ) ? "Module-Build" : "MakeMaker";
+}
+
 sub _warn_incomplete_copyright {
     my $self = shift;
 




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