in reply to Trying to understand (caller($i))[4], a.k.a. $hasargs

I believe the problem can be solved by changing

my @caller = CORE::caller($i++) or return;
to
my @caller = CORE::caller() eq 'DB' ? do { package DB; CORE::caller($i++) } : CORE::caller($i++) or return;

Replies are listed 'Best First'.
Re^2: Trying to understand (caller($i))[4], a.k.a. $hasargs [solution]
by Oberon (Monk) on Feb 14, 2012 at 08:18 UTC

    Excellent! Yes, that stops the error entirely. I'll submit it to DC as a patch. Thanks for the code.