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  -  PLAGGER::PLUGIN (3)

.ds Aq ’

NAME

Plagger::Plugin - Base class for Plagger Plugins

CONTENTS

SYNOPSIS



  package Plagger::Plugin::Something;
  use base qw(Plagger::Plugin);

  # register hooks
  sub register {
    my ($self, $context) = @_;
    $context->register_hook( $self,
       thingy.wosit  => $self->can(doodad),
    )
  }

  sub doodad { ... }



DESCRIPTION

This is the base class for plagger plugins. Pretty much everything is done by plugins in Plagger.

To write a new plugin, simply inherit from Plagger::Plugin:



  package Plagger::Plugin;
  use base qw(Plagger::Plugin);



Then register some hooks:



  # register hooks
  sub register {
    my ($self, $context) = @_;
    $context->register_hook( $self,
       thingy.wosit  => $self->can(doodad),
    )
  }



This means that the doodad method will be called at the thingy.wosit stage.

There is a handy plugin-start.pl in tools tool that creates the template of .pm file, dependency YAML file and test files for you.



  > ./tools/plugin-start.pl Foo::Bar



    Methods

new Standard constructor. Calls init.
init Initializes the plugin
walk_config_encryption
do_walk
decrypt_config
conf
rule
rule_hook
cache
dispatch_rule_on
class_id
assets_dir
log
cookie_jar Access the Plagger::Cookies object.
templatize
load_assets

AUTHOR

Tatsuhiko Miyagawa <miyagawa@bulknews.net>

See AUTHORS file for the name of all the contributors.

LICENSE

Except where otherwise noted, Plagger is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

SEE ALSO

<http://plagger.org/>
Search for    or go to Top of page |  Section 3 |  Main Index


perl v5.20.3 PLAGGER::PLUGIN (3) 2006-12-05

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