From: Gurusamy Sarathy Date: Fri, 3 Mar 2000 18:58:45 +0000 (+0000) Subject: whitespace and readabiliti nits in the pods (from Michael G Schwern X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=c47ff5f1a1ef5d0daccf1724400a446cd8e93573;p=p5sagit%2Fp5-mst-13.2.git whitespace and readabiliti nits in the pods (from Michael G Schwern and Robin Barker) p4raw-id: //depot/perl@5493 --- diff --git a/Changes b/Changes index cabbab2..a84b435 100644 --- a/Changes +++ b/Changes @@ -55,7 +55,7 @@ current addresses (as of February 2000): Hugo van der Sanden Michael G Schwern Roderick Schertler - Kurt D. Starsinic + Kurt D. Starsinic Benjamin Stuhl Dan Sugalski Nathan Torkington @@ -95,6 +95,261 @@ Version v5.6.0 -------------- ____________________________________________________________________________ +[ 5492] By: gsar on 2000/03/03 17:48:31 + Log: support for list assignment to pseudohashes (from John Tobey + ) + Branch: perl + ! av.c dump.c embed.h embed.pl global.sym objXSUB.h op.c op.h + ! perlapi.c pp_hot.c proto.h t/op/avhv.t t/op/hashwarn.t +____________________________________________________________________________ +[ 5491] By: gsar on 2000/03/03 16:45:49 + Log: add MakeMaker caveat to INSTALL (from Andy Dougherty) + Branch: perl + ! INSTALL +____________________________________________________________________________ +[ 5490] By: gsar on 2000/03/03 16:44:42 + Log: perldelta tweaks + Branch: perl + ! pod/perldelta.pod +____________________________________________________________________________ +[ 5489] By: gsar on 2000/03/03 16:26:52 + Log: /dev/console may not be writable in Syslog.pm (from Ask Bjoern Hansen + ) + Branch: perl + ! ext/Sys/Syslog/Syslog.pm +____________________________________________________________________________ +[ 5488] By: gsar on 2000/03/03 16:21:34 + Log: OS/2 patches for dlclose() support (from Yitzchak Scott-Thoennes + ) + Branch: perl + ! makedef.pl os2/diff.configure os2/dl_os2.c os2/dlfcn.h + ! os2/os2.sym +____________________________________________________________________________ +[ 5487] By: gsar on 2000/03/03 16:16:34 + Log: skip test on AFS (from Hans Ranke ) + Branch: perl + ! t/lib/glob-basic.t +____________________________________________________________________________ +[ 5486] By: gsar on 2000/03/03 15:42:28 + Log: integrate cfgperl and vmsperl contents into mainline + Branch: perl + ! pod/perl.pod + !> (integrate 38 files) +____________________________________________________________________________ +[ 5485] By: jhi on 2000/03/03 15:21:40 + Log: pull the sparcv9 workshop libraries in front of loclibpth + Branch: cfgperl + ! hints/solaris_2.sh +____________________________________________________________________________ +[ 5484] By: jhi on 2000/03/03 15:09:03 + Log: Introduce i_ieefp because FreeBSD on ix86 needs that + for ftpsetmask(0); regen Configure. + Branch: cfgperl + ! Configure Porting/Glossary Porting/config.sh Porting/config_H + ! config_h.SH epoc/config.sh perl.h vms/subconfigure.com + ! vos/config.def vos/config.h vos/config_h.SH_orig + ! win32/config.bc win32/config.gc win32/config.vc + ! win32/config_H.bc win32/config_H.gc win32/config_H.vc +____________________________________________________________________________ +[ 5483] By: jhi on 2000/03/03 05:37:58 + Log: The _cflags must be left-aligned. + Branch: cfgperl + ! hints/irix_6.sh +____________________________________________________________________________ +[ 5482] By: bailey on 2000/03/03 04:42:45 + Log: Once more unto resync + Branch: vmsperl + !> (integrate 48 files) +____________________________________________________________________________ +[ 5481] By: bailey on 2000/03/03 04:36:46 + Log: VMS-specific perldelta update + Branch: vmsperl + ! pod/perldelta.pod +____________________________________________________________________________ +[ 5480] By: bailey on 2000/03/03 04:05:28 + Log: Set up Perl invocation method during configuration (Peter Prymmer) + Add missing bits to various utilities and install them (ditto) + Branch: vmsperl + ! configure.com pod/pod2usage.PL pod/podselect.PL + ! utils/dprofpp.PL vms/descrip_mms.template +____________________________________________________________________________ +[ 5479] By: bailey on 2000/03/03 04:01:48 + Log: Fix test to match new behavior of vmsify() (Craig Berry) + Branch: vmsperl + ! vms/ext/filespec.t +____________________________________________________________________________ +[ 5478] By: bailey on 2000/03/03 03:54:10 + Log: Try to intuit whether typeless file invoked in subprocess + is an executable image or DCL procedure. + Branch: vmsperl + ! vms/perlvms.pod vms/vms.c +____________________________________________________________________________ +[ 5477] By: bailey on 2000/03/03 03:37:18 + Log: Remove leftover bits of VAXC support (Dan Sugalski) + Branch: vmsperl + ! vms/gen_shrfls.pl +____________________________________________________________________________ +[ 5476] By: bailey on 2000/03/03 03:34:51 + Log: Add missing declaration (Dan Sugalski) + Branch: vmsperl + ! vms/vms.c +____________________________________________________________________________ +[ 5475] By: gsar on 2000/03/03 03:27:52 + Log: warn about /(?p{})/ (from Simon Cozens) + Branch: perl + ! regcomp.c toke.c +____________________________________________________________________________ +[ 5474] By: bailey on 2000/03/03 03:27:05 + Log: Ad hoc patch for duping stdout into stderr + Branch: vmsperl + ! vms/vms.c +____________________________________________________________________________ +[ 5473] By: bailey on 2000/03/03 03:23:29 + Log: Bypass PERL_INC_VERSION_LIST until we support in in Configure.Com + Branch: vmsperl + ! vms/subconfigure.com vms/vmsish.h +____________________________________________________________________________ +[ 5472] By: gsar on 2000/03/03 02:58:49 + Log: File::Spec bugs (spotted by Hack Kampbjorn ) + Branch: perl + ! lib/File/Spec/Mac.pm lib/File/Spec/Unix.pm + ! lib/File/Spec/VMS.pm lib/File/Spec/Win32.pm +____________________________________________________________________________ +[ 5471] By: jhi on 2000/03/03 02:38:23 + Log: more todo + Branch: cfgperl + ! Todo-5.6 +____________________________________________________________________________ +[ 5470] By: gsar on 2000/03/03 02:36:02 + Log: skip test if db doesn't have null key support + Branch: perl + ! t/lib/anydbm.t +____________________________________________________________________________ +[ 5469] By: jhi on 2000/03/03 02:26:53 + Log: Integrate with Sarathy. + Branch: cfgperl + !> INSTALL lib/AutoSplit.pm lib/ExtUtils/xsubpp lib/SelfLoader.pm + !> lib/Test/Harness.pm lib/constant.pm pod/perl.pod + !> pod/perldelta.pod pod/perlpod.pod pod/perlre.pod + !> pod/perltoc.pod regcomp.c t/op/misc.t t/op/pat.t toke.c + !> utils/h2xs.PL win32/Makefile win32/makefile.mk +____________________________________________________________________________ +[ 5468] By: jhi on 2000/03/03 02:24:05 + Log: irix hints tweak + Branch: cfgperl + ! hints/irix_6.sh +____________________________________________________________________________ +[ 5467] By: gsar on 2000/03/03 02:19:50 + Log: /(?p{})/ changed to /(??{})/, per Larry's suggestion (from + Simon Cozens ) + Branch: perl + ! lib/AutoSplit.pm lib/ExtUtils/xsubpp lib/SelfLoader.pm + ! pod/perlre.pod pod/perltoc.pod regcomp.c t/op/misc.t + ! t/op/pat.t toke.c +____________________________________________________________________________ +[ 5466] By: jhi on 2000/03/03 02:12:41 + Log: in words order bad + Branch: cfgperl + ! pod/perlre.pod +____________________________________________________________________________ +[ 5465] By: jhi on 2000/03/03 02:09:45 + Log: /[[:alpha]/ now dies on unmatched [] instead of + "an unknown character class" (spotted by Tom Christiansen) + Branch: cfgperl + ! regcomp.c t/pragma/warn/regcomp +____________________________________________________________________________ +[ 5464] By: gsar on 2000/03/03 02:04:48 + Log: perldelta notes about IO::Socket changes (from Graham Barr) + Branch: perl + ! pod/perldelta.pod +____________________________________________________________________________ +[ 5463] By: gsar on 2000/03/03 02:02:50 + Log: relax restrictions on constant names a bit (from M J T Guy) + Branch: perl + ! lib/constant.pm +____________________________________________________________________________ +[ 5462] By: gsar on 2000/03/03 01:59:49 + Log: support for generation of accessor functions (from Hugo van der + Sanden) + Branch: perl + ! utils/h2xs.PL +____________________________________________________________________________ +[ 5461] By: jhi on 2000/03/03 01:51:53 + Log: cosmetics + Branch: cfgperl + ! t/op/pack.t +____________________________________________________________________________ +[ 5460] By: jhi on 2000/03/03 01:50:07 + Log: detypo + Branch: cfgperl + ! t/op/pack.t +____________________________________________________________________________ +[ 5459] By: gsar on 2000/03/03 01:46:35 + Log: pod tweaks + Branch: perl + ! pod/perl.pod pod/perlpod.pod +____________________________________________________________________________ +[ 5458] By: jhi on 2000/03/03 01:25:21 + Log: solaris hints tweak + Branch: cfgperl + ! hints/solaris_2.sh +____________________________________________________________________________ +[ 5457] By: jhi on 2000/03/02 22:56:49 + Log: detypo + Branch: cfgperl + ! hints/solaris_2.sh +____________________________________________________________________________ +[ 5456] By: gsar on 2000/03/02 21:15:11 + Log: Test::Harness uses $ENV{HARNESS_PERL_SWITCHES} when running perl; + add test targets for -C switch on windows + Branch: perl + ! lib/Test/Harness.pm win32/Makefile win32/makefile.mk +____________________________________________________________________________ +[ 5455] By: gsar on 2000/03/02 21:06:49 + Log: add note about failed tests on memory starved systems (from + Andy Dougherty) + Branch: perl + ! INSTALL +____________________________________________________________________________ +[ 5454] By: jhi on 2000/03/02 21:03:35 + Log: Integrate with Sarathy. + Branch: cfgperl + !> Changes lib/Pod/Find.pm lib/Pod/Html.pm lib/Pod/Man.pm + !> lib/Term/Cap.pm lib/Test/Harness.pm lib/blib.pm + !> pod/perldata.pod pod/perldelta.pod pod/perlop.pod +____________________________________________________________________________ +[ 5453] By: jhi on 2000/03/02 20:58:43 + Log: Further long double patches from Spider Boardman. + Branch: cfgperl + ! t/comp/use.t t/lib/bigfltpm.t t/op/pack.t t/op/universal.t +____________________________________________________________________________ +[ 5452] By: gsar on 2000/03/02 20:52:08 + Log: move doc about v-strings from perlop to perldata (suggested by + David Dyck ) + Branch: perl + ! pod/perldata.pod pod/perldelta.pod pod/perlop.pod +____________________________________________________________________________ +[ 5451] By: gsar on 2000/03/02 20:30:29 + Log: integrate cfgperl changes into mainline + Branch: perl + !> Configure hints/irix_6.sh pp.c +____________________________________________________________________________ +[ 5450] By: gsar on 2000/03/02 20:08:10 + Log: still other multiline match cleanups (from Greg Bacon) + Branch: perl + ! Changes lib/Pod/Find.pm lib/Pod/Html.pm lib/Pod/Man.pm + ! lib/Term/Cap.pm lib/Test/Harness.pm lib/blib.pm +____________________________________________________________________________ +[ 5449] By: jhi on 2000/03/02 20:01:58 + Log: Integrate with Sarathy. + Branch: cfgperl + !> configure.com ext/File/Glob/Glob.pm ext/File/Glob/bsd_glob.c + !> lib/ExtUtils/MM_VMS.pm lib/Test/Harness.pm t/lib/glob-basic.t + !> t/pragma/warn/8signal t/pragma/warn/pp_ctl + !> vms/descrip_mms.template vms/gen_shrfls.pl + !> vms/subconfigure.com vms/vms.c win32/Makefile + !> win32/makefile.mk win32/perllib.c win32/win32.c win32/win32.h +____________________________________________________________________________ [ 5448] By: jhi on 2000/03/02 20:00:37 Log: workaround for Tru64 compiler bug (cleaner fix will have to wait until 5.6.1), from Spider Boardman diff --git a/pod/perl.pod b/pod/perl.pod index a66e2c8..7e940ad 100644 --- a/pod/perl.pod +++ b/pod/perl.pod @@ -246,12 +246,12 @@ http://www.perl.com/CPAN/src/index.html 2) formerly known as MVS 3) formerly known as Digital UNIX and before that DEC OSF/1 4) compilers: Borland, Cygwin, Mingw32 EGCS/GCC, VC++ - + The following platforms have been known to build Perl from source, but we haven't been able to verify their status for the current release, either because the hardware/software platforms are rare or because we don't have an active champion on these platforms--or both. - + 3b1 FPS Plan 9 AmigaOS GENIX PowerUX ConvexOS Greenhills RISC/os diff --git a/pod/perl5004delta.pod b/pod/perl5004delta.pod index 43bfb51..85a8f96 100644 --- a/pod/perl5004delta.pod +++ b/pod/perl5004delta.pod @@ -79,7 +79,7 @@ your scripts. Before Perl 5.004, C functions were looked up as methods (using the C<@ISA> hierarchy), even when the function to be autoloaded was called as a plain function (e.g. C), not a method -(e.g. Cbar()> or C<$obj-Ebar()>). +(e.g. C<< Foo->bar() >> or C<< $obj->bar() >>). Perl 5.005 will use method lookup only for methods' Cs. However, there is a significant base of existing code that may be using @@ -266,11 +266,11 @@ A subroutine reference may now be suffixed with an arrow and a (possibly empty) parameter list. This syntax denotes a call of the referenced subroutine, with the given parameters (if any). -This new syntax follows the pattern of S{FOO}>> and -S[$foo]>>: You may now write S> as -S($foo)>>. All these arrow terms may be chained; -thus, S{FOO}}($bar)>> may now be written -S{FOO}-E($bar)>>. +This new syntax follows the pattern of S{FOO} >>> and +S[$foo] >>>: You may now write S> as +S($foo) >>>. All these arrow terms may be chained; +thus, S{FOO}}($bar) >>> may now be written +S{FOO}->($bar) >>>. =back @@ -1290,7 +1290,7 @@ likely to eliminate these arbitrary limitations. (F) A carriage return character was found in the input. This is an error, and not a warning, because carriage return characters can break -multi-line strings, including here documents (e.g., CEEOF;>). +multi-line strings, including here documents (e.g., C). =item Illegal switch in PERL5OPT: %s @@ -1312,7 +1312,7 @@ architecture. On a 32-bit architecture the largest octal literal is =item internal error: glob failed (P) Something went wrong with the external program(s) used for C -and C*.cE>. This may mean that your csh (C shell) is +and C<< <*.c> >>. This may mean that your csh (C shell) is broken. If so, you should change all of the csh-related variables in config.sh: If you have tcsh, make the variables refer to it as if it were csh (e.g. C); otherwise, make them all diff --git a/pod/perl5005delta.pod b/pod/perl5005delta.pod index ca9f185..b133c0d 100644 --- a/pod/perl5005delta.pod +++ b/pod/perl5005delta.pod @@ -482,10 +482,10 @@ magic lvalue too. For instance, this code now acts differently: In previous versions, this would print "hello", but it now prints "g'bye". -=head2 EE now reads in records +=head2 <> now reads in records If C<$/> is a reference to an integer, or a scalar that holds an integer, -EE will read in records instead of lines. For more info, see +<> will read in records instead of lines. For more info, see L. =head1 Supported Platforms @@ -759,10 +759,10 @@ only with arrays that have a hash reference at index 0. =item Can't localize pseudo-hash element -(F) You said something like C{'key'}>, where $ar is +(F) You said something like C<< local $ar->{'key'} >>, where $ar is a reference to a pseudo-hash. That hasn't been implemented yet, but you can get a similar effect by localizing the corresponding array -element directly -- C[$ar-E[0]{'key'}]>. +element directly -- C<< local $ar->[$ar->[0]{'key'}] >>. =item Can't use %%! because Errno.pm is not available diff --git a/pod/perlboot.pod b/pod/perlboot.pod index dbf4fc9..bab3656 100644 --- a/pod/perlboot.pod +++ b/pod/perlboot.pod @@ -67,7 +67,7 @@ Or is it? =head2 Introducing the method invocation arrow -For now, let's say that Cmethod> invokes subroutine +For now, let's say that C<< Class->method >> invokes subroutine C in package C. (Here, "Class" is used in its "category" meaning, not its "scholastic" meaning.) That's not completely accurate, but we'll do this one step at a time. Now let's @@ -176,8 +176,8 @@ This method provides the constant text for the sound itself. } } -Now, when we call Cspeak>, we get a C<$class> of C in -C. This in turn selects the Csound> method, which +Now, when we call C<< Cow->speak >>, we get a C<$class> of C in +C. This in turn selects the C<< Cow->sound >> method, which returns C. But how different would this be for the C? { package Horse; @@ -214,7 +214,7 @@ with the animal-specific sound: Note the added C<@ISA> array. We'll get to that in a minute. -But what happens when we invoke Cspeak> now? +But what happens when we invoke C<< Cow->speak >> now? First, Perl constructs the argument list. In this case, it's just C. Then Perl looks for C. But that's not there, so @@ -227,7 +227,7 @@ with the already frozen argument list. Inside the C subroutine, C<$class> becomes C (the first argument). So when we get to the step of invoking -C<$class-Esound>, it'll be looking for Csound>, which +C<< $class->sound >>, it'll be looking for C<< Cow->sound >>, which gets it on the first try without looking at C<@ISA>. Success! =head2 A few notes about @ISA @@ -295,13 +295,13 @@ which results in: a Mouse goes squeak! [but you can barely hear it!] -Here, C has its own speaking routine, so Cspeak> -doesn't immediately invoke Cspeak>. This is known as +Here, C has its own speaking routine, so C<< Mouse->speak >> +doesn't immediately invoke C<< Animal->speak >>. This is known as "overriding". In fact, we didn't even need to say that a C was an C at all, since all of the methods needed for C are completely defined with C. -But we've now duplicated some of the code from Cspeak>, +But we've now duplicated some of the code from C<< Animal->speak >>, and this can once again be a maintenance headache. So, can we avoid that? Can we say somehow that a C does everything any other C does, but add in the extra comment? Sure! @@ -322,7 +322,7 @@ First, we can invoke the C method directly: Note that we have to include the C<$class> parameter (almost surely the value of C<"Mouse">) as the first parameter to C, since we've stopped using the method arrow. Why did we stop? Well, -if we invoke Cspeak> there, the first parameter to the +if we invoke C<< Animal->speak >> there, the first parameter to the method will be C<"Animal"> not C<"Mouse">, and when time comes for it to call for the C, it won't have the right class to come back to this package. @@ -429,7 +429,7 @@ and the C class: sub sound { "neigh" } } -This lets us invoke Cspeak> to ripple upward to +This lets us invoke C<< Horse->speak >> to ripple upward to C, calling back to C to get the specific sound, and the output of: @@ -506,7 +506,7 @@ the name: $$self; } } - + Now we call for the name: print $talking->name, " says ", $talking->sound, "\n"; @@ -695,8 +695,8 @@ Let's make a sheep that has a name and a color: my $bad = bless { Name => "Evil", Color => "black" }, Sheep; -so C<$bad-E{Name}> has C, and C<$bad-E{Color}> has -C. But we want to make C<$bad-Ename> access the name, and +so C<< $bad->{Name} >> has C, and C<< $bad->{Color} >> has +C. But we want to make C<< $bad->name >> access the name, and that's now messed up because it's expecting a scalar reference. Not to worry, because that's pretty easy to fix up: diff --git a/pod/perldata.pod b/pod/perldata.pod index 4dbc765..e3361e4 100644 --- a/pod/perldata.pod +++ b/pod/perldata.pod @@ -109,14 +109,14 @@ list context to each of its arguments. For example, if you say int( ) -the integer operation provides scalar context for the E +the integer operation provides scalar context for the <> operator, which responds by reading one line from STDIN and passing it back to the integer operation, which will then find the integer value of that line and return that. If, on the other hand, you say sort( ) -then the sort operation provides list context for E, which +then the sort operation provides list context for <>, which will proceed to read every line available up to the end of file, and pass that list of lines back to the sort routine, which will then sort those lines and return them as a list to whatever the context @@ -398,13 +398,13 @@ plain paranoid, you can force the correct interpretation with curly braces as above. A line-oriented form of quoting is based on the shell "here-document" -syntax. Following a CE> you specify a string to terminate +syntax. Following a C<< << >> you specify a string to terminate the quoted material, and all lines following the current line down to the terminating string are the value of the item. The terminating string may be either an identifier (a word), or some quoted text. If quoted, the type of quotes you use determines the treatment of the text, just as in regular quoting. An unquoted identifier works like -double quotes. There must be no space between the CE> and +double quotes. There must be no space between the C<< << >> and the identifier. (If you put a space it will be treated as a null identifier, which is valid, and matches the first empty line.) The terminating string must appear by itself (unquoted and with no @@ -576,8 +576,8 @@ hash. Likewise, hashes included as parts of other lists (including parameters lists and return lists from functions) always flatten out into key/value pairs. That's why it's good to use references sometimes. -It is often more readable to use the C<=E> operator between key/value -pairs. The C<=E> operator is mostly just a more visually distinctive +It is often more readable to use the C<< => >> operator between key/value +pairs. The C<< => >> operator is mostly just a more visually distinctive synonym for a comma, but it also arranges for its left-hand operand to be interpreted as a string--if it's a bareword that would be a legal identifier. This makes it nice for initializing hashes: diff --git a/pod/perldebug.pod b/pod/perldebug.pod index 841ad75..f89e67f 100644 --- a/pod/perldebug.pod +++ b/pod/perldebug.pod @@ -126,7 +126,7 @@ of the next statement. If an expression is supplied that includes function calls, those functions will be executed with stops before each statement. -=item ECRE +=item Repeat last C or C command. @@ -145,7 +145,7 @@ List C lines starting at C. =item l min-max -List lines C through C. C> is synonymous to C>. +List lines C through C. C is synonymous to C<->. =item l line @@ -506,25 +506,25 @@ corresponds to F, say, by issuing a command like See L<"Debugger Internals"> below for more details. -=item E [ command ] +=item < [ command ] Set an action (Perl command) to happen before every debugger prompt. A multi-line command may be entered by backslashing the newlines. If C is missing, resets the list of actions. -=item EE command +=item << command Add an action (Perl command) to happen before every debugger prompt. A multi-line command may be entered by backslashing the newlines. -=item E command +=item > command Set an action (Perl command) to happen after the prompt when you've just given a command to return to executing the script. A multi-line command may be entered by backslashing the newlines. If C is missing, resets the list of actions. -=item EE command +=item >> command Adds an action (Perl command) to happen after the prompt when you've just given a command to return to executing the script. A multi-line @@ -701,7 +701,7 @@ Listing given via different flavors of C command looks like this: Note that the breakable lines are marked with C<:>, lines with breakpoints are marked by C, with actions by C, and the -next executed line is marked by C<==E>. +next executed line is marked by C<< ==> >>. =item Frame listing @@ -979,14 +979,14 @@ application. =item * -The array C<@{"_E$filename"}> is the line-by-line contents of +The array C<@{"_<$filename"}> is the line-by-line contents of $filename for all the compiled files. Same for Ced strings which contain subroutines, or which are currently executed. The $filename for Ced strings looks like C<(eval 34)>. =item * -The hash C<%{"_E$filename"}> contains breakpoints and action (it is +The hash C<%{"_<$filename"}> contains breakpoints and action (it is keyed by line number), and individual entries are settable (as opposed to the whole hash). Only true/false is important to Perl, though the values used by F have the form @@ -999,7 +999,7 @@ C<(eval 34)>. =item * -The scalar C<${"_E$filename"}> contains C<"_E$filename">. Same for +The scalar C<${"_<$filename"}> contains C<"_<$filename">. Same for evaluated strings which contain subroutines, or which are currently executed. The $filename for Ced strings looks like C<(eval 34)>. @@ -1007,7 +1007,7 @@ executed. The $filename for Ced strings looks like C<(eval =item * After each Cd file is compiled, but before it is executed, -C$filename"})> is called (if subroutine +C is called (if subroutine C exists). Here the $filename is the expanded name of the Cd file (as found in values of %INC). @@ -1031,7 +1031,7 @@ a breakpoint, a call to C is performed if any one of variables $DB::trace, $DB::single, or $DB::signal is true. (Note that these variables are not Cizable.) This feature is disabled when the control is inside C or functions called from it (unless -C<$^D & (1EE30)>). +C<$^D & (1<<30)>). =item * @@ -1104,7 +1104,7 @@ C. The function C prints formatted info about caller frames. The last two functions may be -convenient as arguments to C>, CE> commands. +convenient as arguments to C<< < >>, C<< << >> commands. =head2 Other resources diff --git a/pod/perldelta.pod b/pod/perldelta.pod index 6f24ddb..2a29f8a 100644 --- a/pod/perldelta.pod +++ b/pod/perldelta.pod @@ -590,10 +590,10 @@ C: Perl now allows the arrow to be omitted in many constructs involving subroutine calls through references. For example, -C<$foo[10]-E('foo')> may now be written C<$foo[10]('foo')>. +C<< $foo[10]->('foo') >> may now be written C<$foo[10]('foo')>. This is rather similar to how the arrow may be omitted from -C<$foo[10]-E{'foo'}>. Note however, that the arrow is still -required for C('bar')>. +C<< $foo[10]->{'foo'} >>. Note however, that the arrow is still +required for C<< foo(10)->('bar') >>. =head2 exists() is supported on subroutine names @@ -627,7 +627,7 @@ The length argument of C has become optional. =head2 File and directory handles can be autovivified -Similar to how constructs such as C<$x-E[0]> autovivify a reference, +Similar to how constructs such as C<< $x->[0] >> autovivify a reference, handle constructors (open(), opendir(), pipe(), socketpair(), sysopen(), socket(), and accept()) now autovivify a file or directory handle if the handle passed to them is an uninitialized scalar variable. This @@ -943,7 +943,7 @@ See F and F. =head1 Significant bug fixes -=head2 EHANDLEE on empty files +=head2 on empty files With C<$/> set to C, "slurping" an empty file returns a string of zero length (instead of C, as it used to) the first time the @@ -1001,14 +1001,14 @@ handles I/O. =head2 Better diagnostics on meaningless filehandle operations -Constructs such as CFHE)> and CFHE)> +Constructs such as C<< open() >> and C<< close() >> are compile time errors. Attempting to read from filehandles that were opened only for writing will now produce warnings (just as writing to read-only filehandles does). =head2 Where possible, buffered data discarded from duped input filehandle -C&OLD")> now attempts to discard any data that +C<< open(NEW, "<&OLD") >> now attempts to discard any data that was previously read and buffered in C before duping the handle. On platforms where doing this is allowed, the next read operation on C will return the same data as the corresponding operation @@ -1017,9 +1017,9 @@ of the following disk block instead. =head2 eof() has the same old magic as <> -C would return true if no attempt to read from CE> had +C would return true if no attempt to read from C<< <> >> had yet been made. C has been changed to have a little magic of its -own, it now opens the CE> files. +own, it now opens the C<< <> >> files. =head2 system(), backticks and pipe open now reflect exec() failure @@ -1046,7 +1046,7 @@ array element in that slot. =head2 Pseudo-hashes work better Dereferencing some types of reference values in a pseudo-hash, -such as C<$ph-E{foo}[1]>, was accidentally disallowed. This has +such as C<< $ph->{foo}[1] >>, was accidentally disallowed. This has been corrected. When applied to a pseudo-hash element, exists() now reports whether @@ -1645,12 +1645,11 @@ messages. For example: See L for details. -A bug that prevented the non-option call-back EE from being +A bug that prevented the non-option call-back <> from being specified as the first argument has been fixed. -To specify the characters E and E as option starters, use -EE. Note, however, that changing option starters is strongly -deprecated. +To specify the characters < and > as option starters, use ><. Note, +however, that changing option starters is strongly deprecated. =item IO @@ -1685,7 +1684,7 @@ C removes all named entries. =item Math::BigInt -The bitwise operations CE>, CE>, C<&>, C<|>, +The bitwise operations C<<< << >>>, C<<< >> >>>, C<&>, C<|>, and C<~> are now supported on bigints. =item Math::Complex @@ -1733,7 +1732,7 @@ translators. L traverses directory structures and returns found pod files, along with their canonical names (like C). L contains B (useful for storing pod list information), B -(for parsing the contents of CE> sequences) and B +(for parsing the contents of CE> sequences) and B (for caching information about pod files, e.g. link nodes). =item Pod::Select, podselect @@ -2038,7 +2037,7 @@ could also result in this warning. See L. =item <> should be quotes -(F) You wrote CfileE> when you should have written +(F) You wrote C<< require >> when you should have written C. =item Attempt to join self @@ -2216,8 +2215,8 @@ See L. (W) You tried to read from a filehandle opened only for writing. If you intended it to be a read/write filehandle, you needed to open it with -"+E" or "+E" or "+EE" instead of with "E" or nothing. If -you intended only to read from the file, use "E". See +"+<" or "+>" or "+>>" instead of with "<" or nothing. If +you intended only to read from the file, use "<". See L. =item flock() on closed filehandle %s @@ -2455,8 +2454,8 @@ L) so that the environ array isn't the target of the change to =item Unknown open() mode '%s' (F) The second argument of 3-argument open() is not among the list -of valid modes: C>, C>, CE>, C<+E>, -C<+E>, C<+EE>, C<-|>, C<|E<45>>. +of valid modes: C<< < >>, C<< > >>, C<<< >> >>>, C<< +< >>, +C<< +> >>, C<<< +>> >>>, C<-|>, C<|->. =item Unknown process %x sent message to prime_env_iter: %s diff --git a/pod/perldiag.pod b/pod/perldiag.pod index f95c7d5..23c376b 100644 --- a/pod/perldiag.pod +++ b/pod/perldiag.pod @@ -298,7 +298,7 @@ the string being unpacked. See L. =item <> should be quotes -(F) You wrote CfileE> when you should have written +(F) You wrote C<< require >> when you should have written C. =item accept() on closed socket %s @@ -771,7 +771,7 @@ your sysadmin why he and/or she removed it. (F) This machine doesn't have either waitpid() or wait4(), so only waitpid() without flags is emulated. -=item Can't do {n,m} with n E m +=item Can't do {n,m} with n > m (F) Minima must be less than or equal to maxima. If you really want your regexp to match something 0 times, just put {0}. See L. @@ -897,10 +897,10 @@ package name. =item Can't localize pseudo-hash element -(F) You said something like C{'key'}>, where $ar is +(F) You said something like C<< local $ar->{'key'} >>, where $ar is a reference to a pseudo-hash. That hasn't been implemented yet, but you can get a similar effect by localizing the corresponding array -element directly -- C[$ar-E[0]{'key'}]>. +element directly -- C<< local $ar->[$ar->[0]{'key'}] >>. =item Can't locate auto/%s.al in @INC @@ -956,7 +956,7 @@ buffer. =item Can't open %s: %s -(S inplace) The implicit opening of a file through use of the CE> +(S inplace) The implicit opening of a file through use of the C<< <> >> filehandle, either implicitly under the C<-n> or C<-p> command-line switches, or explicitly, failed for the indicated reason. Usually this is because you don't have read permission for a file which you named @@ -966,24 +966,24 @@ on the command line. (W pipe) You tried to say C, which is not supported. You can try any of several modules in the Perl library to do this, such as -IPC::Open2. Alternately, direct the pipe's output to a file using "E", +IPC::Open2. Alternately, direct the pipe's output to a file using ">", and then read it in under a different file handle. =item Can't open error file %s as stderr (F) An error peculiar to VMS. Perl does its own command line redirection, and -couldn't open the file specified after '2E' or '2EE' on the +couldn't open the file specified after '2>' or '2>>' on the command line for writing. =item Can't open input file %s as stdin (F) An error peculiar to VMS. Perl does its own command line redirection, and -couldn't open the file specified after 'E' on the command line for reading. +couldn't open the file specified after '<' on the command line for reading. =item Can't open output file %s as stdout (F) An error peculiar to VMS. Perl does its own command line redirection, and -couldn't open the file specified after 'E' or 'EE' on the command +couldn't open the file specified after '>' or '>>' on the command line for writing. =item Can't open output pipe (name: %s) @@ -1090,7 +1090,7 @@ provide symbolic names for C<$!> errno values. =item Can't use "my %s" in sort comparison (F) The global variables $a and $b are reserved for sort comparisons. -You mentioned $a or $b in the same line as the E=E or cmp operator, +You mentioned $a or $b in the same line as the <=> or cmp operator, and the variable had earlier been declared as a lexical variable. Either qualify the sort variable with the package name, or rename the lexical variable. @@ -1208,7 +1208,7 @@ backslash: "\[=" and "=\]". not realizing that 777 will be interpreted as a decimal number, equivalent to 01411. Octal constants are introduced with a leading 0 in Perl, as in C. -=item Close on unopened file E%sE +=item Close on unopened file <%s> (W unopened) You tried to close a filehandle that was never opened. @@ -1304,7 +1304,7 @@ just use C for example. =item Delimiter for here document is too long -(F) In a here document construct like CEFOO>, the label +(F) In a here document construct like C<<, the label C is too long for Perl to handle. You have to be seriously twisted to write code that triggers this error. @@ -1480,16 +1480,16 @@ the FileHandle package. (W io) You tried to write on a read-only filehandle. If you intended it to be a read-write filehandle, you needed to open it with -"+E" or "+E" or "+EE" instead of with "E" or nothing. If -you intended only to write the file, use "E" or "EE". See +"+<" or "+>" or "+>>" instead of with "<" or nothing. If +you intended only to write the file, use ">" or ">>". See L. =item Filehandle %s opened only for output (W io) You tried to read from a filehandle opened only for writing. If you intended it to be a read/write filehandle, you needed to open it with -"+E" or "+E" or "+EE" instead of with "E" or nothing. If -you intended only to read from the file, use "E". See +"+<" or "+>" or "+>>" instead of with "<" or nothing. If +you intended only to read from the file, use "<". See L. =item Final $ should be \$ or $name @@ -1561,7 +1561,7 @@ C operator returned an invalid UIC. =item glob failed (%s) (W glob) Something went wrong with the external program(s) used for C -and C*.cE>. Usually, this means that you supplied a C +and C<< <*.c> >>. Usually, this means that you supplied a C pattern that caused the external program to fail and exit with a nonzero status. If the message indicates that the abnormal exit resulted in a coredump, this may also mean that your csh (C shell) is broken. If so, @@ -2003,28 +2003,28 @@ but for some reason the perl5db.pl file (or some facsimile thereof) didn't define a DB::sub routine to be called at the beginning of each ordinary subroutine call. -=item No error file after 2E or 2EE on command line +=item No error file after 2> or 2>> on command line (F) An error peculiar to VMS. Perl handles its own command line redirection, -and found a '2E' or a '2EE' on the command line, but can't find +and found a '2>' or a '2>>' on the command line, but can't find the name of the file to which to write data destined for stderr. -=item No input file after E on command line +=item No input file after < on command line (F) An error peculiar to VMS. Perl handles its own command line redirection, -and found a 'E' on the command line, but can't find the name of the file +and found a '<' on the command line, but can't find the name of the file from which to read data for stdin. -=item No output file after E on command line +=item No output file after > on command line (F) An error peculiar to VMS. Perl handles its own command line redirection, -and found a lone 'E' at the end of the command line, so it doesn't know +and found a lone '>' at the end of the command line, so it doesn't know where you wanted to redirect stdout. -=item No output file after E or EE on command line +=item No output file after > or >> on command line (F) An error peculiar to VMS. Perl handles its own command line redirection, -and found a 'E' or a 'EE' on the command line, but can't find the +and found a '>' or a '>>' on the command line, but can't find the name of the file to which to write data destined for stdout. =item No package name allowed for variable %s in "our" @@ -2766,7 +2766,7 @@ think so. =item seteuid() not implemented -(F) You tried to assign to C<$E>, and your operating system doesn't support +(F) You tried to assign to C<< $> >>, and your operating system doesn't support the seteuid() system call (or equivalent), or at least Configure didn't think so. @@ -2783,7 +2783,7 @@ think so. =item setruid() not implemented -(F) You tried to assign to C<$E>, and your operating system doesn't support +(F) You tried to assign to C<$<>, and your operating system doesn't support the setruid() system call (or equivalent), or at least Configure didn't think so. @@ -2813,7 +2813,7 @@ But before sort was a keyword, people sometimes used it as a filehandle. =item Sort subroutine didn't return a numeric value (F) A sort comparison routine must return a number. You probably blew -it by not using C=E> or C, or by not using them correctly. +it by not using C<< <=> >> or C, or by not using them correctly. See L. =item Sort subroutine didn't return single value @@ -2827,7 +2827,7 @@ or less than one element. See L. more times than there are characters of input, which is what happened.) See L. -=item Stat on unopened file E%sE +=item Stat on unopened file <%s> (W unopened) You tried to use the stat() function (or an equivalent file test) on a filehandle that was either never opened or has since been closed. @@ -2949,7 +2949,7 @@ nested for Perl to reach. Perl is doing you a favor by refusing. (W unopened) You tried to use the tell() function on a filehandle that was either never opened or has since been closed. -=item Test on unopened file E%sE +=item Test on unopened file <%s> (W unopened) You tried to invoke a file test operator on a filehandle that isn't open. Check your logic. See also L. @@ -3156,8 +3156,8 @@ representative, who probably put it there in the first place. =item Unknown open() mode '%s' (F) The second argument of 3-argument open() is not among the list -of valid modes: C>, C>, CE>, C<+E>, -C<+E>, C<+EE>, C<-|>, C<|E<45>>. +of valid modes: C<< < >>, C<< > >>, C<<< >> >>>, C<< +< >>, +C<< +> >>, C<<< +>> >>>, C<-|>, C<|->. =item Unknown process %x sent message to prime_env_iter: %s @@ -3241,7 +3241,7 @@ At least, Configure doesn't think so. (F) Your machine doesn't support the Berkeley socket mechanism, or at least that's what Configure thought. -=item Unterminated EE operator +=item Unterminated <> operator (F) The lexer saw a left angle bracket in a place where it was expecting a term, so it's looking for the corresponding right angle bracket, and not @@ -3279,7 +3279,7 @@ action-at-a-distance effects of C<$*>. (F) You attempted to use a feature of printf that is accessible from only C. This usually means there's a better way to do it in Perl. -=item Use of bare EE to mean EE"" is deprecated +=item Use of bare << to mean <<"" is deprecated (D deprecated) You are now encouraged to use the explicitly quoted form if you wish to use an empty line as the terminator of the here-document. @@ -3292,10 +3292,10 @@ a split() explicitly to an array (or list). =item Use of inherited AUTOLOAD for non-method %s() is deprecated -(D deprecated) As an (ahem) accidental feature, C subroutines are looked -up as methods (using the C<@ISA> hierarchy) even when the subroutines to -be autoloaded were called as plain functions (e.g. C), not -as methods (e.g. Cbar()> or C<$obj-Ebar()>). +(D deprecated) As an (ahem) accidental feature, C subroutines are +looked up as methods (using the C<@ISA> hierarchy) even when the subroutines +to be autoloaded were called as plain functions (e.g. C), +not as methods (e.g. C<< Foo->bar() >> or C<< $obj->bar() >>). This bug will be rectified in Perl 5.005, which will use method lookup only for methods' Cs. However, there is a significant base @@ -3559,13 +3559,13 @@ substitution, but stylistically it's better to use the variable form because other Perl programmers will expect it, and it works better if there are more than 9 backreferences. -=item '|' and 'E' may not both be specified on command line +=item '|' and '<' may not both be specified on command line (F) An error peculiar to VMS. Perl does its own command line redirection, and found that STDIN was a pipe, and that you also tried to redirect STDIN using -'E'. Only one STDIN stream to a customer, please. +'<'. Only one STDIN stream to a customer, please. -=item '|' and 'E' may not both be specified on command line +=item '|' and '>' may not both be specified on command line (F) An error peculiar to VMS. Perl does its own command line redirection, and thinks you tried to redirect stdout both to a file and into a pipe to another diff --git a/pod/perlembed.pod b/pod/perlembed.pod index b46c463..c4df676 100644 --- a/pod/perlembed.pod +++ b/pod/perlembed.pod @@ -280,32 +280,32 @@ the first, a C from the second, and a C from the third. #include #include - + static PerlInterpreter *my_perl; - + main (int argc, char **argv, char **env) { STRLEN n_a; char *embedding[] = { "", "-e", "0" }; - + my_perl = perl_alloc(); perl_construct( my_perl ); - + perl_parse(my_perl, NULL, 3, embedding, NULL); perl_run(my_perl); - + /** Treat $a as an integer **/ eval_pv("$a = 3; $a **= 2", TRUE); printf("a = %d\n", SvIV(get_sv("a", FALSE))); - + /** Treat $a as a float **/ eval_pv("$a = 3.14; $a **= 2", TRUE); printf("a = %f\n", SvNV(get_sv("a", FALSE))); - + /** Treat $a as a string **/ eval_pv("$a = 'rekcaH lreP rehtonA tsuJ'; $a = reverse($a);", TRUE); printf("a = %s\n", SvPV(get_sv("a", FALSE), n_a)); - + perl_destruct(my_perl); perl_free(my_perl); } @@ -364,7 +364,7 @@ been wrapped here): #include #include - + /** my_eval_sv(code, error_check) ** kinda like eval_sv(), ** but we pop the return value off the stack @@ -374,41 +374,41 @@ been wrapped here): dSP; SV* retval; STRLEN n_a; - + PUSHMARK(SP); eval_sv(sv, G_SCALAR); - + SPAGAIN; retval = POPs; PUTBACK; - + if (croak_on_error && SvTRUE(ERRSV)) croak(SvPVx(ERRSV, n_a)); - + return retval; } - + /** match(string, pattern) ** ** Used for matches in a scalar context. ** ** Returns 1 if the match was successful; 0 otherwise. **/ - + I32 match(SV *string, char *pattern) { SV *command = NEWSV(1099, 0), *retval; STRLEN n_a; - + sv_setpvf(command, "my $string = '%s'; $string =~ %s", SvPV(string,n_a), pattern); - + retval = my_eval_sv(command, TRUE); SvREFCNT_dec(command); - + return SvIV(retval); } - + /** substitute(string, pattern) ** ** Used for =~ operations that modify their left-hand side (s/// and tr///) @@ -416,22 +416,22 @@ been wrapped here): ** Returns the number of successful matches, and ** modifies the input string if there were any. **/ - + I32 substitute(SV **string, char *pattern) { SV *command = NEWSV(1099, 0), *retval; STRLEN n_a; - + sv_setpvf(command, "$string = '%s'; ($string =~ %s)", SvPV(*string,n_a), pattern); - + retval = my_eval_sv(command, TRUE); SvREFCNT_dec(command); - + *string = get_sv("string", FALSE); return SvIV(retval); } - + /** matches(string, pattern, matches) ** ** Used for matches in an array context. @@ -439,25 +439,25 @@ been wrapped here): ** Returns the number of matches, ** and fills in **matches with the matching substrings **/ - + I32 matches(SV *string, char *pattern, AV **match_list) { SV *command = NEWSV(1099, 0); I32 num_matches; STRLEN n_a; - + sv_setpvf(command, "my $string = '%s'; @array = ($string =~ %s)", SvPV(string,n_a), pattern); - + my_eval_sv(command, TRUE); SvREFCNT_dec(command); - + *match_list = get_av("array", FALSE); num_matches = av_len(*match_list) + 1; /** assume $[ is 0 **/ - + return num_matches; } - + main (int argc, char **argv, char **env) { PerlInterpreter *my_perl = perl_alloc(); @@ -466,30 +466,30 @@ been wrapped here): I32 num_matches, i; SV *text = NEWSV(1099,0); STRLEN n_a; - + perl_construct(my_perl); perl_parse(my_perl, NULL, 3, embedding, NULL); - + sv_setpv(text, "When he is at a convenience store and the bill comes to some amount like 76 cents, Maynard is aware that there is something he *should* do, something that will enable him to get back a quarter, but he has no idea *what*. He fumbles through his red squeezey changepurse and gives the boy three extra pennies with his dollar, hoping that he might luck into the correct amount. The boy gives him back two of his own pennies and then the big shiny quarter that is his prize. -RICHH"); - + if (match(text, "m/quarter/")) /** Does text contain 'quarter'? **/ printf("match: Text contains the word 'quarter'.\n\n"); else printf("match: Text doesn't contain the word 'quarter'.\n\n"); - + if (match(text, "m/eighth/")) /** Does text contain 'eighth'? **/ printf("match: Text contains the word 'eighth'.\n\n"); else printf("match: Text doesn't contain the word 'eighth'.\n\n"); - + /** Match all occurrences of /wi../ **/ num_matches = matches(text, "m/(wi..)/g", &match_list); printf("matches: m/(wi..)/g found %d matches...\n", num_matches); - + for (i = 0; i < num_matches; i++) printf("match: %s\n", SvPV(*av_fetch(match_list, i, FALSE),n_a)); printf("\n"); - + /** Remove all vowels from text **/ num_matches = substitute(&text, "s/[aeiou]//gi"); if (num_matches) { @@ -497,12 +497,12 @@ been wrapped here): num_matches); printf("Now text is: %s\n\n", SvPV(text,n_a)); } - + /** Attempt a substitution **/ if (!substitute(&text, "s/Perl/C/")) { printf("substitute: s/Perl/C...No substitution made.\n\n"); } - + SvREFCNT_dec(text); PL_perl_destruct_level = 1; perl_destruct(my_perl); diff --git a/pod/perlfaq.pod b/pod/perlfaq.pod index 0d5dae8..fa6943f 100644 --- a/pod/perlfaq.pod +++ b/pod/perlfaq.pod @@ -250,7 +250,7 @@ miscellaneous data issues. =item * What's wrong with always quoting "$vars"? -=item * Why don't my EEHERE documents work? +=item * Why don't my <*E? +=item * Why do I sometimes get an "Argument list too long" when I use <*>? =item * Is there a leak/bug in glob()? -=item * How can I open a file with a leading "E" or trailing blanks? +=item * How can I open a file with a leading ">" or trailing blanks? =item * How can I reliably rename a file? @@ -508,7 +508,7 @@ other sections. =item * What's the difference between deep and shallow binding? -=item * Why doesn't "my($foo) = EFILEE;" work right? +=item * Why doesn't "my($foo) = ;" work right? =item * How do I redefine a builtin function, operator, or method? diff --git a/pod/perlfaq2.pod b/pod/perlfaq2.pod index 4530f40..d6870b7 100644 --- a/pod/perlfaq2.pod +++ b/pod/perlfaq2.pod @@ -262,7 +262,7 @@ a star may be ordered from O'Reilly. by Ellen Siever, Stephan Spainhour, and Nathan Patwardhan =item Tutorials - + *Learning Perl [2nd edition] by Randal L. Schwartz and Tom Christiansen with foreword by Larry Wall diff --git a/pod/perlfaq4.pod b/pod/perlfaq4.pod index 7a34271..ad48245 100644 --- a/pod/perlfaq4.pod +++ b/pod/perlfaq4.pod @@ -465,7 +465,7 @@ really does work: # $_ contains the string to parse # BEGIN and END are the opening and closing markers for the # nested text. - + @( = ('(',''); @) = (')',''); ($re=$_)=~s/((BEGIN)|(END)|.)/$)[!$3]\Q$1\E$([!$2]/gs; @@ -821,7 +821,7 @@ Stringification also destroys arrays. print "@lines"; # WRONG - extra blanks print @lines; # right -=head2 Why don't my EEHERE documents work? +=head2 Why don't my <): @list = sort { $a <=> $b } @list; The default sort function is cmp, string comparison, which would -sort C<(1, 2, 10)> into C<(1, 10, 2)>. C=E>, used above, is +sort C<(1, 2, 10)> into C<(1, 10, 2)>. C<< <=> >>, used above, is the numerical comparison operator. If you have a complicated function needed to pull out the part you diff --git a/pod/perlfaq5.pod b/pod/perlfaq5.pod index 2209180..6ae7755 100644 --- a/pod/perlfaq5.pod +++ b/pod/perlfaq5.pod @@ -347,7 +347,7 @@ Then use any of those as you would a normal filehandle. Anywhere that Perl is expecting a filehandle, an indirect filehandle may be used instead. An indirect filehandle is just a scalar variable that contains a filehandle. Functions like C, C, C, or -the CFHE> diamond operator will accept either a read filehandle +the C<< >> diamond operator will accept either a read filehandle or a scalar variable containing one: ($ifh, $ofh, $efh) = (*STDIN, *STDOUT, *STDERR); @@ -407,7 +407,7 @@ calls doesn't work for the diamond operator. That's because it's a real operator, not just a function with a comma-less argument. Assuming you've been storing typeglobs in your structure as we did above, you can use the built-in function named C to reads a record just -as CE> does. Given the initialization shown above for @fd, this +as C<< <> >> does. Given the initialization shown above for @fd, this would work, but only because readline() require a typeglob. It doesn't work with objects or strings, which might be a bug we haven't fixed yet. @@ -463,7 +463,7 @@ whatever: =head2 How can I translate tildes (~) in a filename? -Use the EE (glob()) operator, documented in L. This +Use the <> (glob()) operator, documented in L. This requires that you have a shell installed that groks tildes, meaning csh or tcsh or (some versions of) ksh, and thus may have portability problems. The Glob::KGlob module (available from CPAN) gives more @@ -495,7 +495,7 @@ doesn't exist. open(FH, "+< /path/name"); # open for update -Using "E" always clobbers or creates. Using "E" never does +Using ">" always clobbers or creates. Using "<" never does either. The "+" doesn't change this. Here are examples of many kinds of file opens. Those using sysopen() @@ -556,9 +556,9 @@ isn't so exclusive as you might wish. See also the new L if you have it (new for 5.6). -=head2 Why do I sometimes get an "Argument list too long" when I use E*E? +=head2 Why do I sometimes get an "Argument list too long" when I use <*>? -The CE> operator performs a globbing operation (see above). +The C<< <> >> operator performs a globbing operation (see above). In Perl versions earlier than v5.6.0, the internal glob() operator forks csh(1) to do the actual glob expansion, but csh can't handle more than 127 items and so gives the error message @@ -576,7 +576,7 @@ use the glob() function or its angle-bracket alias in a scalar context, you may cause a leak and/or unpredictable behavior. It's best therefore to use glob() only in list context. -=head2 How can I open a file with a leading "E" or trailing blanks? +=head2 How can I open a file with a leading ">" or trailing blanks? Normally perl ignores trailing blanks in filenames, and interprets certain leading characters (or a trailing "|") to mean something @@ -1100,7 +1100,7 @@ Or even with a literal numeric descriptor: $fd = $ENV{MHCONTEXTFD}; open(MHCONTEXT, "<&=$fd"); # like fdopen(3S) -Note that "E&STDIN" makes a copy, but "E&=STDIN" make +Note that "<&STDIN" makes a copy, but "<&=STDIN" make an alias. That means if you close an aliased handle, all aliases become inaccessible. This is not true with a copied one. diff --git a/pod/perlfaq6.pod b/pod/perlfaq6.pod index de6093a..bf007ee 100644 --- a/pod/perlfaq6.pod +++ b/pod/perlfaq6.pod @@ -533,8 +533,8 @@ pos() point. A failed match resets the position of C<\G> unless the C modifier is in effect. For example, suppose you had a line of text quoted in standard mail -and Usenet notation, (that is, with leading C> characters), and -you want change each leading C> into a corresponding C<:>. You +and Usenet notation, (that is, with leading C<< > >> characters), and +you want change each leading C<< > >> into a corresponding C<:>. You could do so in this way: s/^(>+)/':' x length($1)/gem; diff --git a/pod/perlfaq7.pod b/pod/perlfaq7.pod index 72f4bb7..0afbc0d 100644 --- a/pod/perlfaq7.pod +++ b/pod/perlfaq7.pod @@ -35,12 +35,12 @@ really type specifiers are: <> are used for inputting a record from a filehandle. \ takes a reference to something. -Note that EFILEE is I the type specifier for files -nor the name of the handle. It is the CE> operator applied +Note that is I the type specifier for files +nor the name of the handle. It is the C<< <> >> operator applied to the handle FILE. It reads one line (well, record - see L) from the handle FILE in scalar context, or I lines in list context. When performing open, close, or any other operation -besides CE> on files, or even talking about the handle, do +besides C<< <> >> on files, or even talking about the handle, do I use the brackets. These are correct: C, C and "copying from STDIN to FILE". @@ -49,7 +49,7 @@ I use the brackets. These are correct: C, C). But a hash key consisting of a simple word (that isn't the name of a defined -subroutine) and the left-hand operand to the C<=E> operator both +subroutine) and the left-hand operand to the C<< => >> operator both count as though they were quoted: This is like this @@ -307,10 +307,10 @@ you want to pass in a bit of code into a function: my $line; timeout( 30, sub { $line = } ); -If the code to execute had been passed in as a string, C<'$line = -ESTDINE'>, there would have been no way for the hypothetical -timeout() function to access the lexical variable $line back in its -caller's scope. +If the code to execute had been passed in as a string, +C<< '$line = ' >>, there would have been no way for the +hypothetical timeout() function to access the lexical variable +$line back in its caller's scope. =head2 What is variable suicide and how can I prevent it? @@ -581,10 +581,10 @@ However, dynamic variables (aka global, local, or package variables) are effectively shallowly bound. Consider this just one more reason not to use them. See the answer to L<"What's a closure?">. -=head2 Why doesn't "my($foo) = EFILEE;" work right? +=head2 Why doesn't "my($foo) = ;" work right? C and C give list context to the right hand side -of C<=>. The EFHE read operation, like so many of Perl's +of C<=>. The read operation, like so many of Perl's functions and operators, can tell which context it was called in and behaves appropriately. In general, the scalar() function can help. This function does nothing to the data itself (contrary to popular myth) @@ -766,7 +766,7 @@ before Perl has seen that such a package exists. It's wisest to make sure your packages are all defined before you start using them, which will be taken care of if you use the C statement instead of C. If not, make sure to use arrow notation (eg, -Cfind("Samy")>) instead. Object notation is explained in +C<< Guru->find("Samy") >>) instead. Object notation is explained in L. Make sure to read about creating modules in L and diff --git a/pod/perlfaq8.pod b/pod/perlfaq8.pod index 0d77dc1..ed22ba0 100644 --- a/pod/perlfaq8.pod +++ b/pod/perlfaq8.pod @@ -410,7 +410,7 @@ For example: } However, because syscalls restart by default, you'll find that if -you're in a "slow" call, such as EFHE, read(), connect(), or +you're in a "slow" call, such as , read(), connect(), or wait(), that the only way to terminate them is by "longjumping" out; that is, by raising an exception. See the time-out handler for a blocking flock() in L or chapter 6 of the Camel. @@ -976,7 +976,7 @@ sysopen(): sysopen(FH, "/tmp/somefile", O_WRONLY|O_NDELAY|O_CREAT, 0644) or die "can't open /tmp/somefile: $!": - + =head2 How do I install a module from CPAN? diff --git a/pod/perlfaq9.pod b/pod/perlfaq9.pod index d2f2034..16a803c 100644 --- a/pod/perlfaq9.pod +++ b/pod/perlfaq9.pod @@ -82,7 +82,7 @@ way is to use HTML::FormatText which not only removes HTML but also attempts to do a little simple formatting of the resulting plain text. Many folks attempt a simple-minded regular expression approach, like -C.*?E//g>, but that fails in many cases because the tags +C<< s/<.*?>//g >>, but that fails in many cases because the tags may continue over line breaks, they may contain quoted angle-brackets, or HTML comment may be present. Plus folks forget to convert entities, like C<<> for example. @@ -148,7 +148,7 @@ the same as the startform() method. =head2 How do I make a pop-up menu in HTML? -Use the BSELECTE> and BOPTIONE> tags. The CGI.pm +Use the B<<