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__
Returns a L<CPAN::Meta> from the contents of MYMETA.json in the bugzilla directory.
+=head2 C<preload_features()>
+
+Attempts to load all features.
# 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