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;