| 1 | 26 | ▶ | use strict; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 2 | 26 | ▶ | 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 | 26 | ▶ | 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 | sub parse { | ||||||||||
| 12 | 21 | ▶ | my $self = shift; | ||||||||
|
Subroutine
parse: called CC=1 SCAR=0.0
Pod
documented
| |||||||||||
| 13 | 21 | return $self->normalize_number($_[0]); | |||||||||
| 14 | } | ||||||||||
| 15 | |||||||||||
| 16 | sub valid_args { | ||||||||||
| 17 | 90 | ▶ | my $self = shift; | ||||||||
|
Subroutine
valid_args: called CC=3 SCAR=11.0
Pod
documented
| |||||||||||
| 18 | |||||||||||
| 19 | 90 | my $number = $self->normalize_number($_[0]); | |||||||||
| 20 | |||||||||||
| 21 | 90 | ▶ | return unless defined $number; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 22 | |||||||||||
| 23 | 74 | ▶ | return $number if @_ == 1; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 24 | |||||||||||
| 25 | 70 | return; | |||||||||
| 26 | } | ||||||||||
| 27 | |||||||||||
| 28 | 26 | 1; | |||||||||
| 29 | |||||||||||
| 30 | __END__ | ||||||||||