Commit | Line | Data |
---|---|---|
86530b38 AT |
1 | # NOTE: Derived from blib/lib/Inline/denter.pm. |
2 | # Changes made here will be lost when autosplit is run again. | |
3 | # See AutoSplit.pm. | |
4 | package Inline::denter; | |
5 | ||
6 | #line 240 "blib/lib/Inline/denter.pm (autosplit into blib/lib/auto/Inline/denter/indent_value.al)" | |
7 | sub indent_value { | |
8 | my ($o, $data) = @_; | |
9 | my $stream; | |
10 | if ($data =~ /\n/) { | |
11 | my $marker = 'EOV'; | |
12 | $marker++ while $data =~ /^$marker$/m; | |
13 | my $chomp = ($data =~ s/\n\Z//) ? '' : '-'; | |
14 | $stream = "<<$marker$chomp\n"; | |
15 | $stream .= $o->{key}, $o->{key} = '' if $o->{key}; | |
16 | $stream .= "$data\n$marker\n"; | |
17 | } | |
18 | elsif ($data =~ /^[\s\%\@\$\\?\"]|\s$/ or | |
19 | $data =~ /\Q$o->{comma}\E/ or | |
20 | $data =~ /[\x00-\x1f]/ or | |
21 | $data eq '') { | |
22 | $stream = qq{"$data"\n}; | |
23 | $stream .= $o->{key}, $o->{key} = '' if $o->{key}; | |
24 | } | |
25 | else { | |
26 | $stream = "$data\n"; | |
27 | $stream .= $o->{key}, $o->{key} = '' if $o->{key}; | |
28 | } | |
29 | return $stream; | |
30 | } | |
31 | ||
32 | # end of Inline::denter::indent_value | |
33 | 1; |