line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Devel::Declare::Lexer::Token::String; |
2
|
|
|
|
|
|
|
|
3
|
10
|
|
|
10
|
|
54
|
use base qw/ Devel::Declare::Lexer::Token /; |
|
10
|
|
|
|
|
20
|
|
|
10
|
|
|
|
|
949
|
|
4
|
|
|
|
|
|
|
|
5
|
10
|
|
|
10
|
|
18790
|
use Devel::Declare::Lexer::Token::String::Interpolator; |
|
10
|
|
|
|
|
38
|
|
|
10
|
|
|
|
|
398
|
|
6
|
|
|
|
|
|
|
|
7
|
10
|
|
|
10
|
|
136
|
use v5; |
|
10
|
|
|
|
|
41
|
|
|
10
|
|
|
|
|
2988
|
|
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
sub new |
10
|
|
|
|
|
|
|
{ |
11
|
62
|
|
|
62
|
0
|
250
|
my ($caller, %arg) = @_; |
12
|
|
|
|
|
|
|
|
13
|
62
|
|
|
|
|
622
|
my $self = $caller->SUPER::new(%arg); |
14
|
|
|
|
|
|
|
|
15
|
62
|
|
|
|
|
279
|
return $self; |
16
|
|
|
|
|
|
|
} |
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
sub get |
19
|
|
|
|
|
|
|
{ |
20
|
59
|
|
|
59
|
0
|
262
|
my ($self) = @_; |
21
|
|
|
|
|
|
|
|
22
|
59
|
|
|
|
|
119
|
my $v = $self->{value}; |
23
|
59
|
|
|
|
|
113
|
$v =~ s/\n/\\n/g; |
24
|
|
|
|
|
|
|
|
25
|
59
|
|
|
|
|
285
|
return $self->{start} . $v . $self->{end}; |
26
|
|
|
|
|
|
|
} |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
sub deinterpolate |
29
|
|
|
|
|
|
|
{ |
30
|
25
|
|
|
25
|
0
|
853
|
my ($self) = @_; |
31
|
|
|
|
|
|
|
|
32
|
25
|
|
|
|
|
91
|
return Devel::Declare::Lexer::Token::String::Interpolator::deinterpolate($self->{value}); |
33
|
|
|
|
|
|
|
} |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
sub interpolate |
36
|
|
|
|
|
|
|
{ |
37
|
5
|
|
|
5
|
0
|
58
|
my ($self, @args) = @_; |
38
|
5
|
|
|
|
|
18
|
return Devel::Declare::Lexer::Token::String::Interpolator::interpolate($self->{value}, @args); |
39
|
|
|
|
|
|
|
} |
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
1; |