/usr/lib/x86_64-linux-gnu/perl5/5.24/Scalar/Util/Numeric.pm is in libscalar-util-numeric-perl 0.40-1+b2.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 | package Scalar::Util::Numeric;
use 5.008000;
use strict;
use warnings;
use base qw(Exporter);
use XSLoader;
our $VERSION = '0.40';
our %EXPORT_TAGS = (
'all' => [ qw(isbig isfloat isinf isint isnan isneg isnum isuv) ],
);
our @EXPORT_OK = ( map { @$_ } values %EXPORT_TAGS );
XSLoader::load(__PACKAGE__, $VERSION);
1;
__END__
=head1 NAME
Scalar::Util::Numeric - numeric tests for perl scalars
=head1 SYNOPSIS
use Scalar::Util::Numeric qw(isnum isint isfloat);
foo($bar / 2) if (isnum $bar);
if (isint $baz) {
# ...
} elsif (isfloat $baz) {
# ...
}
=head1 DESCRIPTION
This module exports a number of wrappers around perl's builtin C<grok_number> function, which
returns the numeric type of its argument, or 0 if it isn't numeric.
=head1 TAGS
All of the functions exported by Scalar::Util::Numeric can be imported by using the C<:all> tag:
use Scalar::Util::Numeric qw(:all);
=head1 EXPORTS
=head2 isnum
isnum ($val)
Returns a nonzero value (indicating the numeric type) if $val is a number.
The numeric type is a conjunction of the following flags:
0x01 IS_NUMBER_IN_UV (number within UV range - not necessarily an integer)
0x02 IS_NUMBER_GREATER_THAN_UV_MAX (number is greater than UV_MAX)
0x04 IS_NUMBER_NOT_INT (saw . or E notation)
0x08 IS_NUMBER_NEG (leading minus sign)
0x10 IS_NUMBER_INFINITY (Infinity)
0x20 IS_NUMBER_NAN (NaN - not a number)
=head2 isint
=head2 isuv
=head2 isbig
=head2 isfloat
=head2 isneg
=head2 isinf
=head2 isnan
The following flavours of C<isnum> (corresponding to the flags above) are also available:
isint
isuv
isbig
isfloat
isneg
isinf
isnan
C<isint> returns -1 if its operand is a negative integer, 1 if
it's 0 or a positive integer, and 0 otherwise.
The others always return 1 or 0.
=head1 SEE ALSO
=over
=item * L<autobox/type>
=item * L<Data::Types>
=item * L<Params::Classify>
=item * L<Params::Util>
=item * L<Scalar::Util>
=item * L<String::Numeric>
=back
=head1 VERSION
0.40
=head1 AUTHORS
=over
=item * chocolateboy <chocolate@cpan.org>
=item * Michael G. Schwern <schwern@pobox.com>
=back
=head1 COPYRIGHT
Copyright (c) 2005-2014, chocolateboy.
This module is free software. It may be used, redistributed
and/or modified under the same terms as Perl itself.
=cut
|