Return-Path: Delivered-To: apmail-perl-dev-archive@www.apache.org Received: (qmail 4654 invoked from network); 15 Mar 2006 17:27:07 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 15 Mar 2006 17:27:06 -0000 Received: (qmail 60407 invoked by uid 500); 15 Mar 2006 17:27:03 -0000 Delivered-To: apmail-perl-dev-archive@perl.apache.org Received: (qmail 60288 invoked by uid 500); 15 Mar 2006 17:27:03 -0000 Mailing-List: contact dev-help@perl.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: List-Id: Delivered-To: mailing list dev@perl.apache.org Received: (qmail 60237 invoked by uid 99); 15 Mar 2006 17:27:02 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 15 Mar 2006 09:27:02 -0800 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: local policy) Received: from [66.77.29.165] (HELO secure.exclamationlabs.net) (66.77.29.165) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 15 Mar 2006 09:27:02 -0800 Received: from [192.168.2.160] (c-69-141-1-101.hsd1.pa.comcast.net [69.141.1.101]) (authenticated (0 bits)) by secure.exclamationlabs.net (8.11.6/8.11.6) with ESMTP id k2FHNfe17073; Wed, 15 Mar 2006 11:23:41 -0600 Message-ID: <44184D9A.2010501@modperlcookbook.org> Date: Wed, 15 Mar 2006 12:23:38 -0500 From: Geoffrey Young User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.3) Gecko/20040927 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Tom Schindl CC: "Philippe M. Chiasson" , Frank Wiles , dev@perl.apache.org, torsten.foertsch@gmx.net, gyoung@modperlcookbook.org Subject: Re: [MP2] possible pnotes bug? References: <200601091914.13383.torsten.foertsch@gmx.net> <200601101703.08384.torsten.foertsch@gmx.net> <43C3FB20.4010402@modperlcookbook.org> <200601110857.27319.torsten.foertsch@gmx.net> <4415F864.6000303@ectoplasm.org> <20060313192957.4fd70022.frank@wiles.org> <44161DF1.8030902@modperlcookbook.org> <20060313195533.1a4bef20.frank@wiles.org> <441623F1.5090902@ectoplasm.org> <441697B6.8080808@bestsolution.at> <44182202.7090807@modperlcookbook.org> <44182B56.6050203@bestsolution.at> In-Reply-To: <44182B56.6050203@bestsolution.at> X-Enigmail-Version: 0.86.1.0 X-Enigmail-Supports: pgp-inline, pgp-mime Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N > + my $foo = 123; > + $r->pnotes('foo' => $foo); > + $foo = 456; > + $r->pnotes('foo') # <== now 456 (in 2.0.2) > + $r->pnotes('foo') # <== left at 123 (in 2.0.3) actually, I'm re-thinking my stance on this. a common use of pnotes is to pass objects around. if I understand things correctly, the current situation is this -- some handler my $o = Foo->new; $r->pnotes(foo => $o); -- next handler my $o = $r->pnotes('foo'); $o->set(bar => 1); # sets $o->{_bar} = 1 -- another handler my $o = $r->pnotes('foo'); my $bar = $o->bar; # 1 I actually thing that would be somewhat common. and as I understand things, the fix would require the middle step to be -- next handler my $o = $r->pnotes('foo'); $o->set(bar => 1); # sets $o->{_bar} = 1 $r->pnotes(foo => $o); in order for $o to maintain it's internal state. is that right? if so, I don't like that very much. in fact, I'll bet that doug originally coded pnotes to behave the way it currently does on purpose, since the original force behind pnotes was to be able to pass objects around. so, I think I'm leaning more towards "the current behavior is not only not broken, it's intentional" camp. --Geoff --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org For additional commands, e-mail: dev-help@perl.apache.org