Subject: | Schema migration fails when running under PAR |
When running under PAR and the original perl interpreter (as found on
the build machine) is not available on the target machine the relevant
detection fails. Probe::Perl->find_perl_interpreter will return undef in
this case.
This also leads to a failing migration (stumbled upon when trying the
binary download of padre 0.33m which tried to migrate the schema with a
simple migrate-7.pl)
A quick solution is attached, just requiring a sane installation where
perl is in the path. Of course Probe::Perl should be fixed to return the
correct interpreter when running under PAR (whatever that is then).
Proposed patch (against 0.02) attached (although not perfect it's better
then the current situation).
Subject: | ORLite-Migrate-0.02-patch-perl.diff |
diff -u -r ORLite-Migrate-0.02/Changes ORLite-Migrate-0.02.new/Changes
--- ORLite-Migrate-0.02/Changes 2009-02-15 15:02:21.000000000 +0100
+++ ORLite-Migrate-0.02.new/Changes 2009-04-06 00:46:59.000000000 +0200
@@ -1,5 +1,8 @@
Changes for Perl extension ORLite-Migrate
+ - Use a default perl interpreter "perl" in case Probe::Perl fails
+ (e.g. running under PAR and original perl is not available)
+
0.02 Mon 16 Feb 2009
- Updating to Module::Install 0.79
- Support creation of database in subdirectories
diff -u -r ORLite-Migrate-0.02/lib/ORLite/Migrate.pm ORLite-Migrate-0.02.new/lib/ORLite/Migrate.pm
--- ORLite-Migrate-0.02/lib/ORLite/Migrate.pm 2009-02-15 15:02:21.000000000 +0100
+++ ORLite-Migrate-0.02.new/lib/ORLite/Migrate.pm 2009-04-06 00:45:53.000000000 +0200
@@ -100,7 +100,7 @@
require IPC::Run3;
# Execute each script
- my $perl = Probe::Perl->find_perl_interpreter;
+ my $perl = Probe::Perl->find_perl_interpreter || "perl";
my $pushd = File::pushd::pushd($timeline);
foreach my $patch ( @plan ) {
my $stdin = "$file\n";