Created
March 12, 2010 07:30
-
-
Save nekoya/330125 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| diff --git a/lib/DBIx/Skinny.pm b/lib/DBIx/Skinny.pm | |
| index fe676ab..93316d6 100644 | |
| --- a/lib/DBIx/Skinny.pm | |
| +++ b/lib/DBIx/Skinny.pm | |
| @@ -24,6 +24,7 @@ sub import { | |
| my $dbd_type = _dbd_type($args); | |
| my $_attribute = +{ | |
| + check_schema => defined $args->{check_schema} ? $args->{check_schema} : 1, | |
| dsn => $args->{dsn}, | |
| username => $args->{username}, | |
| password => $args->{password}, | |
| @@ -100,8 +101,9 @@ sub new { | |
| my $schema_checked = 0; | |
| sub schema { | |
| - my $schema = $_[0]->attribute->{schema}; | |
| - unless ( $schema_checked ) { | |
| + my $attribute = $_[0]->attribute; | |
| + my $schema = $attribute->{schema}; | |
| + if ( $attribute->{check_schema} && !$schema_checked ) { | |
| do { | |
| no strict 'refs'; | |
| unless ( defined *{"@{[ $schema ]}::schema_info"} ) { |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment