Arguably HTML::Template should use methods on those objects instead of poking around in their guts... but I agree with your greater premise. Class::Roles is a simple implementation of Perl 6's answer to this question.
Update: Of course, if HTML::Template's documentation asks you to pass in hashrefs and doesn't say that you can pass in objects, you're getting what you deserve. :)
In reply to Re: "Is it a hashref" vs "Can I use it like a hashref?"
by chromatic
in thread "Is it a hashref" vs "Can I use it like a hashref?"
by blokhead
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |