X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=pod%2Fperlrun.pod;h=4f6294cc69b1c3bf4331cdba3add1c465b574c1c;hb=a2bdc9a53b6d7221bdf979c28003d54de36d16e5;hp=fe8a154c395f2a0e9217f9c341331c4b5f70bb44;hpb=a77489aad1511753fbfe951d1291deb8ecb1aa54;p=p5sagit%2Fp5-mst-13.2.git diff --git a/pod/perlrun.pod b/pod/perlrun.pod index fe8a154..4f6294c 100644 --- a/pod/perlrun.pod +++ b/pod/perlrun.pod @@ -4,10 +4,16 @@ perlrun - how to execute the Perl interpreter =head1 SYNOPSIS -B [B<-acdhnpPsSTuUvw>] [B<-0[octal>]] [B<-D[number/list]>] - [B<-F regexp>] [B<-i[extension>]] [B<-Idir>] - [B<-l[octal]>] [B<-x[dir]>] - [programfile | B<-e command>] [argument ...] +B S<[ B<-sTuU> ]> + S<[ B<-hv> ] [ B<-V>[:I] ]> + S<[ B<-cw> ] [ B<-d>[:I] ] [ B<-D>[I] ]> + S<[ B<-pna> ] [ B<-F>I ] [ B<-l>[I] ] [ B<-0>[I] ]> + S<[ B<-I>I ] [ B<-m>[B<->]I ] [ B<-M>[B<->]I<'module...'> ]> + S<[ B<-P> ]> + S<[ B<-S> ]> + S<[ B<-x>[I] ]> + S<[ B<-i>[I] ]> + S<[ B<-e> I<'command'> ] [ B<--> ] [ I ] [ I ]...> =head1 DESCRIPTION @@ -92,7 +98,7 @@ Switches include: =over 5 -=item B<-0>I +=item B<-0>[I] specifies the record separator (C<$/>) as an octal number. If there are no digits, the null character is the separator. Other switches may @@ -134,7 +140,7 @@ your program. runs the script under the Perl debugger. See L. -=item B<-d:foo> +=item B<-d:>I runs the script under the control of a debugging or tracing module installed as Devel::foo. E.g., B<-d:DProf> executes the script using the @@ -177,12 +183,17 @@ Multiple B<-e> commands may be given to build up a multi-line script. Make sure to use semicolons where you would in a normal program. -=item B<-F>I +=item B<-F>I -specifies a regular expression to split on if B<-a> is also in effect. -If regexp has C around it, the slashes will be ignored. +specifies the pattern to split on if B<-a> is also in effect. The +pattern may be surrounded by C, C<""> or C<''>, otherwise it will be +put in single quotes. -=item B<-i>I +=item B<-h> + +prints a summary of the options. + +=item B<-i>[I] specifies that files processed by the CE> construct are to be edited in-place. It does this by renaming the input file, opening the output @@ -226,11 +237,12 @@ example in L). =item B<-I>I -may be used in conjunction with B<-P> to tell the C preprocessor where -to look for include files. By default /usr/include and /usr/lib/perl -are searched. +Directories specified by B<-I> are prepended to the search path for +modules (@INC), and also tells the C preprocessor where to search for +include files. The C preprocessor is invoked with B<-P>; by default it +searches /usr/include and /usr/lib/perl. -=item B<-l>I +=item B<-l>[I] enables automatic line-ending processing. It has two effects: first, it automatically chomps the line terminator when used with B<-n> or @@ -249,9 +261,13 @@ separator if the B<-l> switch is followed by a B<-0> switch: This sets $\ to newline and then sets $/ to the null character. -=item B<-m>I +=item B<-m>[B<->]I + +=item B<-M>[B<->]I -=item B<-M>I +=item B<-M>[B<->]I<'module ...'> + +=item B<-[mM]>[B<->]I C<-m>I executes C I C<();> before executing your script. @@ -260,9 +276,14 @@ C<-M>I executes C I C<;> before executing your script. You can use quotes to add extra code after the module name, e.g., C<-M'module qw(foo bar)'>. +If the first character after the C<-M> or C<-m> is a dash (C<->) +then the 'use' is replaced with 'no'. + A little built-in syntactic sugar means you can also say -C<-mmodule=foo> or C<-Mmodule=foo> as a shortcut for -C<-M'module qw(foo)'>. Note that using the C<=> form +C<-mmodule=foo,bar> or C<-Mmodule=foo,bar> as a shortcut for +C<-M'module qw(foo bar)'>. This avoids the need to use quotes when +importing symbols. The actual code generated by C<-Mmodule=foo,bar> is +C. Note that the C<=> form removes the distinction between C<-m> and C<-M>. =item B<-n> @@ -388,7 +409,7 @@ prints the version and patchlevel of your Perl executable. prints summary of the major perl configuration values and the current value of @INC. -=item B<-V:name> +=item B<-V:>I Prints to STDOUT the value of the named configuration variable.