Venus::Role::Reflectable
Reflectable Role
Reflectable Role for Perl 5
method: class method: clone method: meta method: reify method: space method: what
package Example;
use Venus::Class;
with 'Venus::Role::Reflectable';
sub test {
true
}
package main;
my $example = Example->new;
# $example->space;
This package modifies the consuming package and provides methods for introspecting the object and its underlying package.
The class method returns the class name for the given class or object.
class() (string)
{ since => '0.01', }
=example-1 class
# given: synopsis;
my $class = $example->class;
# "Example"
The clone method clones the invocant and returns the result.
clone() (object)
{ since => '4.15', }
The meta method returns a Venus::Meta object for the given object.
meta() (Venus::Meta)
{ since => '1.23', }
=example-1 meta
# given: synopsis;
my $meta = $example->meta;
# bless({name => "Example"}, "Venus::Meta")
The reify method dispatches the method call or executes the callback and returns the result as a value object.
reify(string | coderef $code, any @args) (object)
{ since => '1.23', }
=example-1 reify
# given: synopsis
package main;
my $reify = $example->reify;
# bless({}, "Example")
The space method returns a Venus::Space object for the given object.
space() (Venus::Space)
{ since => '0.01', }
=example-1 space
# given: synopsis;
my $space = $example->space;
# bless({ value => "Example" }, "Venus::Space")
The what method dispatches the method call or executes the callback and returns the result as a Venus::What object.
what(string | coderef $code, any @args) (Venus::What)
{ since => '0.01', }
=example-1 what
# given: synopsis;
my $what = $example->what;
# bless({ value => bless({}, "Example") }, "Venus::What")
t/Venus.t: present: authors t/Venus.t: present: license
29 POD Errors
The following errors were encountered while parsing the POD:
- Around line 14:
Unknown directive: =name
- Around line 22:
Unknown directive: =tagline
- Around line 30:
Unknown directive: =abstract
- Around line 38:
Unknown directive: =includes
- Around line 51:
Unknown directive: =synopsis
- Around line 80:
Unknown directive: =description
- Around line 89:
Unknown directive: =method
- Around line 93:
Unknown directive: =signature
- Around line 97:
Unknown directive: =metadata
- Around line 121:
Unknown directive: =method
- Around line 125:
Unknown directive: =signature
- Around line 129:
Unknown directive: =metadata
- Around line 147:
=cut found outside a pod block. Skipping to next block.
- Around line 160:
Unknown directive: =method
- Around line 164:
Unknown directive: =signature
- Around line 168:
Unknown directive: =metadata
- Around line 192:
Unknown directive: =method
- Around line 197:
Unknown directive: =signature
- Around line 201:
Unknown directive: =metadata
- Around line 237:
=cut found outside a pod block. Skipping to next block.
- Around line 258:
=cut found outside a pod block. Skipping to next block.
- Around line 269:
Unknown directive: =method
- Around line 273:
Unknown directive: =signature
- Around line 277:
Unknown directive: =metadata
- Around line 301:
Unknown directive: =method
- Around line 306:
Unknown directive: =signature
- Around line 310:
Unknown directive: =metadata
- Around line 343:
=cut found outside a pod block. Skipping to next block.
- Around line 354:
Unknown directive: =partials