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.
|
|---|