Help for this page

Select Code to Download


  1. 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");
        }
    
  2. 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???
    
  3. 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
    
  4. 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