in reply to Help with modules!
#!/usr/bin/perl -w use DBI; my $dbh = new DBI->connect(...); my $pkg = new MyModule($dbh); ############################################## package MyModule; sub new { my ($dbh) = @_; my $self = (); $self{dbh} = $dbh; ... } sub MyMethod { my ($self) = @_; # use the db handle something like this $self{dbh}->quote(...); ... }
--
hiseldl
"Act better than you feel"
|
|---|