line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
#include "EXTERN.h" |
2
|
|
|
|
|
|
|
#include "perl.h" |
3
|
|
|
|
|
|
|
#include "XSUB.h" |
4
|
|
|
|
|
|
|
|
5
|
114
|
|
|
|
|
|
int is_ok(SV * in) { |
6
|
|
|
|
|
|
|
|
7
|
114
|
100
|
|
|
|
|
if( sv_isobject(in) ) { |
8
|
9
|
50
|
|
|
|
|
const char* h = HvNAME( SvSTASH(SvRV(in)) ); |
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
9
|
9
|
100
|
|
|
|
|
if(strEQ(h, "Math::NumOnly")) return 1; |
10
|
|
|
|
|
|
|
} |
11
|
|
|
|
|
|
|
|
12
|
108
|
100
|
|
|
|
|
if( !(SvPOK(in)) && (SvIOK(in) || SvNOK(in)) ) return 2; |
|
|
100
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
13
|
|
|
|
|
|
|
|
14
|
12
|
|
|
|
|
|
return 0; |
15
|
|
|
|
|
|
|
} |
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
MODULE = Math::NumOnly PACKAGE = Math::NumOnly |
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
PROTOTYPES: DISABLE |
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
int |
23
|
|
|
|
|
|
|
is_ok (in) |
24
|
|
|
|
|
|
|
SV * in |
25
|
|
|
|
|
|
|
|