- "dumper"
- scalar => list
Take a data structure (presumably from another filter like
eval) and use Data::Dumper to dump it in a canonical fashion.
- "escape"
- scalar => scalar
Unescape all backslash escaped chars.
- "eval"
- scalar => list
Run Perl's "eval" command
against the data and use the returned value as the data.
- "eval_all"
- scalar => list
Run Perl's "eval" command
against the data and return a list of 4 values:
1) The return value
2) The error in $@
3) Captured STDOUT
4) Captured STDERR
- "eval_stderr"
- scalar => scalar
Run Perl's "eval" command
against the data and return the captured STDERR.
- "eval_stdout"
- scalar => scalar
Run Perl's "eval" command
against the data and return the captured STDOUT.
- "exec_perl_stdout"
- list => scalar
Input Perl code is written to a temp file and run. STDOUT is
captured and returned.
- "flatten"
- scalar => list
Takes a hash or array ref and flattens it to a list.
- "get_url"
- scalar => scalar
The text is chomped and considered to be a url. Then
LWP::Simple::get is used to fetch the contents of the url.
- "hash"
- list => scalar
Turn a list of key/value pairs into an anonymous hash
reference.
- "head[=number]"
- list => list
Takes a list and returns a number of the elements from the
front of it. The default number is one.
- "join"
- list => scalar
Join a list of strings into a scalar.
- "Join"
- Join the list of strings inside a list of array refs and return the
strings in place of the array refs.
- "lines"
- scalar => list
Break the data into an anonymous array of lines. Each line
(except possibly the last one if the
"chomp" filter came first) will have a
newline at the end.
- "norm"
- scalar => scalar
Normalize the data. Change non-Unix line endings to Unix line
endings.
- "prepend=string"
- list => list
Prepend a string onto each of a list of strings.
- "read_file"
- scalar => scalar
Read the file named by the current content and return the
file's content.
- "regexp[=xism]"
- scalar => scalar
The "regexp" filter will
turn your data section into a regular expression object. You can pass in
extra flags after an equals sign.
If the text contains more than one line and no flags are
specified, then the 'xism' flags are assumed.
- "reverse"
- list => list
Reverse the elements of a list.
- "Reverse"
- list => list
Reverse the list of strings inside a list of array refs.
- "slice=x[,y]"
- list => list
Returns the element number x through element number y of a
list.
- "sort"
- list => list
Sorts the elements of a list in character sort order.
- "Sort"
- list => list
Sort the list of strings inside a list of array refs.
- "split[=string|pattern]"
- scalar => list
Split a string in into a list. Takes a optional string or
regexp as a parameter. Defaults to s+. Same as Perl
"split".
- "Split[=string|pattern]"
- list => list
Split each of a list of strings and turn them into array
refs.
- "strict"
- scalar => scalar
Prepend the string:
use strict;
use warnings;
to the block's text.
- "tail[=number]"
- list => list
Return a number of elements from the end of a list. The
default number is one.
- "trim"
- list => list
Remove extra blank lines from the beginning and end of the
data. This allows you to visually separate your test data with blank
lines.
- "unchomp"
- list => list
Add a newline to each string value in a list.
- "write_file[=filename]"
- scalar => scalar
Write the content of the section to the named file. Return the
filename.
- "yaml"
- scalar => list
Apply the YAML::Load function to the data block and use the
resultant structure. Requires YAML.pm.