DBIx-Class-Schema-Loader-DBI-MariaDB
view release on metacpan or search on metacpan
t/lib/dbixcsl_test_dir.pm view on Meta::CPAN
1234567891011121314151617package
dbixcsl_test_dir;
use
strict;
use
warnings;
use
namespace::clean;
use
DBI ();
our
@EXPORT_OK
=
'$tdir'
;
die
"/t does not exist, this can't be right...\n"
unless
-d
't'
;
my
$tbdir
=
't/var'
;
t/lib/dbixcsl_test_dir.pm view on Meta::CPAN
282930313233343536373839404142434445464748no
warnings
'redefine'
;
my
$connect
= \
&DBI::connect
;
my
@handles
;
*DBI::connect
=
sub
{
my
$dbh
=
$connect
->(
@_
);
push
@handles
,
$dbh
;
weaken
$handles
[-1];
return
$dbh
;
};
END {
if
(not
$ENV
{SCHEMA_LOADER_TESTS_NOCLEANUP}) {
foreach
my
$dbh
(
@handles
) {
$dbh
->disconnect
if
$dbh
;
}
rmtree(
$tdir
, 1, 1);
( run in 0.239 second using v1.01-cache-2.11-cpan-26ccb49234f )