diff options
Diffstat (limited to 'tests/tap/perl/Test/RRA/ModuleVersion.pm')
-rw-r--r-- | tests/tap/perl/Test/RRA/ModuleVersion.pm | 20 |
1 files changed, 8 insertions, 12 deletions
diff --git a/tests/tap/perl/Test/RRA/ModuleVersion.pm b/tests/tap/perl/Test/RRA/ModuleVersion.pm index 8b6dba2..7774351 100644 --- a/tests/tap/perl/Test/RRA/ModuleVersion.pm +++ b/tests/tap/perl/Test/RRA/ModuleVersion.pm @@ -8,32 +8,28 @@ package Test::RRA::ModuleVersion; -use 5.006; +use 5.008; +use base qw(Exporter); use strict; use warnings; -use Exporter; use File::Find qw(find); use Test::More; use Test::RRA::Config qw(@MODULE_VERSION_IGNORE); -# For Perl 5.006 compatibility. -## no critic (ClassHierarchies::ProhibitExplicitISA) - # Declare variables that should be set in BEGIN for robustness. -our (@EXPORT_OK, @ISA, $VERSION); +our (@EXPORT_OK, $VERSION); # Set $VERSION and everything export-related in a BEGIN block for robustness # against circular module loading (not that we load any modules, but # consistency is good). BEGIN { - @ISA = qw(Exporter); @EXPORT_OK = qw(test_module_versions update_module_versions); # This version should match the corresponding rra-c-util release, but with # two digits for the minor version, including a leading zero if necessary, # so that it will sort properly. - $VERSION = '7.02'; + $VERSION = '8.02'; } # A regular expression matching the version string for a module using the @@ -139,7 +135,7 @@ sub _update_module_version { } # Scan for the version and replace it. - open(my $in, q{<}, $file) or die "$0: cannot open $file: $!\n"; + open(my $in, q{<}, $file) or die "$0: cannot open $file: $!\n"; open(my $out, q{>}, "$file.new") or die "$0: cannot create $file.new: $!\n"; SCAN: @@ -155,8 +151,8 @@ sub _update_module_version { # Copy the rest of the input file to the output file. print {$out} <$in> or die "$0: cannot write to $file.new: $!\n"; - close($out) or die "$0: cannot flush $file.new: $!\n"; - close($in) or die "$0: error reading from $file: $!\n"; + close($out) or die "$0: cannot flush $file.new: $!\n"; + close($in) or die "$0: error reading from $file: $!\n"; # All done. Rename the new file over top of the old file. rename("$file.new", $file) @@ -269,7 +265,7 @@ Russ Allbery <eagle@eyrie.org> =head1 COPYRIGHT AND LICENSE -Copyright 2016, 2018 Russ Allbery <eagle@eyrie.org> +Copyright 2016, 2018-2019 Russ Allbery <eagle@eyrie.org> Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal |