GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages


Manual Reference Pages  -  WWWDB::PLUGIN (3)

.ds Aq ’

NAME

WWWdb::Plugin - Plugins for WWWdb

CONTENTS

SYNOPSIS



 use WWWdb::Plugin;

 $oPlugin   = Plugin->new($cName,
                          ["HasPrePost" => $bHasPrePost,]
                          ["HasMy"      => $bHasMy]);

 $cResult   = $oPlugin->Call(@lParams);

 $bResult   = $oPlugin->IsDefined($cType);

 $cName     = $oPlugin->getName();



DESCRIPTION

The Plugin class

Plugins are one of the base-technology, which makes WWWdb so flexible. It allows the user, to plug in his own modules before, after and/or instead of the system-routine.

An example demonstrates, how this works. Lets assume we have a subroutine named Plugin. If we want to add functionality, before this routine is called we need a own plugin called PrePlugin. For additional functionality after the call of the Routine we have to define a routine called PostPlugin.

But what, if we want to replace the default plugin completely? Ok, then we must define the subroutine MyPlugin. If it is defined, this subroutine instead of the original Plugin is called.

    Note

Currently the plugins are expected in the main:: name-space.

    Class Methods

<B>newB>


 $oPlugin   = Plugin->new($cName,
                          ["HasPrePost" => $bHasPrePost,]
                          ["HasMy"      => $bHasMy]);



With this method, a new plugin can be allocated. The Name-Parameter contains the base-name of the subroutines. The HasPrePost and HasMy-parameters control, what types of plugins are searched, the defaults are 0.

<B>CallB>


 $cResult   = $oPlugin->Call(@lParams);



Calls the plugins, depending on the Has...-flags given at creation time and the availability of the subroutines. The results of the subroutines are concatenated and will be returned. The given parameters were evaluated and passed to the plugin-routines.

<B>IsDefinedB>


 $bResult   = $oPlugin->IsDefined($cType);



Checks for this plugin, if a subroutine for one of the specified types
Pre,
Post,
My or
Default is defined. If it is, 1 is returned; 0 if not. For any other types undef will be given back.

    Class Attributes

<B>NameB>


 $cName = $oPlugin->getName();



The base-name of this Plugin. (Read-only)

<B>HasPrePostB>


 $bHasPrePost = $oPlugin->getHasPrePost();



True, when this Plugin could have a Pre- or Post-Plugin. (Read-only, private)

<B>HasMyB>


 $bHasMy = $oPlugin->getHasMy();



True, when this Plugin could be replaced by a My-Plugin. (Read-only, private)

Search for    or go to Top of page |  Section 3 |  Main Index


perl v5.20.3 WWWDB::PLUGIN (3) 2002-03-14

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with manServer 1.07.