http://qs321.pair.com?node_id=286507

Lori713 has asked for the wisdom of the Perl Monks concerning the following question:

Hello all,

I've been given the task of learning Perl, Javascript, HTML and SQL on my own in order to take over a program written by a consultant (currently about 8000 lines of code with little/no documentation) that generate financial reports on the Web (I also have to develop some new reports from scratch). The current program works and is in production. To read more about my experience:

I currently don't know any of these languages, but am reading various books and nodes here to get ideas. My previous programming experience involves a little Visual Basic (i.e., "Programming Lite"), and something called nVision from PeopleSoft (i.e., "Spoonfeeding Heavy"). I'm fairly comfortable with all the new languages except Perl. The next Perl class available that I can go to is in late October.


Did I mention a draft of these new reports are due October 31st?

I'm not sure how to ask my question because I know so little at this point, but I'll try...

How does one debug a Perl program containing multiple subroutines that generate HTML pages that use Javascript on the Web (and uses SQL to pull data from the database)? To read more about what I've done so far:

I've read numerous nodes and articles about the Perl debugger (i.e., nate's article on "using the Perl debugger," the idiot's guide to debugging node). I've also explored ActiveState's site and watched a couple of recorded webcasts about VisualPerl. I also have the Camel book, the Llama book, an HTML and Javascript book, a Perl/CGI book, all of which I've scanned for various tips and tricks. I've also tried digging through perldoc perldoc, perlfaq1 through -9 and other various manpages.

Confession: I don't know how to run my program from a command line when my access to it is through an URL I type in. I make changes to a text document, FTP it to the Unix server, and it automagically appears when I go into Windows Explorer and type in my URL (I'm on Windows 2000 on a client PC). I have found someone to show me how telnet works... but I'm not sure how to debug in that environment since my program/subroutines generate web pages...

Any thoughts on how to set up an effective debugging system given that I'm playing with multiple languages on the Web? I'm having trouble pulling together all the information I've read over the last couple of weeks.

Just FYI: The program I'm taking over doesn't use the "-w" or "use strict" etc. (when I put these helpful things into the program, well, it's ugly - lots of "uninitialized variables"). Any dangers to putting "my" on every variable? The consultant said a lot of the variables are global, but I'm not sure what that means in the context of my one subroutine library (everything is in one file). He named the global variables "g_xxx," so I do know how to find them. I'd like to be able to use the "-w" and "use strict" for future help in debugging.

Thanks for any help you can provide. If you need more info, please let me know. Lori

P.S. Sorry this is so freaking long but I wanted to provide all the info I'd seen people ask for in previous posts.