Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

ysh(1p) [debian man page]

YSH(1p) 						User Contributed Perl Documentation						   YSH(1p)

NAME
ysh - The YAML Test Shell SYNOPSIS
ysh [options] DESCRIPTION
This program is designed to let you play with the Perl YAML modules in an interactive way. When you to type in Perl, you get back YAML. And vice versa. By default, every line you type is a one line Perl program, the return value of which will be displayed as YAML. 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 YAML text, start with a valid YAML separator/header line which is typically '---'. Use '===' to indicate that there is no YAML header. Enter as many lines as needed. Terminate with a line containing just '...'. To read in and process an external YAML file, enter '< filename'. The ysh will also work as a standalone filter. It will read anything on STDIN as a YAML stream and write the Perl output to STDOUT. You can say (on most Unix systems): cat yaml.file | ysh | less COMMAND LINE OPTIONS
-MYAML::Module Set the YAML implementation module you wish. -l Keep a log of all ysh activity in './ysh.log'. If the log file already exists, new content will be concatenated to it. -L Keep a log of all ysh activity in './ysh.log'. If the log file already exists, it will be deleted first. -r 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. -R Same as above, except that a confirmation message will be printed when the roundtrip succeeds. -i<number> Specify the number of characters to indent each level. This is the same as setting $YAML::Indent. -ub Shortcut for setting '$YAML::UseBlock = 1'. Force multiline scalars to use 'block' style. -uf Shortcut for setting '$YAML::UseFold = 1'. Force multiline scalars to use 'folded' style. -uc Shortcut for setting '$YAML::UseCode = 1'. Allows subroutine references to be processed. -nh Shortcut for setting '$YAML::UseHeader = 0'. -nv Shortcut for setting '$YAML::UseVersion = 0'. -v Print the versions of ysh and the YAML implementation module in use. -V In addition to the -v info, print the versions of YAML related modules. -h Print a help message. YSH_OPT If you don't want to enter your favorite options every time you enter ysh, you can put the options into the "YSH_OPT" environment variable. Do something like this: export YSH_OPT='-i3 -uc -L' SEE ALSO
YAML AUTHOR
Ingy doet Net <ingy@cpan.org> COPYRIGHT
Copyright (c) 2006, 2008. Ingy doet Net. Copyright (c) 2001, 2002. Brian Ingerson. 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> perl v5.10.1 2008-12-01 YSH(1p)

Check Out this Related Man Page

Test::YAML::Valid(3pm)					User Contributed Perl Documentation				    Test::YAML::Valid(3pm)

NAME
Test::YAML::Valid - Test for valid YAML VERSION
Version 0.04 SYNOPSIS
This module lets you easily test the validity of YAML: use Test::More tests => 3; use Test::YAML::Valid; yaml_string_ok(YAML::Dump({foo => 'bar'}), 'YAML generates good YAML?'); yaml_string_ok('this is not YAML, is it?', 'This one will fail'); yaml_file_ok('/path/to/some/YAML', '/path/to/some/YAML is YAML'); yaml_files_ok('/path/to/YAML/files/*', 'all YAML files are valid'); You can also test with YAML::Syck instead of YAML by passing "-Syck" in the import list: use Test::YAML::Valid qw(-Syck); yaml_string_ok(...); # uses YAML::Syck::Load instead of YAML::Load It's up to you to make sure you have YAML::Syck if you specify the "-Syck" option, since it's an optional prerequisite to this module. If it's requested but not found, a warning will be issued and YAML will be used instead. As of version 0.04, you can use any module you want in the same way; "-Tiny" for YAML::Tiny and "-XS" for YAML::XS. EXPORT
o yaml_string_ok o yaml_file_ok o yaml_files_ok FUNCTIONS
yaml_string_ok($yaml, [$message]) Test will pass if $yaml contains valid YAML (according to YAML.pm) and fail otherwise. Returns the result of loading the YAML. yaml_file_ok($filename, [$message]) Test will pass if $filename is a valid YAML file (according to YAML.pm) and fail otherwise. Returns the result of loading the YAML. yaml_files_ok($file_glob_string, [$message]) Test will pass if all files matching the glob $file_glob_string contain valid YAML. If a file is not valid, the test will fail and no further files will be examined. Returns a list of all loaded YAML; AUTHOR
Jonathan Rockway, "<jrockway at cpan.org>" BUGS
Please report any bugs or feature requests to "bug-test-yaml-valid at rt.cpan.org", or through the web interface at <http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Test-YAML-Valid>. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes. SUPPORT
You can find documentation for this module with the perldoc command. perldoc Test::YAML::Valid You can also look for information at: o AnnoCPAN: Annotated CPAN documentation <http://annocpan.org/dist/Test-YAML-Valid> o CPAN Ratings <http://cpanratings.perl.org/d/Test-YAML-Valid> o RT: CPAN's request tracker <http://rt.cpan.org/NoAuth/Bugs.html?Dist=Test-YAML-Valid> o Search CPAN <http://search.cpan.org/dist/Test-YAML-Valid> ACKNOWLEDGEMENTS
Stevan Little "<stevan.little@iinteractive.com>" contributed "yaml_files_ok" and some more tests. COPYRIGHT &; LICENSE Copyright 2007 Jonathan Rockway, all rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. perl v5.10.1 2010-01-09 Test::YAML::Valid(3pm)
Man Page