Test::File::Cleaner

Automatically clean up your filesystem after tests
Download

Test::File::Cleaner Ranking & Summary

Advertisement

  • Rating:
  • License:
  • Perl Artistic License
  • Price:
  • FREE
  • Publisher Name:
  • Adam Kennedy
  • Publisher web site:
  • http://search.cpan.org/~adamk/

Test::File::Cleaner Tags


Test::File::Cleaner Description

Automatically clean up your filesystem after tests Test::File::Cleaner is a Perl module to automatically clean up your filesystem after tests.SYNOPSIS # Create the cleaner my $Cleaner = Test::File::Cleaner->new( 'file_dmz' ); # Do some tests that create files touch 'file_dmz/foo'; # Cleaner cleans when it is DESTROYed exit(); # Alternatively, force an immediate clean up $Cleaner->clean;When writing file-related testing code, it is common to end up with a number of files scattered all over the testing directories. If you are running the test scripts over and over these leftover files can interfere with subsequent test runs, and so they need to be cleaned up.This clean up code typically needs to be done at END-time, so that the files are cleaned up even if you break out of the test script while it is running. The code to do this can get long and is labourious to maintain.Test::File::Cleaner attempts to solve this problem. When you create a Cleaner object for a particular directory, the object scans and saves the contents of the directory.When the object is DESTROYed, it compares the current state to the original, and removes any new files and directories created during the testing process. Requirements: · Perl


Test::File::Cleaner Related Software