almut, The main difference that I can best express to you about your two scripts is this:
When you are writing code and executing the warnme.pl script, the call to
my $val = $Some::Nonexistent::Pkg::variable;
tells Perl to find and use that pre-existing package and assign its value to $val .
When you are coding in the package warnme.pm, the call to
my $val = $Some::Nonexistent::Pkg::variable;
tells Perl to search for the pre-existing package, but if not found, CREATE the package and assign it to $val .
Now I am sure that I don't have it nailed down exactly, but in concept, I believe I am right.
A study of perlboot, perltoot, and perlobj will help distinguish the differences more clearly.
A look at ISA may shed some light on this, as well.
In reply to Re: "possible typo" warnings in modules
by Sagacity
in thread "possible typo" warnings in modules
by almut
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |