| 1 | package Zuzu::Value::Boolean; | ||||||||||
| 2 | |||||||||||
| 3 | 79 | ▶ | use utf8; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 4 | |||||||||||
| 5 | 79 | our $VERSION = '0.007002'; | |||||||||
| 6 | |||||||||||
| 7 | 79 | ▶ | use Moo; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 8 | |||||||||||
| 9 | use overload | ||||||||||
| 10 | 0 | ▶ | '0+' => sub { $_[0]->value ? 1 : 0 }, | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.2
Subroutine
__ANON__: not called CC=2 SCAR=17.9
Branch: 1 branch
| |||||||||||
| 11 | 110 | ▶ | '""' => sub { $_[0]->value ? '1' : '0' }, | ||||||||
|
Subroutine
__ANON__: called CC=2 SCAR=6.9
Branch: 1 branch
| |||||||||||
| 12 | 62917 | ▶ | 'bool' => sub { $_[0]->value ? 1 : 0 }, | ||||||||
|
Subroutine
__ANON__: called CC=2 SCAR=6.9
Branch: 1 branch
| |||||||||||
| 13 | 79 | fallback => 1; | |||||||||
| 14 | |||||||||||
| 15 | 0 | ▶ | has 'value' => ( is => 'rw', default => sub { 0 } ); | ||||||||
|
Subroutine
__ANON__: not called CC=1 SCAR=1.2
| |||||||||||
| 16 | |||||||||||
| 17 | 3 | ▶ | sub is_truthy { | ||||||||
|
Subroutine
is_truthy: called CC=2 SCAR=7.2
Pod
undocumented
| |||||||||||
| 18 | 3 | my ( $self ) = @_; | |||||||||
| 19 | |||||||||||
| 20 | 3 | ▶ | return $self->value ? 1 : 0; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 21 | } | ||||||||||
| 22 | |||||||||||
| 23 | 79 | 1; | |||||||||
| 24 | |||||||||||
| 25 | =pod | ||||||||||
| 26 | |||||||||||
| 27 | =head1 COPYRIGHT AND LICENCE | ||||||||||
| 28 | |||||||||||
| 29 | B<< Zuzu::Value::Boolean >> is copyright Toby Inkster. | ||||||||||
| 30 | |||||||||||
| 31 | It is free software; you may redistribute it and/or modify it under | ||||||||||
| 32 | the terms of either the Artistic License 1.0 or the GNU General Public | ||||||||||
| 33 | License version 2. | ||||||||||
| 34 | |||||||||||
| 35 | =cut | ||||||||||