File tree Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -179,10 +179,10 @@ sub mangle_plpython3
179
179
my @files = glob (" $dir /$test .$extension $dir /${test} _[0-9].$extension " );
180
180
foreach my $file (@files )
181
181
{
182
- open (my $handle , " $file " ) || die " test file $file not found" ;
182
+ open (my $handle , ' < ' , $file ) || die " test file $file not found" ;
183
183
my $contents = <$handle >;
184
184
close ($handle );
185
- map
185
+ do
186
186
{
187
187
s / except ([[:alpha:]][[:alpha:].]*), *([[:alpha:]][[:alpha:]]*):/ except $1 as $2 :/ g ;
188
188
s / <type 'exceptions\. ([[:alpha:]]*)'>/ <class '$1 '>/ g ;
@@ -194,15 +194,16 @@ sub mangle_plpython3
194
194
s / LANGUAGE plpython2?u/ LANGUAGE plpython3u/ g ;
195
195
s / EXTENSION ([^ ]*_)*plpython2?u/ EXTENSION $1plpython3u/ g ;
196
196
s / installing required extension "plpython2u"/ installing required extension "plpython3u"/ g ;
197
- } $contents ;
197
+ } for ( $contents ) ;
198
198
my $base = basename $file ;
199
- open ($handle , " >$dir /python3/$base " ) || die " opening python 3 file for $file " ;
199
+ open ($handle , ' >' , " $dir /python3/$base " ) ||
200
+ die " opening python 3 file for $file " ;
200
201
print $handle $contents ;
201
202
close ($handle );
202
203
}
203
204
}
204
205
}
205
- map { $_ =~ s ! ^! python3/! ; } @$tests ;
206
+ do { s ! ^! python3/! ; } foreach ( @$tests ) ;
206
207
return @$tests ;
207
208
}
208
209
You can’t perform that action at this time.
0 commit comments