Thank you Michhael for your reply.

I am forwarding it to the bug submitter (CC-ing also the bug itself to 
keep the log).

Alexander, can you check if the approach below is feasibble? It would 
also be good if you can reply to Fergal's mail[1]

    [1] http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=419637#14


-=| Michael G Schwern via RT, Sat, Oct 04, 2008 at 01:28:30AM -0400 |=-
> <URL: http://rt.cpan.org/Ticket/Display.html?id=32330 >
> 
> I was looking at $Test::Deep::NoTest today and it occurs to me that
> rather than undefining $Test you could instead use a mock Test::Builder
> object that does nothing except ok() but silently.  Everything else is a
> no-op (throw in an AUTOLOAD).  That would at least make things like
> cmp_deeply() work without having to do any special checks.
> 
> As for avoiding Test::Deep::NoTest from stomping on $Test... you could
> make use of the new lexical pragma stuff in 5.10.  mjd might have
> backported that.  Another trick would be to use a local variable to
> switch.  $Test would be a proxy object between the real and mock
> Test::Builders.  It has an AUTOLOAD which simply looks at the flag and
> decides which to call.
> 
> if( $NoTest ) {
>     $mock->$method(@args);
> }
> else {
>     $real->$metho(@args);
> }
> 
> 

-- 
dam            JabberID: [EMAIL PROTECTED]

Attachment: signature.asc
Description: Digital signature

Reply via email to