~ubuntu-branches/ubuntu/intrepid/libtemplate-plugin-class-perl/intrepid

« back to all changes in this revision

Viewing changes to Makefile.PL

  • Committer: Bazaar Package Importer
  • Author(s): Stephen Quinney
  • Date: 2004-01-23 10:44:25 UTC
  • Revision ID: james.westby@ubuntu.com-20040123104425-pk1xm5c12whh9g39
Tags: upstream-0.12
ImportĀ upstreamĀ versionĀ 0.12

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
 
 
2
    unless (eval "use Module::Build::Compat 0.02; 1" ) {
 
3
      print "This module requires Module::Build to install itself.\n";
 
4
      
 
5
      require ExtUtils::MakeMaker;
 
6
      my $yn = ExtUtils::MakeMaker::prompt
 
7
        ('  Install Module::Build now from CPAN?', 'y');
 
8
      
 
9
      unless ($yn =~ /^y/i) {
 
10
        warn " *** Cannot install without Module::Build.  Exiting ...\n";
 
11
        exit 1;
 
12
      }
 
13
 
 
14
      require Cwd;
 
15
      require File::Spec;
 
16
      require CPAN;
 
17
      
 
18
      # Save this 'cause CPAN will chdir all over the place.
 
19
      my $cwd = Cwd::cwd();
 
20
      my $makefile = File::Spec->rel2abs($0);
 
21
      
 
22
      CPAN::Shell->install('Module::Build::Compat');
 
23
      
 
24
      chdir $cwd or die "Cannot chdir() back to $cwd: $!";
 
25
      exec $^X, $makefile, @ARGV;  # Redo now that we have Module::Build
 
26
    }
 
27
    Module::Build::Compat->run_build_pl(args => \@ARGV);
 
28
    Module::Build::Compat->write_makefile();