1Number::Tolerant::Type(U3s)er Contributed Perl DocumentatNiuomnber::Tolerant::Type(3)
2
3
4

NAME

6       Number::Tolerant::Type - a type of tolerance
7

VERSION

9       version 1.708
10

SYNOPSIS

METHODS

13   valid_args
14         my @args = $type_class->valid_args(@_);
15
16       If the arguments to "valid_args" are valid arguments for this type of
17       tolerance, this method returns their canonical form, suitable for
18       passing to "construct".  Otherwise this method returns false.
19
20   construct
21         my $object_guts = $type_class->construct(@args);
22
23       This method is passed the output of the "valid_args" method, and should
24       return a hashref that will become the guts of a new tolerance.
25
26   parse
27         my $tolerance = $type_class->parse($string);
28
29       This method returns a new, fully constructed tolerance from the given
30       string if the given string can be parsed into a tolerance of this type.
31
32   number_re
33         my $number_re = $type_class->number_re;
34
35       This method returns the regular expression (as a "qx" construct) used
36       to match number in parsed strings.
37
38   normalize_number
39         my $number = $type_class->normalize_number($input);
40
41       This method will decide whether the given input is a valid number for
42       use with Number::Tolerant and return it in a canonicalized form.
43       Math::BigInt objects are returned intact.  Strings holding numbers are
44       also returned intact.  Strings that appears to be fractions are
45       converted to Math::BigRat objects.
46
47       Anything else is considered invalid, and the method will return false.
48
49   variable_re
50         my $variable_re = $type_class->variable_re;
51
52       This method returns the regular expression (as a "qr" construct) used
53       to match the variable in parsed strings.
54
55       When parsing "4 <= x <= 10" this regular expression is used to match
56       the letter "x."
57

AUTHOR

59       Ricardo Signes <rjbs@cpan.org>
60
62       This software is copyright (c) 2004 by Ricardo Signes.
63
64       This is free software; you can redistribute it and/or modify it under
65       the same terms as the Perl 5 programming language system itself.
66
67
68
69perl v5.28.1                      2015-11-01         Number::Tolerant::Type(3)
Impressum