New Upstream Snapshot - libstring-mkpasswd-perl

Ready changes

Summary

Merged new upstream version: 0.05+git20150129.1.b8cdd1e (was: 0.05).

Resulting package

Built on 2022-11-19T19:41 (took 7m53s)

The resulting binary packages can be installed (if you have the apt repository enabled) by running one of:

apt install -t fresh-snapshots libstring-mkpasswd-perl

Lintian Result

Diff

diff --git a/LICENSE b/LICENSE
index 2faf02a..d8d53b8 100644
--- a/LICENSE
+++ b/LICENSE
@@ -22,7 +22,7 @@ This is free software, licensed under:
                      Version 1, February 1989
 
  Copyright (C) 1989 Free Software Foundation, Inc.
- 51 Franklin St, Suite 500, Boston, MA  02110-1335  USA
+ 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 
  Everyone is permitted to copy and distribute verbatim copies
  of this license document, but changing it is not allowed.
@@ -292,21 +292,21 @@ Definitions:
 
   - "Package" refers to the collection of files distributed by the Copyright
     Holder, and derivatives of that collection of files created through
-    textual modification. 
+    textual modification.
   - "Standard Version" refers to such a Package if it has not been modified,
     or has been modified in accordance with the wishes of the Copyright
-    Holder. 
+    Holder.
   - "Copyright Holder" is whoever is named in the copyright or copyrights for
-    the package. 
+    the package.
   - "You" is you, if you're thinking about copying or distributing this Package.
   - "Reasonable copying fee" is whatever you can justify on the basis of media
     cost, duplication charges, time of people involved, and so on. (You will
     not be required to justify it to the Copyright Holder, but only to the
-    computing community at large as a market that must bear the fee.) 
+    computing community at large as a market that must bear the fee.)
   - "Freely Available" means that no fee is charged for the item itself, though
     there may be fees involved in handling the item. It also means that
     recipients of the item may redistribute it under the same conditions they
-    received it. 
+    received it.
 
 1. You may make and give away verbatim copies of the source form of the
 Standard Version of this Package without restriction, provided that you
@@ -373,7 +373,7 @@ products derived from this software without specific prior written permission.
 
 9. THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED
 WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
-MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
 
 The End
 
diff --git a/MANIFEST b/MANIFEST
index 1e14b6c..00762dd 100644
--- a/MANIFEST
+++ b/MANIFEST
@@ -1,3 +1,4 @@
+# This file was automatically generated by Dist::Zilla::Plugin::Manifest v6.025.
 Changes
 LICENSE
 MANIFEST
@@ -7,8 +8,7 @@ README
 bin/mkpasswd.pl
 dist.ini
 lib/String/MkPasswd.pm
-t/01use.t
-t/02length.t
-t/03count.t
-t/04fatal.t
-t/05ambiguous.t
+t/ambiguous.t
+t/count.t
+t/fatal.t
+t/length.t
diff --git a/META.yml b/META.yml
index 4d28ffd..6a54ec8 100644
--- a/META.yml
+++ b/META.yml
@@ -3,27 +3,28 @@ abstract: 'random password generator'
 author:
   - 'Chris Grau <cgrau@cpan.org>'
 build_requires:
-  Test::More: 0
+  Test::More: '0.96'
+  warnings: '0'
 configure_requires:
-  ExtUtils::MakeMaker: 6.30
+  ExtUtils::MakeMaker: '0'
 dynamic_config: 0
-generated_by: 'Dist::Zilla version 4.300039, CPAN::Meta::Converter version 2.120921'
+generated_by: 'Dist::Zilla version 6.025, CPAN::Meta::Converter version 2.150010'
 license: perl
 meta-spec:
   url: http://module-build.sourceforge.net/META-spec-v1.4.html
-  version: 1.4
+  version: '1.4'
 name: String-MkPasswd
 requires:
