You are viewing a plain text version of this content. The canonical link for it is here.
Posted to axkit-dev@xml.apache.org by ma...@sergeant.org on 2006/08/10 00:24:38 UTC

[SVN] [70] Only initialise plugins once.

Revision: 70
Author:   matt
Date:     2006-08-09 22:24:21 +0000 (Wed, 09 Aug 2006)

Log Message:
-----------
Only initialise plugins once.
Made a decision on how body_data hook should work

Modified Paths:
--------------
    trunk/lib/AxKit2/Client.pm

Modified: trunk/lib/AxKit2/Client.pm
===================================================================
--- trunk/lib/AxKit2/Client.pm	2006-08-09 22:23:12 UTC (rev 69)
+++ trunk/lib/AxKit2/Client.pm	2006-08-09 22:24:21 UTC (rev 70)
@@ -40,6 +40,8 @@
         }
     }
     
+    return if $PLUGINS{$plugin};
+    
     my $plug = $package->new();
     $PLUGINS{$plugin} = $plug;
     $plug->_register();
@@ -213,6 +215,9 @@
     my $self = shift;
     my ($ret, $out) = $self->run_hooks('body_data', @_);
     if ($ret == DECLINED) {
+        return;
+    }
+    if ($ret == DONE) {
         $self->process_request();
         return;
     }