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
|
233731
|
|
|
|
|
|
char *pkg = NULL; |
15
|
233731
|
|
|
|
|
|
char *name = NULL; |
16
|
|
|
|
|
|
|
PPCODE: |
17
|
233731
|
100
|
|
|
|
|
SvGETMAGIC(coderef); |
|
|
50
|
|
|
|
|
|
18
|
233731
|
50
|
|
|
|
|
if (mop_get_code_info(coderef, &pkg, &name)) { |
19
|
233731
|
50
|
|
|
|
|
EXTEND(SP, 2); |
20
|
233731
|
|
|
|
|
|
mPUSHs(newSVpv(pkg, 0)); |
21
|
233731
|
|
|
|
|
|
mPUSHs(newSVpv(name, 0)); |
22
|
|
|
|
|
|
|
} |