Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
bugzilla
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
etersoft
bugzilla
Commits
ce3970fd
Commit
ce3970fd
authored
Oct 23, 2011
by
Frédéric Buclin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bug 696541: Only load some external modules when needed, to improve the load time of pages
r/a=mkanat
parent
e9f859e1
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
7 deletions
+9
-7
Localconfig.pm
Bugzilla/Install/Localconfig.pm
+0
-1
Util.pm
Bugzilla/Install/Util.pm
+6
-2
RNG.pm
Bugzilla/RNG.pm
+3
-4
No files found.
Bugzilla/Install/Localconfig.pm
View file @
ce3970fd
...
...
@@ -36,7 +36,6 @@ use Bugzilla::Util qw(generate_random_password);
use
Data::
Dumper
;
use
File::
Basename
qw(dirname)
;
use
IO::
File
;
use
Safe
;
use
base
qw(Exporter)
;
...
...
Bugzilla/Install/Util.pm
View file @
ce3970fd
...
...
@@ -29,11 +29,9 @@ use strict;
use
Bugzilla::
Constants
;
use
Encode
;
use
ExtUtils::
MM
();
use
File::
Basename
;
use
File::
Spec
;
use
POSIX
qw(setlocale LC_CTYPE)
;
use
Safe
;
use
Scalar::
Util
qw(tainted)
;
use
Term::
ANSIColor
qw(colored)
;
use
PerlIO
;
...
...
@@ -58,6 +56,9 @@ our @EXPORT_OK = qw(
sub
bin_loc
{
my
(
$bin
,
$path
)
=
@_
;
# This module is not needed most of the time and is a bit slow,
# so we only load it when calling bin_loc().
require
ExtUtils::
MM
;
# If the binary is a full path...
if
(
$bin
=~
m{[/\\]}
)
{
...
...
@@ -541,6 +542,9 @@ sub no_checksetup_from_cgi {
# Used by install_string
sub
_get_string_from_file
{
my
(
$string_id
,
$file
)
=
@_
;
# This module is only needed by checksetup.pl,
# so only load it when needed.
require
Safe
;
return
undef
if
!-
e
$file
;
my
$safe
=
new
Safe
;
...
...
Bugzilla/RNG.pm
View file @
ce3970fd
...
...
@@ -24,7 +24,6 @@ use strict;
use
base
qw(Exporter)
;
use
Bugzilla::
Constants
qw(ON_WINDOWS)
;
use
IO::
File
;
use
Math::Random::
ISAAC
;
use
if
ON_WINDOWS
,
'Win32::API'
;
...
...
@@ -156,14 +155,14 @@ sub _get_seed {
sub
_read_seed_from
{
my
(
$from
)
=
@_
;
my
$fh
=
IO::
File
->
new
(
$from
,
"r"
)
or
die
"$from: $!"
;
open
(
my
$fh
,
'<'
,
$from
)
or
die
"$from: $!"
;
my
$buffer
;
$fh
->
read
(
$buffer
,
SEED_SIZE
);
read
(
$fh
,
$buffer
,
SEED_SIZE
);
if
(
length
(
$buffer
)
<
SEED_SIZE
)
{
die
"Could not read enough seed bytes from $from, got only "
.
length
(
$buffer
);
}
$fh
->
close
;
close
$fh
;
return
$buffer
;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment