NAME

Evo::Class::Meta

VERSION

version 0.0227

METHODS

register

Register a meta instance only once. The second invocation will return the same instance. But if it will be called from another subclass, die. This is a protection from the fool

Meta is stored in $Some::Class::META_CLASS global variable and lives as long as a package.

IMPLEMENTATION NOTES

overridden

"overridden" means this symbol will be skept during "extend_with" so if you marked something as overridden, you should define method or sub yourself too. This is not a problem with sub foo : Over {} or "reg_attr_over" because it marks symbol as overridden and also registers a symbol.

BUT!!! Calling "reg_attr_over" should be called

private

Mark something as private (even if it doesn't exist) to skip at from "public_*". But better use my sub foo {} feature

reg_method

All methods compiled in the class are public by default. But what to do if you make a method by monkey-patching or by extending? Use /reg_method

package Foo;
use Evo 'Scalar::Util(); -Class::Meta';
my $meta = Evo::Class::Meta->register(__PACKAGE__);

no warnings 'once';
*lln = \&Scalar::Util::looks_like_number;

# nothing, because lln was compiled in Scalar::Util
say $meta->public_methods;

# fix this
$meta->reg_method('lln');
say $meta->public_methods;

check_implementation

If implementation requires "attribute", "reg_attr" should be called before checking implementation

AUTHOR

alexbyk.com

COPYRIGHT AND LICENSE

This software is copyright (c) 2016 by alexbyk.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.