Test::Environment::Plugin::Dump - Dump files reader plugin


Test-Environment documentation  | view source Contained in the Test-Environment distribution.

Index


NAME

Top

Test::Environment::Plugin::Dump - Dump files reader plugin

SYNOPSIS

Top

	use Test::Environment qw{
		Dump
	};

	dump_with_name('some_file.txt');

	set_dumps_folder($FindBin::Bin.'/dumps2');
	dump_with_name('some_other_file.txt');

DESCRIPTION

Top

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'.

FUNCTIONS

Top

import

All functions are exported 2 levels up. That is to the use Test::Environment caller.

dump_with_name($name)

Returns read_file($dumps_folder.'/'.$name).

set_dumps_folder($folder_name)

Set dumps root folder to $folder_name.

SEE ALSO

Top

Test::Environment http://search.cpan.org/perldoc?Test::Environment

AUTHOR

Top

Jozef Kutej - <jozef@kutej.net>


Test-Environment documentation  | view source Contained in the Test-Environment distribution.