diff options
Diffstat (limited to 'perl')
45 files changed, 105 insertions, 71 deletions
diff --git a/perl/lib/Wallet/ACL.pm b/perl/lib/Wallet/ACL.pm index 948b71c..58e33b4 100644 --- a/perl/lib/Wallet/ACL.pm +++ b/perl/lib/Wallet/ACL.pm @@ -20,7 +20,7 @@ use warnings; use DateTime; use Wallet::Object::Base; -our $VERSION = '1.04'; +our $VERSION = '1.05'; ############################################################################## # Constructors diff --git a/perl/lib/Wallet/ACL/Base.pm b/perl/lib/Wallet/ACL/Base.pm index 320a731..1a33227 100644 --- a/perl/lib/Wallet/ACL/Base.pm +++ b/perl/lib/Wallet/ACL/Base.pm @@ -17,7 +17,7 @@ use 5.008; use strict; use warnings; -our $VERSION = '1.04'; +our $VERSION = '1.05'; ############################################################################## # Interface diff --git a/perl/lib/Wallet/ACL/External.pm b/perl/lib/Wallet/ACL/External.pm index 2285469..1dc1ea7 100644 --- a/perl/lib/Wallet/ACL/External.pm +++ b/perl/lib/Wallet/ACL/External.pm @@ -19,7 +19,7 @@ use Wallet::ACL::Base; use Wallet::Config; our @ISA = qw(Wallet::ACL::Base); -our $VERSION = '1.04'; +our $VERSION = '1.05'; ############################################################################## # Interface diff --git a/perl/lib/Wallet/ACL/Krb5.pm b/perl/lib/Wallet/ACL/Krb5.pm index 3309274..88f8cd9 100644 --- a/perl/lib/Wallet/ACL/Krb5.pm +++ b/perl/lib/Wallet/ACL/Krb5.pm @@ -20,7 +20,7 @@ use warnings; use Wallet::ACL::Base; our @ISA = qw(Wallet::ACL::Base); -our $VERSION = '1.04'; +our $VERSION = '1.05'; ############################################################################## # Interface diff --git a/perl/lib/Wallet/ACL/Krb5/Regex.pm b/perl/lib/Wallet/ACL/Krb5/Regex.pm index be6c5e1..d69ba60 100644 --- a/perl/lib/Wallet/ACL/Krb5/Regex.pm +++ b/perl/lib/Wallet/ACL/Krb5/Regex.pm @@ -20,7 +20,7 @@ use warnings; use Wallet::ACL::Krb5; our @ISA = qw(Wallet::ACL::Krb5); -our $VERSION = '1.04'; +our $VERSION = '1.05'; ############################################################################## # Interface diff --git a/perl/lib/Wallet/ACL/LDAP/Attribute.pm b/perl/lib/Wallet/ACL/LDAP/Attribute.pm index 65e0208..a3fb941 100644 --- a/perl/lib/Wallet/ACL/LDAP/Attribute.pm +++ b/perl/lib/Wallet/ACL/LDAP/Attribute.pm @@ -23,7 +23,7 @@ use Wallet::ACL::Base; use Wallet::Config; our @ISA = qw(Wallet::ACL::Base); -our $VERSION = '1.04'; +our $VERSION = '1.05'; ############################################################################## # Interface diff --git a/perl/lib/Wallet/ACL/LDAP/Attribute/Root.pm b/perl/lib/Wallet/ACL/LDAP/Attribute/Root.pm index 5ebece6..89d4eba 100644 --- a/perl/lib/Wallet/ACL/LDAP/Attribute/Root.pm +++ b/perl/lib/Wallet/ACL/LDAP/Attribute/Root.pm @@ -20,7 +20,7 @@ use warnings; use Wallet::ACL::LDAP::Attribute; our @ISA = qw(Wallet::ACL::LDAP::Attribute); -our $VERSION = '1.04'; +our $VERSION = '1.05'; ############################################################################## # Interface diff --git a/perl/lib/Wallet/ACL/Nested.pm b/perl/lib/Wallet/ACL/Nested.pm index a6b6655..d3f11ec 100644 --- a/perl/lib/Wallet/ACL/Nested.pm +++ b/perl/lib/Wallet/ACL/Nested.pm @@ -20,7 +20,7 @@ use warnings; use Wallet::ACL::Base; our @ISA = qw(Wallet::ACL::Base); -our $VERSION = '1.04'; +our $VERSION = '1.05'; ############################################################################## # Interface diff --git a/perl/lib/Wallet/ACL/NetDB.pm b/perl/lib/Wallet/ACL/NetDB.pm index c5fdc39..ead0429 100644 --- a/perl/lib/Wallet/ACL/NetDB.pm +++ b/perl/lib/Wallet/ACL/NetDB.pm @@ -21,7 +21,7 @@ use Wallet::ACL::Base; use Wallet::Config; our @ISA = qw(Wallet::ACL::Base); -our $VERSION = '1.04'; +our $VERSION = '1.05'; ############################################################################## # Interface diff --git a/perl/lib/Wallet/ACL/NetDB/Root.pm b/perl/lib/Wallet/ACL/NetDB/Root.pm index 2dd1562..cb123c4 100644 --- a/perl/lib/Wallet/ACL/NetDB/Root.pm +++ b/perl/lib/Wallet/ACL/NetDB/Root.pm @@ -20,7 +20,7 @@ use warnings; use Wallet::ACL::NetDB; our @ISA = qw(Wallet::ACL::NetDB); -our $VERSION = '1.04'; +our $VERSION = '1.05'; ############################################################################## # Interface diff --git a/perl/lib/Wallet/Admin.pm b/perl/lib/Wallet/Admin.pm index 707f410..630ac81 100644 --- a/perl/lib/Wallet/Admin.pm +++ b/perl/lib/Wallet/Admin.pm @@ -20,7 +20,7 @@ use warnings; use Wallet::ACL; use Wallet::Schema; -our $VERSION = '1.04'; +our $VERSION = '1.05'; # The last non-DBIx::Class version of Wallet::Schema. If a database has no # DBIx::Class versioning, we artificially install this version number before diff --git a/perl/lib/Wallet/Config.pm b/perl/lib/Wallet/Config.pm index 60f0e10..969ad9a 100644 --- a/perl/lib/Wallet/Config.pm +++ b/perl/lib/Wallet/Config.pm @@ -13,7 +13,7 @@ use 5.008; use strict; use warnings; -our $VERSION = '1.04'; +our $VERSION = '1.05'; # Path to the config file to load. our $PATH = $ENV{WALLET_CONFIG} || '/etc/wallet/wallet.conf'; diff --git a/perl/lib/Wallet/Database.pm b/perl/lib/Wallet/Database.pm index 83b8dfc..e98c85c 100644 --- a/perl/lib/Wallet/Database.pm +++ b/perl/lib/Wallet/Database.pm @@ -26,7 +26,7 @@ use Wallet::Config; use Wallet::Schema; our @ISA = qw(Wallet::Schema); -our $VERSION = '1.04'; +our $VERSION = '1.05'; ############################################################################## # Core overrides diff --git a/perl/lib/Wallet/Kadmin.pm b/perl/lib/Wallet/Kadmin.pm index 150c188..02a3b54 100644 --- a/perl/lib/Wallet/Kadmin.pm +++ b/perl/lib/Wallet/Kadmin.pm @@ -19,7 +19,7 @@ use warnings; use Wallet::Config; -our $VERSION = '1.04'; +our $VERSION = '1.05'; ############################################################################## # Utility functions for child classes diff --git a/perl/lib/Wallet/Kadmin/AD.pm b/perl/lib/Wallet/Kadmin/AD.pm index f2f86b9..6acebb9 100644 --- a/perl/lib/Wallet/Kadmin/AD.pm +++ b/perl/lib/Wallet/Kadmin/AD.pm @@ -26,7 +26,7 @@ use Wallet::Config; use Wallet::Kadmin; our @ISA = qw(Wallet::Kadmin); -our $VERSION = '1.04'; +our $VERSION = '1.05'; my $LDAP; diff --git a/perl/lib/Wallet/Kadmin/Heimdal.pm b/perl/lib/Wallet/Kadmin/Heimdal.pm index 57013de..1478936 100644 --- a/perl/lib/Wallet/Kadmin/Heimdal.pm +++ b/perl/lib/Wallet/Kadmin/Heimdal.pm @@ -22,7 +22,7 @@ use Wallet::Config; use Wallet::Kadmin; our @ISA = qw(Wallet::Kadmin); -our $VERSION = '1.04'; +our $VERSION = '1.05'; ############################################################################## # Utility functions diff --git a/perl/lib/Wallet/Kadmin/MIT.pm b/perl/lib/Wallet/Kadmin/MIT.pm index 373d4cf..99d8ea8 100644 --- a/perl/lib/Wallet/Kadmin/MIT.pm +++ b/perl/lib/Wallet/Kadmin/MIT.pm @@ -23,7 +23,7 @@ use Wallet::Config; use Wallet::Kadmin; our @ISA = qw(Wallet::Kadmin); -our $VERSION = '1.04'; +our $VERSION = '1.05'; ############################################################################## # kadmin Interaction diff --git a/perl/lib/Wallet/Object/Base.pm b/perl/lib/Wallet/Object/Base.pm index bf535e9..ef4716c 100644 --- a/perl/lib/Wallet/Object/Base.pm +++ b/perl/lib/Wallet/Object/Base.pm @@ -22,7 +22,7 @@ use Date::Parse qw(str2time); use Text::Wrap qw(wrap); use Wallet::ACL; -our $VERSION = '1.04'; +our $VERSION = '1.05'; ############################################################################## # Constructors diff --git a/perl/lib/Wallet/Object/Duo.pm b/perl/lib/Wallet/Object/Duo.pm index 1ec527e..1072e41 100644 --- a/perl/lib/Wallet/Object/Duo.pm +++ b/perl/lib/Wallet/Object/Duo.pm @@ -23,7 +23,7 @@ use Wallet::Config; use Wallet::Object::Base; our @ISA = qw(Wallet::Object::Base); -our $VERSION = '1.04'; +our $VERSION = '1.05'; # Mappings from our types into what Duo calls the integration types. our %DUO_TYPES = ( diff --git a/perl/lib/Wallet/Object/File.pm b/perl/lib/Wallet/Object/File.pm index bef8981..6ad236e 100644 --- a/perl/lib/Wallet/Object/File.pm +++ b/perl/lib/Wallet/Object/File.pm @@ -23,7 +23,7 @@ use Wallet::Config; use Wallet::Object::Base; our @ISA = qw(Wallet::Object::Base); -our $VERSION = '1.04'; +our $VERSION = '1.05'; ############################################################################## # File naming diff --git a/perl/lib/Wallet/Object/Keytab.pm b/perl/lib/Wallet/Object/Keytab.pm index 498e657..092daf7 100644 --- a/perl/lib/Wallet/Object/Keytab.pm +++ b/perl/lib/Wallet/Object/Keytab.pm @@ -22,7 +22,7 @@ use Wallet::Kadmin; use Wallet::Object::Base; our @ISA = qw(Wallet::Object::Base); -our $VERSION = '1.04'; +our $VERSION = '1.05'; ############################################################################## # Shared methods diff --git a/perl/lib/Wallet/Object/Password.pm b/perl/lib/Wallet/Object/Password.pm index 336aa9d..f124c43 100644 --- a/perl/lib/Wallet/Object/Password.pm +++ b/perl/lib/Wallet/Object/Password.pm @@ -23,7 +23,7 @@ use Wallet::Config; use Wallet::Object::File; our @ISA = qw(Wallet::Object::File); -our $VERSION = '1.04'; +our $VERSION = '1.05'; ############################################################################## # File naming diff --git a/perl/lib/Wallet/Object/WAKeyring.pm b/perl/lib/Wallet/Object/WAKeyring.pm index a64b376..923292d 100644 --- a/perl/lib/Wallet/Object/WAKeyring.pm +++ b/perl/lib/Wallet/Object/WAKeyring.pm @@ -24,7 +24,7 @@ use Wallet::Object::Base; use WebAuth 3.06 qw(WA_KEY_AES WA_AES_128); our @ISA = qw(Wallet::Object::Base); -our $VERSION = '1.04'; +our $VERSION = '1.05'; ############################################################################## # File naming diff --git a/perl/lib/Wallet/Policy/Stanford.pm b/perl/lib/Wallet/Policy/Stanford.pm index 2c761bb..3aeea1c 100644 --- a/perl/lib/Wallet/Policy/Stanford.pm +++ b/perl/lib/Wallet/Policy/Stanford.pm @@ -26,7 +26,7 @@ our (@EXPORT_OK, $VERSION); # against circular module loading (not that we load any modules, but # consistency is good). BEGIN { - $VERSION = '1.04'; + $VERSION = '1.05'; @EXPORT_OK = qw(default_owner verify_name is_for_host); } diff --git a/perl/lib/Wallet/Report.pm b/perl/lib/Wallet/Report.pm index 151a285..d4add04 100644 --- a/perl/lib/Wallet/Report.pm +++ b/perl/lib/Wallet/Report.pm @@ -20,7 +20,7 @@ use warnings; use Wallet::ACL; use Wallet::Schema; -our $VERSION = '1.04'; +our $VERSION = '1.05'; ############################################################################## # Constructor, destructor, and accessors diff --git a/perl/lib/Wallet/Schema/Result/Acl.pm b/perl/lib/Wallet/Schema/Result/Acl.pm index 9a73b18..b3836f9 100644 --- a/perl/lib/Wallet/Schema/Result/Acl.pm +++ b/perl/lib/Wallet/Schema/Result/Acl.pm @@ -13,7 +13,7 @@ use warnings; use base 'DBIx::Class::Core'; -our $VERSION = '1.04'; +our $VERSION = '1.05'; =for stopwords ACL diff --git a/perl/lib/Wallet/Schema/Result/AclEntry.pm b/perl/lib/Wallet/Schema/Result/AclEntry.pm index 1737084..d84f5d4 100644 --- a/perl/lib/Wallet/Schema/Result/AclEntry.pm +++ b/perl/lib/Wallet/Schema/Result/AclEntry.pm @@ -13,7 +13,7 @@ use warnings; use base 'DBIx::Class::Core'; -our $VERSION = '1.04'; +our $VERSION = '1.05'; =for stopwords ACL diff --git a/perl/lib/Wallet/Schema/Result/AclHistory.pm b/perl/lib/Wallet/Schema/Result/AclHistory.pm index 48aed49..db99b31 100644 --- a/perl/lib/Wallet/Schema/Result/AclHistory.pm +++ b/perl/lib/Wallet/Schema/Result/AclHistory.pm @@ -13,7 +13,7 @@ use warnings; use base 'DBIx::Class::Core'; -our $VERSION = '1.04'; +our $VERSION = '1.05'; __PACKAGE__->load_components("InflateColumn::DateTime"); diff --git a/perl/lib/Wallet/Schema/Result/AclScheme.pm b/perl/lib/Wallet/Schema/Result/AclScheme.pm index abdd541..165c6ee 100644 --- a/perl/lib/Wallet/Schema/Result/AclScheme.pm +++ b/perl/lib/Wallet/Schema/Result/AclScheme.pm @@ -13,7 +13,7 @@ use warnings; use base 'DBIx::Class::Core'; -our $VERSION = '1.04'; +our $VERSION = '1.05'; __PACKAGE__->load_components (qw//); diff --git a/perl/lib/Wallet/Schema/Result/Duo.pm b/perl/lib/Wallet/Schema/Result/Duo.pm index def9dce..0dedf8e 100644 --- a/perl/lib/Wallet/Schema/Result/Duo.pm +++ b/perl/lib/Wallet/Schema/Result/Duo.pm @@ -13,7 +13,7 @@ use warnings; use base 'DBIx::Class::Core'; -our $VERSION = '1.04'; +our $VERSION = '1.05'; =for stopwords keytab enctype diff --git a/perl/lib/Wallet/Schema/Result/Enctype.pm b/perl/lib/Wallet/Schema/Result/Enctype.pm index 24fa897..433a38e 100644 --- a/perl/lib/Wallet/Schema/Result/Enctype.pm +++ b/perl/lib/Wallet/Schema/Result/Enctype.pm @@ -1,10 +1,10 @@ # Wallet schema for Kerberos encryption type. # # Written by Jon Robertson <jonrober@stanford.edu> -# Copyright 2012, 2013 +# Copyright 2012-2013 # The Board of Trustees of the Leland Stanford Junior University # -# See LICENSE for licensing terms. +# SPDX-License-Identifier: MIT package Wallet::Schema::Result::Enctype; @@ -13,7 +13,7 @@ use warnings; use base 'DBIx::Class::Core'; -our $VERSION = '1.04'; +our $VERSION = '1.05'; =for stopwords Kerberos diff --git a/perl/lib/Wallet/Schema/Result/Flag.pm b/perl/lib/Wallet/Schema/Result/Flag.pm index 4ed8dcb..af352e2 100644 --- a/perl/lib/Wallet/Schema/Result/Flag.pm +++ b/perl/lib/Wallet/Schema/Result/Flag.pm @@ -13,7 +13,7 @@ use warnings; use base 'DBIx::Class::Core'; -our $VERSION = '1.04'; +our $VERSION = '1.05'; =head1 NAME diff --git a/perl/lib/Wallet/Schema/Result/KeytabEnctype.pm b/perl/lib/Wallet/Schema/Result/KeytabEnctype.pm index abb465e..0e30282 100644 --- a/perl/lib/Wallet/Schema/Result/KeytabEnctype.pm +++ b/perl/lib/Wallet/Schema/Result/KeytabEnctype.pm @@ -1,10 +1,10 @@ # Wallet schema for keytab enctype. # # Written by Jon Robertson <jonrober@stanford.edu> -# Copyright 2012, 2013 +# Copyright 2012-2013 # The Board of Trustees of the Leland Stanford Junior University # -# See LICENSE for licensing terms. +# SPDX-License-Identifier: MIT package Wallet::Schema::Result::KeytabEnctype; @@ -13,7 +13,7 @@ use warnings; use base 'DBIx::Class::Core'; -our $VERSION = '1.04'; +our $VERSION = '1.05'; =for stopwords keytab enctype diff --git a/perl/lib/Wallet/Schema/Result/KeytabSync.pm b/perl/lib/Wallet/Schema/Result/KeytabSync.pm index 1939e74..676d8d6 100644 --- a/perl/lib/Wallet/Schema/Result/KeytabSync.pm +++ b/perl/lib/Wallet/Schema/Result/KeytabSync.pm @@ -1,10 +1,10 @@ # Wallet schema for keytab synchronization. # # Written by Jon Robertson <jonrober@stanford.edu> -# Copyright 2012, 2013 +# Copyright 2012-2013 # The Board of Trustees of the Leland Stanford Junior University # -# See LICENSE for licensing terms. +# SPDX-License-Identifier: MIT package Wallet::Schema::Result::KeytabSync; @@ -13,7 +13,7 @@ use warnings; use base 'DBIx::Class::Core'; -our $VERSION = '1.04'; +our $VERSION = '1.05'; =for stopwords keytab diff --git a/perl/lib/Wallet/Schema/Result/Object.pm b/perl/lib/Wallet/Schema/Result/Object.pm index b4bc46f..3a25ed2 100644 --- a/perl/lib/Wallet/Schema/Result/Object.pm +++ b/perl/lib/Wallet/Schema/Result/Object.pm @@ -13,7 +13,7 @@ use warnings; use base 'DBIx::Class::Core'; -our $VERSION = '1.04'; +our $VERSION = '1.05'; __PACKAGE__->load_components("InflateColumn::DateTime"); diff --git a/perl/lib/Wallet/Schema/Result/ObjectHistory.pm b/perl/lib/Wallet/Schema/Result/ObjectHistory.pm index c6c6225..e8eb25d 100644 --- a/perl/lib/Wallet/Schema/Result/ObjectHistory.pm +++ b/perl/lib/Wallet/Schema/Result/ObjectHistory.pm @@ -13,7 +13,7 @@ use warnings; use base 'DBIx::Class::Core'; -our $VERSION = '1.04'; +our $VERSION = '1.05'; __PACKAGE__->load_components("InflateColumn::DateTime"); diff --git a/perl/lib/Wallet/Schema/Result/SyncTarget.pm b/perl/lib/Wallet/Schema/Result/SyncTarget.pm index ff6e3f3..134ab44 100644 --- a/perl/lib/Wallet/Schema/Result/SyncTarget.pm +++ b/perl/lib/Wallet/Schema/Result/SyncTarget.pm @@ -13,7 +13,7 @@ use warnings; use base 'DBIx::Class::Core'; -our $VERSION = '1.04'; +our $VERSION = '1.05'; =head1 NAME diff --git a/perl/lib/Wallet/Schema/Result/Type.pm b/perl/lib/Wallet/Schema/Result/Type.pm index a9238e6..7ffd03c 100644 --- a/perl/lib/Wallet/Schema/Result/Type.pm +++ b/perl/lib/Wallet/Schema/Result/Type.pm @@ -13,7 +13,7 @@ use warnings; use base 'DBIx::Class::Core'; -our $VERSION = '1.04'; +our $VERSION = '1.05'; =for stopwords APIs diff --git a/perl/lib/Wallet/Server.pm b/perl/lib/Wallet/Server.pm index af0d8a8..959595e 100644 --- a/perl/lib/Wallet/Server.pm +++ b/perl/lib/Wallet/Server.pm @@ -21,7 +21,7 @@ use Wallet::ACL; use Wallet::Config; use Wallet::Schema; -our $VERSION = '1.04'; +our $VERSION = '1.05'; ############################################################################## # Utility methods diff --git a/perl/t/docs/pod-spelling.t b/perl/t/docs/pod-spelling.t index 94d7503..819aa69 100755 --- a/perl/t/docs/pod-spelling.t +++ b/perl/t/docs/pod-spelling.t @@ -6,6 +6,7 @@ # which can be found at <https://www.eyrie.org/~eagle/software/rra-c-util/>. # # Written by Russ Allbery <eagle@eyrie.org> +# Copyright 2019 Russ Allbery <eagle@eyrie.org> # Copyright 2013-2014 # The Board of Trustees of the Leland Stanford Junior University # @@ -29,15 +30,16 @@ # # SPDX-License-Identifier: MIT -use 5.006; +use 5.008; use strict; use warnings; use lib 't/lib'; -use Test::More; use Test::RRA qw(skip_unless_author use_prereq); +use Test::More; + # Only run this test for the module author since the required stopwords are # too sensitive to the exact spell-checking program and dictionary. skip_unless_author('Spelling tests'); diff --git a/perl/t/docs/pod.t b/perl/t/docs/pod.t index 5fcfcdf..e7d0231 100755 --- a/perl/t/docs/pod.t +++ b/perl/t/docs/pod.t @@ -6,6 +6,7 @@ # which can be found at <https://www.eyrie.org/~eagle/software/rra-c-util/>. # # Written by Russ Allbery <eagle@eyrie.org> +# Copyright 2019 Russ Allbery <eagle@eyrie.org> # Copyright 2012-2014 # The Board of Trustees of the Leland Stanford Junior University # @@ -29,15 +30,16 @@ # # SPDX-License-Identifier: MIT -use 5.006; +use 5.008; use strict; use warnings; use lib 't/lib'; -use Test::More; use Test::RRA qw(skip_unless_automated use_prereq); +use Test::More; + # Skip this test for normal user installs, although pod2man may still fail. skip_unless_automated('POD syntax tests'); diff --git a/perl/t/style/minimum-version.t b/perl/t/style/minimum-version.t index 7698c2b..861367d 100755 --- a/perl/t/style/minimum-version.t +++ b/perl/t/style/minimum-version.t @@ -6,6 +6,7 @@ # which can be found at <https://www.eyrie.org/~eagle/software/rra-c-util/>. # # Written by Russ Allbery <eagle@eyrie.org> +# Copyright 2019 Russ Allbery <eagle@eyrie.org> # Copyright 2013-2014 # The Board of Trustees of the Leland Stanford Junior University # @@ -29,16 +30,17 @@ # # SPDX-License-Identifier: MIT -use 5.006; +use 5.008; use strict; use warnings; use lib 't/lib'; -use Test::More; use Test::RRA qw(skip_unless_automated use_prereq); use Test::RRA::Config qw($MINIMUM_VERSION); +use Test::More; + # Skip for normal user installs since this doesn't affect functionality. skip_unless_automated('Minimum version tests'); diff --git a/perl/t/style/strict.t b/perl/t/style/strict.t index a3d2a3e..a87c1fa 100755 --- a/perl/t/style/strict.t +++ b/perl/t/style/strict.t @@ -6,7 +6,7 @@ # which can be found at <https://www.eyrie.org/~eagle/software/rra-c-util/>. # # Written by Russ Allbery <eagle@eyrie.org> -# Copyright 2016 Russ Allbery <eagle@eyrie.org> +# Copyright 2016, 2018-2019 Russ Allbery <eagle@eyrie.org> # Copyright 2013-2014 # The Board of Trustees of the Leland Stanford Junior University # @@ -30,15 +30,16 @@ # # SPDX-License-Identifier: MIT -use 5.006; +use 5.008; use strict; use warnings; use lib 't/lib'; -use File::Spec; use Test::RRA qw(skip_unless_automated use_prereq); +use File::Spec; + # Skip for normal user installs since this doesn't affect functionality. skip_unless_automated('Strictness tests'); @@ -46,15 +47,40 @@ skip_unless_automated('Strictness tests'); # use 5.012 or later automatically implies use strict. use_prereq('Test::Strict', '0.25'); -# Test everything in the distribution directory except the Build and -# Makefile.PL scripts generated by Module::Build. We also want to check use -# warnings. -$Test::Strict::TEST_SKIP = ['Build', 'Makefile.PL']; +# Directories to exclude from checks. +my %EXCLUDE = map { $_ => 1 } qw(.git blib); + +# Determine whether we want to check the given file or top-level directory. +# Assume that the only interesting files at the top level are directories or +# files ending in *.PL. +# +# $file - Name of the file or directory +# +# Returns: 1 if it should be checked, undef otherwise. +sub should_check { + my ($file) = @_; + return if $EXCLUDE{$file}; + return 1 if -d $file; + return 1 if $file =~ m{ [.] PL \z }xms; + return; +} + +# Test::Strict (as of 0.47) doesn't have a way of excluding whole directories +# from all_perl_files_ok and doesn't exclude .git, which results in false +# positives if there are Perl files unpacked under .git (which is often the +# case when using dgit). We therefore can't just point it at the root of the +# module distribution and instead have to manually construct a list of +# interesting files. +opendir(my $rootdir, File::Spec->curdir) + or die "$0: cannot open current directory: $!\n"; +my @files = File::Spec->no_upwards(readdir($rootdir)); +closedir($rootdir) or die "$0: cannot close current directory: $!\n"; +my @to_check = grep { should_check($_) } @files; + +# Test the files and top-level directories we found, including checking for +# use warnings. $Test::Strict::TEST_WARNINGS = 1; -all_perl_files_ok(File::Spec->curdir); +all_perl_files_ok(@to_check); # Hack to suppress "used only once" warnings. -END { - $Test::Strict::TEST_SKIP = []; - $Test::Strict::TEST_WARNINGS = 0; -} +END { $Test::Strict::TEST_WARNINGS = 0 } diff --git a/perl/t/verifier/ldap-attr.t b/perl/t/verifier/ldap-attr.t index 321822d..4448b38 100755 --- a/perl/t/verifier/ldap-attr.t +++ b/perl/t/verifier/ldap-attr.t @@ -6,7 +6,7 @@ # access to the LDAP server and will be skipped in all other environments. # # Written by Russ Allbery <eagle@eyrie.org> -# Copyright 2018 Russ Allbery <eagle@eyrie.org> +# Copyright 2018, 2020 Russ Allbery <eagle@eyrie.org> # Copyright 2012-2014 # The Board of Trustees of the Leland Stanford Junior University # @@ -15,12 +15,13 @@ use strict; use warnings; -use Test::More; - use lib 't/lib'; + use Test::RRA qw(skip_unless_author); use Util; +use Test::More; + # This test requires a specific environment setup, so only run it for package # maintainers. skip_unless_author('LDAP verifier tests'); diff --git a/perl/t/verifier/netdb.t b/perl/t/verifier/netdb.t index c9e63d3..2a28468 100755 --- a/perl/t/verifier/netdb.t +++ b/perl/t/verifier/netdb.t @@ -7,7 +7,7 @@ # environments. # # Written by Russ Allbery <eagle@eyrie.org> -# Copyright 2018 Russ Allbery <eagle@eyrie.org> +# Copyright 2018, 2020 Russ Allbery <eagle@eyrie.org> # Copyright 2008, 2014 # The Board of Trustees of the Leland Stanford Junior University # @@ -16,14 +16,15 @@ use strict; use warnings; -use Test::More; - -use Wallet::ACL::NetDB; - use lib 't/lib'; + use Test::RRA qw(skip_unless_author); use Util; +use Test::More; + +use Wallet::ACL::NetDB; + # This test requires a specific environment setup, so only run it for package # maintainers. skip_unless_author('NetDB verifier tests'); |