Sub::Meta::CreatorFunction - utilities to create Sub::Meta
use Sub::Meta::CreatorFunction; sub hello { } my $meta = Sub::Meta::CreatorFunction::find_submeta(\&hello);
This module tries to create Sub::Meta from a subroutine in the way it is under Sub::Meta::Finder, or from Sub::Meta::Library.
find_submeta(CodeRef $sub) => Maybe[Sub::Meta]
Return submeta of subroutine.
finders() => ArrayRef[CodeRef]
Return arrayref of Sub::Meta::Finder::*::find_materials.
Sub::Meta::Finder::*::find_materials
You can change @FINDER_CLASSES:
local @Sub::Meta::CreatorFunction::FINDER_CLASSES = qw(MySubMeta::Finder); my $meta = Sub::Meta::CreatorFunction::find_submeta(\&hello); # find by MySubMeta::Finder
Note that once find_submeta is called, the finders will be fixed by state.
state
Copyright (C) kfly8.
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
kfly8 <kfly@cpan.org>
To install Sub::Meta, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Sub::Meta
CPAN shell
perl -MCPAN -e shell install Sub::Meta
For more information on module installation, please visit the detailed CPAN module installation guide.