Act on some Kritika feedback

This commit is contained in:
Dave Cross 2021-01-23 12:12:20 +00:00
parent 43d0bfc5d8
commit 780b0b886f
4 changed files with 11 additions and 2 deletions

View file

@ -83,7 +83,7 @@ sub parse_file {
croak "Spec file $file is empty\n";
}
open my $fh, $file or croak "Cannot open $file: $!\n";
open my $fh, '<', $file or croak "Cannot open $file: $!\n";
my $scalars = $self->parse_spec->{scalars};
my $arrays = $self->parse_spec->{arrays};

View file

@ -1,9 +1,12 @@
use strict;
use warnings;
use Test::More;
use Test::Exception;
BEGIN { use_ok('Parse::RPM::Spec') };
ok($spec = Parse::RPM::Spec->new( { file => 't/file.spec' } ),
ok(my $spec = Parse::RPM::Spec->new( { file => 't/file.spec' } ),
'Got an object');
isa_ok($spec, 'Parse::RPM::Spec');

View file

@ -1,3 +1,6 @@
use strict;
use warnings;
use Test::More;
eval "use Test::Pod 1.00";
plan skip_all => "Test::Pod 1.00 required for testing POD" if $@;

View file

@ -1,3 +1,6 @@
use strict;
use warnings;
use Test::More;
eval "use Test::Pod::Coverage 1.00";
plan skip_all => "Test::Pod::Coverage 1.00 required for testing POD coverage" if $@;