Help for this page

Select Code to Download


  1. or download this
    my $dbh = $base::dbh; # get a database handle
    
    eval {
    ...
            : " rollback performed successfully\n")
      );
    }
    
  2. or download this
    sub dbtry (&@) {
      my ($dbtry, $dbcatch) = @_;
    
    ...
    }
    
    sub dbcatch (&) { $_[0] }
    
  3. or download this
    dbtry {
      # lots of inserts, updates, etc...
    } dbcatch {
      $base::showerrors("error: $_");
    }