Re: A question about modules

2005-12-17 Thread Shawn Corey
Robert wrote: I simply use: my $dbh = DBConn::db1(); It does the right connection (i.e. subroutine) from the DBConn package and I didn't use Exporter. I should also mention that DBConn is in the same folder and the calling script so maybe that makes a difference. No, it doesn't. You can

Re: A question about modules

2005-12-17 Thread vishal malik
I see. That's fine then. I didn't know that you were using the package name as a prefix to the subroutine name (DBConn::). In that case you don't need to use the Exporter. You only need it if you want to use the the subroutines as if they were in the current package (for example, db1(), and

Re: A question about modules

2005-12-16 Thread vmalik
It is okay to do something like that. However, you should not use the package declaration on the top. If you do that, you will have to use the Exporter module to export your subroutine names to your script when you say use DBConn; Quoting Robert [EMAIL PROTECTED]: I have broken out my DB

Re: A question about modules

2005-12-16 Thread Robert
I simply use: my $dbh = DBConn::db1(); It does the right connection (i.e. subroutine) from the DBConn package and I didn't use Exporter. I should also mention that DBConn is in the same folder and the calling script so maybe that makes a difference. I am probably going to go back and do a

A question about modules

2005-12-15 Thread Robert
I have broken out my DB connection calls into a small module. It isn't anything fancy so it is basically: package DBConn use strict; use warnings; sub { # connection info for db1 } sub { # connection info for db2 } sub { # connection info for db3 } 1; The question is do I go through the

RV: Newbie question about modules

2003-02-19 Thread Ramón Chávez
I have used and installed Perldiver Just upload and run. Great tool. Thank you very much for the advice. -rm- - Original Message - From: Todd Wade [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, February 18, 2003 4:33 AM Subject: Re: Newbie question about modules Rgíón

Re: Newbie question about modules

2003-02-18 Thread Todd Wade
Rgíón «hávkú [EMAIL PROTECTED] wrote in message 003001c2d474$f6f76b20$[EMAIL PROTECTED]">news:003001c2d474$f6f76b20$[EMAIL PROTECTED]... Hello all. I've reading some messges relating to the use of modules. How can I know what modules are installed in the server??? I have my site hosted on

Newbie question about modules

2003-02-14 Thread Ramón Chávez
Hello all. I've reading some messges relating to the use of modules. How can I know what modules are installed in the server??? I have my site hosted on a Server far away from here. And it provides me Perl with the most commonly used modules. Being that I'm not an expert on Perl I don't know

Re: Newbie question about modules

2003-02-14 Thread Paul
How can I know what modules are installed in the server??? duh. Feeling dense. I think there should be a way, but can't think of how to get a full listing. Maybe the Config.pm? Anyway, to test for any *given* module(s), try perl -MModule::Name -e 'print Module::Name is installed\n' thus, to

Re: Newbie question about modules

2003-02-14 Thread david
Paul wrote: How can I know what modules are installed in the server??? duh. Feeling dense. I think there should be a way, but can't think of how to get a full listing. Maybe the Config.pm? try: [xx@panda]$ perl -MFild::Find -e 'find(sub{print $File::Find::name\n if(/\.pm$/)},$_)