tie my %options, 'Tie::IxHash', %{__PACKAGE__->sql_options};
delete $options{$_} for qw( table schema static primary_key );
tie my %options, 'Tie::IxHash', %{__PACKAGE__->sql_options};
delete $options{$_} for qw( table schema static primary_key );
'notes' => <<END
Read mailbox status information (vacation and spam settings) from an SQL
database, tables "vacation" and "users" respectively.
'notes' => <<END
Read mailbox status information (vacation and spam settings) from an SQL
database, tables "vacation" and "users" respectively.
sub export_getstatus {
my($self, $svc_acct, $htmlref, $hashref) = @_;
sub export_getstatus {
my($self, $svc_acct, $htmlref, $hashref) = @_;
- my $dbh = DBI->connect( map $self->option($_), qw(datasrc username password) )
- or do { $hashref->{'error'} = "can't connect: ". $DBI::errstr; return; };
+ my $dbh = FS::DBI->connect( map $self->option($_), qw(datasrc username password) )
+ or return "can't connect: ". $FS::DBI::errstr;