summaryrefslogtreecommitdiff
path: root/git-send-email.perl
diff options
context:
space:
mode:
authorÆvar Arnfjörð Bjarmason <avarab@gmail.com>2021-05-28 09:23:48 (GMT)
committerJunio C Hamano <gitster@pobox.com>2021-05-28 09:38:07 (GMT)
commit447ed29c0d414547914c23e92f8bb13fcf748f9b (patch)
treeb7ca48b3c6f8aa292486d23f4cef11e3cd7bbc83 /git-send-email.perl
parent4adbf387bfd4b03b838282757e0bdf67e8f9fc8d (diff)
downloadgit-447ed29c0d414547914c23e92f8bb13fcf748f9b.zip
git-447ed29c0d414547914c23e92f8bb13fcf748f9b.tar.gz
git-447ed29c0d414547914c23e92f8bb13fcf748f9b.tar.bz2
send-email: get rid of indirect object syntax
Change indirect object syntax such as "new X ARGS" to "X->new(ARGS)". This allows perl to see what "new" is at compile-time without having loaded Term::ReadLine. This doesn't matter now, but will in a subsequent commit when we start lazily loading it. Let's do the same for the adjacent "FakeTerm" package for consistency, even though we're not going to conditionally load it. Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'git-send-email.perl')
-rwxr-xr-xgit-send-email.perl6
1 files changed, 3 insertions, 3 deletions
diff --git a/git-send-email.perl b/git-send-email.perl
index 44dc3f6..cc1027d 100755
--- a/git-send-email.perl
+++ b/git-send-email.perl
@@ -194,11 +194,11 @@ my $repo = eval { Git->repository() };
my @repo = $repo ? ($repo) : ();
my $term = eval {
$ENV{"GIT_SEND_EMAIL_NOTTY"}
- ? new Term::ReadLine 'git-send-email', \*STDIN, \*STDOUT
- : new Term::ReadLine 'git-send-email';
+ ? Term::ReadLine->new('git-send-email', \*STDIN, \*STDOUT)
+ : Term::ReadLine->new('git-send-email');
};
if ($@) {
- $term = new FakeTerm "$@: going non-interactive";
+ $term = FakeTerm->new("$@: going non-interactive");
}
# Behavior modification variables