Name

numeric —

DESCRIPTION

EXAMPLES

No examples are available at this time. We do consider this a problem and will try to supply some.

NOTES

AVAILABILITY

numeric is available in Interchange versions:

5.8.0, 5.9.0 (git-head)

SOURCE

Interchange 5.9.0:

Source: code/OrderCheck/numeric.oc
Lines: 23


# Copyright 2010 Interchange Development Group and others
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version. See the LICENSE file for details.

CodeDef numeric OrderCheck
CodeDef numeric Description Numeric
CodeDef numeric Routine <<EOR

sub {
my ($ref, $name, $value, $msg) = @_;
use Scalar::Util qw/looks_like_number/;

if (looks_like_number($value)) {
    return (1, $name, '');
}
else {
    return (0, $name, defined($msg) ? $msg : 'not numeric');
}
}
EOR

AUTHORS

Interchange Development Group

SEE ALSO

DocBook! Interchange!