On Wed, Jun 30, 2004 at 11:42:34AM -0400, Vsevolod (Simon) Ilyushchenko wrote:

> I have tried to run Devel::Cover on my tests that use Test::Unit, and I 
> am getting this after the code is run:
> 
> Deep recursion on subroutine "B::Deparse::find_scope" at 
> /usr/lib/perl5/5.8.1/i386-linux-thread-multi/B/Deparse.pm line 1317.
> Deep recursion on subroutine "B::Deparse::dq" at 
> /usr/lib/perl5/5.8.1/i386-linux-thread-multi/B/Deparse.pm line 3550.
> Deep recursion on subroutine "B::Deparse::dq" at 
> /usr/lib/perl5/5.8.1/i386-linux-thread-multi/B/Deparse.pm line 3551.
> Deep recursion on subroutine "B::Deparse::find_scope" at 
> /usr/lib/perl5/5.8.1/i386-linux-thread-multi/B/Deparse.pm line 1317.
> 
> However, nothing seems to be affected - the table is generated by 
> 'cover'. I'd like to debug this, but not sure how to proceed.

Actually, it's not infinite recursion, just deep recursion, where deep
is defined as > 100, or is it >= 100, I can't remember offhand.

As you've noted, everything should still work - it's just a warning, and
as such it can be turned off with C<no warnings "recursion">.  I was
(and still am) of the opinion that 100 is a little low nowadays, and
sent a patch to p5p a couple of weeks ago to raise the limit to 1000,
which is what parrot uses, I think.

Unfortunately, everyone else seemed satisfied with 100, or at least
no-one else spoke up in favour of the patch, and so the limit will
remain at 100.

I didn't want to have to put C<no warnings "recursion"> in Devel::Cover,
as it seems to high a level to me.  Maybe it should go in B::Deparse.
But then I've also hit a similar problem using Parse::RecDescent to
parse a language, which I why I wondered about upping the limit.

But I suppose I'll turn off the warning from Devel::Cover.  That seems
the most pragmatic solution at the moment.

In the meantime, please just ignore the noise.  Or maybe add -X to your
command line, if you're feeling brave.

-- 
Paul Johnson - [EMAIL PROTECTED]
http://www.pjcj.net

Reply via email to