DBIx-Class-Schema-Versioned-Inline

 view release on metacpan or  search on metacpan

t/lib/Role/MySQL.pm  view on Meta::CPAN

    eval { $self->database }
      or plan skip_all => "Init database failed: $@";
}

sub _build_database {
    my $self = shift;
    no warnings 'once';    # prevent: "Test::mysqld::errstr" used only once
    my $mysqld = Test::mysqld->new(
        my_cnf => {
            'character-set-server' => 'utf8',
            'collation-server'     => 'utf8_unicode_ci',
            'skip-networking'      => '',
        }
    ) or die $Test::mysqld::errstr;
    return $mysqld;
}

sub _build_dbd_version {
    my $self = shift;
    return
        "DBD::mysql $DBD::mysql::VERSION Test::mysqld "

t/lib/Role/SQLite.pm  view on Meta::CPAN

    return "DBD::SQLite $DBD::SQLite::VERSION";
}

sub connect_info {
    my $self = shift;

    return (
        "dbi:SQLite:dbname=$dbfile",
        undef, undef,
        {
            sqlite_unicode  => 1,
            on_connect_call => 'use_foreign_keys',
            on_connect_do   => 'PRAGMA synchronous = OFF',
            quote_names     => 1,
        }
    );

}

sub _build_database_info {
    my $self = shift;



( run in 0.846 second using v1.01-cache-2.11-cpan-f29a10751f0 )