| 1 | package CljPerl::Var; | ||||||||||
| 2 | |||||||||||
| 3 | 2 | ▶ | use strict; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 4 | 2 | ▶ | use warnings; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 5 | |||||||||||
| 6 | 2 | our $VERSION = '0.10'; | |||||||||
| 7 | |||||||||||
| 8 | 314 | ▶ | sub new { | ||||||||
|
Subroutine
new: called CC=1 SCAR=0.0
Pod
undocumented
| |||||||||||
| 9 | 314 | my $class = shift; | |||||||||
| 10 | 314 | my $name = shift; | |||||||||
| 11 | 314 | my $value = shift; | |||||||||
| 12 | 314 | my $self = {class=>$class, | |||||||||
| 13 | name=>$name, | ||||||||||
| 14 | value=>$value}; | ||||||||||
| 15 | 314 | bless $self; | |||||||||
| 16 | 314 | return $self; | |||||||||
| 17 | } | ||||||||||
| 18 | |||||||||||
| 19 | 0 | ▶ | sub name { | ||||||||
|
Subroutine
name: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||
| 20 | 0 | my $self = shift; | |||||||||
| 21 | 0 | return $self->{name}; | |||||||||
| 22 | } | ||||||||||
| 23 | |||||||||||
| 24 | 560 | ▶ | sub value { | ||||||||
|
Subroutine
value: called CC=2 SCAR=6.9
Pod
undocumented
| |||||||||||
| 25 | 560 | my $self = shift; | |||||||||
| 26 | 560 | my $value = shift; | |||||||||
| 27 | 560 | ▶ | if(defined $value){ | ||||||||
|
Branch: 1 branch
| |||||||||||
| 28 | 93 | $self->{value} = $value; | |||||||||
| 29 | } else { | ||||||||||
| 30 | 467 | return $self->{value}; | |||||||||
| 31 | } | ||||||||||
| 32 | } | ||||||||||
| 33 | |||||||||||
| 34 | 2 | 1; | |||||||||