blib/lib/CatalystX/ASP/Parser.pm | |||
---|---|---|---|
Criterion | Covered | Total | % |
branch | 40 | 54 | 74.0 |
line | true | false | branch |
---|---|---|---|
43 | 0 | 23 | $opts{'file'} ? : |
23 | 2 | unless $opts{'is_raw'} | |
65 | 23 | 2 | if ($parsed_scriptref) { } |
71 | 0 | 25 | if ($@) |
90 | 1 | 14 | if ($@) |
113 | 0 | 25 | unless $$scriptref |
119 | 1 | 1 | if ($3) |
125 | 0 | 2 | if ($head_data =~ s/.*\n\#line (\d+) [^\n]+\n(\%\>)?//s) |
127 | 0 | 0 | $2 ? : |
136 | 0 | 2 | unless $self->search_includes_dir($include) |
147 | 0 | 2 | unless $self->compile_include($c, $include) |
160 | 23 | 4 | if $self->XMLSubsMatch |
164 | 2 | 25 | unless $$scriptref =~ /\<\%.*?\%\>/s |
176 | 27 | 36 | if ($text) |
182 | 12 | 15 | if $last_perl_block |
187 | 63 | 0 | if ($perl) |
188 | 49 | 14 | if ($is_perl_block) { } |
194 | 19 | 30 | if (@out) |
208 | 43 | 6 | unless ($perl =~ /\n\s*$/so) |
209 | 0 | 43 | if ($perl =~ /\#[^\n]*$/so) |
215 | 24 | 25 | unless ($perl eq ';;;') |
244 | 3 | 0 | if ($args) |
253 | 23 | 4 | unless $script =~ s[ \<\s*($xml_subs_match)(\s+[^\>]*)?\>(?!.*?\<\s*\1[^\>]*\>)(.*?)\<\/\1\s*> ][{ my($func, $args, $text) = ($1, $2, $3); $args = $self->_code_tag_decode($args); $func =~ s/\:+/::/g; if ($args) { $args =~ s/(\s*)([^\s]+?)(\s*)\=(\s*[^\s]+)/,$1'$2'$3=>$4/gs; $args =~ s/^(\s*),/$1/s; }; $args ||= ''; $text = $self->_code_tag_decode($text); if ($text =~ /\<\%|\<($xml_subs_match)/) { my $sub_scriptref = $self->_parse_asp($c, \$text); $text = join(' ', '&{sub {', 'my $saved = $Response->Body;', '$Response->Clear;', 'local $Response->{out} = local $Response->{BinaryRef} = \\( $Response->{Body} );', 'local *CatalystX::ASP::Response::Flush = sub {};', $$sub_scriptref, ';', 'my $trapped = $Response->Body;', '$Response->Body( $saved );', '$trapped;', '} }'); } else { $text =~ s/\\/\\\\/sog; $text =~ s/\'/\\'/sog; $text = "'${text}'"; }; "<% $func({ $args }, $text); %>"; };]egsx |
260 | 4 | 0 | if ($args) |
267 | 2 | 2 | if ($text =~ /\<\%|\<($xml_subs_match)/) { } |
302 | 23 | 0 | if (defined $data) |
313 | 34 | 0 | if (defined $data) |