printf("current: %d\n", PL_op->op_type); printf("next: %d\n", PL_op->op_next->op_type); if(GIMME_V) { printf("array context\n"); } else { printf("scalar context\n"); } #### perl -le 'use blib; use Alter qw(ego); $f = ego($a, { 1, 2 });' current: 166 # OP_METHOD next: 6 # OP_GVSV scalar context perl -le 'use blib; use Alter qw(ego); $f = {ego($a, { 1, 2 })}' current: 166 # OP_METHOD next: 144 # OP_ANONLIST huh? array context 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??? #### perl -le 'use blib; use Alter qw(ego); $f = {ego($a, { 1, 2 }),1}' current: 166 # OP_METHOD next: 5 # OP_CONST array context perl -le 'use blib; use Alter qw(ego); $f = 1,ego($a, { 1, 2 }),1' current: 166 # OP_METHOD next: 141 # OP_JOIN array context #### perl -le 'use blib; use Alter qw(ego); ego($a, { 1, 2 })->{"foo"} = "bar"' current: 166 # OP_METHOD next: 134 # OP_EXISTS scalar context Segmentation fault perl -le 'use blib; use Alter qw(ego); @{ ego( $a, { 1, 2 }) } = (1,2,3)' current: 166 # OP_METHOD next: 178 # OP_ENTER hmm? scalar context Segmentation fault perl -le 'use blib; use Alter qw(ego); ego( $a, { 1, 2 })->[0] = (1,2,3)' current: 166 # OP_METHOD next: 125 # OP_QUOTEMETA interesting... scalar context Segmentation fault