File tree 1 file changed +3
-3
lines changed
1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -90,7 +90,7 @@ sub store {
90
90
croak " no upload specified" unless $upload ;
91
91
92
92
# generate UUID
93
- my $ug = new Data::UUID;
93
+ my $ug = Data::UUID-> new ;
94
94
my $uuid = $ug -> create_str;
95
95
96
96
# generate one-time secret
@@ -112,7 +112,7 @@ sub store {
112
112
$upload -> move_to($filePath );
113
113
114
114
# write info file
115
- open my $infoFH , " > " , $infoPath
115
+ open my $infoFH , ' >:encoding(UTF-8) ' , $infoPath
116
116
or die " failed to write upload info file $infoPath : $! " ;
117
117
print $infoFH " $realFileName \n $secret \n " ;
118
118
close $infoFH ;
@@ -203,7 +203,7 @@ sub retrieve {
203
203
croak " no upload matches the ID specified" unless -e $infoPath ;
204
204
205
205
# get real file name and secret from info file
206
- open my $infoFH , " < " , $infoPath
206
+ open my $infoFH , ' <:encoding(UTF-8) ' , $infoPath
207
207
or die " failed to read upload info file $infoPath : $! " ;
208
208
my ($realFileName , $secret ) = <$infoFH >;
209
209
close $infoFH ;
You can’t perform that action at this time.
0 commit comments