Skip to content

Instantly share code, notes, and snippets.

@nekoya
Created March 12, 2010 07:30
Show Gist options
  • Select an option

  • Save nekoya/330125 to your computer and use it in GitHub Desktop.

Select an option

Save nekoya/330125 to your computer and use it in GitHub Desktop.
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