porta has asked for the wisdom of the Perl Monks concerning the following question:
B.pmuse B; $aValue = 10; my $B = new B; my $something = $B->aSub;
package B; sub new { my $class = shift; my $self = bless {}, $class; return $self; } sub aSub { my $self->shift; #here I want to access A.pl's $aValue whitout having it passed as +parameter into the $B->aSub call... } 1;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Variable access across packages?
by syphilis (Archbishop) on Nov 14, 2007 at 14:19 UTC | |
by porta (Sexton) on Nov 14, 2007 at 14:26 UTC | |
by kyle (Abbot) on Nov 14, 2007 at 15:59 UTC | |
by Anonymous Monk on Nov 14, 2007 at 14:58 UTC | |
|
Re: Variable access across packages?
by moritz (Cardinal) on Nov 14, 2007 at 14:07 UTC | |
by shmem (Chancellor) on Nov 14, 2007 at 18:21 UTC | |
by porta (Sexton) on Nov 14, 2007 at 14:22 UTC | |
by moritz (Cardinal) on Nov 14, 2007 at 14:24 UTC | |
by tinita (Parson) on Nov 15, 2007 at 12:40 UTC |