File Coverage

blib/lib/Scalar/Util/LooksLikeNumber.pm
Criterion Covered Total %
statement 3 3 100.0
branch n/a
condition n/a
subroutine 1 1 100.0
pod n/a
total 4 4 100.0


line stmt bran cond sub pod time code
1             package Scalar::Util::LooksLikeNumber;
2              
3 1     1   24134 use strict;
  1         2  
  1         135  
4              
5             our $VERSION = "1.39.1";
6              
7             require Exporter;
8             our @ISA = qw(Exporter);
9             our @EXPORT_OK = qw(looks_like_number);
10              
11             require XSLoader;
12             XSLoader::load('Scalar::Util::LooksLikeNumber', $VERSION);
13              
14             1;
15              
16             =head1 NAME
17              
18             Scalar::Util::LooksLikeNumber - Access to looks_like_number() perl API function
19              
20             =head1 SYNOPSIS
21              
22             use Scalar::Util::LooksLikeNumber;
23             print Scalar::Util::LooksLikeNumber::looks_like_number(1); # -> 4352
24              
25              
26             =head1 DESCRIPTION
27              
28             C contains looks_like_number() like
29             C's looks_like_number(), except it returns the raw value from the
30             C function. Scalar::Util used to do this also, but it returns a booleanized
31             value since 1.39.
32              
33              
34             =head1 FUNCTIONS
35              
36             =head2 $res = looks_like_number( $var )
37              
38             Returns a non-zero if perl thinks C<$var> is a number. See
39             L.
40              
41              
42             =head1 SEE ALSO
43              
44             L
45              
46              
47             =head1 COPYRIGHT
48              
49             Copyright (c) 2014 Steven Haryanto <stevenharyanto@gmail.com>. Code is
50             based on Scalar::Util.
51              
52             =cut