| 1 | 25 | ▶ | use strict; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 2 | 25 | ▶ | use warnings; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 3 | # ABSTRACT: a tolerance "m == n" | ||||||||||
| 4 | |||||||||||
| 5 | package | ||||||||||
| 6 | Number::Tolerant::Type::constant; | ||||||||||
| 7 | 25 | ▶ | use parent qw(Number::Tolerant::Type); | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 8 | |||||||||||
| 9 | 4 | ▶ | sub construct { shift; $_[0] } | ||||||||
|
Subroutine
construct: called CC=1 SCAR=0.0
Pod
documented
| |||||||||||
| 10 | |||||||||||
| 11 | 18 | ▶ | sub parse { | ||||||||
|
Subroutine
parse: called CC=1 SCAR=0.0
Pod
documented
| |||||||||||
| 12 | 18 | my $self = shift; | |||||||||
| 13 | 18 | return $self->normalize_number($_[0]); | |||||||||
| 14 | } | ||||||||||
| 15 | |||||||||||
| 16 | 100 | ▶ | sub valid_args { | ||||||||
|
Subroutine
valid_args: called CC=3 SCAR=11.0
Pod
documented
| |||||||||||
| 17 | 100 | my $self = shift; | |||||||||
| 18 | |||||||||||
| 19 | 100 | my $number = $self->normalize_number($_[0]); | |||||||||
| 20 | |||||||||||
| 21 | 100 | ▶ | return unless defined $number; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 22 | |||||||||||
| 23 | 82 | ▶ | return $number if @_ == 1; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 24 | |||||||||||
| 25 | 78 | return; | |||||||||
| 26 | } | ||||||||||
| 27 | |||||||||||
| 28 | 25 | 1; | |||||||||
| 29 | |||||||||||
| 30 | __END__ | ||||||||||