Parse::FieldPath::Role
Moose role to provide an extract_fields method.
extract_fields
package Boris; use Moose; with 'Parse::FieldPath::Role'; has plan => ( is => 'rw' ); has tnt => ( is => 'rw' ); # Meanwhile.. my $boris = Boris->new(plan => 'a very evil plan', tnt => 'lots'); $boris->extract_fields(""); # returns: { plan => 'a very evil plan', tnt => 'lots', }
Called by extract_fields() to get a list of every available field for the object. This implementation return the name of every attribute reader method.
extract_fields()
Calls extract_fields from Parse::FieldPath on the object.
To install Parse::FieldPath, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Parse::FieldPath
CPAN shell
perl -MCPAN -e shell install Parse::FieldPath
For more information on module installation, please visit the detailed CPAN module installation guide.