G'day Jerry, Craig, and p5p,
Craig A. Berry wrote:
> I guess this should go to:> > <http://rt.cpan.org/Public/Dist/Display.html?Name=autodie>RT is preferred. github isn't bad. p5p's not bad either. The big no-no is
reporting bugs by bitching randomly on twitter. I have terrible response
times on those. ;)
> rather than p5p. And since the test is already using Test::More, it> might make more sense for it to call use_ok() rather than scanning> %INC to see if something got loaded successfully (unless I"m missing> the intent of the test or misremembering the capabilities of use_ok()The test is actually more complex than it first appears. autodie::hints
uses Sub::Identify to resolve subroutine references back to subroutine
times. However if Sub::Identify is not loaded, it uses its own internal
code to do the same. The tests in question are checking to see if we're
correctly resolving subroutine names, and if that ever throws a bug, I want
to know *how* we were resolving subroutine names.
use_ok() would insist that we be able to load Sub::Identify, but here it's
perfectly fine if we don't, hence the check to %INC.
> Barring that, I think prepending '#' might be preferable to> suppressing output in the core, but that's a minor nit.Since the line in question is using diag(), it already does have a #
prepended to it. AFAIK most TAP parses pass that through to the user by
default.
In this case, I'm very happy for the debug output to be suppressed when
doing core testing, since Sub::Identify is not a core module, it's never
going to be loaded. That makes the debug line itself is therefore redundant.
I've applied this upstream as a72aad7, and will go into the next release of
autodie. I'm very happy for Jerry's patch to be applied as-is to the core;
it will bring my repo and blead back into sync.
Jerry - many thanks for the patch!
All the best,
Paul
--
Paul Fenwick <pjf@perltraining.com.au> | http://perltraining.com.au/
Director of Training | Ph: +61 3 9354 6001
Perl Training Australia | Fax: +61 3 9354 2681