| 1 | package Games::Solitaire::Verify::Base; | ||
| 2 | 35 | $Games::Solitaire::Verify::Base::VERSION = '0.2601'; | |
| 3 | 35 | ▶ | use strict; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 4 | 35 | ▶ | use warnings; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 5 | |||
| 6 | |||
| 7 | 35 | ▶ | use Class::XSAccessor; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 8 | |||
| 9 | |||
| 10 | |||
| 11 | sub new | ||
| 12 | 18475 | ▶ | { |
|
Subroutine
new: called CC=1 SCAR=0.0
Pod
documented
| |||
| 13 | 18475 | my $class = shift; | |
| 14 | 18475 | my $self = {}; | |
| 15 | 18475 | bless $self, $class; | |
| 16 | |||
| 17 | # May throw an exception. | ||
| 18 | 18475 | $self->_init(@_); | |
| 19 | |||
| 20 | 18467 | return $self; | |
| 21 | } | ||
| 22 | |||
| 23 | |||
| 24 | sub mk_accessors | ||
| 25 | 1 | ▶ | { |
|
Subroutine
mk_accessors: called CC=1 SCAR=0.0
Pod
documented
| |||
| 26 | 1 | my $package = shift; | |
| 27 | 1 | return $package->mk_acc_ref( [@_] ); | |
| 28 | } | ||
| 29 | |||
| 30 | |||
| 31 | sub mk_acc_ref | ||
| 32 | 181 | ▶ | { |
|
Subroutine
mk_acc_ref: called CC=1 SCAR=0.0
Pod
documented
| |||
| 33 | 181 | my $package = shift; | |
| 34 | 181 | my $names = shift; | |
| 35 | |||
| 36 | 181 | my $mapping = +{ map { $_ => $_ } @$names }; | |
| 37 | |||
| 38 | 181 | eval <<"EOF"; | |
| 39 | package $package; | ||
| 40 | |||
| 41 | Class::XSAccessor->import( | ||
| 42 | accessors => \$mapping, | ||
| 43 | ); | ||
| 44 | EOF | ||
| 45 | |||
| 46 | } | ||
| 47 | |||
| 48 | 35 | 1; # End of Games::Solitaire::Verify::Base | |
| 49 | |||
| 50 | __END__ | ||