Skip Menu |

This queue is for tickets about the CHI-Memoize CPAN distribution.

Report information
The Basics
Id: 77027
Status: open
Priority: 0/
Queue: CHI-Memoize

People
Owner: Nobody in particular
Requestors: danboo [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Critical
Broken in: 0.02
Fixed in:
  • 0.03
  • 0.04



Subject: @_ being wiped?
subject says it all... Show quoted text
> perl -MCHI::Memoize=memoize -le 'sub foo { return "@_" }
memoize(q(foo)); print foo( a => 1, b => 2 )' Show quoted text
> perl -MMemoize=memoize -le 'sub foo { return "@_" } memoize(q(foo));
print foo( a => 1, b => 2 )' a 1 b 2
Subject: Re: [rt.cpan.org #77027] @_ being wiped?
Date: Sun, 6 May 2012 15:59:33 -0700
To: bug-CHI-Memoize [...] rt.cpan.org
From: Jonathan Swartz <swartz [...] pobox.com>
I'm an idiot. :) Will be fixed shortly. On May 6, 2012, at 11:32 AM, Daniel B. Boorstein via RT wrote: Show quoted text
> Sun May 06 14:32:59 2012: Request 77027 was acted upon. > Transaction: Ticket created by DANBOO > Queue: CHI-Memoize > Subject: @_ being wiped? > Broken in: 0.02 > Severity: Critical > Owner: Nobody > Requestors: danboo@cpan.org > Status: new > Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=77027 > > > > subject says it all... >
>> perl -MCHI::Memoize=memoize -le 'sub foo { return "@_" }
> memoize(q(foo)); print foo( a => 1, b => 2 )' >
>> perl -MMemoize=memoize -le 'sub foo { return "@_" } memoize(q(foo));
> print foo( a => 1, b => 2 )' > a 1 b 2 >
0.03 look good. Thanks! So what I actually intended to test was the doc (and blog) assertion that these are equivalent: memoized_function(a => 5, b => 6, c => { d => 7, e => 8 }); memoized_function(b => 6, c => { e => 8, d => 7 }, a => 5); I suspect you meant to wrap each of these argument lists with curlies to create anon hash refs. Obviously, the ordered lists cannot be considered the same.
Subject: Re: [rt.cpan.org #77027] @_ being wiped?
Date: Sun, 6 May 2012 23:34:39 -0700
To: bug-CHI-Memoize [...] rt.cpan.org
From: Jonathan Swartz <swartz [...] pobox.com>
Ha ha! You're right, this was an error. Yet another release. Please let me know all the problems at once before I get to version 100. :p On May 6, 2012, at 5:31 PM, Daniel B. Boorstein via RT wrote: Show quoted text
> Queue: CHI-Memoize > Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=77027 > > > 0.03 look good. Thanks! > > So what I actually intended to test was the doc (and blog) assertion that > these are equivalent: > > memoized_function(a => 5, b => 6, c => { d => 7, e => 8 }); > memoized_function(b => 6, c => { e => 8, d => 7 }, a => 5); > > I suspect you meant to wrap each of these argument lists with curlies to > create anon hash refs. Obviously, the ordered lists cannot be considered > the same.
On Mon May 07 02:34:49 2012, swartz@pobox.com wrote: Show quoted text
> Ha ha! You're right, this was an error. Yet another release. Please > let me know all the problems at once before I get to version 100. :p
Yeah, sorry about that. =) In my defense, I couldn't really know whether it was a doc error or real code error until @_ was working. Next time, I'll give the whole story upfront. Thanks!
Subject: Re: [rt.cpan.org #77027] @_ being wiped?
Date: Mon, 7 May 2012 09:02:37 -0700
To: bug-CHI-Memoize [...] rt.cpan.org
From: Jonathan Swartz <swartz [...] pobox.com>
On May 7, 2012, at 12:04 AM, Daniel B. Boorstein via RT wrote: Show quoted text
> Queue: CHI-Memoize > Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=77027 > > > On Mon May 07 02:34:49 2012, swartz@pobox.com wrote:
>> Ha ha! You're right, this was an error. Yet another release. Please >> let me know all the problems at once before I get to version 100. :p
> > Yeah, sorry about that. =) > > In my defense, I couldn't really know whether it was a doc error or real code error until @_ was > working. Next time, I'll give the whole story upfront. > > Thanks!
Of course! Thanks for the bug report, I didn't expect someone to try it so soon. I should make intriguing mistakes in my documentation more often.