in reply to why package definition order affect the available of package variable
The package statement doesn't affect execution order: $global = "I'm in the testEnd package global version"; is executed after the testEnd::show_me() call, so $testEnd::global is still undef at that point in time.
Note that you should always Use strict and warnings.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: why package definition order affect the available of package variable
by fanasy (Sexton) on Oct 20, 2019 at 14:03 UTC |
In Section
Seekers of Perl Wisdom