1YSH(1) User Contributed Perl Documentation YSH(1)
2
3
4
6 ysh - The YAML Test Shell
7
9 ysh [options]
10
12 This program is designed to let you play with the YAML.pm module in an
13 interactive way. When you to type in Perl, you get back YAML. And vice
14 versa.
15
16 By default, every line you type is a one line Perl program, the return
17 value of which will be displayed as YAML.
18
19 To enter multi-line Perl code start the first line with ';' and use as
20 many lines as needed. Terminate with a line containing just ';'.
21
22 To enter YAML text, start with a valid YAML separator/header line which
23 is typically '---'. Use '===' to indicate that there is no YAML header.
24 Enter as many lines as needed. Terminate with a line containing just
25 '...'.
26
27 To read in and process an external YAML file, enter '< filename'. The
28 ysh will also work as a standalone filter. It will read anything on
29 STDIN as a YAML stream and write the Perl output to STDOUT. You can say
30 (on most Unix systems):
31
32 cat yaml.file ⎪ ysh ⎪ less
33
35 -MYAML::Module
36 Set the YAML implementation module you wish.
37
38 -l Keep a log of all ysh activity in './ysh.log'. If the log file
39 already exists, new content will be concatenated to it.
40
41 -L Keep a log of all ysh activity in './ysh.log'. If the log file
42 already exists, it will be deleted first.
43
44 -r Test roundtripping. Every piece of Perl code entered will be
45 Dumped, Loaded, and Dumped again. If the two stores do not match,
46 an error message will be reported.
47
48 -R Same as above, except that a confirmation message will be printed
49 when the roundtrip succeeds.
50
51 -i<number>
52 Specify the number of characters to indent each level. This is the
53 same as setting $YAML::Indent.
54
55 -ub Shortcut for setting '$YAML::UseBlock = 1'. Force multiline scalars
56 to use 'block' style.
57
58 -uf Shortcut for setting '$YAML::UseFold = 1'. Force multiline scalars
59 to use 'folded' style.
60
61 -uc Shortcut for setting '$YAML::UseCode = 1'. Allows subroutine refer‐
62 ences to be processed.
63
64 -nh Shortcut for setting '$YAML::UseHeader = 0'.
65
66 -nv Shortcut for setting '$YAML::UseVersion = 0'.
67
68 -v Print the versions of ysh and YAML.pm.
69
70 -V In addition to the -v info, print the versions of YAML related mod‐
71 ules.
72
73 -h Print a help message.
74
75 YSH_OPT
76
77 If you don't want to enter your favorite options every time you enter
78 ysh, you can put the options into the "YSH_OPT" environment variable.
79 Do something like this:
80
81 export YSH_OPT='-i3 -uc -L'
82
84 YAML
85
87 Ingy döt Net <ingy@cpan.org>
88
90 Copyright (c) 2006. Ingy döt Net. All rights reserved. Copyright (c)
91 2001, 2002. Brian Ingerson. All rights reserved.
92
93 This program is free software; you can redistribute it and/or modify it
94 under the same terms as Perl itself.
95
96 See <http://www.perl.com/perl/misc/Artistic.html>
97
98
99
100perl v5.8.8 2006-04-06 YSH(1)