The Perl Advent Calendar needs more articles for 2022. Submit your idea today!

NAME

Test::MockFile::Plugin::FileTemp - Plugin to allow File::Temp calls

SYNOPSIS

  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" );

DESCRIPTION

Test::MockFile::Plugin::FileTemp provides plugin to Test::MockFile to authorize any calls from File::Temp package.

METHODS

register( $self )

Public method to register the plugin.

SEE ALSO

Test::MockFile, Test::MockFile::Plugins, Test::MockModule