Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Re: Re: Static Data ("__DATA__" vs. "our") (handles)

by IlyaM (Parson)
on Sep 18, 2003 at 19:30 UTC ( #292497=note: print w/ replies, xml ) Need Help??


in reply to Re: Static Data ("__DATA__" vs. "our") (handles)
in thread Static Data ("__DATA__" vs. "our")

Another common problem I've seen with usage of __DATA__ in modules is using while(<DATA>) without localizing $_ (see while(<>) { ... } considered harmful why it is bad).

Update: Actually $_ should not be used in modules at all. See this bug report why.

--
Ilya Martynov, ilya@iponweb.net
CTO IPonWEB (UK) Ltd
Quality Perl Programming and Unix Support UK managed @ offshore prices - http://www.iponweb.net
Personal website - http://martynov.org


Comment on Re: Re: Static Data ("__DATA__" vs. "our") (handles)
Select or Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (5)
As of 2014-09-18 01:46 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (104 votes), past polls