in reply to Re^2: Module Problems
in thread Module Problems
Is there any way to pass the %pform,%gform down the levels without actually manually passing them through?
Yes and no. For example,
package formBreaker; sub test { print($CallerPackage::var, $/); } package CallerPackage; our $var; $var = 'success'; formBreaker->test();
You can, but as you can see, you have to either hardcode the caller's package (bad!) or you have to get the caller's package name using caller and dynamically build the variable name (ugly and bad!). What's wrong with
%pform = formBreaker->breakupForms('post');
or
formBreaker->breakupForms('post', \%pform);
?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: Module Problems
by Anonymous Monk on Oct 23, 2004 at 19:11 UTC |