Skip to content

Commit dfb4bd8

Browse files
committed
Replace bareword filehandles with lexical filehandles
Issue: https://progress.opensuse.org/issues/179975
1 parent 51951a7 commit dfb4bd8

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed

t/12-profiler.t

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,7 @@ my $t = Test::Mojo->new('OpenQA::WebAPI');
2525
# now get some DB action done
2626
$t->get_ok('/tests')->status_is(200);
2727

28-
open(FILE, $filename);
29-
my @lines = <FILE>;
30-
close(FILE);
28+
my @lines = <$fh>;
3129

3230
like(join('', @lines), qr/.*debug\] \[pid:.*\] \[DBIC\] Took .* seconds: SELECT.*/, 'seconds in log file');
3331

t/api/02-assets.t

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,8 @@ sub iso_path {
3131
sub touch_isos {
3232
my ($isos) = @_;
3333
for my $iso (@$isos) {
34-
ok(open(FH, '>', iso_path($iso)), "touch $iso");
35-
close FH;
34+
ok open(my $fh, '>', iso_path($iso)), "touch $iso";
35+
close $fh;
3636
}
3737
}
3838
my $iso1 = 'test-dvd-1.iso';

0 commit comments

Comments
 (0)