-#!./perl
+#!/usr/bin/perl -w
+# Test for File::Temp - POSIX functions
BEGIN {
- chdir 't' if -d 't';
- unshift @INC, '../lib';
+ chdir 't' if -d 't';
+ @INC = '../lib';
+ require Test; import Test;
+ plan(tests => 7);
}
-# Test for File::Temp - POSIX functions
-
use strict;
-use Test;
-BEGIN { plan tests => 7}
use File::Temp qw/ :POSIX unlink0 /;
ok(1);
print "# TMPNAM file name: $tmpnam\n";
-# TMPNAM array context
+# TMPNAM list context
# Not strict posix behaviour
(my $fh, $tmpnam) = tmpnam();
-print "# TMPNAM: in array context: $fh $tmpnam\n";
+print "# TMPNAM: in list context: $fh $tmpnam\n";
# File is opened - make sure it exists
ok( (-e $tmpnam ));