| 1 | package eris::role::dictionary; | ||
| 2 | # ABSTRACT: Interface for implementing a dictionary object | ||
| 3 | |||
| 4 | 6 | ▶ | use Moo::Role; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 5 | 6 | ▶ | use Types::Standard qw(Int Str); |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 6 | 6 | ▶ | use namespace::autoclean; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 7 | |||
| 8 | 6 | our $VERSION = '0.008'; # VERSION | |
| 9 | |||
| 10 | |||
| 11 | 6 | requires qw(lookup fields); | |
| 12 | 6 | with qw( | |
| 13 | eris::role::plugin | ||
| 14 | ); | ||
| 15 | |||
| 16 | |||
| 17 | 6 | 1; | |
| 18 | |||
| 19 | __END__ | ||
| 20 | |||
| 21 | =pod | ||
| 22 | |||
| 23 | =encoding UTF-8 | ||
| 24 | |||
| 25 | =head1 NAME | ||
| 26 | |||
| 27 | eris::role::dictionary - Interface for implementing a dictionary object | ||
| 28 | |||
| 29 | =head1 VERSION | ||
| 30 | |||
| 31 | version 0.008 | ||
| 32 | |||
| 33 | =head1 INTERFACE | ||
| 34 | |||
| 35 | =head2 lookup() | ||
| 36 | |||
| 37 | Takes a field name, returns undef for not found or | ||
| 38 | a HashRef with the following keys: | ||
| 39 | |||
| 40 | { | ||
| 41 | field => 'field_name', | ||
| 42 | description => 'This is what this field means to users', | ||
| 43 | } | ||
| 44 | |||
| 45 | =head2 fields() | ||
| 46 | |||
| 47 | Returns the list of all fields in the dictionary. | ||
| 48 | |||
| 49 | =head1 SEE ALSO | ||
| 50 | |||
| 51 | L<eris::dictionary>, L<eris::role::plugin>, L<eris::dictionary::cee>, | ||
| 52 | L<eris::dictionary::eris>, L<eris::dictionary::syslog> | ||
| 53 | |||
| 54 | =head1 AUTHOR | ||
| 55 | |||
| 56 | Brad Lhotsky <brad@divisionbyzero.net> | ||
| 57 | |||
| 58 | =head1 COPYRIGHT AND LICENSE | ||
| 59 | |||
| 60 | This software is Copyright (c) 2015 by Brad Lhotsky. | ||
| 61 | |||
| 62 | This is free software, licensed under: | ||
| 63 | |||
| 64 | The (three-clause) BSD License | ||
| 65 | |||
| 66 | =cut | ||