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