-  Carp: 0
-  Exporter: 0
-  File::Basename: 0
-  Getopt::Long: 0
-  Text::Wrap: 0
-  base: 0
-  constant: 0
-  perl: 5.006001
-  strict: 0
-resources:
-  homepage: https://github.com/sirhc/string-mkpasswd
-  repository: https://github.com/sirhc/string-mkpasswd.git
-version: 0.05
+  Carp: '0'
+  Exporter: '0'
+  File::Basename: '0'
+  Getopt::Long: '0'
+  Text::Wrap: '0'
+  base: '0'
+  constant: '0'
+  perl: '5.006001'
+  strict: '0'
+version: '0.05'
+x_generated_by_perl: v5.36.0
+x_serialization_backend: 'YAML::Tiny version 1.73'
+x_spdx_expression: 'Artistic-1.0-Perl OR GPL-1.0-or-later'
diff --git a/Makefile.PL b/Makefile.PL
index fdc3fbf..0f7fea5 100644
--- a/Makefile.PL
+++ b/Makefile.PL
@@ -1,25 +1,23 @@
-
+# This file was automatically generated by Dist::Zilla::Plugin::MakeMaker v6.025.
 use strict;
 use warnings;
 
 use 5.006001;
 
-use ExtUtils::MakeMaker 6.30;
-
-
+use ExtUtils::MakeMaker;
 
 my %WriteMakefileArgs = (
   "ABSTRACT" => "random password generator",
   "AUTHOR" => "Chris Grau <cgrau\@cpan.org>",
-  "BUILD_REQUIRES" => {},
   "CONFIGURE_REQUIRES" => {
-    "ExtUtils::MakeMaker" => "6.30"
+    "ExtUtils::MakeMaker" => 0
   },
   "DISTNAME" => "String-MkPasswd",
   "EXE_FILES" => [
     "bin/mkpasswd.pl"
   ],
   "LICENSE" => "perl",
+  "MIN_PERL_VERSION" => "5.006001",
   "NAME" => "String::MkPasswd",
   "PREREQ_PM" => {
     "Carp" => 0,
@@ -32,7 +30,8 @@ my %WriteMakefileArgs = (
     "strict" => 0
   },
   "TEST_REQUIRES" => {
-    "Test::More" => 0
+    "Test::More" => "0.96",
+    "warnings" => 0
   },
   "VERSION" => "0.05",
   "test" => {
@@ -41,36 +40,27 @@ my %WriteMakefileArgs = (
 );
 
 
-unless ( eval { ExtUtils::MakeMaker->VERSION(6.63_03) } ) {
-  my $tr = delete $WriteMakefileArgs{TEST_REQUIRES};
-  my $br = $WriteMakefileArgs{BUILD_REQUIRES};
-  for my $mod ( keys %$tr ) {
-    if ( exists $br->{$mod} ) {
-      $br->{$mod} = $tr->{$mod} if $tr->{$mod} > $br->{$mod};
-    }
-    else {
-      $br->{$mod} = $tr->{$mod};
-    }
-  }
-}
+my %FallbackPrereqs = (
+  "Carp" => 0,
+  "Exporter" => 0,
+  "File::Basename" => 0,
+  "Getopt::Long" => 0,
+  "Test::More" => "0.96",
+  "Text::Wrap" => 0,
+  "base" => 0,
+  "constant" => 0,
+  "strict" => 0,
+  "warnings" => 0
+);
 
-unless ( eval { ExtUtils::MakeMaker->VERSION(6.56) } ) {
-  my $br = delete $WriteMakefileArgs{BUILD_REQUIRES};
-  my $pp = $WriteMakefileArgs{PREREQ_PM};
-  for my $mod ( keys %$br ) {
-    if ( exists $pp->{$mod} ) {
-      $pp->{$mod} = $br->{$mod} if $br->{$mod} > $pp->{$mod};
-    }
-    else {
-      $pp->{$mod} = $br->{$mod};
-    }
-  }
+
+unless ( eval { ExtUtils::MakeMaker->VERSION(6.63_03) } ) {
+  delete $WriteMakefileArgs{TEST_REQUIRES};
+  delete $WriteMakefileArgs{BUILD_REQUIRES};
+  $WriteMakefileArgs{PREREQ_PM} = \%FallbackPrereqs;
 }
 
 delete $WriteMakefileArgs{CONFIGURE_REQUIRES}
   unless eval { ExtUtils::MakeMaker->VERSION(6.52) };
 
 WriteMakefile(%WriteMakefileArgs);
-
-
-
diff --git a/README b/README
index d0b03c0..3669aab 100644
--- a/README
+++ b/README
@@ -1,5 +1,3 @@
-
-
 This archive contains the distribution String-MkPasswd,
 version 0.05:
 
@@ -11,3 +9,4 @@ This is free software; you can redistribute it and/or modify it under
 the same terms as the Perl 5 programming language system itself.
 
 
+This README file was generated by Dist::Zilla::Plugin::Readme v6.025.
diff --git a/debian/changelog b/debian/changelog
index f1723f6..8770c03 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+libstring-mkpasswd-perl (0.05+git20150129.1.b8cdd1e-1) UNRELEASED; urgency=low
+
+  * New upstream snapshot.
+
+ -- Debian Janitor <janitor@jelmer.uk>  Sat, 19 Nov 2022 19:37:05 -0000
+
 libstring-mkpasswd-perl (0.05-3) unstable; urgency=medium
 
   [ Debian Janitor ]
diff --git a/t/01use.t b/t/01use.t
deleted file mode 100644
index da95068..0000000
--- a/t/01use.t
+++ /dev/null
@@ -1,7 +0,0 @@
-use Test::More tests => 3;
-BEGIN { use_ok('String::MkPasswd') };
-
-my $passwd = String::MkPasswd::mkpasswd();
-
-ok(defined $passwd, "defined");
-ok(length $passwd > 0, "length");
diff --git a/t/02length.t b/t/02length.t
deleted file mode 100644
index 3164969..0000000
--- a/t/02length.t
+++ /dev/null
@@ -1,14 +0,0 @@
-use Test::More tests => 22;
-BEGIN { use_ok('String::MkPasswd') };
-
-String::MkPasswd->import("mkpasswd");
-
-ok(length mkpasswd(-length => 0) == 9, "length = 0");
-
-for ( 1 .. 6 ) {
-	ok(!defined mkpasswd(-length => $_), "length = $_");
-}
-
-for ( 7 .. 20 ) {
-	ok(length mkpasswd(-length => $_) == $_, "length = $_");
-}
diff --git a/t/03count.t b/t/03count.t
deleted file mode 100644
index d5306b8..0000000
--- a/t/03count.t
+++ /dev/null
@@ -1,121 +0,0 @@
-use Test::More tests => 41;
-BEGIN { use_ok('String::MkPasswd') };
-
-String::MkPasswd->import("mkpasswd");
-
-my $passwd = mkpasswd();
-
-ok(length $passwd == 9, "length = 9");
-ok(&count_digits($passwd) == 2, "digits = 2");
-ok(&count_lower($passwd) == 4, "lower = 4");
-ok(&count_upper($passwd) == 2, "upper = 2");
-ok(&count_special($passwd) == 1, "special = 1");
-
-$passwd = mkpasswd(
-	-length		=> 20,
-	-minnum		=> 4,
-	-minlower	=> 7,
-	-minupper	=> 6,
-	-minspecial	=> 3,
-);
-
-ok(length $passwd == 20, "length = 20");
-ok(&count_digits($passwd) == 4, "digits = 4");
-ok(&count_lower($passwd) == 7, "lower = 7");
-ok(&count_upper($passwd) == 6, "upper = 6");
-ok(&count_special($passwd) == 3, "special = 3");
-
-$passwd = mkpasswd(
-	-minnum	=> 0,
-);
-
-ok(length $passwd == 9, "length = 9");
-ok(&count_digits($passwd) == 0, "digits = 0");
-ok(&count_lower($passwd) == 6, "lower = 6");
-ok(&count_upper($passwd) == 2, "upper = 2");
-ok(&count_special($passwd) == 1, "special = 1");
-
-$passwd = mkpasswd(
-	-minlower	=> 0,
-);
-
-ok(length $passwd == 9, "length = 9");
-ok(&count_digits($passwd) == 2, "digits = 2");
-ok(&count_lower($passwd) == 4, "lower = 4");
-ok(&count_upper($passwd) == 2, "upper = 2");
-ok(&count_special($passwd) == 1, "special = 1");
-
-$passwd = mkpasswd(
-	-minupper	=> 0,
-);
-
-ok(length $passwd == 9, "length = 9");
-ok(&count_digits($passwd) == 2, "digits = 2");
-ok(&count_lower($passwd) == 6, "lower = 6");
-ok(&count_upper($passwd) == 0, "upper = 0");
-ok(&count_special($passwd) == 1, "special = 1");
-
-$passwd = mkpasswd(
-	-minspecial	=> 0,
-);
-
-ok(length $passwd == 9, "length = 9");
-ok(&count_digits($passwd) == 2, "digits = 2");
-ok(&count_lower($passwd) == 5, "lower = 5");
-ok(&count_upper($passwd) == 2, "upper = 2");
-ok(&count_special($passwd) == 0, "special = 0");
-
-$passwd = mkpasswd(
-	-minnum		=> 0,
-	-minlower	=> 0,
-	-minupper	=> 0,
-	-minspecial	=> 0,
-);
-
-ok(length $passwd == 9, "length = 9");
-ok(&count_digits($passwd) == 0, "digits = 0");
-ok(&count_lower($passwd) == 9, "lower = 9");
-ok(&count_upper($passwd) == 0, "upper = 0");
-ok(&count_special($passwd) == 0, "special = 0");
-
-$passwd = mkpasswd(
-	-length		=> 3,
-	-minnum		=> 3,
-	-minlower	=> 0,
-	-minupper	=> 0,
-	-minspecial	=> 0,
-);
-
-ok(length $passwd == 3, "length = 3");
-ok(&count_digits($passwd) == 3, "digits = 3");
-ok(&count_lower($passwd) == 0, "lower = 0");
-ok(&count_upper($passwd) == 0, "upper = 0");
-ok(&count_special($passwd) == 0, "special = 0");
-
-sub count_digits {
-	my $re = qr/([0-9])/;
-	my $count = 0;
-	$count++ while $_[0] =~ /$re/g;
-	return $count;
-}
-
-sub count_lower {
-	my $re = qr/([a-z])/;
-	my $count = 0;
-	$count++ while $_[0] =~ /$re/g;
-	return $count;
-}
-
-sub count_special {
-	my $re = qr/([!@#\$%~^&*()=_+\[\]{}\\|;:'"<>,.?\/-])/;
-	my $count = 0;
-	$count++ while $_[0] =~ /$re/g;
-	return $count;
-}
-
-sub count_upper {
-	my $re = qr/([A-Z])/;
-	my $count = 0;
-	$count++ while $_[0] =~ /$re/g;
-	return $count;
-}
diff --git a/t/04fatal.t b/t/04fatal.t
deleted file mode 100644
index 27c58d7..0000000
--- a/t/04fatal.t
+++ /dev/null
@@ -1,20 +0,0 @@
-use Test::More tests => 5;
-BEGIN { use_ok('String::MkPasswd') };
-
-String::MkPasswd->import("mkpasswd");
-
-$String::MkPasswd::FATAL = 0;
-
-eval { mkpasswd(-fatal => 1) };
-is($@, "", "not fatal, flag");
-
-eval { mkpasswd(-length => 1, -fatal => 1) };
-isnt($@, "", "fatal, flag");
-
-$String::MkPasswd::FATAL = 1;
-
-eval { mkpasswd() };
-is($@, "", "not fatal, global");
-
-eval { mkpasswd(-length => 1) };
-isnt($@, "", "fatal, global");
diff --git a/t/05ambiguous.t b/t/05ambiguous.t
deleted file mode 100644
index c0f5cc4..0000000
--- a/t/05ambiguous.t
+++ /dev/null
@@ -1,24 +0,0 @@
-use Test::More tests => 3;
-
-use constant ITERATIONS => 100; # sufficiently large to overcome probability
-our $AMBIGUOUS = 'o01ilvwc|_\-.,:;\[\](){}'; # keys of String::MkPasswd::IS_AMBIGUOUS in regex form
-
-BEGIN { use_ok('String::MkPasswd') };
-
-my $password;
-
-subtest 'Test distributed passwords with "-noambiguous" enabled' => sub {
-	plan tests => ITERATIONS;
-	for ( my $i = 0; $i < ITERATIONS; $i++ ) {
-		$password = String::MkPasswd::mkpasswd( -dist => 1, -noambiguous => 1 );
-		ok( $password !~ /[$AMBIGUOUS]/, 'Distributed password contains no ambiguous characters');
-	}
-};
-
-subtest 'Test non-distributed passwords with "-noambiguous" enabled' => sub {
-	plan tests => ITERATIONS;
-	for ( my $i = 0; $i < ITERATIONS; $i++ ) {
-		$password = String::MkPasswd::mkpasswd( -dist => 0, -noambiguous => 1 );
-		ok( $password !~ /[$AMBIGUOUS]/, 'Non-distributed password contains no ambiguous characters');
-	}
-};
diff --git a/t/ambiguous.t b/t/ambiguous.t
new file mode 100644
index 0000000..b76cce3
--- /dev/null
+++ b/t/ambiguous.t
@@ -0,0 +1,24 @@
+#!perl
+
+use strict;
+use warnings;
+use Test::More 0.96;
+
+use String::MkPasswd 'mkpasswd';
+
+my $ITERATIONS = 100;                            # sufficiently large to overcome probability
+my $AMBIGUOUS  = qr/[o01ilvwc|_\-.,:;\[\](){}]/; # keys of String::MkPasswd::IS_AMBIGUOUS in regex form
+
+subtest 'Test distributed passwords with "-noambiguous" enabled' => sub {
+	for ( 1 .. $ITERATIONS ) {
+		unlike mkpasswd( -dist => 1, -noambiguous => 1 ), $AMBIGUOUS, 'Distributed password contains no ambiguous characters';
+	}
+};
+
+subtest 'Test non-distributed passwords with "-noambiguous" enabled' => sub {
+	for ( 1 .. $ITERATIONS ) {
+		unlike mkpasswd( -dist => 0, -noambiguous => 1 ), $AMBIGUOUS, 'Non-distributed password contains no ambiguous characters';
+	}
+};
+
+done_testing;
diff --git a/t/count.t b/t/count.t
new file mode 100644
index 0000000..947113b
--- /dev/null
+++ b/t/count.t
@@ -0,0 +1,144 @@
+#!perl
+
+use strict;
+use warnings;
+use Test::More 0.96;
+
+use String::MkPasswd 'mkpasswd';
+
+my $passwd;
+
+$passwd = mkpasswd();
+
+subtest "Testing password $passwd", sub {
+    is +( length $passwd ),    9, 'length';
+    is count_digits($passwd),  2, 'digits';
+    is count_lower($passwd),   4, 'lower';
+    is count_upper($passwd),   2, 'upper';
+    is count_special($passwd), 1, 'special';
+};
+
+$passwd = mkpasswd(
+	-length		=> 20,
+	-minnum		=> 4,
+	-minlower	=> 7,
+	-minupper	=> 6,
+	-minspecial	=> 3,
+);
+
+subtest "Testing password $passwd", sub {
+    is +( length $passwd ),   20, 'length';
+    is count_digits($passwd),  4, 'digits';
+    is count_lower($passwd),   7, 'lower';
+    is count_upper($passwd),   6, 'upper';
+    is count_special($passwd), 3, 'special';
+};
+
+$passwd = mkpasswd(
+	-minnum	=> 0,
+);
+
+subtest "Testing password $passwd", sub {
+    is +( length $passwd ),    9, 'length';
+    is count_digits($passwd),  0, 'digits';
+    is count_lower($passwd),   6, 'lower';
+    is count_upper($passwd),   2, 'upper';
+    is count_special($passwd), 1, 'special';
+};
+
+$passwd = mkpasswd(
+	-minlower	=> 0,
+);
+
+subtest "Testing password $passwd", sub {
+    is +( length $passwd ),    9, 'length';
+    is count_digits($passwd),  2, 'digits';
+    is count_lower($passwd),   4, 'lower';
+    is count_upper($passwd),   2, 'upper';
+    is count_special($passwd), 1, 'special';
+};
+
+$passwd = mkpasswd(
+	-minupper	=> 0,
+);
+
+subtest "Testing password $passwd", sub {
+    is +( length $passwd ),    9, 'length';
+    is count_digits($passwd),  2, 'digits';
+    is count_lower($passwd),   6, 'lower';
+    is count_upper($passwd),   0, 'upper';
+    is count_special($passwd), 1, 'special';
+};
+
+$passwd = mkpasswd(
+	-minspecial	=> 0,
+);
+
+subtest "Testing password $passwd", sub {
+    is +( length $passwd ),    9, 'length';
+    is count_digits($passwd),  2, 'digits';
+    is count_lower($passwd),   5, 'lower';
+    is count_upper($passwd),   2, 'upper';
+    is count_special($passwd), 0, 'special';
+};
+
+$passwd = mkpasswd(
+	-minnum		=> 0,
+	-minlower	=> 0,
+	-minupper	=> 0,
+	-minspecial	=> 0,
+);
+
+subtest "Testing password $passwd", sub {
+    is +( length $passwd ),    9, 'length';
+    is count_digits($passwd),  0, 'digits';
+    is count_lower($passwd),   9, 'lower';
+    is count_upper($passwd),   0, 'upper';
+    is count_special($passwd), 0, 'special';
+};
+
+$passwd = mkpasswd(
+	-length		=> 3,
+	-minnum		=> 3,
+	-minlower	=> 0,
+	-minupper	=> 0,
+	-minspecial	=> 0,
+);
+
+subtest "Testing password $passwd", sub {
+    is +( length $passwd ),    3, 'length';
+    is count_digits($passwd),  3, 'digits';
+    is count_lower($passwd),   0, 'lower';
+    is count_upper($passwd),   0, 'upper';
+    is count_special($passwd), 0, 'special';
+};
+
+done_testing;
+
+sub count_digits {
+	my $re = qr/([0-9])/;
+	my $count = 0;
+	$count++ while $_[0] =~ /$re/g;
+	return $count;
+}
+
+sub count_lower {
+	my $re = qr/([a-z])/;
+	my $count = 0;
+	$count++ while $_[0] =~ /$re/g;
+	return $count;
+}
+
+sub count_special {
+	my $re = qr/([!@#\$%~^&*()=_+\[\]{}\\|;:'"<>,.?\/-])/;
+	my $count = 0;
+	$count++ while $_[0] =~ /$re/g;
+	return $count;
+}
+
+sub count_upper {
+	my $re = qr/([A-Z])/;
+	my $count = 0;
+	$count++ while $_[0] =~ /$re/g;
+	return $count;
+}
diff --git a/t/fatal.t b/t/fatal.t
new file mode 100644
index 0000000..7f92ba3
--- /dev/null
+++ b/t/fatal.t
@@ -0,0 +1,25 @@
+#!perl
+
+use strict;
+use warnings;
+use Test::More 0.96;
+
+use String::MkPasswd 'mkpasswd';
+
+$String::MkPasswd::FATAL = 0;
+
+eval { mkpasswd( -fatal => 1 ) };
+is $@, '', 'not fatal, flag';
+
+eval { mkpasswd( -length => 1, -fatal => 1 ) };
+isnt $@, '', 'fatal, flag';
+
+$String::MkPasswd::FATAL = 1;
+
+eval { mkpasswd() };
+is $@, '', 'not fatal, global';
+
+eval { mkpasswd( -length => 1 ) };
+isnt $@, '', 'fatal, global';
+
+done_testing;
diff --git a/t/length.t b/t/length.t
new file mode 100644
index 0000000..744d34a
--- /dev/null
+++ b/t/length.t
@@ -0,0 +1,19 @@
+#!perl
+
+use strict;
+use warnings;
+use Test::More 0.96;
+
+use String::MkPasswd 'mkpasswd';
+
+is +( length mkpasswd( -length => 0 ) ), 9, '-length => 0';
+
+for ( 1 .. 6 ) {
+	ok +( !defined mkpasswd( -length => $_ ) ), "-length => $_";
+}
+
+for ( 7 .. 20 ) {
+	is +( length mkpasswd( -length => $_ ) ), $_, "-length => $_";
+}
+
+done_testing;

Debdiff

File lists identical (after any substitutions)

No differences were encountered in the control files

More details

Full run details