The yaml test shell
ysh [options]
This program is designed to let you play with the Perl \s-1YAML\s0 modules in an interactive way. When you to type in Perl, you get back \s-1YAML\s0. And vice versa.
By default, every line you type is a one line Perl program, the return value of which will be displayed as \s-1YAML\s0.
To enter multi-line Perl code start the first line with ';' and use as many lines as needed. Terminate with a line containing just ';'.
To enter \s-1YAML\s0 text, start with a valid \s-1YAML\s0 separator/header line which is typically '---'. Use '===' to indicate that there is no \s-1YAML\s0 header. Enter as many lines as needed. Terminate with a line containing just '...'.
To read in and process an external \s-1YAML\s0 file, enter '< filename'. The ysh will also work as a standalone filter. It will read anything on \s-1STDIN\s0 as a \s-1YAML\s0 stream and write the Perl output to \s-1STDOUT\s0. You can say (on most Unix systems):
cat yaml.file | ysh | less
Set the \s-1YAML\s0 implementation module you wish.
Keep a log of all ysh activity in './ysh.log'. If the log file already exists, new content will be concatenated to it.
Keep a log of all ysh activity in './ysh.log'. If the log file already exists, it will be deleted first.
Test roundtripping. Every piece of Perl code entered will be Dumped, Loaded, and Dumped again. If the two stores do not match, an error message will be reported.
Same as above, except that a confirmation message will be printed when the roundtrip succeeds.
Specify the number of characters to indent each level. This is the same as setting $YAML::Indent.
Shortcut for setting '$YAML::UseBlock = 1'. Force multiline scalars to use 'block' style.
Shortcut for setting '$YAML::UseFold = 1'. Force multiline scalars to use 'folded' style.
Shortcut for setting '$YAML::UseCode = 1'. Allows subroutine references to be processed.
Shortcut for setting '$YAML::UseHeader = 0'.
Shortcut for setting '$YAML::UseVersion = 0'.
Print the versions of ysh and the \s-1YAML\s0 implementation module in use.
In addition to the -v info, print the versions of \s-1YAML\s0 related modules.
Print a help message.
If you don't want to enter your favorite options every time you enter ysh, you can put the options into the \*(C`YSH_OPT\*(C' environment variable. Do something like this:
export YSH_OPT='-i3 -uc -L'
\s-1YAML\s0
Ingy do\*:t Net <[email protected]>
Copyright 2001-2014. Ingy do\*:t Net.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
See <http://www.perl.com/perl/misc/Artistic.html>