From 529dd386dda6c6e6d0dad801785d2d943756fb3f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=86var=20Arnfj=C3=B6r=C3=B0=20Bjarmason?= Date: Thu, 30 Sep 2010 13:43:08 +0000 Subject: send-email: make_message_id use "require" instead of "use" MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change the use of Sys::Hostname from a "use" to a "require". The former happens in an implicit BEGIN block and is thus immune from the if block it's contained in, so it's always loaded. This should speed up the invocation of git-send-email by a few milliseconds. Signed-off-by: Ævar Arnfjörð Bjarmason Reviewed-by: Jeff King > Signed-off-by: Junio C Hamano diff --git a/git-send-email.perl b/git-send-email.perl index 1e7adc2..bfc6d4b 100755 --- a/git-send-email.perl +++ b/git-send-email.perl @@ -819,7 +819,7 @@ sub make_message_id { last if (defined $du_part and $du_part ne ''); } if (not defined $du_part or $du_part eq '') { - use Sys::Hostname qw(); + require Sys::Hostname; $du_part = 'user@' . Sys::Hostname::hostname(); } my $message_id_template = "<%s-git-send-email-%s>"; -- cgit v0.10.2-6-g49f6