1BackPAN::Index::Role::AUssHearshC(o3n)tributed Perl DocuBmaecnktPaAtNi:o:nIndex::Role::AsHash(3)
2
3
4

NAME

6       BackPAN::Index::Role::AsHash - Role to dump object data as a hash
7

SYNOPSIS

9           use BackPAN::Index::Role::AsHash;
10
11           sub data_methods { return qw(list of data methods) }
12

DESCRIPTION

14       A role to implement "<as_hash"> in result objects.
15
16   Requires
17       The receiving class must implement...
18
19       data_methods
20
21           my @methods = $self->data_methods;
22
23       Returns a list of methods which get data about the object.
24
25   Implements
26       as_hash
27
28           my $hash = $self->as_hash;
29
30       Produces a hash reference representing the object's data based on
31       "<$self-"data_methods>>.  Each key is a method name, the value is
32       "<$self-"$method>>.
33
34
35
36perl v5.32.0                      2020-07-28   BackPAN::Index::Role::AsHash(3)
Impressum