aboutsummaryrefslogtreecommitdiff
path: root/IkiWiki/Plugin
diff options
context:
space:
mode:
authorjoey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071>2007-04-30 04:41:53 +0000
committerjoey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071>2007-04-30 04:41:53 +0000
commitcd27ffc61458ecb1c4b7f2f919556b112620f671 (patch)
treee96a94c2526de478231e16c7fa98cbf4ea2ae6a7 /IkiWiki/Plugin
parent479d213419bf7d9e475063dab2164e2e7790ed62 (diff)
downloadikiwiki-cd27ffc61458ecb1c4b7f2f919556b112620f671.tar
ikiwiki-cd27ffc61458ecb1c4b7f2f919556b112620f671.tar.gz
* If Net::OpenID::Consumer is not available, the openid module will quietly
disable itself, this avoids needing a hard dependency on the perl module.
Diffstat (limited to 'IkiWiki/Plugin')
-rw-r--r--IkiWiki/Plugin/openid.pm8
1 files changed, 8 insertions, 0 deletions
diff --git a/IkiWiki/Plugin/openid.pm b/IkiWiki/Plugin/openid.pm
index fcd53ee71..ab9fc560b 100644
--- a/IkiWiki/Plugin/openid.pm
+++ b/IkiWiki/Plugin/openid.pm
@@ -26,6 +26,14 @@ sub formbuilder_setup (@) { #{{{
my $form=$params{form};
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") {
# This avoids it displaying a redundant label for the