Test::mysql::DatadirDumper - Dump mysql data directory for Test::mysqld
use Test::mysql::DatadirDumper; my $datadir = 'path/to/datadir'; Test::mysqld::DatadirDumper->new( datadir => $datadir, ddl_file => 't/data/ddl.sql', fixtures => ['t/data/item.yml'], )->dump; # $datadir is usable as follows my $mysqld = Test::mysqld->new( my_cnf => { 'skip-networking' => '', }, copy_data_from => $datadir, );
Test::mysql::DatadirDumper is to dump data directory of mysql. The directory is useful for Test::mysql's copy_data_from option.
copy_data_from
new is constructor and following options are available.
new
datadir:Str
Required. Data directory to be dumped.
ddl_file:Str
Required. Create statements for mysql.
fixtures:ArrayRef
Optional.
dump
Dump data directory.
Copyright (C) Songmu.
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
Songmu <y.songmu@gmail.com>
To install Test::mysqld::DatadirDumper, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Test::mysqld::DatadirDumper
CPAN shell
perl -MCPAN -e shell install Test::mysqld::DatadirDumper
For more information on module installation, please visit the detailed CPAN module installation guide.