Skip to content
Browse files

rename $trie to $try everywhere

  • Loading branch information...
1 parent 8bdc52a commit 3a417f8a2f03f816b9c09a227fb30c0bd4e216bb @berekuk berekuk committed Jul 18, 2012
Showing with 6 additions and 6 deletions.
  1. +5 −5 lib/DBD/Safe.pm
  2. +1 −1 t/main.t
View
10 lib/DBD/Safe.pm
@@ -169,8 +169,8 @@ sub connect {
}
my $retry_cb = sub {
- my $trie = shift;
- if ($trie == 1) {
+ my $try = shift;
+ if ($try == 1) {
return 1;
} else {
return 0;
@@ -414,11 +414,11 @@ sub stay_connected {
#return $dbh->set_err($DBI::stderr, "Reconnect needed when db in transaction");
}
- my $trie = 0;
+ my $try = 0;
my $retry_cb = $dbh->FETCH('x_safe_retry_cb');
while (1) {
- $trie++;
- my $can_connect = $retry_cb->($trie);
+ $try++;
+ my $can_connect = $retry_cb->($try);
if ($can_connect) {
my $dbh = eval { real_connect($dbh) };
if (!$dbh) {
View
2 t/main.t
@@ -96,7 +96,7 @@ sub reconnect_threads : Test(1) {
sub retry_cb : Test(1) {
my $cb = sub {
- my $trie = shift;
+ my $try = shift;
return 0
};
dies_ok(sub { get_dbh({retry_cb => $cb}) }, "always negative retry_cb");

0 comments on commit 3a417f8

Please sign in to comment.
Something went wrong with that request. Please try again.