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 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 formal process of creating a module for 
> everything (I use Module::Starter) or is it okay to do something like the 
> above for very small modules?
> 
> Robert
> 
> 
> 
> 
> -- 
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> <http://learn.perl.org/> <http://learn.perl.org/first-response>
> 
> 




----------------------------------------
This mail sent through www.mywaterloo.ca

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to