Skip Menu |

This queue is for tickets about the Git-Sub CPAN distribution.

Report information
The Basics
Id: 118114
Status: resolved
Priority: 0/
Queue: Git-Sub

People
Owner: dolmen [...] cpan.org
Requestors: book [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: (no value)
Fixed in: 0.163320



Subject: Git::Sub (or System::Sub?) clobbers $_ in list context
The following tests expose the issue: $ perl -MGit::Sub -le '$_ = "canary"; $out = git::cat_file( qw( --batch-check --batch-all-objects ) ); print "\$_ = $_"' $_ = canary $ perl -MGit::Sub -le '$_ = "canary"; @out = git::cat_file( qw( --batch-check --batch-all-objects ) ); print "\$_ = $_"' $_ = I've just found this out, but haven't had time to investigate further. Tested with Git::Sub version 0.161810 and System::Sub version 0.150960.
Show quoted text
> Tested with Git::Sub version 0.161810 and System::Sub version
> 0.150960.

Thanks for this report.
The issue is in System::Sub. The generated wrapper subs use $_ without localizing it.

-- 
Olivier Mengué - http://perlresume.org/DOLMEN
The issue is fixed with System::Sub 0.162800.
I still have to make a new Git::Sub that requires it.

-- 
Olivier Mengué - http://perlresume.org/DOLMEN
Le 2016-11-08 23:50:39, DOLMEN a écrit :
Show quoted text
> The issue is fixed with System::Sub 0.162800.
> I still have to make a new Git::Sub that requires it.

Git::Sub has been released a few month ago.
https://metacpan.org/release/DOLMEN/Git-Sub-0.163320

--
Olivier Mengué - http://perlresume.org/DOLMEN