summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Bugzilla/CPAN.pm13
-rw-r--r--mod_perl.pl2
2 files changed, 15 insertions, 0 deletions
diff --git a/Bugzilla/CPAN.pm b/Bugzilla/CPAN.pm
index f044e45bc..1ffac601c 100644
--- a/Bugzilla/CPAN.pm
+++ b/Bugzilla/CPAN.pm
@@ -104,6 +104,16 @@ sub feature {
return $FEATURE_LOADED{$feature_name} = 1;
}
+sub preload_features {
+ my ($class) = @_;
+ return 0 unless _CAN_HAS_FEATURE;
+ my $meta = $class->cpan_meta;
+
+ foreach my $feature ($meta->features) {
+ $class->feature($feature->identifier);
+ }
+}
+
1;
__END__
@@ -140,3 +150,6 @@ are installed.
Returns a L<CPAN::Meta> from the contents of MYMETA.json in the bugzilla directory.
+=head2 C<preload_features()>
+
+Attempts to load all features.
diff --git a/mod_perl.pl b/mod_perl.pl
index bbca30c2e..920032fe7 100644
--- a/mod_perl.pl
+++ b/mod_perl.pl
@@ -93,6 +93,8 @@ $server->add_config([split("\n", $conf)]);
# Pre-load all extensions
$Bugzilla::extension_packages = Bugzilla::Extension->load_all();
+Bugzilla->preload_features();
+
# Have ModPerl::RegistryLoader pre-compile all CGI scripts.
my $rl = new ModPerl::RegistryLoader();
# If we try to do this in "new" it fails because it looks for a