If you want to mock your DbLibTry class instead of DBI, as you also seem to want to do, you could look into something like Test::MockObject (which Test::MockDBI happens to use).
Also, note that you're not really doing anything with your $mock_dbi object. You'd probably need a way to inject it into your DbLibTry object for it to take effect (like maybe $dblibtry->{dbh} = $mock_dbi;?). (Untested, and the Test::MockDBI documentation is a little lacking so I'm not completely sure.)
In reply to Re: Test::MockDBI example
by Anonymous Monk
in thread Test::MockDBI example [SOLVED]
by brilant_blue
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |