File Coverage

xs/MOP.xs
Criterion Covered Total %
statement 7 7 100.0
branch 5 8 62.5
condition n/a
subroutine n/a
pod n/a
total 12 15 80.0


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