|
NAMEClass::Component::Component::Plaggerize - extend your module like from Plagger componentSYNOPSISmyapp.pl#!/usr/bin/perl use strict; use warnings; use MyApp; MyApp->new({ config => 'config.yaml' })->run; config.yaml plugins: - module: Test config: hello MyApp.pm package MyApp; use strict; use warnings; use Class::Component; __PACKAGE__->load_components(qw/ Plaggerize /); sub run { my $self = shift; $self->log( debug => 'running start' ); $self->run_hook('test'); } 1; MyApp/Plugin/Test.pm package MyApp::Plugin::Test; use strict; use warnings; use base 'Class::Component::Plugin'; sub test : Hook('test') { my($self, $c) = @_; use Data::Dumper; $c->log( debug => 'testmethod:' . Dumper($self->config) ); } 1; METHODS
SETUP METHODS
AUTHORKazuhiro Osawa <ko@yappo.ne.jp>SEE ALSOClass::ComponentLICENSEThis library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
Visit the GSP FreeBSD Man Page Interface. |