| 1 | |||||||||||
| 2 | package PDF::Labels::base; | ||||||||||
| 3 | 1 | ▶ | use strict; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 4 | |||||||||||
| 5 | |||||||||||
| 6 | 0 | ▶ | sub new { | ||||||||
|
Subroutine
new: not called CC=5 SCAR=34.0
Pod
undocumented
| |||||||||||
| 7 | |||||||||||
| 8 | 0 | ▶ | my $class = ref($_[0]) ? ref(shift) : shift; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 9 | 0 | ▶ | my $opts = ref($_[0]) ? $_[0] : {@_}; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 10 | |||||||||||
| 11 | 0 | my $self = bless {}, $class; | |||||||||
| 12 | |||||||||||
| 13 | map { | ||||||||||
| 14 | 0 | UNIVERSAL::can( $self, $_ ) ? | |||||||||
| 15 | $self->$_( $opts->{$_} ) | ||||||||||
| 16 | 0 | ▶ | : $self->{$_}=$opts->{$_}; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 17 | } keys %$opts; | ||||||||||
| 18 | |||||||||||
| 19 | 0 | ▶ | $self->_new if UNIVERSAL::can($self, "_new"); | ||||||||
|
Branch: 1 branch
| |||||||||||
| 20 | |||||||||||
| 21 | 0 | return $self; | |||||||||
| 22 | |||||||||||
| 23 | } | ||||||||||
| 24 | |||||||||||
| 25 | |||||||||||
| 26 | 1 | 1; | |||||||||
| 27 | |||||||||||