Caller.xs

filter: Statementstmt 83.3% 10 / 12 Branchbran 50.0% 2 / 4 Conditioncond n/a MC/DCmcdc n/a Subroutinesub n/a Podpod n/a totaltotal 75.0% 12 / 16 CC 0 SCAR 0
CC
0
Cov
0%
CRAP 0
« blib/lib/Devel/Caller.pm ↑ Summary
1 /* -*- C -*- */
2 #include "EXTERN.h"
3 #include "perl.h"
4 #include "XSUB.h"
5  
6 MODULE = Devel::Caller PACKAGE = Devel::Caller
7  
8 SV*
9 _context_cv(context)
10 SV* context;
11 CODE:
12 8 PERL_CONTEXT *cx = INT2PTR(PERL_CONTEXT *, SvIV(context));
13 CV *cur_cv;
14  
15 8 ▶ if (CxTYPE(cx) != CXt_SUB)
Branch: 1 branch
BranchTrueFalseTotal
if (CxTYPE(cx) != CXt_SUB) 0 8 8
16 0 croak("cx_type is %d not CXt_SUB\n", CxTYPE(cx));
17  
18 8 cur_cv = cx->blk_sub.cv;
19 8 ▶ if (!cur_cv)
Branch: 1 branch
BranchTrueFalseTotal
if (!cur_cv) 0 8 8
20 0 croak("Context has no CV!\n");
21  
22 8 RETVAL = (SV*) newRV_inc( (SV*) cur_cv );
23 OUTPUT:
24 RETVAL
25  
26 SV*
27 _context_op(context)
28 SV* context;
29 CODE:
30 50 PERL_CONTEXT *cx = INT2PTR(PERL_CONTEXT*, SvIV(context));
31 50 OP *op = cx->blk_oldcop->op_next;
32 50 SV *rv = newSV(0);
33 50 sv_setref_iv(rv, "B::OP", PTR2IV(op));
34 50 RETVAL = rv;
35 OUTPUT:
36 RETVAL
37  
« blib/lib/Devel/Caller.pm ↑ Summary