Problem was addressed by first response -- the error message can be interpreted ambiguously and talks about the "errors" effect on a particular model rather than what the error *is*. So I was looking at the 'blessed' statement's target rather than what was being used to bless the target -- problem was that the RH operand of the bless wasn't a "value", due to the stack being confused. The error message was trying to interpret the effect of what was going on, saying: 'error: you are trying to bless into a <insert random type from stack>', where random value was a hash.
Once I knew it was complaining about the RH of the bless and not the LH, the error was obvious: the constructor was called as PKG::new instead of PKG->new.
I figured it had to be something basic I was missing (like never having seen that particular error before, and misinterpreting it), cuz, I really thought I had at least a passing understanding of the objects -- and that led to the 'lame mistake' of me using the wrong calling convention.
The rest of the suggestions were things that were pretty much already covered in my code, in some perlish fashion (different but equal...:-) ).
Thanks much for all the suggestions!
In reply to Re^4: blessed confusion
by perl-diddler
in thread blessed confusion
by perl-diddler
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |