diff --git a/lib/Devel/Cover/Test.pm b/lib/Devel/Cover/Test.pm index 3168ae84..339f94b0 100644 --- a/lib/Devel/Cover/Test.pm +++ b/lib/Devel/Cover/Test.pm @@ -215,9 +215,9 @@ sub run_test { return 1 unless $v; # assume we are generating the golden results my $gold = "$base.$v"; - open I, $gold or die "Cannot open $gold: $!"; - my @cover = ; - close I or die "Cannot close $gold: $!"; + open my $i, "<", $gold or die "Cannot open $gold: $!"; + my @cover = <$i>; + close $i or die "Cannot close $gold: $!"; $self->{cover} = \@cover; # print STDERR "gold from $gold\n", @cover if $self->{debug};