NAME
Sub::Meta::Library - library of Sub::Meta
SYNOPSIS
use Sub::Meta;
use Sub::Meta::Library;
sub hello { }
my $meta = Sub::Meta->new(sub => \&hello);
Sub::Meta::Library->register(\&hello, $meta);
my $meta = Sub::Meta::Library->get(\&hello);
METHODS
register(\&sub, $meta)
Register submeta in refaddr of \&sub
.
register_list(ArrayRef[\&sub, $meta])
Register a list of coderef and submeta.
get(\&sub)
Get submeta of \&sub
.
get_by_stash_subname($stash, $subname)
Get submeta by stash and subname. e.g. get_by_stash_subname('Foo::Bar', 'hello')
get_all_subnames_by_stash($stash)
Get all subnames by stash. e.g. get_all_subnames_by_stash('Foo::Bar')
;
get_all_submeta_by_stash($stash)
Get all submeta by stash. e.g. get_all_submeta_by_stash('Foo::Bar')
remove(\&sub)
Remove submeta of \&sub
from the library.
LICENSE
Copyright (C) kfly8.
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
AUTHOR
kfly8 <kfly@cpan.org>