It's bad style, but yes:
As long as $f is a package variable in main -- i.e., not declared with my, my preference being:package Blah; sub doSomething { $main::f->whatever(); }
... and as long as I don't have to maintain your code. You have factoring issues here that should be keeping you awake at night.our $f = Foobar->new();
In reply to Re: Re: Re: accessing subs/methods from the module
by steves
in thread accessing subs/methods from the module
by shrubbery
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |