in reply to How to override a mocked method with Test::MockDBI?

Just a wild guess: Don't you need to override the DBI::errstr not the Test::MockDBI::errstr which probably was only used to override the DBI::errstr?

Be well,
rir

Replies are listed 'Best First'.
Re^2: How to override a mocked method with Test::MockDBI?
by andreas1234567 (Vicar) on Oct 23, 2008 at 07:01 UTC
    That is correct, perhaps I was unclear: I want to override DBI::errstr which is overridden by Test::MockDBI::errstr. How can it be done?

    I can always patch MockDBI.pm but can it be done programmatically?

    --
    No matter how great and destructive your problems may seem now, remember, you've probably only seen the tip of them. [1]
      andreas1234567, you were clear. I meant try: *DBI::errstr = sub { return }; Test::MockDBI::errstr does not exist, there is only a errstr-keyed element in an argument to fake_module there.

      Be well,
      rir