Hello,
I'm working on mod_perl project which has many different modules. One is
so-called 'main' modules which loads other when needed. Until now
everything worked just fine, but now one module just says that he doesn't
know the variable I've exported.
And interesting is, that when I comment
Viljo Marrandi actually wrote:
my $r = shift;
use vars qw( $log );
$log = $r-log();
if ( $some_case eq 'true' ) {
use Sub::First qw( $log );
I haven't tested, but this doesn't look as a good idea.
I don't think your code does what you think it does
(or what you think it
The answer to the trick question is that the subroutine name in package
Sub::First is misspelled (missing a t).
However, I think I would provide the Apache::Log object as a parameter to
new() rather than twiddling with package vars to try to have it magically
updated by Exporter. For example: