Subject: | support mock_sub for singular overrides |
Date: | Wed, 11 Feb 2009 14:32:09 +0200 |
To: | bug-test-callflow [...] rt.cpan.org |
From: | Kalle Hallivuori <Kalle.Hallivuori [...] ascom.com> |
mock_package on a package already loaded may produce lots of redefinition
warnings, and may fail to override constant subs:
Prototype mismatch: sub Gb::Transfer::IPInterface::ENOTTY () vs none at
(eval 450) line 280.
Constant subroutine ENOTTY redefined at (eval 450) line 277.
Also the prototype mismatch above is a nuisance that should be worked
around (can we see it in internal structures?).
mock_sub should be exported and should forcibly override each sub to
support planning (rather than just mark them for override later at
mock_run).
Also this should be thrown with a stack trace:
Mock call in a bad state: succeeded at src/XXX/XXX.pm line 216