File Coverage

blib/lib/Games/Solitaire/Verify/Base.pm
Criterion Covered Total %
statement 21 21 100.0
branch n/a
condition n/a
subroutine 6 6 100.0
pod 3 3 100.0
total 30 30 100.0


line stmt bran cond sub pod time code
1             package Games::Solitaire::Verify::Base;
2             $Games::Solitaire::Verify::Base::VERSION = '0.2601';
3 35     35   448144 use strict;
  35         84  
  35         2109  
4 35     35   188 use warnings;
  35         75  
  35         1753  
5              
6              
7 35     35   17407 use Class::XSAccessor;
  35         98174  
  35         229  
8              
9              
10              
11             sub new
12             {
13 18475     18475 1 4604415 my $class = shift;
14 18475         29246 my $self = {};
15 18475         32152 bless $self, $class;
16              
17             # May throw an exception.
18 18475         53956 $self->_init(@_);
19              
20 18467         66978 return $self;
21             }
22              
23              
24             sub mk_accessors
25             {
26 1     1 1 499629 my $package = shift;
27 1         10 return $package->mk_acc_ref( [@_] );
28             }
29              
30              
31             sub mk_acc_ref
32             {
33 181     181 1 517 my $package = shift;
34 181         431 my $names = shift;
35              
36 181         519 my $mapping = +{ map { $_ => $_ } @$names };
  926         2501  
37              
38 181         14893 eval <<"EOF";
39             package $package;
40              
41             Class::XSAccessor->import(
42             accessors => \$mapping,
43             );
44             EOF
45              
46             }
47              
48             1; # End of Games::Solitaire::Verify::Base
49              
50             __END__