| 1 | package Chloro::Trait::Class; | ||||||||||||||||||||||||||||
| 2 | |||||||||||||||||||||||||||||
| 3 | 11 | ▶ | use strict; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 4 | 11 | ▶ | use warnings; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 5 | 11 | ▶ | use namespace::autoclean; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 6 | |||||||||||||||||||||||||||||
| 7 | 11 | our $VERSION = '0.07'; | |||||||||||||||||||||||||||
| 8 | |||||||||||||||||||||||||||||
| 9 | 11 | ▶ | use Moose::Role; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 10 | |||||||||||||||||||||||||||||
| 11 | 11 | with 'Chloro::Role::Trait::HasFormComponents'; | |||||||||||||||||||||||||||
| 12 | |||||||||||||||||||||||||||||
| 13 | 30 | ▶ | sub fields { | ||||||||||||||||||||||||||
|
Subroutine
fields: called CC=1 SCAR=0.0
Pod
undocumented
| |||||||||||||||||||||||||||||
| 14 | 30 | my $self = shift; | |||||||||||||||||||||||||||
| 15 | |||||||||||||||||||||||||||||
| 16 | 30 | return $self->_unique_items('local_fields'); | |||||||||||||||||||||||||||
| 17 | } | ||||||||||||||||||||||||||||
| 18 | |||||||||||||||||||||||||||||
| 19 | 27 | ▶ | sub groups { | ||||||||||||||||||||||||||
|
Subroutine
groups: called CC=1 SCAR=0.0
Pod
undocumented
| |||||||||||||||||||||||||||||
| 20 | 27 | my $self = shift; | |||||||||||||||||||||||||||
| 21 | |||||||||||||||||||||||||||||
| 22 | 27 | return $self->_unique_items('local_groups'); | |||||||||||||||||||||||||||
| 23 | } | ||||||||||||||||||||||||||||
| 24 | |||||||||||||||||||||||||||||
| 25 | 57 | ▶ | sub _unique_items { | ||||||||||||||||||||||||||
|
Subroutine
_unique_items: called CC=6 SCAR=17.9
| |||||||||||||||||||||||||||||
| 26 | 57 | my $self = shift; | |||||||||||||||||||||||||||
| 27 | 57 | my $meth = shift; | |||||||||||||||||||||||||||
| 28 | |||||||||||||||||||||||||||||
| 29 | 57 | my %seen; | |||||||||||||||||||||||||||
| 30 | my @items; | ||||||||||||||||||||||||||||
| 31 | |||||||||||||||||||||||||||||
| 32 | 57 | for my $class ( $self->linearized_isa() ) { | |||||||||||||||||||||||||||
| 33 | 176 | my $meta = Class::MOP::class_of($class); | |||||||||||||||||||||||||||
| 34 | |||||||||||||||||||||||||||||
| 35 | 176 | ▶ | next unless $meta && $meta->can($meth); | ||||||||||||||||||||||||||
|
Branch: 1 branch
Condition66%2/3
$meta and $meta->can($meth)
MC/DC50%1/2
$meta and $meta->can($meth)
$meta
$meta->can($meth)
Truth table66%2/3
A and B
A= $metaB= $meta->can($meth)
| |||||||||||||||||||||||||||||
| 36 | |||||||||||||||||||||||||||||
| 37 | 61 | for my $item ( $meta->$meth() ) { | |||||||||||||||||||||||||||
| 38 | 81 | ▶ | next if $seen{ $item->name() }; | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 39 | |||||||||||||||||||||||||||||
| 40 | 80 | push @items, $item; | |||||||||||||||||||||||||||
| 41 | |||||||||||||||||||||||||||||
| 42 | 80 | $seen{ $item->name() } = 1; | |||||||||||||||||||||||||||
| 43 | } | ||||||||||||||||||||||||||||
| 44 | } | ||||||||||||||||||||||||||||
| 45 | |||||||||||||||||||||||||||||
| 46 | 57 | return @items; | |||||||||||||||||||||||||||
| 47 | } | ||||||||||||||||||||||||||||
| 48 | |||||||||||||||||||||||||||||
| 49 | 11 | 1; | |||||||||||||||||||||||||||