Test::Environment::Plugin::Dump - Dump files reader plugin
use Test::Environment qw{ Dump }; dump_with_name('some_file.txt'); set_dumps_folder($FindBin::Bin.'/dumps2'); dump_with_name('some_other_file.txt');
This plugin will export 'dump_with_name' and 'set_dumps_folder' functions.
set_dumps_folder($path) will set the root path where dump files will be looked up.
dump_with_name($file_name) will return
File::Slurp::read_file($dump_folder.'/'.$file_name)
Default $dump_folder is $FindBin::Bin.'/dumps'.
All functions are exported 2 levels up. That is to the use Test::Environment caller.
Returns read_file($dumps_folder.'/'.$name).
Set dumps root folder to $folder_name.
Test::Environment http://search.cpan.org/perldoc?Test::Environment
Jozef Kutej - <jozef@kutej.net>
To install Test::Environment, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Test::Environment
CPAN shell
perl -MCPAN -e shell install Test::Environment
For more information on module installation, please visit the detailed CPAN module installation guide.