Evo::Class::Meta
version 0.0229
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.
$Some::Class::META_CLASS
"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.
sub foo : Over {}
BUT!!! Calling "reg_attr_over" should be called
Mark something as private (even if it doesn't exist) to skip at from "public_*". But better use my sub foo {} feature
my sub foo {}
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
/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;
If implementation requires "attribute", "reg_attr" should be called before checking implementation
alexbyk.com
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.
To install Evo, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Evo
CPAN shell
perl -MCPAN -e shell install Evo
For more information on module installation, please visit the detailed CPAN module installation guide.