--- "Brett W. McCoy" <[EMAIL PROTECTED]> wrote:
> > Line 9:  Global symbol "FORM_DATA" requires explicit package name.
> > How can I avoid the above warning?
> > . . .
>
> %FORM_DATA (which I am guessing is defined and/or created in
> libcgi2.pl) isn't explicitly put into a package
> (which you correctly do with the $key scalar, using 'my').

Not to correct those smarter and more knowledgeable, I'd like to call a
rephrase on that one. =o)

my() makes a variable lexical, meaning it isn't in any package.
packages equate to namespaces, which mean little or nothing to
lexicals, who live and die in terms of scope.

Lexicals, (i.e., my() vars) are in *no* package.
Any variable in a package (that's everything you don't declare with
my()...or maybe our()?) is always global.

Now that I've also misphrased that, would someone help me make it
clear? lol....

> Since you are requiring the library, it is getting included into the
> current file, for which you are usng the strict
> . . . .

current file *scope*, no. Current file *package*, yes.
Though I add the caveat that I've never used requires.
I make everything modules.

> Want to make your life easier?  Use CGI.pm.  It handles all of this
> form input stuff for you automatically, and many other things
besides,
> and lets you focus more on your application logic than trying to
> decode headers, HTML parsing, etc.

Amen, brother.

__________________________________________________
Do You Yahoo!?
Yahoo! Auctions - buy the things you want at great prices
http://auctions.yahoo.com/

Reply via email to