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