optimisation, only load openid module when signing in
This makes the CGI about .2 seconds faster when editing pages etc.master
parent
d85c9660c5
commit
9f3788e2a2
|
@ -27,15 +27,15 @@ sub formbuilder_setup (@) { #{{{
|
|||
my $session=$params{session};
|
||||
my $cgi=$params{cgi};
|
||||
|
||||
# Give up if module is unavailable to avoid needing to depend on
|
||||
# it.
|
||||
eval q{use Net::OpenID::Consumer};
|
||||
if ($@) {
|
||||
debug("unable to load Net::OpenID::Consumer, not enabling OpenID login");
|
||||
return;
|
||||
}
|
||||
|
||||
if ($form->title eq "signin") {
|
||||
# Give up if module is unavailable to avoid
|
||||
# needing to depend on it.
|
||||
eval q{use Net::OpenID::Consumer};
|
||||
if ($@) {
|
||||
debug("unable to load Net::OpenID::Consumer, not enabling OpenID login");
|
||||
return;
|
||||
}
|
||||
|
||||
# This avoids it displaying a redundant label for the
|
||||
# OpenID fieldset.
|
||||
$form->fieldsets("OpenID");
|
||||
|
|
Loading…
Reference in New Issue