No subject
Sun Nov 20 20:48:46 GMT 2022
```
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.
```
--
Reply to this email directly or view it on GitHub:
https://github.com/dbsrgits/dbix-class-schema-loader/issues/32
You are receiving this because you are subscribed to this thread.
Message ID: <dbsrgits/dbix-class-schema-loader/issues/32 at github.com>
----==_mimepart_637a92ca7bdf4_3ae1c67023115c
Content-Type: text/html;
charset=UTF-8
Content-Transfer-Encoding: 7bit
<p></p>
<p dir="auto">Migrated from <a href="https://rt.cpan.org/Ticket/Display.html?id=81742" rel="nofollow">rt.cpan.org#81742</a> (status was 'new')</p>
<p dir="auto">Requestors:</p>
<ul dir="auto">
<li><a href="mailto:JDS at cpan.org">JDS at cpan.org</a></li>
</ul>
<p dir="auto">From <a href="mailto:jds at cpan.org">jds at cpan.org</a> on 2012-12-06 13:40:06<br>
:</p>
<pre class="notranslate"><code class="notranslate">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.
</code></pre>
<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />Reply to this email directly, <a href="https://github.com/dbsrgits/dbix-class-schema-loader/issues/32">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AACJ4AR6IH3ZFT6HJK23BILWJKFEVANCNFSM6AAAAAASGAVB3Y">unsubscribe</a>.<br />You are receiving this because you are subscribed to this thread.<img src="https://github.com/notifications/beacon/AACJ4AW66XCVRKSGNH2JNKDWJKFEVA5CNFSM6AAAAAASGAVB32WGG33NNVSW45C7OR4XAZNFJFZXG5LFVJRW63LNMVXHIX3JMTHFNWFPSI.gif" height="1" width="1" alt="" /><span style="color: transparent; font-size: 0; display: none; visibility: hidden; overflow: hidden; opacity: 0; width: 0; height: 0; max-width: 0; max-height: 0; mso-hide: all">Message ID: <span><dbsrgits/dbix-class-schema-loader/issues/32</span><span>@</span><span>github</span><span>.</span><span>com></span></span></p>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/dbsrgits/dbix-class-schema-loader/issues/32",
"url": "https://github.com/dbsrgits/dbix-class-schema-loader/issues/32",
"name": "View Issue"
},
"description": "View this Issue on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>
----==_mimepart_637a92ca7bdf4_3ae1c67023115c--
More information about the DBIx-Class-Devel
mailing list