in reply to Sharing Across Packages

The main package scoped variable $MW is not available inside the package BPP::About.

Where do you call AboutBPP? You could always call it as

AboutBPP($MW);
if it's from the main program.

And then all you would have to do is add to AboutBPP

my $MW = shift;

Hope this helped,
-v

"Perl. There is no substitute."

Replies are listed 'Best First'.
Re^2: Sharing Across Packages
by polettix (Vicar) on Sep 29, 2006 at 12:46 UTC
    The main package scoped variable $MW is not available inside the package BPP::About.
    "Package scoped variables" are package variables, they're always accessible using the fully qualified name (like $main::MW). When dealing with our, the only thing you're "scoping" is the possibility to use the non-fully-qualified symbol ($MW) instead of the fully qualified one ($main::MW).

    Flavio
    perl -ple'$_=reverse' <<<ti.xittelop@oivalf

    Don't fool yourself.