Psh/Strategy/Perl.pm untested

filter: Statementstmt 0.0% 0 / 12 Branchbran 0.0% 0 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 5 Podpod 0.0% 0 / 4 totaltotal 0.0% 0 / 23 CC 2 SCAR 12.0
CC
2
Cov
0%
applies
6.0
consumes
2.0
runs_before
2.0
CRAP 3.3
1 package Psh::Strategy::Perl;
2  
3 =item * C<perl>
4  
5 If the input line starts with p! all remaining input will be
6 sent unchanged to the perl interpreter
7  
8 =cut
9  
10  
11 require Psh::Strategy;
12  
13 @Psh::Strategy::Perl::ISA=('Psh::Strategy');
14  
15 sub consumes {
16 return Psh::Strategy::CONSUME_LINE;
17 }
18  
19 sub runs_before {
20 return qw(built_in brace);
21 }
22  
23 sub applies {
24 return 'perl evaluation' if substr(${$_[1]},0,2) eq 'p!';
25 }
26  
27 sub execute {
28 ${$_[1]}= substr(${$_[1]},2);
29 Psh::Strategy::Eval::execute(@_);
30 }
31  
32 1;