Git.pm: remove redundant "use strict" from sub-package
authorÆvar Arnfjörð Bjarmason <avarab@gmail.com>
Sun, 25 Feb 2018 19:46:26 +0000 (19:46 +0000)
committerJunio C Hamano <gitster@pobox.com>
Tue, 27 Feb 2018 22:52:46 +0000 (14:52 -0800)
In Perl the "use strict/warnings" pragmas are lexical, thus there's no
reason to do:

package Foo;
use strict;
package Bar;
use strict;
$x = 5;

To satisfy the desire that the undeclared $x variable will be spotted
at compile-time. It's enough to include the first "use strict".

This functionally changes nothing, but makes a subsequent change where
"use warnings" will be added to Git.pm less confusing and less
verbose, since as with "strict" we'll only need to do that at the top
of the file.

Changes code initially added in a6065b548f ("Git.pm: Try to support
ActiveState output pipe", 2006-06-25).

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
perl/Git.pm
index 9d60d7948b22254e6f61cc0d984b4ef40f27bc4f..99e5d943af9e4046bb5fd0935e397e258ef532ca 100644 (file)
@@ -1692,7 +1692,6 @@ sub DESTROY {
 # Pipe implementation for ActiveState Perl.
 
 package Git::activestate_pipe;
-use strict;
 
 sub TIEHANDLE {
        my ($class, @params) = @_;