in reply to Mocking Apache::Constants

I doubt that Test::MockObject will handle exporting the constants for you. You might want to look at Test::MockModule which IIRC allows you to override module subroutines selectively, which might allow you to just override OK and nothing else (although I am not sure that is really what you are looking for here). Apache::Constants is an XS module, so it's internals may not be so easily manipulated.

-stvn

Replies are listed 'Best First'.
Re^2: Mocking Apache::Constants
by Herkum (Parson) on May 26, 2006 at 16:18 UTC

    I was not really worried about Apache internals, I justed need for something to be returned when those functions are called.

    The Test::MockModule did do the trick, it took a little work but I have it completed tested now. Thanks for the help.