| 1 | package Seis::Object; | ||||||||||||||||||||
| 2 | 25 | ▶ | use strict; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 3 | 25 | ▶ | use warnings; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 4 | 25 | ▶ | use utf8; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 5 | 25 | ▶ | use 5.010_001; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 6 | |||||||||||||||||||||
| 7 | # TODO: make more perl6-ish. | ||||||||||||||||||||
| 8 | 0 | ▶ | sub new { | ||||||||||||||||||
|
Subroutine
new: not called CC=2 SCAR=17.9
Pod
undocumented
| |||||||||||||||||||||
| 9 | 0 | my $class = shift; | |||||||||||||||||||
| 10 | 0 | ▶ | my %args = @_==1 ? %{$_[0]} : @_; | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 11 | 0 | bless { %args }, $class; | |||||||||||||||||||
| 12 | } | ||||||||||||||||||||
| 13 | |||||||||||||||||||||
| 14 | 0 | ▶ | sub meta { | ||||||||||||||||||
|
Subroutine
meta: not called CC=2 SCAR=13.4
Pod
undocumented
| |||||||||||||||||||||
| 15 | 0 | my $self = shift; | |||||||||||||||||||
| 16 | 0 | ▶ | my $pkg = ref $self || $self; | ||||||||||||||||||
|
Condition0%0/3
ref $self || $self
MC/DC0%0/2
ref $self || $self
ref $self
$self
Truth table0%0/3
A || B
A= ref $selfB= $self
| |||||||||||||||||||||
| 17 | 25 | ▶ | no strict 'refs'; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 18 | 0 | my $meta = Seis::MetaClass->new(name => $pkg); | |||||||||||||||||||
| 19 | 0 | ▶ | *{"${pkg}::_meta"} = sub { $meta }; | ||||||||||||||||||
|
Subroutine
__ANON__: not called CC=1 SCAR=6.9
| |||||||||||||||||||||
| 20 | 0 | $meta; | |||||||||||||||||||
| 21 | } | ||||||||||||||||||||
| 22 | |||||||||||||||||||||
| 23 | 0 | ▶ | sub WHAT { | ||||||||||||||||||
|
Subroutine
WHAT: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||||||||||||
| 24 | 0 | my $self = shift; | |||||||||||||||||||
| 25 | 0 | Seis::Class->_new(name => Scalar::Util::blessed($self)); | |||||||||||||||||||
| 26 | } | ||||||||||||||||||||
| 27 | |||||||||||||||||||||
| 28 | 0 | ▶ | sub DESTROY { } | ||||||||||||||||||
|
Subroutine
DESTROY: not called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 29 | |||||||||||||||||||||
| 30 | 0 | ▶ | sub isa { | ||||||||||||||||||
|
Subroutine
isa: not called CC=2 SCAR=17.9
Pod
undocumented
| |||||||||||||||||||||
| 31 | 0 | my ($self, $stuff) = @_; | |||||||||||||||||||
| 32 | 0 | ▶ | if (UNIVERSAL::isa($stuff, 'Seis::Class')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 33 | 0 | UNIVERSAL::isa($self, $stuff->{name}); | |||||||||||||||||||
| 34 | } else { | ||||||||||||||||||||
| 35 | 0 | UNIVERSAL::isa($self, $stuff); | |||||||||||||||||||
| 36 | } | ||||||||||||||||||||
| 37 | } | ||||||||||||||||||||
| 38 | |||||||||||||||||||||
| 39 | 25 | 1; | |||||||||||||||||||
| 40 | |||||||||||||||||||||