[Jifty-commit] r4228 - in jifty/trunk: lib/Jifty
jifty-commit at lists.jifty.org
jifty-commit at lists.jifty.org
Wed Oct 10 22:44:22 EDT 2007
Author: alexmv
Date: Wed Oct 10 22:44:21 2007
New Revision: 4228
Modified:
jifty/trunk/ (props changed)
jifty/trunk/lib/Jifty/Schema.pm
Log:
r23484 at zoq-fot-pik: chmrr | 2007-10-10 22:42:01 -0400
* Just a perltidy
Modified: jifty/trunk/lib/Jifty/Schema.pm
==============================================================================
--- jifty/trunk/lib/Jifty/Schema.pm (original)
+++ jifty/trunk/lib/Jifty/Schema.pm Wed Oct 10 22:44:21 2007
@@ -293,21 +293,21 @@
sub connect_to_db_for_management {
my $handle = Jifty::Handle->new();
- my $driver = Jifty->config->framework('Database')->{'Driver'};
+ my $driver = Jifty->config->framework('Database')->{'Driver'};
# Everything but the template1 database is assumed
my %connect_args;
- $connect_args{'database'} = 'template1' if ( $handle->isa("Jifty::DBI::Handle::Pg") );
- $connect_args{'database'} = '' if ( $handle->isa("Jifty::DBI::Handle::mysql") );
- for(1..50) {
- my $counter = $_;
- eval {
- $handle->connect(%connect_args);
- };
- my $err = $@;
- last if( !$err || $err =~ /does not exist/i);
- sleep 1;
- }
+ $connect_args{'database'} = 'template1'
+ if ( $handle->isa("Jifty::DBI::Handle::Pg") );
+ $connect_args{'database'} = ''
+ if ( $handle->isa("Jifty::DBI::Handle::mysql") );
+ for ( 1 .. 50 ) {
+ my $counter = $_;
+ eval { $handle->connect(%connect_args); };
+ my $err = $@;
+ last if ( !$err || $err =~ /does not exist/i );
+ sleep 1;
+ }
return $handle;
}
More information about the Jifty-commit
mailing list