| 1 |
|
| #define PERL_NO_GET_CONTEXT |
| 2 |
|
| |
| 3 |
|
| #include "EXTERN.h" |
| 4 |
|
| #include "perl.h" |
| 5 |
|
| #include "XSUB.h" |
| 6 |
|
| |
| 7 |
|
| #define NEED_sv_2pv_flags |
| 8 |
|
| #include "ppport.h" |
| 9 |
|
| |
| 10 |
|
| /* |
| 11 |
|
| * http://www.nntp.perl.org/group/perl.perl5.porters/2014/11/msg222354.html |
| 12 |
|
| * |
| 13 |
|
| * Maybe it just shows that the macro is poorly named. Or, rather, |
| 14 |
|
| * IN_PERL_COMPILETIME means that we are currently in the middle of parsing |
| 15 |
|
| * and building ops via toke.c/op.c. We switch to 'run time' for |
| 16 |
|
| * running any code, even BEGIN blocks. |
| 17 |
|
| */ |
| 18 |
|
| |
| 19 |
|
| MODULE = Devel::Pragma PACKAGE = Devel::Pragma |
| 20 |
|
| |
| 21 |
|
| SV * |
| 22 |
|
| ccstash() |
| 23 |
|
| PROTOTYPE: |
| 24 |
|
| CODE: |
| 25 |
5 |
▶ | if (PL_in_eval && EVAL_INREQUIRE) { /* being required: return the stash name */ |
Branch: 1 branch
| Branch | True | False | Total |
| if (PL_in_eval && EVAL_INREQUIRE) { /* being required: return the stash name */ |
4 |
1 |
5 |
|
| 26 |
4 |
▶ | RETVAL = newSVpv(HvNAME(PL_curstash), 0); |
Branch: 6 branches
| Branch | True | False | Total |
| RETVAL = newSVpv(HvNAME(PL_curstash), 0); |
4 |
0 |
4 |
| RETVAL = newSVpv(HvNAME(PL_curstash), 0); |
4 |
0 |
4 |
| RETVAL = newSVpv(HvNAME(PL_curstash), 0); |
0 |
4 |
4 |
| RETVAL = newSVpv(HvNAME(PL_curstash), 0); |
0 |
0 |
0 |
| RETVAL = newSVpv(HvNAME(PL_curstash), 0); |
4 |
0 |
4 |
| RETVAL = newSVpv(HvNAME(PL_curstash), 0); |
0 |
4 |
4 |
|
| 27 |
|
| } else { /* not being required: return undef */ |
| 28 |
1 |
| RETVAL = &PL_sv_undef; |
| 29 |
|
| } |
| 30 |
|
| OUTPUT: |
| 31 |
|
| RETVAL |
| 32 |
|
| |
| 33 |
|
| void |
| 34 |
|
| xs_scope() |
| 35 |
|
| PROTOTYPE: |
| 36 |
|
| CODE: |
| 37 |
29 |
| XSRETURN_UV(PTR2UV(GvHV(PL_hintgv))); |