Thread (19 messages) flat view 19 messages, 7 authors, 2016-06-15

Re: [PATCH 6/6] Remove bareword filehandles in git-send-email.perl

From: Francis Galiegue <hidden>
Date: 2016-06-15 22:46:42

Le lundi 04 mai 2009, vous avez écrit :
[...]
quoted
And why not go the full way and using IO::File?
Because that would be travelling back in time.
The most efficient and preferred way is three-arg lexical:

    open my $fh, "<", $filename or die "$filename: $!";
    while (<$fh>) {
        # ...
        }
    close $fh or die "$filename: $!";
I don't see how using IO::File is going back in time at all. It's a standard 
perl module, even in 5.10.
quoted
my $fh = new IO::File;

$fh->open("/the/file", O_RDONLY|...)
Why use a module for something that is neatly buit in?
Because it reads better? YMMV, of course. I prefer using IO::File because perl 
has too many keywords for its own good :p

-- 
Francis Galiegue
ONE2TEAM
Ingénieur système
Mob : +33 (0) 683 877 875
Tel : +33 (0) 178 945 552
fge@one2team.com
40 avenue Raymond Poincaré
75116 Paris
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help