Hello,

I am trying to create a library (.pm file) of DBI functions for use in my
MOD_PERL scripts, but am not totally clear on how to use exporter (do I
absolutely NEED to use exporter?, or can I just "use" the .pm library?)....
Is the following correct?


The TEST.pm package
--------------------------------
{
package TEST;
use DBI;
use Exporter();
@ISA=qw(Exporter);
@EXPORT=();

sub dbConnect
{
.....
}

sub fetchTest
{
....
}



The MOD_PERL script
-----------------------------------
use CGI;
use DBI;
use TEST;
use Apache;
{
my $v=new CGI
print $v->header;
TEST->dbconnect();
my $var = TEST->fetchTest();

}

Reply via email to