Apache2-AUS
view release on metacpan or search on metacpan
sub 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 base q(Apache::TestServer);
use lib 't/tlib';
use t::dbh;
use DBIx::Migration::Directories;
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 1.208 second using v1.01-cache-2.11-cpan-49f99fa48dc )