| June 27, 2006 | Two or Three Things I Learned ... | Back Next |
Only became core with Perl 5.6.1
Least bad alternative: use within SKIP blocks
SKIP: {
eval { require 5.006_001 };
skip "tests require File::Temp, core with 5.6", (43 - 10) if $@;
use warnings;
use_ok( 'File::Temp', qw| tempdir |);
my $tdir = tempdir( CLEANUP => 1);
ok(chdir $tdir, 'changed to temp directory for testing');
...
ok(chdir $cwd, 'changed back to original directory');
}
| Home Last TOC |
|
© 2006 James E Keenan |
|
Back Next |