You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by Michael Hanisch <ha...@informatik.uni-muenchen.de> on 2000/07/06 17:19:57 UTC
HTML::Mason - declaration of subs outside out <%ONCE> sections?
Hi *,
I am currently working on a site running HTML::Mason (v0.87).
While reading the documentation, I came across the <%ONCE> sections, that
are -as the docs put it-
" Useful for declaring persistent component-scoped lexical variables
(especially objects that are expensive
to create), declaring subroutines (both named and anonymous), and
initializing state. "
To be honest - I have never used them ;-)
So the question is:
Is there any harm in defining subroutines inside regular <%PERL> sections?
(I know that it works, but I'm not sure for how long :-( )
If anyone can shed a little light on the more complex scoping/lifetime
issues with the different kinds of sections, I'd be really grateful.
Best regards,
Michael.
________________________________________________________
Michael | email: hanisch@informatik.uni-muenchen.de
Hanisch |
________________________________________________________