Test::MockFile::Plugin::FileTemp - Plugin to allow File::Temp calls
use Test::MockFile 'strict', plugin => 'FileTemp'; # using FileTemp plugin, all calls from FileTemp bypass the Test::MockFile strict mode my $dir = File::Temp->newdir(); ok opendir( my $dh, "$dir" ); ok open( my $f, '>', "$dir/myfile.txt" );
Test::MockFile::Plugin::FileTemp provides plugin to Test::MockFile to authorize any calls from File::Temp package.
Public method to register the plugin.
Test::MockFile, Test::MockFile::Plugins, Test::MockModule
To install Test::MockFile, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Test::MockFile
CPAN shell
perl -MCPAN -e shell install Test::MockFile
For more information on module installation, please visit the detailed CPAN module installation guide.