Skip to content

Commit 447ed29

Browse files
avargitster
authored andcommitted
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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 4adbf38 commit 447ed29

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

git-send-email.perl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -194,11 +194,11 @@ sub format_2822_time {
194194
my @repo = $repo ? ($repo) : ();
195195
my $term = eval {
196196
$ENV{"GIT_SEND_EMAIL_NOTTY"}
197-
? new Term::ReadLine 'git-send-email', \*STDIN, \*STDOUT
198-
: new Term::ReadLine 'git-send-email';
197+
? Term::ReadLine->new('git-send-email', \*STDIN, \*STDOUT)
198+
: Term::ReadLine->new('git-send-email');
199199
};
200200
if ($@) {
201-
$term = new FakeTerm "$@: going non-interactive";
201+
$term = FakeTerm->new("$@: going non-interactive");
202202
}
203203

204204
# Behavior modification variables

0 commit comments

Comments
 (0)