MozRepl::Plugin::Base - Plugin base class.
version 0.03
package MozRepl::Plugin::Foo::Bar; use strict; use warnings; use base qw(MozRepl::Plugin::Base); sub execute { my ($self, $ctx, $args) = @_; $ctx->execute(q|window.alert("Anta ga taisho!")|); } 1; package main; use MozRepl; my $repl = MozRepl->new; $repl->setup({ plugins => { plugins => [qw/Foo::Bar/] } }); $repl->foo_bar();
This module is base class any plugins for MozRepl.
Create instance.
Hash reference.
Called from MozRepl setup() method. This is abstract method, If you want to task in setup pharse, then must be overriding this method.
Context object. See MozRepl
Extra parameters.
Execute plugin method. Please override me.
If you override this method and return constant string, then the string will be used as method name in context.
Not overriding method name will be determined by MozRepl::Util plugin_to_method() method. See "plugin_to_method($plugin, $search)" in MozRepl::Util
Processing template using by Template, Template::Provider::FromDATA.
Label name in DATA Section.
Append values as hash reference.
Toru Yamaguchi, <zigorou@cpan.org>
<zigorou@cpan.org>
Please report any bugs or feature requests to bug-mozrepl-plugin-base@rt.cpan.org, or through the web interface at http://rt.cpan.org. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.
bug-mozrepl-plugin-base@rt.cpan.org
Copyright 2007 Toru Yamaguchi, All Rights Reserved.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
To install MozRepl, copy and paste the appropriate command in to your terminal.
cpanm
cpanm MozRepl
CPAN shell
perl -MCPAN -e shell install MozRepl
For more information on module installation, please visit the detailed CPAN module installation guide.