Commit 34b392c3 authored by Frédéric Buclin's avatar Frédéric Buclin

Bug 696537: Load DateTime only when datetime_from() is called

r/a=mkanat
parent bf1b1140
......@@ -50,8 +50,6 @@ use Bugzilla::RNG qw(irand);
use Date::Parse;
use Date::Format;
use DateTime;
use DateTime::TimeZone;
use Digest;
use Email::Address;
use List::Util qw(first);
......@@ -485,6 +483,9 @@ sub datetime_from {
delete $args{$arg} if !defined $args{$arg};
}
# This module takes time to load and is only used here, so we
# |require| it here rather than |use| it.
require DateTime;
my $dt = new DateTime(\%args);
# Now display the date using the given timezone,
......
......@@ -39,6 +39,7 @@ use Apache2::Log ();
use Apache2::ServerUtil;
use ModPerl::RegistryLoader ();
use File::Basename ();
use DateTime ();
# This loads most of our modules.
use Bugzilla ();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment