Interesting, but in a top-level component, <%args> can and is supposed to be overwritten by query string parameters.
I think <%attr> is much better place for these constant-type things, though, since <%attr> is evaluated only once when the component is loaded for the first time and then persists for the life of the child process, and the attributes themselves can't be modified at all after that. Also, component attributes are usually universally accessible even from sub components via $m->base_comp->attr(), saving you from having to use costly <%shared> blocks, touching caller_args(), or passing values explicitly from component to component.
In reply to Re: Re: HTML::Mason and "use constant" constants?
by William G. Davis
in thread HTML::Mason and "use constant" constants?
by William G. Davis
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |