יובל קוג'מן (Yuval Kogman) > Object-Meta-Plugin-0.01 > Object::Meta::Plugin::Useful::Generic

Download:
Object-Meta-Plugin-0.01.tar.gz

Dependencies

Annotate this POD

CPAN RT

Open  0
View/Report Bugs
Module Version: 0.01   Source   Latest Release: Object-Meta-Plugin-0.02_04

NAME ^

Object::Meta::Plugin::Useful::Generic - a generic useful plugin base class.

SYNOPSIS ^

        package MyFoo;
        use bas "Object::Meta::Plugin::Useful::Generic";

        sub new {
                my $pkg = shift;
                my $self = $pkg->SUPER::new(@_);
                $self->export(qw/foo bar/);
        }

        sub foo {
                # ...
        }

        sub bar {
                # ...
        }

DESCRIPTION ^

This provides a very simple base class for a plugin. It uses the method export to explicitly mark a method name for exporting. When Object::Meta::Plugin::Useful's init hits

METHODS ^

export METHODS ...

This method takes a list of method names, and makes sure they are all implemented ($self-can($method)>) and so forth. It then makes notes of what remains, and will return these values when the exports method is called by the standard export list implementation.

CAVEATS ^

BUGS ^

COPYRIGHT & LICENSE ^

        Copyright 2003 Yuval Kogman. All rights reserved.
        This program is free software; you can redistribute it
        and/or modify it under the same terms as Perl itself.

AUTHOR ^

Yuval Kogman <nothingmuch@woobling.org>

SEE ALSO ^

Object::Meta::Plugin, Object::Meta::Plugin::Useful, Object::Meta::Plugin::Useful::Meta, Object::Meta::Plugin::Useful::Greedy.

syntax highlighting: