On Thu, 2 Mar 2006, David Cornell wrote:

from the mason style guide:

   * By default, all Mason components share a single namespace.
Declaring a named subroutine ("sub foo") inside a component means that
all components now have access to that subroutine. If you must use a
subroutine inside a component, consider using an anonymous subroutine
instead.

This refers to code like this:

 <%once>
 sub foo { ... }
 </%once>

Is there a reason why the subroutines are not placed into their own
namespace?

How could we do that? The only way to do that would be to parse all components for subroutine declarations and then rewrite them to be in a per-component namespace. That's way too much work to enable people to do something that is a fundamentally bad idea! Subroutines should be in a module.


-dave

/*===================================================
VegGuide.Org                        www.BookIRead.com
Your guide to all that's veg.       My book blog
===================================================*/


-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
Mason-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mason-users

Reply via email to