Skip to content

Commit e0e92a1

Browse files
Merge branch 'pull/34' into master
2 parents 186caee + 8e263f1 commit e0e92a1

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

t/cmp.t

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ use strict;
77
BEGIN {use_ok( "File::Temp" ); }
88

99
{
10-
my $fh = new File::Temp();
10+
my $fh = File::Temp->new();
1111
isa_ok ($fh, 'File::Temp');
1212

1313
ok( "$fh" ne "foo", "compare stringified object with string");

t/lock.t

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ if ($@) {
4343
ok( !$status, "File $fh is locked" );
4444

4545
# Now get a tempfile with locking disabled
46-
$fh = new File::Temp( EXLOCK => 0 );
46+
$fh = File::Temp->new( EXLOCK => 0 );
4747

4848
eval {
4949
local $SIG{ALRM} = sub { die "alarm\n" }; # NB: \n required

t/object.t

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ like( $@, qr/can't be called as a method/, "File::Temp->tempfile error" );
4141

4242
# Tempfile
4343
# Open tempfile in some directory, unlink at end
44-
my $fh = new File::Temp( SUFFIX => '.txt' );
44+
my $fh = File::Temp->new( SUFFIX => '.txt' );
4545

4646
ok( (-f "$fh"), "File $fh exists" );
4747
# Should still be around after closing
@@ -89,7 +89,7 @@ ok( (-d $tempdir), "Does $tempdir directory exist" );
8989
push(@dirs, $tempdir);
9090

9191
# Create file in the temp dir
92-
$fh = new File::Temp(
92+
$fh = File::Temp->new(
9393
DIR => $tempdir,
9494
SUFFIX => '.dat',
9595
);
@@ -102,15 +102,15 @@ push(@files, "$fh");
102102

103103
# Test tempfile
104104
# ..and again (without unlinking it)
105-
$fh = new File::Temp( DIR => $tempdir, UNLINK => 0 );
105+
$fh = File::Temp->new( DIR => $tempdir, UNLINK => 0 );
106106

107107
print "# TEMPFILE: Created $fh\n";
108108
ok( (-f "$fh" ), "Second file $fh exists in tempdir [nounlink]?");
109109
push(@files, "$fh");
110110

111111
# and another (with template)
112112

113-
$fh = new File::Temp( TEMPLATE => 'helloXXXXXXX',
113+
$fh = File::Temp->new( TEMPLATE => 'helloXXXXXXX',
114114
DIR => $tempdir,
115115
SUFFIX => '.dat',
116116
);
@@ -133,7 +133,7 @@ push(@files, "$fh");
133133

134134
# Create a temporary file that should stay around after
135135
# it has been closed
136-
$fh = new File::Temp( TEMPLATE => 'permXXXXXXX', UNLINK => 0);
136+
$fh = File::Temp->new( TEMPLATE => 'permXXXXXXX', UNLINK => 0);
137137

138138
print "# TEMPFILE: Created $fh\n";
139139
ok( -f "$fh", "File $fh exists?" );
@@ -143,7 +143,7 @@ push( @still_there, "$fh"); # check at END
143143

144144
# Now create a temp file that will remain when the object
145145
# goes out of scope because of $KEEP_ALL
146-
$fh = new File::Temp( TEMPLATE => 'permXXXXXXX', UNLINK => 1);
146+
$fh = File::Temp->new( TEMPLATE => 'permXXXXXXX', UNLINK => 1);
147147

148148
print "# TEMPFILE: Created $fh\n";
149149
ok( -f "$fh", "File $fh exists?" );

0 commit comments

Comments
 (0)