line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
#include "mop.h" |
2
|
|
|
|
|
|
|
#include "ppport.h" |
3
|
|
|
|
|
|
|
|
4
|
|
|
|
|
|
|
MODULE = Class::MOP PACKAGE = Class::MOP |
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
PROTOTYPES: DISABLE |
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
# use prototype here to be compatible with get_code_info from Sub::Identify |
9
|
|
|
|
|
|
|
void |
10
|
|
|
|
|
|
|
get_code_info(coderef) |
11
|
|
|
|
|
|
|
SV *coderef |
12
|
|
|
|
|
|
|
PROTOTYPE: $ |
13
|
|
|
|
|
|
|
PREINIT: |
14
|
239293
|
|
|
|
|
|
char *pkg = NULL; |
15
|
239293
|
|
|
|
|
|
char *name = NULL; |
16
|
|
|
|
|
|
|
PPCODE: |
17
|
239293
|
100
|
|
|
|
|
SvGETMAGIC(coderef); |
|
|
50
|
|
|
|
|
|
18
|
239293
|
50
|
|
|
|
|
if (mop_get_code_info(coderef, &pkg, &name)) { |
19
|
239293
|
50
|
|
|
|
|
EXTEND(SP, 2); |
20
|
239293
|
|
|
|
|
|
mPUSHs(newSVpv(pkg, 0)); |
21
|
239293
|
|
|
|
|
|
mPUSHs(newSVpv(name, 0)); |
22
|
|
|
|
|
|
|
} |