GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages


Manual Reference Pages  -  NUMBER::TOLERANT::TYPE (3)

.ds Aq ’

NAME

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

CONTENTS

VERSION

version 1.708

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.

    normalize_number



  my $number = $type_class->normalize_number($input);



This method will decide whether the given input is a valid number for use with Number::Tolerant and return it in a canonicalized form. Math::BigInt objects are returned intact. Strings holding numbers are also returned intact. Strings that appears to be fractions are converted to Math::BigRat objects.

Anything else is considered invalid, and the method will return false.

    variable_re



  my $variable_re = $type_class->variable_re;



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

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

AUTHOR

Ricardo Signes <rjbs@cpan.org>

COPYRIGHT AND LICENSE

This software is copyright (c) 2004 by Ricardo Signes.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.

Search for    or go to Top of page |  Section 3 |  Main Index


perl v5.20.3 NUMBER::TOLERANT::TYPE (3) 2015-11-01

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with manServer 1.07.