| 1 | package TAP::DOM::Entry; | ||||||||||
| 2 | 25 | our $AUTHORITY = 'cpan:SCHWIGON'; | |||||||||
| 3 | # ABSTRACT: Accessors for TAP::DOM line entries | ||||||||||
| 4 | 25 | $TAP::DOM::Entry::VERSION = '1.002'; | |||||||||
| 5 | 25 | ▶ | use 5.006; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 6 | 25 | ▶ | use strict; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 7 | 25 | ▶ | use warnings; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 8 | |||||||||||
| 9 | 25 | require TAP::DOM; | |||||||||
| 10 | |||||||||||
| 11 | use Class::XSAccessor | ||||||||||
| 12 | 25 | ▶ | chained => 1, | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 13 | constructor => 'new', | ||||||||||
| 14 | accessors => [qw( raw | ||||||||||
| 15 | type | ||||||||||
| 16 | data | ||||||||||
| 17 | number | ||||||||||
| 18 | severity | ||||||||||
| 19 | as_string | ||||||||||
| 20 | directive | ||||||||||
| 21 | description | ||||||||||
| 22 | explanation | ||||||||||
| 23 | _children | ||||||||||
| 24 | 25 | )]; | |||||||||
| 25 | |||||||||||
| 26 | 25 | ▶ | BEGIN { | ||||||||
|
Subroutine
BEGIN: called CC=2 SCAR=6.9
| |||||||||||
| 27 | 25 | ▶ | no strict 'refs'; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 28 | |||||||||||
| 29 | # bitset aware 'is_/has_' accessors | ||||||||||
| 30 | 25 | for my $method (qw( is_plan | |||||||||
| 31 | is_ok | ||||||||||
| 32 | is_test | ||||||||||
| 33 | is_comment | ||||||||||
| 34 | is_unknown | ||||||||||
| 35 | is_actual_ok | ||||||||||
| 36 | is_version | ||||||||||
| 37 | is_pragma | ||||||||||
| 38 | is_unplanned | ||||||||||
| 39 | is_bailout | ||||||||||
| 40 | is_yaml | ||||||||||
| 41 | has_skip | ||||||||||
| 42 | has_todo | ||||||||||
| 43 | )) | ||||||||||
| 44 | { | ||||||||||
| 45 | 325 | ▶ | *{$method} = sub { | ||||||||
|
Subroutine
__ANON__: called CC=2 SCAR=6.9
| |||||||||||
| 46 | 182 | my ($self) = @_; | |||||||||
| 47 | 182 | ▶ | defined $self->{is_has} ? $self->{is_has} & ${"TAP::DOM::".uc($method)} : $self->{$method} | ||||||||
|
Branch: 1 branch
| |||||||||||
| 48 | } | ||||||||||
| 49 | 325 | } | |||||||||
| 50 | } | ||||||||||
| 51 | |||||||||||
| 52 | 25 | 1; | |||||||||
| 53 | |||||||||||
| 54 | __END__ | ||||||||||