Apache2-AUS
view release on metacpan or search on metacpan
111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758sub
pre_configure {
my
$self
=
shift
;
# mod_bt doesn't like to be loaded if it isn't configured.
Apache::TestConfig::autoconfig_skip_module_add(
'mod_bt.c'
)
}
sub
configure {
my
$self
=
shift
;
bless
$self
->{server},
"Apache2::AUS::TestServer"
;
return
$self
->SUPER::configure(
@_
);
}
package
Apache2::AUS::TestServer;
use
t::dbh;
sub
start {
my
$self
=
shift
;
warn
"installing database schema!"
;
if
(
my
$dbh
= dbh) {
my
$mh
= DBIx::Migration::Directories->new(
schema
=>
"Schema::RDBMS::AUS"
,
dbh
=>
$dbh
,
);
$mh
->full_migrate;
$dbh
->disconnect;
}
return
$self
->SUPER::start(
@_
);
}
sub
stop {
my
$self
=
shift
;
my
$rv
;
if
(
$rv
=
$self
->SUPER::stop(
@_
)) {
warn
"removing database schema!"
;
if
(
my
$dbh
= dbh) {
my
$mh
= DBIx::Migration::Directories->new(
schema
=>
"Schema::RDBMS::AUS"
,
dbh
=>
$dbh
,
);
$mh
->full_delete_schema;
$dbh
->disconnect;
}
}
( run in 0.434 second using v1.01-cache-2.11-cpan-26ccb49234f )