Commits

Burak Gürsoy committed 2535763

Support external perl binary

  • Participants
  • Parent commits 81606d8

Comments (0)

Files changed (1)

     nomm
     install
     module=i
+    perl=s
 ));
 
 $O{keep} ||= 0;
 
+my $PERL_EXE = $O{perl} ? do {
+    my $p = $O{perl};
+    die "perl parameter is not a file" if ! -e $p;
+    # TODO: more checks
+    $p
+} : $^X;
+
 my %L10N = (
     EN => { lang_en() },
     TR => { lang_tr() },
     my ( $build_pl, $makefile_pl ) = ( 0, 0 );
 
     if ( -e 'Build.PL' && !$O{nomb} ) {
-        call("$^X Build.PL");
-        call("$^X Build");
-        call("$^X Build dist");
-        call("$^X Build disttest");
-        call("$^X Build clean");
+        call("$PERL_EXE Build.PL");
+        call("$PERL_EXE Build");
+        call("$PERL_EXE Build dist");
+        call("$PERL_EXE Build disttest");
+        call("$PERL_EXE Build clean");
         $build_pl++;
     }
     else {
     }
 
     if ( -e 'Makefile.PL' && !$O{nomm} ) {
-        call("$^X Makefile.PL");
+        call("$PERL_EXE Makefile.PL");
         call($MAKE);
         call( $MAKE . ' test' );
         if ( ! $build_pl && $ALIEN ) {
         if !$build_pl && !$makefile_pl;
 
     if ( $O{install} && $build_pl ) {
-        call("$^X Build");
-        call("$^X Build install");
+        call("$PERL_EXE Build");
+        call("$PERL_EXE Build install");
     }
     return;
 }