| 1 | 1 | ▶ | use strict; use warnings; | ||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||
| 2 | package Lingy::Lang::Boolean; | ||||||||||||||||||||||
| 3 | |||||||||||||||||||||||
| 4 | 1 | ▶ | use Lingy::Common; | ||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||
| 5 | 1 | ▶ | use base SCALARTYPE; | ||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||
| 6 | |||||||||||||||||||||||
| 7 | { | ||||||||||||||||||||||
| 8 | package Lingy::Common; | ||||||||||||||||||||||
| 9 | 1 | my ($t, $f); | |||||||||||||||||||||
| 10 | 1 | ($t, $f) = (1, 0); | |||||||||||||||||||||
| 11 | 1 | my $true = bless \$t, BOOLEAN; | |||||||||||||||||||||
| 12 | 1 | my $false = bless \$f, BOOLEAN; | |||||||||||||||||||||
| 13 | 0 | ▶ | sub true { $true } | ||||||||||||||||||||
|
Subroutine
true: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||||||||||||||
| 14 | 0 | ▶ | sub false { $false } | ||||||||||||||||||||
|
Subroutine
false: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||||||||||||||
| 15 | } | ||||||||||||||||||||||
| 16 | |||||||||||||||||||||||
| 17 | 1 | sub new { | |||||||||||||||||||||
| 18 | 0 | ▶ | my ($class, $scalar) = @_; | ||||||||||||||||||||
|
Subroutine
new: not called CC=5 SCAR=34.0
Pod
undocumented
| |||||||||||||||||||||||
| 19 | 0 | my $type = ref($scalar); | |||||||||||||||||||||
| 20 | 0 | ▶ | (not $type) ? $scalar ? Lingy::Common::true() : Lingy::Common::false() : | ||||||||||||||||||||
|
Branch: 4 branches
| |||||||||||||||||||||||
| 21 | $type eq NIL ? Lingy::Common::false : | ||||||||||||||||||||||
| 22 | $type eq BOOLEAN ? $scalar : | ||||||||||||||||||||||
| 23 | Lingy::Common::true(); | ||||||||||||||||||||||
| 24 | } | ||||||||||||||||||||||
| 25 | |||||||||||||||||||||||
| 26 | 1 | 1; | |||||||||||||||||||||