# HG changeset patch # User Heiko Schlittermann (JUMPER) # Date 1305298893 -7200 # Node ID a4a87929803f6a5751aa174d5f002d75ef2bdaec # Parent 38a3e4aa59c009498ce141ee90e0d45e6f60533b replaced IO::File by normal open() diff -r 38a3e4aa59c0 -r a4a87929803f upload.pl --- a/upload.pl Fri May 13 10:26:06 2011 +0200 +++ b/upload.pl Fri May 13 17:01:33 2011 +0200 @@ -26,7 +26,6 @@ use CGI qw(:all *table); use CGI::Carp qw(fatalsToBrowser); use CGI::Pretty; -use IO::File; use File::Basename; use Digest::MD5 qw(md5_hex); use OSSP::uuid; @@ -89,11 +88,11 @@ my $dir = "$DIR/$uuid-$expires"; mkdir $dir, 0750 or die "Can't mkdir $dir: $!\n"; - my $outfh = new IO::File ">$dir/$filename" + open(my $outfh, ">" => "$dir/$filename") or die "Can't create $dir/$filename: $!\n"; print {$outfh} <$file>; - if (my $atfh = new IO::File("|at now + $days days")) { + if (open(my $atfh, "|-" => "at now + $days days")) { print {$atfh} "rm -f \"$dir/$filename\"\n", "rmdir \"$dir\"\n";