]> git.donarmstrong.com Git - debhelper.git/blobdiff - Debian/Debhelper/Buildsystem/perl_build.pm
Merge branch 'master' into buildsystems
[debhelper.git] / Debian / Debhelper / Buildsystem / perl_build.pm
index 74106d9bf3cd0a85a071570ae64f21bb1eb97a04..ce69f4ce55c2fdb87a02633c667eadd1702709b3 100644 (file)
@@ -8,60 +8,61 @@ package Debian::Debhelper::Buildsystem::perl_build;
 
 use strict;
 use Debian::Debhelper::Dh_Lib;
-use Debian::Debhelper::Dh_Buildsystem_Bases;
-use base 'Debian::Debhelper::Dh_Buildsystem_Basic';
+use base 'Debian::Debhelper::Buildsystem';
 
 sub DESCRIPTION {
-       "support for building Perl Build.PL based packages (in-source only)"
+       "Perl Module::Build (Build.PL)"
 }
 
-sub is_buildable {
-       my ($self, $action) = @_;
-       my $ret = (-e "Build.PL");
+sub check_auto_buildable {
+       my ($this, $action) = @_;
+
+       # Handles everything
+       my $ret = -e "Build.PL";
        if ($action ne "configure") {
-               $ret &= (-e "Build");
+               $ret &&= -e "Build";
        }
        return $ret;
 }
 
-sub invoke_impl {
-       my $self=shift;
+sub do_perl {
+       my $this=shift;
        $ENV{MODULEBUILDRC} = "/dev/null";
-       return $self->SUPER::invoke_impl(@_);
+       doit("perl", @_);
 }
 
 sub new {
-       my $cls=shift;
-       my $self= $cls->SUPER::new(@_);
-       $self->enforce_in_source_building();
-       return $self;
+       my $class=shift;
+       my $this= $class->SUPER::new(@_);
+       $this->enforce_in_source_building();
+       return $this;
 }
 
-sub configure_impl {
-       my $self=shift;
-       $ENV{PERL_MM_USE_DEFAULT}=1; # Module::Build can also use this.
-       doit("perl", "Build.PL", "installdirs=vendor", @_);
+sub configure {
+       my $this=shift;
+       $ENV{PERL_MM_USE_DEFAULT}=1;
+       $this->do_perl("Build.PL", "installdirs=vendor", @_);
 }
 
-sub build_impl {
-       my $self=shift;
-       doit("perl", "Build", @_);
+sub build {
+       my $this=shift;
+       $this->do_perl("Build", @_);
 }
 
-sub test_impl {
-       my $self=shift;
-       doit(qw/perl Build test/, @_);
+sub test {
+       my $this=shift;
+       $this->do_perl("Build", "test", @_);
 }
 
-sub install_impl {
-       my $self=shift;
+sub install {
+       my $this=shift;
        my $destdir=shift;
-       doit("perl", "Build", "install", "destdir=$destdir", "create_packlist=0", @_);
+       $this->do_perl("Build", "install", "destdir=$destdir", "create_packlist=0", @_);
 }
 
-sub clean_impl {
-       my $self=shift;
-       doit("perl", "Build", "--allow_mb_mismatch", 1, "distclean", @_);
+sub clean {
+       my $this=shift;
+       $this->do_perl("Build", "--allow_mb_mismatch", 1, "distclean", @_);
 }
 
 1;