]> sipb.mit.edu Git - ikiwiki.git/blobdiff - IkiWiki/Plugin/openid.pm
delete inline data after it's used
[ikiwiki.git] / IkiWiki / Plugin / openid.pm
index de31f38ee3fffb7d8e9910afd5fadcf46ad41983..10a8fa22f46aa8116f10e13a48ac01678b8ba997 100644 (file)
@@ -27,15 +27,15 @@ sub formbuilder_setup (@) { #{{{
        my $session=$params{session};
        my $cgi=$params{cgi};
        
        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") {
        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");
                # This avoids it displaying a redundant label for the
                # OpenID fieldset.
                $form->fieldsets("OpenID");