Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re: Sub-initiate needs help getting started

by jonadab (Parson)
on Aug 26, 2003 at 14:02 UTC ( [id://286715]=note: print w/replies, xml ) Need Help??


in reply to Sub-initiate needs help getting started

Any dangers to putting "my" on every variable?

Yes, don't do that. When you write your own code from scratch, you can write it to use all lexical variables, but if you try to retrofit that onto code that wasn't written that way you can get strange results. The "always use strict" advice only applies to new work; you shouldn't try to retrofit it to someone else's code. At least, not until you're confident you know what you're doing.

Warnings you should use. Now, for cgi you don't want warnings on for production use, because they'll mess up the interaction between the script, the web server, and the browser. So you can either test from the command line, or use one of the modules that sends errors and warnings to the browser. Or you can turn on warnings while you're debugging and turn them off again after, which is probably what I'd do. You do know how to tail web server logs, right?

My long-term advice to you is to plan on gradually rewriting the whole thing (or most of it) yourself, in bits and pieces. You'll have an easier time maintaining it that way. But you don't have time to do that all at once right now, so only write the bits you need to write in order to meet your deadline. Later you'll want to add or change more things, and you can (re)write more parts of it at that time.


$;=sub{$/};@;=map{my($a,$b)=($_,$;);$;=sub{$a.$b->()}} split//,".rekcah lreP rehtona tsuJ";$\=$ ;->();print$/

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others sharing their wisdom with the Monastery: (3)
As of 2024-04-23 22:17 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found