File Coverage

blib/lib/FBP/ControlWithItems.pm
Criterion Covered Total %
statement 11 11 100.0
branch n/a
condition n/a
subroutine 3 3 100.0
pod 0 1 0.0
total 14 15 93.3


line stmt bran cond sub pod time code
1             package FBP::ControlWithItems;
2              
3 4     4   1907 use Mouse;
  4         8  
  4         24  
4              
5             our $VERSION = '0.41';
6              
7             extends 'FBP::Control';
8              
9             has choices => (
10             is => 'ro',
11             isa => 'Str',
12             required => 1,
13             );
14              
15             sub items {
16 2     2 0 5 my $self = shift;
17 2         37 my @choices = $self->choices =~ /" ( (?: \\. | . )+? ) "/xg;
18 2         8 foreach ( @choices ) {
19 8         30 s/\\(.)/$1/g;
20             }
21 2         15 return @choices;
22             }
23              
24 4     4   1771 no Mouse;
  4         8  
  4         17  
25             __PACKAGE__->meta->make_immutable;
26              
27             1;