diff --git a/SOURCES/version-0.9907-doc_numify_stringify_trailing_zeros.patch b/SOURCES/version-0.9907-doc_numify_stringify_trailing_zeros.patch new file mode 100644 index 0000000..dcdc9cb --- /dev/null +++ b/SOURCES/version-0.9907-doc_numify_stringify_trailing_zeros.patch @@ -0,0 +1,50 @@ +From 505f82135ffca76fb8072500a7378a725a6d9acd Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= +Date: Fri, 9 Mar 2018 15:02:24 +0100 +Subject: [PATCH] doc_numify_stringify_trailing_zeros +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +This corrects numify() and stringify() documentation to match code bahavior +that exists for ages. + +CPAN RT#64635 +CPAN RT#122858 + +Signed-off-by: Petr Písař +--- + lib/version.pod | 9 ++++----- + 1 file changed, 4 insertions(+), 5 deletions(-) + +diff --git a/lib/version.pod b/lib/version.pod +index 40ceee2..86df045 100644 +--- a/lib/version.pod ++++ b/lib/version.pod +@@ -266,11 +266,10 @@ leading-v and at least 3 components. + + =head2 numify() + +-Returns a value representing the object in a pure decimal form without +-trailing zeroes. ++Returns a value representing the object in a pure decimal. + +- version->declare('v1.2')->numify; # 1.002 +- version->parse('1.2')->numify; # 1.2 ++ version->declare('v1.2')->numify; # 1.002000 ++ version->parse('1.2')->numify; # 1.200 + + =head2 stringify() + +@@ -280,7 +279,7 @@ way perl would normally represent it in a string. This method is used whenever + a version object is interpolated into a string. + + version->declare('v1.2')->stringify; # v1.2 +- version->parse('1.200')->stringify; # 1.200 ++ version->parse('1.200')->stringify; # 1.2 + version->parse(1.02_30)->stringify; # 1.023 + + =head1 EXPORTED FUNCTIONS +-- +2.14.3 + diff --git a/SPECS/perl-version.spec b/SPECS/perl-version.spec index 9a49cf7..325d190 100644 --- a/SPECS/perl-version.spec +++ b/SPECS/perl-version.spec @@ -2,7 +2,7 @@ Name: perl-version Epoch: 3 Version: 0.99.07 %global module_version 0.9907 -Release: 3%{?dist} +Release: 6%{?dist} Summary: Perl extension for Version Objects License: GPL+ or Artistic Group: Development/Libraries @@ -13,6 +13,9 @@ Patch0: version-0.9907-Deal-with-certain-tiedscalars-e.g.-created-by-Rea # Support stringifying version objects made from a tainted value, bug #1378885, # CPAN RT#118087 Patch1: version-0.9907-Stringify-tainted-version-object-on-perl-older-than-.patch +# Fix documentation about numify() and stringify() trailing zeros, bug #1483562, +# CPAN RT#64635, CPAN RT#122858 +Patch2: version-0.9907-doc_numify_stringify_trailing_zeros.patch BuildRequires: perl BuildRequires: perl(base) BuildRequires: perl(Carp) @@ -56,8 +59,10 @@ strongly urged to set 0.77 as a minimum in your code. %setup -q -n version-%{module_version} %patch0 -p1 %patch1 -p1 +%patch2 -p1 %build +export TZ=UTC perl Makefile.PL INSTALLDIRS=vendor OPTIMIZE="%{optflags}" make %{?_smp_mflags} @@ -84,6 +89,17 @@ make test %{_mandir}/man3/version::Internals.3pm* %changelog +* Mon Aug 12 2019 Petr Pisar - 3:0.99.07-6 +- Define time zone to correct a date in version::Internals manual page + (bug #1483562) + +* Mon Aug 12 2019 Petr Pisar - 3:0.99.07-5 +- Rebuild to correct a date in version::Internals manual page (bug #1483562) + +* Fri Mar 09 2018 Petr Pisar - 3:0.99.07-4 +- Fix documentation about numify() and stringify() trailing zeros + (bug #1483562) + * Tue Sep 27 2016 Petr Pisar - 3:0.99.07-3 - Support making version objects from tainted strings (bug #1378885)