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


NAME

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


VERSION

version 1.550

 $Id: /my/cs/projects/tolerant/trunk/lib/Number/Tolerant/Type.pm 22321 2006-05-19T02:29:23.338118Z rjbs  $


SYNOPSIS


METHODS

valid_args

  my @args = $type_class->valid_args(@_);

If the arguments to valid_args are valid arguments for this type of tolerance, this method returns their canonical form, suitable for passing to /construct. Otherwise this method returns false.

construct

  my $object_guts = $type_class->construct(@args);

This method is passed the output of the /valid_args method, and should return a hashref that will become the guts of a new tolerance.

parse

  my $tolerance = $type_class->parse($string);

This method returns a new, fully constructed tolerance from the given string if the given string can be parsed into a tolerance of this type.

number_re

  my $number_re = $type_class->number_re;

This method returns the regular expression (as a qx construct) used to match number in parsed strings.

variable_re

  my $variable_re = $type_class->variable_re;

This method returns the regular expression (as a qx construct) used to match the variable in parsed strings.

When parsing ``4 <= x <= 10'' this regular expression is used to match the letter ``x.''


SEE ALSO


AUTHOR

Ricardo SIGNES, <rjbs@cpan.org>


COPYRIGHT

(C) 2004-2006, Ricardo SIGNES. Number::Tolerant is available under the same terms as Perl itself.

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