Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit289bafd

Browse files
committed
Clear severity 5 perlcritic warnings from vcregress.pl
My recent update for python3 support used some idioms that areunapproved. This fixes them. Backpatch to all live branches like theoriginal.
1 parentab7825e commit289bafd

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

‎src/tools/msvc/vcregress.pl

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -261,10 +261,10 @@ sub mangle_plpython3
261261
my@files =glob("$dir/$test.$extension$dir/${test}_[0-9].$extension");
262262
foreachmy$file (@files)
263263
{
264-
open(my$handle,"$file") ||die"test file$file not found";
264+
open(my$handle,'<',$file) ||die"test file$file not found";
265265
my$contents = <$handle>;
266266
close($handle);
267-
map
267+
do
268268
{
269269
s/except ([[:alpha:]][[:alpha:].]*), *([[:alpha:]][[:alpha:]]*):/except$1 as$2:/g;
270270
s/<type 'exceptions\.([[:alpha:]]*)'>/<class '$1'>/g;
@@ -276,15 +276,16 @@ sub mangle_plpython3
276276
s/LANGUAGE plpython2?u/LANGUAGE plpython3u/g;
277277
s/EXTENSION ([^ ]*_)*plpython2?u/EXTENSION $1plpython3u/g;
278278
s/installing required extension "plpython2u"/installing required extension "plpython3u"/g;
279-
}$contents;
279+
}for ($contents);
280280
my$base = basename$file;
281-
open($handle,">$dir/python3/$base") ||die"opening python 3 file for$file";
281+
open($handle,'>',"$dir/python3/$base") ||
282+
die"opening python 3 file for$file";
282283
print$handle$contents;
283284
close($handle);
284285
}
285286
}
286287
}
287-
map {$_ =~s!^!python3/!; }@$tests;
288+
do {s!^!python3/!; }foreach(@$tests);
288289
return@$tests;
289290
}
290291

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp