Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Re: why package definition order affect the available of package variable

by haukex (Chancellor)
on Oct 20, 2019 at 10:16 UTC ( #11107718=note: print w/replies, xml ) Need Help??


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 (Acolyte) on Oct 20, 2019 at 14:03 UTC

    thanks for your quick answer.
    that's the point.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://11107718]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others perusing the Monastery: (9)
As of 2019-12-13 10:22 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?