{"thread":{"id":"4362","subject":"[PATCH] send-email: only 'require' instead of 'use' Net::SMTP","startedAt":"2006-05-31T22:55:47Z","lastAt":"2006-05-31T22:55:47Z","messageCount":1,"participants":["Johannes Schindelin"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"21038","messageId":"Pine.LNX.4.63.0606010054420.3617@wbgn013.biozentrum.uni-wuerzburg.de","threadId":"4362","inReplyTo":null,"subject":"[PATCH] send-email: only 'require' instead of 'use' Net::SMTP","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2006-05-31T22:55:47Z","receivedAt":"2006-05-31T22:55:47Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"\nThis was proposed by Eric Wong and fixes the test. (Of course, git-send-email\ndoes not work, if there is no Net::SMTP here, but it will say what is wrong\nwhen you actually try to use send-email.)\n\nSigned-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>\n---\n git-send-email.perl |    2 +-\n 1 files changed, 1 insertions(+), 1 deletions(-)\n\ndiff --git a/git-send-email.perl b/git-send-email.perl\nindex 0e368ff..ed1d89b 100755\n--- a/git-send-email.perl\n+++ b/git-send-email.perl\n@@ -21,7 +21,6 @@ use warnings;\n use Term::ReadLine;\n use Getopt::Long;\n use Data::Dumper;\n-use Net::SMTP;\n \n # most mail servers generate the Date: header, but not all...\n $ENV{LC_ALL} = 'C';\n@@ -394,6 +393,7 @@ X-Mailer: git-send-email $gitversion\n \t\tprint $sm \"$header\\n$message\";\n \t\tclose $sm or die $?;\n \t} else {\n+\t\trequire Net::SMTP;\n \t\t$smtp ||= Net::SMTP->new( $smtp_server );\n \t\t$smtp->mail( $from ) or die $smtp->message;\n \t\t$smtp->to( @recipients ) or die $smtp->message;\n-- \n1.3.3.gc46d3-dirty\n"}]}