Why in this component:

<%perl>

my $this= "hello world";

sub one {
    print $this;
}

one();

</%perl>

is $this not available to one()?  Also, I notice that by using "our", a 
variable becomes subsequently available to any component.  However, I 
recall from rails that using a global that way was a bad idea because 
in a production environment, two users accessing the system at the same 
time could end up affecting the same variable, and the solution was 
either to use cookies or to write session variables to a per user 
database.  Is this true here as well?  Ie, if I suddenly decide using 
"our" is a nifty way to save passing parameters, will I lose my head 
when this gets put on the net?

-MK

------------------------------------------------------------------------------
Are you an open source citizen? Join us for the Open Source Bridge conference!
Portland, OR, June 17-19. Two days of sessions, one day of unconference: $250.
Need another reason to go? 24-hour hacker lounge. Register today!
http://ad.doubleclick.net/clk;215844324;13503038;v?http://opensourcebridge.org
_______________________________________________
Mason-users mailing list
Mason-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mason-users

Reply via email to