aboutsummaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/perl/perl/fixes/time_piece_doc.diff
blob: 3793e4848a94cc6699cf170f98b0c347136c148b (plain)
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
From 2f34b8acecfa25758eb31a541f019a6b2f1a24e0 Mon Sep 17 00:00:00 2001
From: Dominic Hargreaves <dom@earth.li>
Date: Sat, 30 Apr 2016 23:20:45 +0100
Subject: Time::Piece: Improve documentation for add_months and add_years

These methods don't act on the time of the object they are called from,
so the previous documentation was open to misinterpretation.

Bug: https://github.com/rjbs/Time-Piece/pull/22
Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=817925
Patch-Name: fixes/time_piece_doc.diff
---
 cpan/Time-Piece/Piece.pm | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/cpan/Time-Piece/Piece.pm b/cpan/Time-Piece/Piece.pm
index 6dbf4d69c4..d3b62ce5fb 100644
--- a/cpan/Time-Piece/Piece.pm
+++ b/cpan/Time-Piece/Piece.pm
@@ -783,8 +783,8 @@ days, weeks and years in that delta, using the Time::Seconds API.
 In addition to adding seconds, there are two APIs for adding months and
 years:
 
-    $t->add_months(6);
-    $t->add_years(5);
+    $t = $t->add_months(6);
+    $t = $t->add_years(5);
 
 The months and years can be negative for subtractions. Note that there
 is some "strange" behaviour when adding and subtracting months at the