The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Fukurama::Class::Implements - Pragma to provide interfaces

VERSION

Version 0.02 (beta)

SYNOPSIS

 package MyClass;
 use Fukurama::Class::Implements('MyParent');

DESCRIPTION

This pragma-like module enables te possibility to use interfaces (like in java). The implementation of all subroutines (except perls speacials) will be checked at compiletime. Your package won't inherit from this interface but every isa() will say that it is. Use Fukurama::Class instead, to get all the features for OO.

CONFIG

You can define the check-level which describes how the module will check implementations. The following levels are allowed:

DISABLE (0)

There is no check and no change in UNIVERSAL. If you use this level, it's like you remove this module. There are no side effects. You should only use this, if you never use the isa() method to check for interfaces.

CHECK_NONE (1)

All Registration-Processes are executed and UNIVERSAL::isa would be decorated, but there would be no check. This level is recommended for production.

CHECK_ALL (2)

All Classes would checked for implementation. This is the default behavior when you does'n change the check-level.

EXPORT

UNIVERSAL::isa

would be decorated

METHODS

implements( child_class:STRING, interface_class:STRING ) return:VOID

Helper-method, which would executed by every pragma usage.

run_check() return:VOID

Helper method for static perl (see Fukurama::Class > BUGS)

register_class_tree() return:VOID

Helper method to register needed handler in Fukurama::Class::Tree

AUTHOR, BUGS, SUPPORT, ACKNOWLEDGEMENTS, COPYRIGHT & LICENSE

see perldoc of Fukurama::Class