| 1 | package Perl6::Interpolators; | ||||||||||
| 2 | |||||||||||
| 3 | 1 | ▶ | use 5.6.0; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 4 | 1 | ▶ | use strict; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 5 | 1 | ▶ | use warnings; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 6 | |||||||||||
| 7 | 1 | our $VERSION = '0.03'; | |||||||||
| 8 | |||||||||||
| 9 | 1 | ▶ | use Text::Balanced qw(extract_codeblock); | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 10 | |||||||||||
| 11 | 1 | ▶ | use Filter::Simple sub { | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
Subroutine
__ANON__: called CC=3 SCAR=11.0
| |||||||||||
| 12 | 1 | my($inside_stuff, $t, $pos); | |||||||||
| 13 | |||||||||||
| 14 | 1 | ▶ | while(($pos=index($_, '$(')) != -1) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 15 | 4 | $t=substr($_, $pos); | |||||||||
| 16 | 4 | $inside_stuff=extract_codeblock($t, '()', qr/\$/); | |||||||||
| 17 | |||||||||||
| 18 | 4 | s<\$\Q$inside_stuff\E><\${\\scalar$inside_stuff}> | |||||||||
| 19 | } | ||||||||||
| 20 | |||||||||||
| 21 | 1 | ($inside_stuff, $t, $pos)=(undef, undef, undef); | |||||||||
| 22 | |||||||||||
| 23 | 1 | ▶ | while(($pos=index($_, '@(')) != -1) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 24 | 3 | $t=substr($_, $pos); | |||||||||
| 25 | 3 | $inside_stuff=extract_codeblock($t, '()', qr/\@/); | |||||||||
| 26 | |||||||||||
| 27 | 3 | s<\@\Q$inside_stuff\E><\@{[$inside_stuff]}> | |||||||||
| 28 | } | ||||||||||
| 29 | 1 | }; | |||||||||
| 30 | |||||||||||
| 31 | 1 | 1; | |||||||||
| 32 | |||||||||||
| 33 | __END__ | ||||||||||