1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47
|
Description: Don't call `man crypt` in tests and at runtime.
This avoids a dependency on man-db and libcrypt-dev.
Origin: vendor
Forwarded: not-needed
Author: gregor herrmann <gregoa@debian.org>
Last-Update: 2025-11-06
--- a/lib/Crypt/Password.pm
+++ b/lib/Crypt/Password.pm
@@ -18,22 +18,7 @@
# switches off embodying crypted-looking passwords, like crypt_password()
our $definitely_crypt;
-our $crypt_flav = do {
- $^O =~ /^MSWin|cygwin/ ? 'windows' : do {
- $_ = (`man crypt`)[-1];
- !defined($_) ? 'freesec' :
- /DragonFly/ ? 'dragonflybsd' :
- /NetBSD/ ? 'netbsd' :
- /OpenBSD/ ? 'openbsd' :
- /FreeBSD/ ? do {
- /FreeBSD ([\d\.]+)/; # seems 9.0 starts supporting Modular format
- $1 >= 9 ? 'freebsd' : 'freebsd_lt_9'
- } :
- /MirOS/ ? 'windows' :
- /FreeSec/ ? 'freesec' :
- 'glib'
- }
-};
+our $crypt_flav = 'glib';
our $flav_dispatch = {
glib => {
looks_crypted => sub {
--- a/t/01-crypt-password.t
+++ b/t/01-crypt-password.t
@@ -14,11 +14,6 @@
my $flav = $Crypt::Password::crypt_flav;
diag "testing Crypt::Password (crypt_flav='$flav')";
diag "os is '$^O'";
-unless ($flav eq "windows") {
- my $line = (`man crypt`)[-1];
- $line =~ s/\s+/ /g;
- diag "bottom line of man crypt: '$line'";
-}
diag "generate salt"; {
my %uniq = map { mock()->salt() => undef } 1..20;
|