[ABE.pm] A coupla' more Qs

Faber Fedor faber at linuxnj.com
Wed Oct 13 22:02:50 CDT 2004


1.  I've got a bunch of separate programs that all share similar functions
(connectToDB(), etc.).  I want to create a common library/file that all
of these programs can include.  I tried "use" and "require" but the
former expects a .pm and the latter doesn't scope the variables the way
I want ($dbh in the include file is scoped only inside that file).

Do I need to learn how to write a Perl module or is there an easier way?

2. I HATE MAINFRAMERS AND THEIR FIXED-LENGTH RECORDS! (This ML isn't
spidered by Google, is it? :-)  Does anyone have a good tool for
determining where and how long fixed length records are?  I've been using
the unpack() function and doing a trial and error (thank Ghu for
ptkdb!).

3. I need to separate things into a production database and a
development database (running under one RDBMS).  I'm thinking of
requiring a command-line argument; if --db=prodn is passed, the program
reads/writes to the production database, otherwise, it R/Ws to the
development DB.  Maybe I should make it an enviroment variable instead?
Any suggestions on how to do this elegantly with my poor :-) Perl
skills?

4. Anyone use the ActiveState perl debugger?  Is it worth the money?  I
use ptkdb when I need a GUI debugger, but I can't install that on the
production server because A) it's a production server and B) the server
is running RHEL3 and is a bit outdated.  I'm not too keen on losing
up2date on the box, but I may go that route anywho.

-- 
 
Regards,
 
Faber                     

Linux New Jersey: Open Source Solutions for New Jersey
http://www.linuxnj.com





More information about the ABE-pm mailing list