in reply to Help with proper construction of callable scalars from a Module, please.
Perhaps not the sort of bone you want to chew on, but I would use one of the many existing template systems, with or without one of the website/application platforms, rather than write my own.
In Section
Seekers of Perl Wisdom