Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re: Apocalypse 4 on perl.com

by lestrrat (Deacon)
on Jan 18, 2002 at 14:09 UTC ( [id://139781]=note: print w/replies, xml ) Need Help??


in reply to Apocalypse 4 on perl.com

So far I don't understand this :

sub attempt_closure_after_successful_candidate_file_open (&closure, @fileList) { foreach my $file (@fileList) { my $f is post { close } = try { open $file or die; CATCH { next } } &closure($f); return; } throw Exception "Can't open any file.", debug => @fileList . " tried."; }

This is supposed to be easier to read??

On the other hand, I like

my $foo = BEGIN{ compute_cont() } + $foobar;

That's cool :-) Although, I guess if you're going to do these compile-time evaluations, it would be nicer if you could do some sort of C-macro-substitution type of thing using arbitrary symbols, so that you don't have to repeat these BEGIN{} blocks.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others chanting in the Monastery: (4)
As of 2024-04-26 08:01 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found