diff options
author | Dylan William Hardison <dylan@hardison.net> | 2018-08-05 05:42:33 +0200 |
---|---|---|
committer | Dylan William Hardison <dylan@hardison.net> | 2018-08-05 05:42:33 +0200 |
commit | 23b94e8410d90e9e15584d3a9220b6bb214f4220 (patch) | |
tree | 352c13d323d116a777a9a496f2e727f05f93f17a /Bugzilla/Quantum.pm | |
parent | fc4c941f8c4b8f5ef6036f555703050899e241c2 (diff) | |
parent | 670029a8e7b0aa32fc6336caf29b65fcabe2829c (diff) | |
download | bugzilla-23b94e8410d90e9e15584d3a9220b6bb214f4220.tar.gz bugzilla-23b94e8410d90e9e15584d3a9220b6bb214f4220.tar.xz |
Merge remote-tracking branch 'dylanwh/mojo-poc'
Diffstat (limited to 'Bugzilla/Quantum.pm')
-rw-r--r-- | Bugzilla/Quantum.pm | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/Bugzilla/Quantum.pm b/Bugzilla/Quantum.pm index 135ff94a9..8d46833c4 100644 --- a/Bugzilla/Quantum.pm +++ b/Bugzilla/Quantum.pm @@ -21,6 +21,8 @@ use Bugzilla::Logging; use Bugzilla::Quantum::CGI; use Bugzilla::Quantum::SES; use Bugzilla::Quantum::Static; +use Mojo::Loader qw( find_modules ); +use Module::Runtime qw( require_module ); use Bugzilla::Util (); use Cwd qw(realpath); use MojoX::Log::Log4perl::Tiny; @@ -36,7 +38,14 @@ sub startup { $self->plugin('Bugzilla::Quantum::Plugin::BlockIP'); $self->plugin('Bugzilla::Quantum::Plugin::BasicAuth'); + Bugzilla::Extension->load_all(); if ( $self->mode ne 'development' ) { + Bugzilla->preload_features(); + DEBUG('preloading templates'); + Bugzilla->preload_templates(); + DEBUG('done preloading templates'); + require_module($_) for find_modules('Bugzilla::User::Setting'); + $self->hook( after_static => sub { my ($c) = @_; @@ -49,6 +58,8 @@ sub startup { Bugzilla::Quantum::CGI->load_all($r); Bugzilla::Quantum::CGI->load_one( 'bzapi_cgi', 'extensions/BzAPI/bin/rest.cgi' ); + Bugzilla::WebService::Server::REST->preload; + $r->any('/')->to('CGI#index_cgi'); $r->any('/rest')->to('CGI#rest_cgi'); $r->any('/rest.cgi/*PATH_INFO')->to( 'CGI#rest_cgi' => { PATH_INFO => '' } ); |