You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Tested under Win32 strawberryperl 5.14.2.1 on a 64bit Windows 7 machine.
After a call to make_schema_at, the current directory '.' disappears
from @INC.
As an example consider the following method:
sub dump_schema {
my $attrs = {
debug => 0,
dump_directory => '.',
exclude => qr/(?^:\bBIN)/
};
my $connect_info = [ $dsn, $user, $password ];
push @$connect_info, { on_connect_do => 'PRAGMA foreign_keys = ON' };
make_schema_at( 'TDG::Schema', $attrs, $connect_info );
eval {
require TDG::Schema;
TDG::Schema->import();
1;
} or do {
my $error = $@;
croak $error;
};
$dbic_schema = TDG::Schema->connect( $dsn, $user, $password, '' );
}
The error I got when executing it (using a connection to a SQLite
database) was:
Can't locate TDG/Schema.pm in @INC...
Before calling make_schema_at, we have:
DB<2> x @INC
0 'C:/Dwimperl/perl/site/lib'
1 'C:/Dwimperl/perl/vendor/lib'
2 'C:/Dwimperl/perl/lib'
3 '.'
afterwards:
DB<3> x @INC
0 'C:/Dwimperl/perl/site/lib'
1 'C:/Dwimperl/perl/vendor/lib'
2 'C:/Dwimperl/perl/lib'
Which explains the error.
The text was updated successfully, but these errors were encountered:
Migrated from rt.cpan.org#81742 (status was 'new')
Requestors:
From jds@cpan.org on 2012-12-06 13:40:06
:
The text was updated successfully, but these errors were encountered: