| 1 | package Psh::Strategy::Brace; | ||
| 2 | |||
| 3 | |||
| 4 | =item * C<bang> | ||
| 5 | |||
| 6 | Input within curly braces will be sent unchanged to the perl | ||
| 7 | interpreter. | ||
| 8 | |||
| 9 | =cut | ||
| 10 | |||
| 11 | |||
| 12 | require Psh::Strategy; | ||
| 13 | |||
| 14 | @Psh::Strategy::Brace::ISA=('Psh::Strategy'); | ||
| 15 | |||
| 16 | sub consumes { | ||
| 17 | return Psh::Strategy::CONSUME_TOKENS; | ||
| 18 | } | ||
| 19 | |||
| 20 | sub runs_before { | ||
| 21 | return qw(built_in); | ||
| 22 | } | ||
| 23 | |||
| 24 | sub applies { | ||
| 25 | return 'perl evaluation' if substr(${$_[1]},0,1) eq '{'; | ||
| 26 | } | ||
| 27 | |||
| 28 | sub execute { | ||
| 29 | Psh::Strategy::Eval::execute(@_); | ||
| 30 | } | ||
| 31 | |||
| 32 | 1; |