XP is just a number | |
PerlMonks |
Re: Re: How can I unbless an object?by mp (Deacon) |
on Jul 19, 2002 at 18:22 UTC ( [id://183356]=note: print w/replies, xml ) | Need Help?? |
The intended use is to unbless deeply nested objects for use with Template Toolkit (TT2) so I can add/modify/remove fields in the hash before template processing.
If you pass TT2 an object that is a hash and tell it to access object.element_name, it will return $object->element_name if that method exists rather than $object->{element_name}. If I could unbless the object, then I could force it to use the latter. There are other workarounds, but if "unbless" existed in some form, it might be simpler.
In Section
Seekers of Perl Wisdom
|
|