@@ -567,15 +567,15 @@ ($)
567
567
$compose_filename = ($repo ?
568
568
tempfile(" .gitsendemail.msg.XXXXXX" , DIR => $repo -> repo_path()) :
569
569
tempfile(" .gitsendemail.msg.XXXXXX" , DIR => " ." ))[1];
570
- open (C, " >" ,$compose_filename )
570
+ open my $c , " >" , $compose_filename
571
571
or die " Failed to open for writing $compose_filename : $! " ;
572
572
573
573
574
574
my $tpl_sender = $sender || $repoauthor || $repocommitter || ' ' ;
575
575
my $tpl_subject = $initial_subject || ' ' ;
576
576
my $tpl_reply_to = $initial_reply_to || ' ' ;
577
577
578
- print C <<EOT ;
578
+ print $c <<EOT ;
579
579
From $tpl_sender # This line is ignored.
580
580
GIT: Lines beginning in "GIT:" will be removed.
581
581
GIT: Consider including an overall diffstat or table of contents
@@ -588,33 +588,33 @@ ($)
588
588
589
589
EOT
590
590
for my $f (@files ) {
591
- print C get_patch_subject($f );
591
+ print $c get_patch_subject($f );
592
592
}
593
- close (C) ;
593
+ close $c ;
594
594
595
595
if ($annotate ) {
596
596
do_edit($compose_filename , @files );
597
597
} else {
598
598
do_edit($compose_filename );
599
599
}
600
600
601
- open (C2, " >" ,$compose_filename . " .final" )
601
+ open my $c2 , " >" , $compose_filename . " .final"
602
602
or die " Failed to open $compose_filename .final : " . $! ;
603
603
604
- open (C, " <" ,$compose_filename )
604
+ open $c , " <" , $compose_filename
605
605
or die " Failed to open $compose_filename : " . $! ;
606
606
607
607
my $need_8bit_cte = file_has_nonascii($compose_filename );
608
608
my $in_body = 0;
609
609
my $summary_empty = 1;
610
- while (<C >) {
610
+ while (<$c >) {
611
611
next if m / ^GIT:/ ;
612
612
if ($in_body ) {
613
613
$summary_empty = 0 unless (/ ^\n $ / );
614
614
} elsif (/ ^\n $ / ) {
615
615
$in_body = 1;
616
616
if ($need_8bit_cte ) {
617
- print C2 " MIME-Version: 1.0\n " ,
617
+ print $c2 " MIME-Version: 1.0\n " ,
618
618
" Content-Type: text/plain; " ,
619
619
" charset=UTF-8\n " ,
620
620
" Content-Transfer-Encoding: 8bit\n " ;
@@ -639,10 +639,10 @@ ($)
639
639
print " To/Cc/Bcc fields are not interpreted yet, they have been ignored\n " ;
640
640
next ;
641
641
}
642
- print C2 $_ ;
642
+ print $c2 $_ ;
643
643
}
644
- close (C) ;
645
- close (C2) ;
644
+ close $c ;
645
+ close $c2 ;
646
646
647
647
if ($summary_empty ) {
648
648
print " Summary email is empty, skipping it\n " ;
0 commit comments