>I can do this using "our" in place of "my" - after perl 5.6.
hello,even you use 'my' instead of 'our',there is not any problem.
where in some a subroutine, you use lexical var which is defined outside of
this subroutine,you have made a closure.this var in subroutine is a private
copy of lexic
I can do this using "our" in place of "my" - after perl 5.6.
how do I:
{
package ThePackage;
use strict;
my $dbh=$HTML::Mason::Commands::dbh;
sub printdbh { print "$dbh\n"; }
sub otherSub { print ref $dbh, "\n"; }
how do I:
{
package ThePackage;
use strict;
my $dbh=$HTML::Mason::Commands::dbh;
sub printdbh { print "$dbh\n"; }
sub otherSub { print ref $dbh, "\n"; }
sub anotherSub { dosomething($dbh);}
}
Thanks again