Permalink
Browse files

Use 'do' expression.

  • Loading branch information...
1 parent 58a7d9f commit 4defd166dd7dd21f2d9b85a9afc98ce6cb6e2903 @hiratara committed Jun 20, 2009
Showing with 3 additions and 3 deletions.
  1. +3 −3 lib/Chaberi/Backdoor/Schema.pm
@@ -11,9 +11,9 @@ sub _get_current_dir{
return $ret;
}
-*default_schema = ( sub {
+*default_schema = do {
my $_schema;
- return sub {
+ sub {
my $class = shift;
$_schema = $class->connect(
sprintf(
@@ -23,6 +23,6 @@ sub _get_current_dir{
) unless $_schema;
return $_schema;
};
-} )->();
+};
1;

0 comments on commit 4defd16

Please sign in to comment.