| 1 | # | ||||||||||
| 2 | # This file is part of TBX-Min | ||||||||||
| 3 | # | ||||||||||
| 4 | # This software is copyright (c) 2016 by Alan Melby. | ||||||||||
| 5 | # | ||||||||||
| 6 | # This is free software; you can redistribute it and/or modify it under | ||||||||||
| 7 | # the same terms as the Perl 5 programming language system itself. | ||||||||||
| 8 | # | ||||||||||
| 9 | package TBX::Min::Note; | ||||||||||
| 10 | 1 | ▶ | use strict; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 11 | 1 | ▶ | use warnings; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 12 | 1 | use Class::Tiny qw( | |||||||||
| 13 | noteValue | ||||||||||
| 14 | noteKey | ||||||||||
| 15 | 1 | ▶ | ); | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 16 | 1 | ▶ | use Carp; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 17 | |||||||||||
| 18 | 1 | our $VERSION = '0.07'; # VERSION | |||||||||
| 19 | |||||||||||
| 20 | # ABSTRACT: Store information from one TBX-Min C<tig> element | ||||||||||
| 21 | |||||||||||
| 22 | # above Pod::Coverage makes this not "naked" via Pod::Coverage::TrustPod | ||||||||||
| 23 | |||||||||||
| 24 | 1 | my %valid = map +($_=>1), Class::Tiny->get_all_attributes_for(__PACKAGE__); | |||||||||
| 25 | sub BUILD { | ||||||||||
| 26 | 0 | ▶ | my ($self, $args) = @_; | ||||||||
|
Subroutine
BUILD: not called CC=2 SCAR=17.9
Pod
undocumented
| |||||||||||
| 27 | |||||||||||
| 28 | 0 | ▶ | if(my @invalids = grep !$valid{$_}, sort keys %$args){ | ||||||||
|
Branch: 1 branch
| |||||||||||
| 29 | 0 | croak 'Invalid attributes for class: ' . | |||||||||
| 30 | join ' ', @invalids | ||||||||||
| 31 | } | ||||||||||
| 32 | |||||||||||
| 33 | 0 | return; | |||||||||
| 34 | } | ||||||||||
| 35 | |||||||||||
| 36 | 1 | 1; | |||||||||
| 37 | |||||||||||
| 38 | __END__ | ||||||||||
| 39 | |||||||||||
| 40 | =pod | ||||||||||
| 41 | |||||||||||
| 42 | =encoding UTF-8 | ||||||||||
| 43 | |||||||||||
| 44 | =head1 NAME | ||||||||||
| 45 | |||||||||||
| 46 | TBX::Min::Note - Store information from one TBX-Min C<tig> element | ||||||||||
| 47 | |||||||||||
| 48 | =head1 VERSION | ||||||||||
| 49 | |||||||||||
| 50 | version 0.07 | ||||||||||
| 51 | |||||||||||
| 52 | =head1 SYNOPSIS | ||||||||||
| 53 | |||||||||||
| 54 | use TBX::Min::Note; | ||||||||||
| 55 | my $note = TBX::Min::Note->new( | ||||||||||
| 56 | {noteKey => "grammaticalGender", noteValue => 'male'}); | ||||||||||
| 57 | print $note->noteValue; # 'male' | ||||||||||
| 58 | |||||||||||
| 59 | =head1 DESCRIPTION | ||||||||||
| 60 | |||||||||||
| 61 | This class represents a single term group contained in a TBX-Min file. A term | ||||||||||
| 62 | group contains a single term and information pertaining to it, such as part of | ||||||||||
| 63 | speech, a note, or the associated customer. | ||||||||||
| 64 | |||||||||||
| 65 | =head1 METHODS | ||||||||||
| 66 | |||||||||||
| 67 | =head2 C<new> | ||||||||||
| 68 | |||||||||||
| 69 | Creates a new C<TBX::Min::Note> instance. Optionally you may pass in a hash | ||||||||||
| 70 | reference which is used to initialized the object. The fields of the hash | ||||||||||
| 71 | correspond to the names of the accessor methods listed below. | ||||||||||
| 72 | |||||||||||
| 73 | =head2 C<noteKey> | ||||||||||
| 74 | |||||||||||
| 75 | Get or set a noteKey associated with this note group. | ||||||||||
| 76 | |||||||||||
| 77 | =head2 C<noteValue> | ||||||||||
| 78 | |||||||||||
| 79 | Get or set a noteValue associated with this note group. | ||||||||||
| 80 | |||||||||||
| 81 | =head1 SEE ALSO | ||||||||||
| 82 | |||||||||||
| 83 | L<TBX::Min> | ||||||||||
| 84 | |||||||||||
| 85 | =for Pod::Coverage BUILD | ||||||||||
| 86 | |||||||||||
| 87 | =head1 AUTHOR | ||||||||||
| 88 | |||||||||||
| 89 | James Hayes <james.s.hayes@gmail.com> | ||||||||||
| 90 | |||||||||||
| 91 | =head1 COPYRIGHT AND LICENSE | ||||||||||
| 92 | |||||||||||
| 93 | This software is copyright (c) 2016 by Alan Melby. | ||||||||||
| 94 | |||||||||||
| 95 | This is free software; you can redistribute it and/or modify it under | ||||||||||
| 96 | the same terms as the Perl 5 programming language system itself. | ||||||||||
| 97 | |||||||||||
| 98 | =cut | ||||||||||