- or download this
$dbh = DBI->connect('..', '..', '..');
$sth = $dbh->prepare(q{select ..});
...
..
}
}
- or download this
no strict 'refs';
*{ Test::MockDBI::errstr } = sub { return };
- or download this
package db;
...
__END__
- or download this
$ prove db.t
db....Name "Test::MockDBI::errstr" used only once: possible typo at db
+.t line 24.
...
----------------------------------------------------------------------
+---------
db.t 255 65280 4 4 100.00% 3-4
Failed 1/1 test scripts, 0.00% okay. 2/4 subtests failed, 50.00% okay.