Help for this page

Select Code to Download


  1. or download this
    $dbh = DBI->connect(...);
    sub foo { 
    ...
    $compartment = new Safe;
    $compartment->share('&foo');
    $compartment->reval('&foo();');
    
  2. or download this
    sub foo {
      my $dbh = DBI->connect(...); 
      $dbh->do(...);
      $dbh->disconnect();
    }