IMHO, if HTML::Template were to allow such a wide open definition of what it accepts, it would be a support nightmare. Accepting every tied and overloaded data-structure would certainly degrade performance for plain old everyday hash-refs.
Personally, I think HTML::Template is fine as it is. It's very stable, extremly usable and has a simple and well defined API/interface. Subclass it if you want it to do these things.
I actually think your argument is more with tie than it is with HTML::Template. ( Overloading the %{} operator still requires you to return a hash-ref. If you dont want to return a real hash-ref, then it needs to be a tied hash-ref (see the overload doc for more info) ) What I think you really want is for tie to say "i am a hash" rather than "you can treat me like a hash". But to be honest, I am not a fan of that approach though.
-stvnIn reply to Re: "Is it a hashref" vs "Can I use it like a hashref?"
by stvn
in thread "Is it a hashref" vs "Can I use it like a hashref?"
by blokhead
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |