On Wed, Dec 4, 2013 at 6:34 PM, Jakub Narębski <jnareb@gmail.com> wrote:
Show 33 quoted lines
> On Wed, Dec 4, 2013 at 4:46 PM, Krzesimir Nowak <krzesimir@endocode.com> wrote:
>> On Wed, 2013-12-04 at 16:11 +0100, Jakub Narębski wrote:
>>> On Wed, Dec 4, 2013 at 2:42 PM, Krzesimir Nowak <krzesimir@endocode.com> wrote:
>>>
>>> > So future reader will know what does it mean without running "perldoc
>>> > perlvar".
>>>
>>> Hmmm... shouldn't future reader know it anyway? It is not that cryptic.
>>> I'd say it is idiomatic Perl.
>>
>> It's plainly obscure. And I think it is not that often used - I keep
>> forgetting what that pair of punctuation is actually meaning.
>
> I think it depends on what kind of Perl code one is used to. It is not
> as obscure as $; and similar to $|, I think.
>
>> In this case I guess it would be more readable to use the following code
>> instead:
>>
>> $fh->input_record_separator ("\0");
>
> That would be a good change to replace
>
> local $/ = "\0";
>
> open my $fh, "-|", git_cmd(), ..., '-z', ...
>
> with
>
> open my $fh, "-|", git_cmd(), ..., '-z', ...
> $fh->input_record_separator ("\0");
>
> (not forgetting about "use IO::Handle", which module is core Perl module);