@@ -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
4646ok( (-f " $fh " ), " File $fh exists" );
4747# Should still be around after closing
@@ -89,7 +89,7 @@ ok( (-d $tempdir), "Does $tempdir directory exist" );
8989push (@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
107107print " # TEMPFILE: Created $fh \n " ;
108108ok( (-f " $fh " ), " Second file $fh exists in tempdir [nounlink]?" );
109109push (@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
138138print " # TEMPFILE: Created $fh \n " ;
139139ok( -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
148148print " # TEMPFILE: Created $fh \n " ;
149149ok( -f " $fh " , " File $fh exists?" );
0 commit comments