On Nov 9, 2003, at 2:07 PM, Dan Anderson wrote:

I had a function that blessed a Hash into it's class. Oddly, I started
having problems. On dumping the hash I found it had been blessed into a
part of the hash.


i.e.

bless {foo => "bar"}, "class";
became
bless {foo => "bar"}, "bar";
when the modules constructor was called by another module.

This only happened in one module, and I ended up fixing it by explicitly
declaring the class name (I was using shift @_ to get the class name).


Anybody know either a) what I might've done wrong or b) if there's a
known bug or feature that I'm screwing up on?

It would be hard to say anything with much certainty without seeing the code, but my gut reaction is that the error is in the constructor call itself. Could you please post the entire constructor, since we know that's code you have control over at least?


This "other module" though, what is it and did you write it?

James


-- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to