in reply to Re: Continue block entry
in thread Continue block entry

Thanks to both of you for the suggestions, I kind of figured that was likely to be the case, but I was hoping there would be some existing function (or magicly accessible values) with similar information to that provided by caller.

Prowler
 - Spelling is a demanding task that requies you full attention.

Replies are listed 'Best First'.
Re^3: Continue block entry
by demerphq (Chancellor) on May 10, 2005 at 06:48 UTC

    Perl has an odd feature that you can next out of a block from within a subroutine. Ie:

    sub mynext { next } for (1..10) { mynext(); print $_; }

    This usage will warn as its a form of action at a distance, but it is legal and can be useful*. Thus you could put some caller-fu in mynext() and have it warn where it was called. This would require temporarily s/next/mynext()/g of course so IMO its not a route to be taken lightly. OTOH if its this type of stuff that is causing your problem in the first place then warnings will reveal all. You didnt show any code so its hard to say. :-)

    * An interesting example is its usage in the Test framework for handling SKIP blocks

    ---
    $world=~s/war/peace/g