Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re^2: aborting File::Find::find

by Limbic~Region (Chancellor)
on Nov 16, 2006 at 18:54 UTC ( [id://584570]=note: print w/replies, xml ) Need Help??


in reply to Re: aborting File::Find::find
in thread aborting File::Find::find

Sidhekin,
In this case, I will have to flat out disagree. The sane solution is to patch File::Find. See my comment to jdporter above. Could you remind me what module of your's uses goto label. I promised some time ago that I would look at it to try and see if there was a sane alternative and never did. I do remember at first glance it was a pretty tough cookie to crack.

Cheers - L~R

Replies are listed 'Best First'.
Re^3: aborting File::Find::find
by Sidhekin (Priest) on Nov 16, 2006 at 19:08 UTC

    Well, I'll agree that one sane solution would be to patch File::Find. Provided you have the time, and the patch is accepted, that is. Meawhile, though we may disagree, I maintain that goto LABEL is another. :-)

    Test::Trap uses goto LABEL. (It's the second goto in the source; the first is a goto &function.)

    Tough? Since it calls into user code that may contain arbitrary many levels of subroutine calls and/or eval, I see no way to do it without a LABEL, and I'll argue that goto LABEL is more readable than last LABEL where, as here, the latter would require the addition of a loop-once block and a no warnings 'exiting'.

    print "Just another Perl ${\(trickster and hacker)},"
    The Sidhekin proves Sidhe did it!

      Sidhekin,
      I will look into Test::Trap as promised.

      ... and I'll argue that goto LABEL is more readable than last LABEL where, as here, the latter would require the addition of a loop-once block and a no warnings 'exiting'.

      I just want to make it clear for those following along at home that your comment applies to the label solution proposed by jdporter and not my proposed patching of File::Find which would work cleanly.

      Cheers - L~R

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://584570]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others examining the Monastery: (4)
As of 2024-03-29 09:19 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found