diff options
author | ToshikazuOhiwa <toshikazu_ohiwa@mail.toyota.co.jp> | 2020-03-30 09:24:26 +0900 |
---|---|---|
committer | ToshikazuOhiwa <toshikazu_ohiwa@mail.toyota.co.jp> | 2020-03-30 09:24:26 +0900 |
commit | 5b80bfd7bffd4c20d80b7c70a7130529e9a755dd (patch) | |
tree | b4bb18dcd1487dbf1ea8127e5671b7bb2eded033 /external/poky/meta/recipes-devtools/perl/perl/debian/fixes/podman-empty-date.diff | |
parent | 706ad73eb02caf8532deaf5d38995bd258725cb8 (diff) |
agl-basesystem
Diffstat (limited to 'external/poky/meta/recipes-devtools/perl/perl/debian/fixes/podman-empty-date.diff')
-rw-r--r-- | external/poky/meta/recipes-devtools/perl/perl/debian/fixes/podman-empty-date.diff | 52 |
1 files changed, 52 insertions, 0 deletions
diff --git a/external/poky/meta/recipes-devtools/perl/perl/debian/fixes/podman-empty-date.diff b/external/poky/meta/recipes-devtools/perl/perl/debian/fixes/podman-empty-date.diff new file mode 100644 index 00000000..9de29b86 --- /dev/null +++ b/external/poky/meta/recipes-devtools/perl/perl/debian/fixes/podman-empty-date.diff @@ -0,0 +1,52 @@ +From 183bb4af7ad862a2cf31d0dcb3dd45c100f76776 Mon Sep 17 00:00:00 2001 +From: Russ Allbery <rra@cpan.org> +Date: Wed, 15 Apr 2015 22:21:25 -0700 +Subject: Support an empty POD_MAN_DATE environment variable + +One may want to set this to an empty string. Handle that correctly. + +(backported to Perl 5.20.2 by Niko Tyni <ntyni@debian.org>) + +Origin: upstream, http://git.eyrie.org/?p=perl/podlators.git;a=commitdiff;h=e0e9fcb53e8fc954b2b1955385eea18c27f869af +Bug-Debian: https://bugs.debian.org/780259 +Patch-Name: fixes/podman-empty-date.diff +Upstream-Status: Pending +--- + cpan/podlators/lib/Pod/Man.pm | 2 +- + cpan/podlators/t/devise-date.t | 6 +++++- + 2 files changed, 6 insertions(+), 2 deletions(-) + +diff --git a/cpan/podlators/lib/Pod/Man.pm b/cpan/podlators/lib/Pod/Man.pm +index 365892e..8997a15 100644 +--- a/cpan/podlators/lib/Pod/Man.pm ++++ b/cpan/podlators/lib/Pod/Man.pm +@@ -894,7 +894,7 @@ sub devise_date { + my ($self) = @_; + + # If POD_MAN_DATE is set, always use it. +- if ($ENV{POD_MAN_DATE}) { ++ if (defined($ENV{POD_MAN_DATE})) { + return $ENV{POD_MAN_DATE}; + } + +diff --git a/cpan/podlators/t/devise-date.t b/cpan/podlators/t/devise-date.t +index 9da9d1b..27271d9 100644 +--- a/cpan/podlators/t/devise-date.t ++++ b/cpan/podlators/t/devise-date.t +@@ -12,7 +12,7 @@ use warnings; + use Pod::Man; + use POSIX qw(strftime); + +-use Test::More tests => 2; ++use Test::More tests => 3; + + # Check that the results of device_date matches strftime. There is no input + # file name, so this will use the current time. +@@ -26,3 +26,7 @@ is( + # Set the override environment variable and ensure that it's honored. + local $ENV{POD_MAN_DATE} = '2014-01-01'; + is($parser->devise_date, '2014-01-01', 'devise_date honors POD_MAN_DATE'); ++ ++# Check that an empty environment variable is honored. ++local $ENV{POD_MAN_DATE} = q{}; ++is($parser->devise_date, q{}, 'devise_date honors empty POD_MAN_DATE'); |