CC: | Mark Pfeiffer <markpf [...] mlp-consulting.com.au>, <bug-Log-Dispatch-FileRotate [...] rt.cpan.org> |
Subject: | Re: Log-Dispatch-FileRotate-1.15 |
Date: | Sat, 18 Nov 2006 13:05:43 +1100 |
To: | Ateeq Altaf <Ateeq.Altaf [...] talis.com> |
From: | Mark Pfeiffer <markpf [...] mlp-consulting.com.au> |
Good find Ateeq! Thanks for that :-)
I love it when people send me patches. I'll roll this into
version 1.16.
Thanks again
cheers
Mark Pfeiffer
markpf@mlp-consulting.com.au
On 17/11/2006, at 2:21 AM, Ateeq Altaf wrote:
Show quoted text
> Hi Mark
>
> I think you have a bug in your _gen_occurrence function at line 450
> where you’re not giving the match the $pat variable:-
>
> --- FileRotate.pm.orig 2006-11-16 15:05:42.000000000 +0000
>
> +++ FileRotate.pm 2006-11-16 15:05:48.000000000 +0000
>
> @@ -446,7 +446,7 @@
>
> }
>
> else # years
>
> {
>
> - my($yrs) = m/^(\d+):/;
>
> + my($yrs) = $pat =~ m/^(\d+):/;
>
> $yrs = 1 unless $yrs;
>
> my $months = $yrs * 4 * 12;
>
>