For Programmers: Free Programming Magazines  


Home > Archive > PERL Modules > July 2006 > Mason sharing variables, rookie alert :)









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Mason sharing variables, rookie alert :)
bpatton

2006-07-13, 6:56 pm

I have 2 components. One builds a hash. the next needs to read it.

ex: "A" module

<%share>
my %hash = ( 'dogs' => 'ok' ,'cats'=>'maybe');
</%share>

"B" module

<%perl>
my $dogs = $hash{'dogs'};
my $cats = $hash{'cats'};
print "dogs are $dogs and cats are $cats\n";
</%perl>

Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com