| 1 | # NOTE: Derived from blib/lib/Inline.pm. |
| 2 | # Changes made here will be lost when autosplit is run again. |
| 3 | # See AutoSplit.pm. |
| 4 | package Inline; |
| 5 | |
| 6 | #line 1027 "blib/lib/Inline.pm (autosplit into blib/lib/auto/Inline/filter.al)" |
| 7 | #============================================================================== |
| 8 | # Apply a list of filters to the source code |
| 9 | #============================================================================== |
| 10 | sub filter { |
| 11 | my $o = shift; |
| 12 | my $new_code = $o->{API}{code}; |
| 13 | for (@_) { |
| 14 | croak M52_invalid_filter($_) unless ref; |
| 15 | if (ref eq 'CODE') { |
| 16 | $new_code = $_->($new_code); |
| 17 | } |
| 18 | else { |
| 19 | $new_code = $_->filter($o, $new_code); |
| 20 | } |
| 21 | } |
| 22 | return $new_code; |
| 23 | } |
| 24 | |
| 25 | # end of Inline::filter |
| 26 | 1; |