- or download this
sub database_handle {
my $dbh = DBI->connect("DBI:Sybase:CRAP", "sa", "");
die "connect failed: $DBI::errstr" unless $dbh;
$dbh;
}
- or download this
my $dbh = database_handle();
- or download this
{
my $dbh;
...
$dbh;
}
}
- or download this
package My::DB;
use strict;
...
}
sub handle { $_[0]->{handle} }
- or download this
my $dbh = My::DB->new->handle;
- or download this
sub _execute {
my $self = shift;
...
}
return $finish ? $rv : $sth;
}