diff options
author | Thorsten Behrens <tbehrens@novell.com> | 2011-02-23 09:59:52 +0100 |
---|---|---|
committer | Thorsten Behrens <tbehrens@novell.com> | 2011-02-23 09:59:52 +0100 |
commit | 4025f24ca9f48453606165a30ca1db5cf4f45578 (patch) | |
tree | d423b7713f3671cded478dfc0fbe75207d9bbabe /bin | |
parent | 42795c499072b264c3f2146c40241267e50b9c84 (diff) |
Make tinbuild load SMTP modules only on demand
Net::SMTP::SSL and Net:SMTP::TLS may not be installed or available
on all systems, so we're now only loading that if the corresponding
command line option was given.
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/tinbuild | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/bin/tinbuild b/bin/tinbuild index 632806966e42..b4c380079ea9 100755 --- a/bin/tinbuild +++ b/bin/tinbuild @@ -52,9 +52,6 @@ sendMailMsg () echo $BCC perl -e " use MIME::Lite; -use Net::SMTP; -use Net::SMTP::SSL; -use Net::SMTP::TLS; my \$text; while (<>) { @@ -82,6 +79,7 @@ if ('$LOG' ne '' && -f '$LOG') { my \$smtp_class = '$SMTPCRYPT' eq 'none' ? 'Net::SMTP' : '$SMTPCRYPT' eq 'ssl' ? 'Net::SMTP::SSL' : 'Net::SMTP::TLS'; +eval \"use \$smtp_class\"; my \$SMTP = \$smtp_class->new( '$SMTPHOST', Hello => 'documentfoundation.org', |