Skip to content

Commit

Permalink
Use $^X whenever we invoke a Perl script.
Browse files Browse the repository at this point in the history
Make sure to set $VegGuide::Build::IsInstalling in sync script for
benefit of VegGuide::Config.
  • Loading branch information
autarch committed Feb 12, 2012
1 parent 5effe13 commit c41c72e
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion script/migrations/1/00-price-ranges
Expand Up @@ -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' ); $dbh->do( 'DELETE FROM PriceRange' );


system( 'script/vegguide_sync_db.pl', '--data' ) system( $^X, 'script/vegguide_sync_db.pl', '--data' )
and die $!; and die $!;
2 changes: 1 addition & 1 deletion script/migrations/1/01-locales
Expand Up @@ -8,7 +8,7 @@ use lib "$FindBin::Bin/../../../lib";


use VegGuide::Schema; use VegGuide::Schema;


system( 'script/vegguide_sync_db.pl', ) system( $^X, 'script/vegguide_sync_db.pl', )
and die $!; and die $!;


my $dbh = VegGuide::Schema->Connect()->driver()->handle(); my $dbh = VegGuide::Schema->Connect()->driver()->handle();
Expand Down
2 changes: 1 addition & 1 deletion script/migrations/1/03-ratings
Expand Up @@ -9,7 +9,7 @@ use lib "$FindBin::Bin/../../../lib";
use VegGuide::Schema; use VegGuide::Schema;




system( 'script/vegguide_sync_db.pl' ) system( $^X, 'script/vegguide_sync_db.pl' )
and die $!; and die $!;


my $dbh = VegGuide::Schema->Connect()->driver()->handle(); my $dbh = VegGuide::Schema->Connect()->driver()->handle();
Expand Down
2 changes: 1 addition & 1 deletion script/vegguide_run_migrations.pl
Expand Up @@ -50,7 +50,7 @@ sub run_scripts {
print "Running migrations for version $ver\n"; print "Running migrations for version $ver\n";
for my $script ( sort grep { -f && -x } glob "$Dir/migrations/$ver/*" ) { for my $script ( sort grep { -f && -x } glob "$Dir/migrations/$ver/*" ) {
print " - ", basename($script), "\n"; print " - ", basename($script), "\n";
system($script ) system( $^X, $script )
and die "Cannot run $script: $!"; and die "Cannot run $script: $!";
} }
} }
2 changes: 2 additions & 0 deletions script/vegguide_sync_db.pl
Expand Up @@ -7,6 +7,8 @@


use lib "$FindBin::Bin/../lib"; use lib "$FindBin::Bin/../lib";


BEGIN { $VegGuide::Build::IsInstalling = 1 }

use VegGuide::Config; use VegGuide::Config;
use VegGuide::Schema; use VegGuide::Schema;


Expand Down

0 comments on commit c41c72e

Please sign in to comment.