--- Devel-FindRef/FindRef.xs 2008/07/19 01:17:12 1.12 +++ Devel-FindRef/FindRef.xs 2008/07/19 01:38:57 1.13 @@ -160,7 +160,11 @@ av_push (excl, newSVuv (PTR2UV (pad))); /* exclude pads themselves from being found */ - for (i = AvFILLp (pad) + 1; i--; ) + /* The 0th pad slot is @_ */ + if (AvARRAY (pad)[0] == targ) + res_pair ("the argument array for"); + + for (i = AvFILLp (pad) + 1; --i; ) if (AvARRAY (pad)[i] == targ) { /* Values from constant functions are stored in the pad without any name */ @@ -213,6 +217,9 @@ } } + if (targ == (SV*)PL_main_cv) + res_text ("the main body of the program"); + EXTEND (SP, 2); PUSHs (sv_2mortal (newRV_noinc ((SV *)about))); PUSHs (sv_2mortal (newRV_noinc ((SV *)excl)));