| 1 | 1 | ▶ | use 5.006; use strict; use warnings; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
Subroutine
BEGIN: called CC=1 SCAR=0.0
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 2 | |||||||||||||||||||||||||||||
| 3 | package Object::Tiny::Lvalue; | ||||||||||||||||||||||||||||
| 4 | |||||||||||||||||||||||||||||
| 5 | 1 | our $VERSION = '1.084'; | |||||||||||||||||||||||||||
| 6 | |||||||||||||||||||||||||||||
| 7 | 3 | ▶ | sub import { | ||||||||||||||||||||||||||
|
Subroutine
import: called CC=5 SCAR=16.3
| |||||||||||||||||||||||||||||
| 8 | 3 | ▶ | return unless shift eq __PACKAGE__; | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 9 | 3 | my $pkg = caller; | |||||||||||||||||||||||||||
| 10 | eval join "\n", ( | ||||||||||||||||||||||||||||
| 11 | "package $pkg;", | ||||||||||||||||||||||||||||
| 12 | 'our @ISA = "Object::Tiny::Lvalue" unless @ISA;', | ||||||||||||||||||||||||||||
| 13 | map { | ||||||||||||||||||||||||||||
| 14 | 3 | ▶ | defined and /\A[^\W\d]\w*\z/ or die "Invalid accessor name '$_'"; | ||||||||||||||||||||||||||
|
Subroutine
bar: called CC=1 SCAR=0.0
Subroutine
bar: called CC=1 SCAR=0.0
Subroutine
foo: called CC=1 SCAR=0.0
Subroutine
foo: called CC=1 SCAR=0.0
Pod
undocumented
Pod
undocumented
Pod
undocumented
Pod
undocumented
Branch: 1 branch
Condition66%2/3
defined $_ and /\A[^\W\d]\w*\z/
MC/DC50%1/2
defined $_ and /\A[^\W\d]\w*\z/
defined $_
/\A[^\W\d]\w*\z/
Truth table66%2/3
A and B
A= defined $_B= /\A[^\W\d]\w*\z/
| |||||||||||||||||||||||||||||
| 15 | 4 | "sub $_ : lvalue { \$_[0]->{$_} }"; | |||||||||||||||||||||||||||
| 16 | } @_ | ||||||||||||||||||||||||||||
| 17 | ); | ||||||||||||||||||||||||||||
| 18 | 2 | ▶ | die "Failed to generate $pkg" if $@; | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 19 | 2 | return 1; | |||||||||||||||||||||||||||
| 20 | } | ||||||||||||||||||||||||||||
| 21 | |||||||||||||||||||||||||||||
| 22 | 2 | ▶ | sub new { | ||||||||||||||||||||||||||
|
Subroutine
new: called CC=1 SCAR=0.0
Pod
undocumented
| |||||||||||||||||||||||||||||
| 23 | 2 | my $class = shift; | |||||||||||||||||||||||||||
| 24 | 2 | bless { @_ }, $class; | |||||||||||||||||||||||||||
| 25 | } | ||||||||||||||||||||||||||||
| 26 | |||||||||||||||||||||||||||||
| 27 | 1 | 1; | |||||||||||||||||||||||||||
| 28 | |||||||||||||||||||||||||||||
| 29 | __END__ | ||||||||||||||||||||||||||||