Re: "use overload" with Apache2::Reload

2006-06-15 Thread Jonathan Vanasco
On Jun 14, 2006, at 10:33 PM, Philip M. Gollucci wrote: Me ? ... my memory is horrible. apololgies, you just pointed me to it a while back... """I didn't author that patch... I'm not even enirely sure I've gotten around to committing it... Though Gozer might have. | - - - - - -

Re: "use overload" with Apache2::Reload

2006-06-14 Thread Philip M. Gollucci
Jonathan Vanasco wrote: On Jun 13, 2006, at 12:15 PM, Thomas Nagel wrote: So maybe: - (1) MyClass is changed and therefore recompiled (2) Another handler uses MyClass but http://perl.apache.org/docs/2.0/api/Apache2/Reload.html#Problems_with_Scripts_Running_with_Registry_Handlers_tha

Re: "use overload" with Apache2::Reload

2006-06-13 Thread Jonathan Vanasco
On Jun 13, 2006, at 12:15 PM, Thomas Nagel wrote: So maybe: - (1) MyClass is changed and therefore recompiled (2) Another handler uses MyClass but http://perl.apache.org/docs/2.0/api/Apache2/ Reload.html#Problems_with_Scripts_Running_with_Registry_Handlers_that_ Cache_the_Code (3

Re: "use overload" with Apache2::Reload

2006-06-13 Thread Perrin Harkins
On Tue, 2006-06-13 at 08:59 -0400, Anthony Heading wrote: > What I understand is happening is that Apache2::Reload is causing (as > designed) MyClass.pm to be recompiled, but perhaps into some fresh new > opaque package namespace and the old namespace is cleared out? No, it's just a normal recom

Re: "use overload" with Apache2::Reload

2006-06-13 Thread Thomas Nagel
Anthony Heading wrote: > The "+" operator, defined using an anonymous sub, works perfectly. The > comparison operators work fine _until_ MyClass.pm is changed; but they > then give errors like "Not a CODE reference at ". Just a guess, maybe I am wrong: --- overload.pm

"use overload" with Apache2::Reload

2006-06-13 Thread Anthony Heading
Hi, I've tracked down a mod_perl problem to one of my class libraries which defined operator overloading. Simplified a lot: package MyClass; use overload ( "+" => sub { $_[0]{val} + $_[1]{val} }, "<=>" => \&compare, "cmp" => \&compare