[ABE.pm] Re: A coupla' more Qs

Faber Fedor faber at linuxnj.com
Thu Oct 14 16:09:20 CDT 2004


On 14/10/04 12:40 -0400, Ricardo SIGNES wrote:
> * Faber Fedor <faber at linuxnj.com> [2004-10-13T23:02:50]
> > Do I need to learn how to write a Perl module or is there an easier way?
> 
> Look at the perldoc for "do", specifically "do EXPR"
> 
> This is ugly, and other programmers will probably scowl if they see it.
> Writing a Perl module is /really/ easy, and a good thing to learn.

Yeah, that was easy.  And I found the "use lib" command(?) which gotme
away from modifying @INC.  

> > 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?
> 
> Both.
> 	$which_db = $opt{db} || $ENV{DB_FOR_FABER} || 'default';

Sweet.

> I hate hate hate [ActiveState's Perl IDE]... not because I use it, but because it makes it
> basically impossible to use the wonderful standard Perl debugger.  I use
> perldb all the time, and it rules.

I think that's the first time I've ever heard "wonderful" and "standard
Perl debugger" in the same sentence. :-)  I must be missing something.
Care to give a demo on practical usage of perldb sometime?



-- 
 
Regards,
 
Faber                     

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





More information about the ABE-pm mailing list