in reply to "Is it a hashref" vs "Can I use it like a hashref?"

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. :)

  • Comment on Re: "Is it a hashref" vs "Can I use it like a hashref?"