Permalink
Browse files

Use $^X whenever we invoke a Perl script.

Make sure to set $VegGuide::Build::IsInstalling in sync script for
benefit of VegGuide::Config.
  • Loading branch information...
1 parent 5effe13 commit c41c72e898b2f7d243a1e23d7eead9e7cde0ff26 @autarch autarch committed Feb 12, 2012
View
2 script/migrations/1/00-price-ranges
@@ -17,5 +17,5 @@ $dbh->do( 'UPDATE Vendor SET price_range_id = 3 WHERE price_range_id IN ( 4, 5 )
$dbh->do( 'DELETE FROM PriceRange' );
-system( 'script/vegguide_sync_db.pl', '--data' )
+system( $^X, 'script/vegguide_sync_db.pl', '--data' )
and die $!;
View
2 script/migrations/1/01-locales
@@ -8,7 +8,7 @@ use lib "$FindBin::Bin/../../../lib";
use VegGuide::Schema;
-system( 'script/vegguide_sync_db.pl', )
+system( $^X, 'script/vegguide_sync_db.pl', )
and die $!;
my $dbh = VegGuide::Schema->Connect()->driver()->handle();
View
2 script/migrations/1/03-ratings
@@ -9,7 +9,7 @@ use lib "$FindBin::Bin/../../../lib";
use VegGuide::Schema;
-system( 'script/vegguide_sync_db.pl' )
+system( $^X, 'script/vegguide_sync_db.pl' )
and die $!;
my $dbh = VegGuide::Schema->Connect()->driver()->handle();
View
2 script/vegguide_run_migrations.pl
@@ -50,7 +50,7 @@ sub run_scripts {
print "Running migrations for version $ver\n";
for my $script ( sort grep { -f && -x } glob "$Dir/migrations/$ver/*" ) {
print " - ", basename($script), "\n";
- system($script )
+ system( $^X, $script )
and die "Cannot run $script: $!";
}
}
View
2 script/vegguide_sync_db.pl
@@ -7,6 +7,8 @@
use lib "$FindBin::Bin/../lib";
+BEGIN { $VegGuide::Build::IsInstalling = 1 }
+
use VegGuide::Config;
use VegGuide::Schema;

0 comments on commit c41c72e

Please sign in to comment.