]> git.donarmstrong.com Git - debhelper.git/blob - Debian/Debhelper/Buildsystem/perl_makefile.pm
code review, added comments
[debhelper.git] / Debian / Debhelper / Buildsystem / perl_makefile.pm
1 # A buildsystem plugin for handling Perl Build based projects.
2 #
3 # Copyright: © 2008-2009 Joey Hess
4 #            © 2008-2009 Modestas Vainius
5 # License: GPL-2+
6
7 package Debian::Debhelper::Buildsystem::perl_makefile;
8
9 use strict;
10 use Debian::Debhelper::Dh_Lib;
11 use Debian::Debhelper::Dh_Buildsystem_Bases;
12 use base 'Debian::Debhelper::Dh_Buildsystem_Basic';
13
14 sub DESCRIPTION {
15         "support for building Perl Makefile.PL based packages (in-source only)"
16 }
17
18 sub is_buildable {
19         my ($self, $action) = @_;
20         return ($action eq "configure")  && (-e "Makefile.PL");
21 }
22
23 sub new {
24         my $cls=shift;
25         my $self=$cls->SUPER::new(@_);
26         $self->enforce_in_source_building();
27         return $self;
28 }
29
30 sub configure_impl {
31         my $self=shift;
32         # If set to a true value then MakeMaker's prompt function will
33         # # always return the default without waiting for user input.
34         $ENV{PERL_MM_USE_DEFAULT}=1;
35         doit("perl", "Makefile.PL", "INSTALLDIRS=vendor", @_);
36 }
37
38 1;