in reply to Re: Spotting an empty array as argument
in thread Spotting an empty array as argument

Well yes, I was reluctant to suggesting parsing the source since it seemed far beyond your scope. (Caller has also some limitations if it comes to the line number)

IIRC is Carp listing the stack trace with the original arguments if called inside the debugger. That's because DB is caching all source lines internally.

You could do the same with a "passiv" source filter.

Since it would only read and not change the source it can't possibly cause any harm.

Another way is adding __DATA__ at the end of your file, because the DATA filehandle is just reading your source. ( seek and see ;)

Both possibilities need far less resources and are more reliable.

Cheers Rolf
(addicted to the Perl Programming Language :)
Wikisyntax for the Monastery