- or download this
printf("current: %d\n", PL_op->op_type);
printf("next: %d\n", PL_op->op_next->op_type);
...
} else {
printf("scalar context\n");
}
- or download this
perl -le 'use blib; use Alter qw(ego); $f = ego($a, { 1, 2 });'
current: 166 # OP_METHOD
...
next: 143 # OP_LSLICE huh?
array context
Assertion *strp failed: file "av.c", line 392 at -e line 1. wtf???
- or download this
perl -le 'use blib; use Alter qw(ego); $f = {ego($a, { 1, 2 }),1}'
current: 166 # OP_METHOD
...
current: 166 # OP_METHOD
next: 141 # OP_JOIN
array context
- or download this
perl -le 'use blib; use Alter qw(ego); ego($a, { 1, 2 })->{"foo"} = "b
+ar"'
current: 166 # OP_METHOD
...
scalar context
Segmentation fault