| 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 |
238188 |
| char *pkg = NULL; |
| 15 |
238188 |
| char *name = NULL; |
| 16 |
|
| PPCODE: |
| 17 |
238188 |
▶ | SvGETMAGIC(coderef); |
Branch: 2 branches
| Branch | True | False | Total |
| SvGETMAGIC(coderef); |
1 |
238187 |
238188 |
| SvGETMAGIC(coderef); |
0 |
1 |
1 |
|
| 18 |
238188 |
▶ | if (mop_get_code_info(coderef, &pkg, &name)) { |
Branch: 1 branch
| Branch | True | False | Total |
| if (mop_get_code_info(coderef, &pkg, &name)) { |
238188 |
0 |
238188 |
|
| 19 |
238188 |
▶ | EXTEND(SP, 2); |
Branch: 1 branch
| Branch | True | False | Total |
| EXTEND(SP, 2); |
0 |
238188 |
238188 |
|
| 20 |
238188 |
| mPUSHs(newSVpv(pkg, 0)); |
| 21 |
238188 |
| mPUSHs(newSVpv(name, 0)); |
| 22 |
|
| } |