shrubbery has asked for the wisdom of the Perl Monks concerning the following question:
I have an OO question. Is there anyway I can access a subroutine inside a program from a class? For example.
Say I have:
and inside the Blah module:use Blah; use Foobar; $b = Blah->new(); $f = Foobar->new(); $x->doSomething;
sub new { ... } sub doSomething { I want to access $f->some foobar method here }
So the question is: is there a way I can access a method $f from package Blah? I would guess you can rephrase that as... can I access something in the main program from the package???
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: accessing subs/methods from the module
by BrowserUk (Patriarch) on Feb 06, 2003 at 18:10 UTC | |
|
Re: accessing subs/methods from the module
by steves (Curate) on Feb 06, 2003 at 18:10 UTC | |
|
Re: accessing subs/methods from the module
by pfaut (Priest) on Feb 06, 2003 at 18:10 UTC | |
|
Re: accessing subs/methods from the module
by bronto (Priest) on Feb 06, 2003 at 18:14 UTC | |
by shrubbery (Acolyte) on Feb 06, 2003 at 19:00 UTC | |
by artist (Parson) on Feb 06, 2003 at 20:23 UTC | |
by steves (Curate) on Feb 06, 2003 at 19:20 UTC | |
by shrubbery (Acolyte) on Feb 06, 2003 at 21:03 UTC | |
by dragonchild (Archbishop) on Feb 06, 2003 at 20:14 UTC |