The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Parse::FieldPath::Role

ABSTRACT

Moose role to provide an extract_fields method.

SYNOPSIS

  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',
                                         }

PROVIDED METHODS

all_fields()

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($field_path)

Calls extract_fields from Parse::FieldPath on the object.