[Prev] Thread [Next]  |  [Prev] Date [Next]

Re: [Mason] subroutine visibility Dave Rolsky Mon May 25 13:00:25 2009

On Mon, 25 May 2009, Ruslan A Dautkhanov wrote:

> For example, I have components
> 1.    abba.mhtm, which includes a.mhtm, which has subroutine proc1
> 2.    baab.mhtm, which includes b.mhtm, which has subroutine proc1,
>    which differ prom a's proc1 by its code and context (global vars etc).
> So, proc1 called from abba.mhtm should be called from a.mhtm only,
> and called from baab.mhtm - from b.mhtm.
> *problem* : proc1 called from abba sporadically erroneously called from b,
> and vice versa
>                  proc1 called from baab sporadically erroneously called
> from a.
> How to "lock" subroutines by their visibility?

You have to name them differently, or explicitly put them in packages. But 
really, you should not define subs in a Mason component. Put them in a 

See for details on this.


Your guide to all that's veg      House Absolute(ly Pointless)

Register Now for Creativity and Technology (CaT), June 3rd, NYC. CaT
is a gathering of tech-side developers & brand creativity professionals. Meet
the minds behind Google Creative Lab, Visual Complexity, Processing, & 
iPhoneDevCamp asthey present alongside digital heavyweights like Barbarian
Group, R/GA, & Big Spaceship. 
Mason-users mailing list