This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Concise.pm: extract padname code and fixup split
authorDavid Mitchell <davem@iabyn.com>
Mon, 19 Sep 2016 15:42:45 +0000 (16:42 +0100)
committerDavid Mitchell <davem@iabyn.com>
Tue, 4 Oct 2016 10:18:40 +0000 (11:18 +0100)
commit4ad59fdb481181ca4ec84ec004a9b4a58ab357f6
tree61f44d95731456aa27f852bc5f818b089f956ba8
parent47a8f19b6f8f837245506422e5a4d36804e7b56a
Concise.pm: extract padname code and fixup split

The code that prints '$i:1,2'' in something like 'padsv[$i:1,2]':
extract it out into a separate function, then use it with  split
to display the array name rather than just a target number in:

    $ perl -MO=Concise -e'my @a = split()'
    ...
    split(/" "/ => @a:1,2)[t2] vK/LVINTRO,RTIME,ASSIGN,LEX,IMPLIM ->6
ext/B/B/Concise.pm