develooper Front page | perl.perl5.porters | Postings from February 2000

[PATCH perlfunc.pod perlop.pod] plain POD readability

Thread Next
From:
Robin Barker
Date:
February 29, 2000 04:23
Subject:
[PATCH perlfunc.pod perlop.pod] plain POD readability
Message ID:
200002291223.MAA06156@tempest.npl.co.uk
I have removed E<...> from perlfunc.pod and perlop.pod
using the C<< ... >> stuff.  This should make the plain
POD more readable.  

With more time I would do more, if this is useful.

Robin

--- pod/perlfunc.pod	2000/02/24 17:53:15	1.1
+++ pod/perlfunc.pod	2000/02/24 17:57:53
@@ -335,7 +335,7 @@
 
 The C<-T> and C<-B> switches work as follows.  The first block or so of the
 file is examined for odd characters such as strange control codes or
-characters with the high bit set.  If too many strange characters (E<gt>30%)
+characters with the high bit set.  If too many strange characters (>30%)
 are found, it's a C<-B> file, otherwise it's a C<-T> file.  Also, any file
 containing null in the first block is considered a binary file.  If C<-T>
 or C<-B> is used on a filehandle, the current stdio buffer is examined
@@ -537,7 +537,7 @@
 Be aware that the optimizer might have optimized call frames away before
 C<caller> had a chance to get the information.  That means that C<caller(N)>
 might not return information about the call frame you expect it do, for
-C<N E<gt> 1>.  In particular, C<@DB::args> might have information from the 
+C<< N > 1 >>.  In particular, C<@DB::args> might have information from the 
 previous time C<caller> was called.
 
 =item chdir EXPR
@@ -995,8 +995,8 @@
 
 Outside an C<eval>, prints the value of LIST to C<STDERR> and
 exits with the current value of C<$!> (errno).  If C<$!> is C<0>,
-exits with the value of C<($? E<gt>E<gt> 8)> (backtick `command`
-status).  If C<($? E<gt>E<gt> 8)> is C<0>, exits with C<255>.  Inside
+exits with the value of C<<< ($? >> 8) >>> (backtick `command`
+status).  If C<<< ($? >> 8) >>> is C<0>, exits with C<255>.  Inside
 an C<eval(),> the error message is stuffed into C<$@> and the
 C<eval> is terminated with the undefined value.  This makes
 C<die> the way to raise an exception.
@@ -1210,12 +1210,12 @@
 An C<eof> without an argument uses the last file read.  Using C<eof()>
 with empty parentheses is very different.  It refers to the pseudo file
 formed from the files listed on the command line and accessed via the
-C<E<lt>E<gt>> operator.  Since C<E<lt>E<gt>> isn't explicitly opened,
-as a normal filehandle is, an C<eof()> before C<E<lt>E<gt>> has been
+C<< <> >> operator.  Since C<< <> >> isn't explicitly opened,
+as a normal filehandle is, an C<eof()> before C<< <> >> has been
 used will cause C<@ARGV> to be examined to determine if input is
 available.
 
-In a C<while (E<lt>E<gt>)> loop, C<eof> or C<eof(ARGV)> can be used to
+In a C<< while (<>) >> loop, C<eof> or C<eof(ARGV)> can be used to
 detect the end of each file, C<eof()> will only detect the end of the
 last file.  Examples:
 
@@ -1458,7 +1458,7 @@
 
 Although the deepest nested array or hash will not spring into existence
 just because its existence was tested, any intervening ones will.
-Thus C<$ref-E<gt>{"A"}> and C<$ref-E<gt>{"A"}-E<gt>{"B"}> will spring
+Thus C<< $ref->{"A"} >> and C<< $ref->{"A"}->{"B"} >> will spring
 into existence due to the existence test for the $key element above.
 This happens anywhere the arrow operator is used, including even:
 
@@ -1926,8 +1926,8 @@
 
 Returns the value of EXPR with filename expansions such as the
 standard Unix shell F</bin/csh> would do.  This is the internal function
-implementing the C<E<lt>*.cE<gt>> operator, but you can use it directly.
-If EXPR is omitted, C<$_> is used.  The C<E<lt>*.cE<gt>> operator is
+implementing the C<< <*.c> >> operator, but you can use it directly.
+If EXPR is omitted, C<$_> is used.  The C<< <*.c> >> operator is
 discussed in more detail in L<perlop/"I/O Operators">.
 
 =item gmtime EXPR
@@ -2099,7 +2099,7 @@
 
 to get the correct function definitions.  If F<ioctl.ph> doesn't
 exist or doesn't have the correct definitions you'll have to roll your
-own, based on your C header files such as F<E<lt>sys/ioctl.hE<gt>>.
+own, based on your C header files such as F<< <sys/ioctl.h> >>.
 (There is a Perl script called B<h2ph> that comes with the Perl kit that
 may help you in this, but it's nontrivial.)  SCALAR will be read and/or
 written depending on the FUNCTION--a pointer to the string value of SCALAR
@@ -2543,24 +2543,24 @@
 to open.)  See L<perlopentut> for a kinder, gentler explanation of opening
 files.
 
-If MODE is C<'E<lt>'> or nothing, the file is opened for input.
-If MODE is C<'E<gt>'>, the file is truncated and opened for
-output, being created if necessary.  If MODE is C<'E<gt>E<gt>'>,
+If MODE is C<< '<' >> or nothing, the file is opened for input.
+If MODE is C<< '>' >>, the file is truncated and opened for
+output, being created if necessary.  If MODE is C<<< '>>' >>>,
 the file is opened for appending, again being created if necessary. 
-You can put a C<'+'> in front of the C<'E<gt>'> or C<'E<lt>'> to indicate that
-you want both read and write access to the file; thus C<'+E<lt>'> is almost
-always preferred for read/write updates--the C<'+E<gt>'> mode would clobber the
+You can put a C<'+'> in front of the C<< '>' >> or C<< '<' >> to indicate that
+you want both read and write access to the file; thus C<< '+<' >> is almost
+always preferred for read/write updates--the C<< '+>' >> mode would clobber the
 file first.  You can't usually use either read-write mode for updating
 textfiles, since they have variable length records.  See the B<-i>
 switch in L<perlrun> for a better approach.  The file is created with
 permissions of C<0666> modified by the process' C<umask> value.
 
-These various prefixes correspond to the fopen(3) modes of C<'r'>, C<'r+'>, C<'w'>,
-C<'w+'>, C<'a'>, and C<'a+'>.
+These various prefixes correspond to the fopen(3) modes of C<'r'>, C<'r+'>,
+C<'w'>, C<'w+'>, C<'a'>, and C<'a+'>.
 
 In the 2-arguments (and 1-argument) form of the call the mode and
 filename should be concatenated (in this order), possibly separated by
-spaces.  It is possible to omit the mode if the mode is C<'E<lt>'>.
+spaces.  It is possible to omit the mode if the mode is C<< '<' >>.
 
 If the filename begins with C<'|'>, the filename is interpreted as a
 command to which output is to be piped, and if the filename ends with a
@@ -2580,7 +2580,7 @@
 and L<perlipc/"Bidirectional Communication"> for alternatives.)
 
 In the 2-arguments (and 1-argument) form opening C<'-'> opens STDIN
-and opening C<'E<gt>-'> opens STDOUT.  
+and opening C<< '>-' >> opens STDOUT.  
 
 Open returns
 nonzero upon success, the undefined value otherwise.  If the C<open>
@@ -2652,10 +2652,10 @@
     }
 
 You may also, in the Bourne shell tradition, specify an EXPR beginning
-with C<'E<gt>&'>, in which case the rest of the string is interpreted as the
+with C<< '>&' >>, in which case the rest of the string is interpreted as the
 name of a filehandle (or file descriptor, if numeric) to be
-duped and opened.  You may use C<&> after C<E<gt>>, C<E<gt>E<gt>>,
-C<E<lt>>, C<+E<gt>>, C<+E<gt>E<gt>>, and C<+E<lt>>.  The
+duped and opened.  You may use C<&> after C<< > >>, C<<< >> >>>,
+C<< < >>, C<< +> >>, C<<< +>> >>>, and C<< +< >>.  The
 mode you specify should match the mode of the original filehandle.
 (Duping a filehandle does not take into account any existing contents of
 stdio buffers.)  Duping file handles is not yet supported for 3-argument
@@ -2686,7 +2686,7 @@
     print STDOUT "stdout 2\n";
     print STDERR "stderr 2\n";
 
-If you specify C<'E<lt>&=N'>, where C<N> is a number, then Perl will do an
+If you specify C<< '<&=N' >>, where C<N> is a number, then Perl will do an
 equivalent of C's C<fdopen> of that file descriptor; this is more
 parsimonious of file descriptors.  For example:
 
@@ -3082,10 +3082,10 @@
 because they obey the native byteorder and endianness.  For example a
 4-byte integer 0x12345678 (305419896 decimal) be ordered natively
 (arranged in and handled by the CPU registers) into bytes as
- 
+
  	0x12 0x34 0x56 0x78	# little-endian
  	0x78 0x56 0x34 0x12	# big-endian
- 
+
 Basically, the Intel, Alpha, and VAX CPUs are little-endian, while
 everybody else, for example Motorola m68k/88k, PPC, Sparc, HP PA,
 Power, and Cray are big-endian.  MIPS can be either: Digital used it
@@ -3095,12 +3095,12 @@
 the classic "Gulliver's Travels" (via the paper "On Holy Wars and a
 Plea for Peace" by Danny Cohen, USC/ISI IEN 137, April 1, 1980) and
 the egg-eating habits of the Lilliputians.
- 
+
 Some systems may have even weirder byte orders such as
- 
+
  	0x56 0x78 0x12 0x34
  	0x34 0x12 0x78 0x56
- 
+
 You can see your system's preference with
 
  	print join(" ", map { sprintf "%#02x", $_ }
@@ -3422,8 +3422,8 @@
 context (i.e. file slurp mode), and when an empty file is read, it
 returns C<''> the first time, followed by C<undef> subsequently.
 
-This is the internal function implementing the C<E<lt>EXPRE<gt>>
-operator, but you can use it directly.  The C<E<lt>EXPRE<gt>>
+This is the internal function implementing the C<< <EXPR> >>
+operator, but you can use it directly.  The C<< <EXPR> >>
 operator is discussed in more detail in L<perlop/"I/O Operators">.
 
     $line = <STDIN>;
@@ -3758,7 +3758,7 @@
 EOF on your read, and then sleep for a while, you might have to stick in a
 seek() to reset things.  The C<seek> doesn't change the current position,
 but it I<does> clear the end-of-file condition on the handle, so that the
-next C<E<lt>FILEE<gt>> makes Perl try again to read something.  We hope.
+next C<< <FILE> >> makes Perl try again to read something.  We hope.
 
 If that doesn't work (some stdios are particularly cantankerous), then
 you may need something more like this:
@@ -3852,7 +3852,7 @@
     select(undef, undef, undef, 0.25);
 
 B<WARNING>: One should not attempt to mix buffered I/O (like C<read>
-or E<lt>FHE<gt>) with C<select>, except as permitted by POSIX, and even
+or <FH>) with C<select>, except as permitted by POSIX, and even
 then only on POSIX systems.  You have to use C<sysread> instead.
 
 =item semctl ID,SEMNUM,CMD,ARG
@@ -4061,7 +4061,7 @@
 is omitted, C<sort>s in standard string comparison order.  If SUBNAME is
 specified, it gives the name of a subroutine that returns an integer
 less than, equal to, or greater than C<0>, depending on how the elements
-of the list are to be ordered.  (The C<E<lt>=E<gt>> and C<cmp>
+of the list are to be ordered.  (The C<< <=> >> and C<cmp>
 operators are extremely useful in such routines.)  SUBNAME may be a
 scalar variable name (unsubscripted), in which case the value provides
 the name of (or a reference to) the actual subroutine to use.  In place
@@ -4157,7 +4157,7 @@
                            ||
                   $a->[2] cmp $b->[2]
            } map { [$_, /=(\d+)/, uc($_)] } @old;
-    
+
     # using a prototype allows you to use any comparison subroutine
     # as a sort subroutine (including other package's subroutines)
     package other;
@@ -4454,7 +4454,7 @@
 ID, among other things.  In versions of Perl prior to 5.004 the default
 seed was just the current C<time>.  This isn't a particularly good seed,
 so many old programs supply their own seed value (often C<time ^ $$> or
-C<time ^ ($$ + ($$ E<lt>E<lt> 15))>), but that isn't necessary any more.
+C<time ^ ($$ + ($$ << 15))>), but that isn't necessary any more.
 
 In fact, it's usually not necessary to call C<srand> at all, because if
 it is not called explicitly, it is called implicitly at the first use of
@@ -4576,7 +4576,7 @@
     S_IRWXU S_IRUSR S_IWUSR S_IXUSR
     S_IRWXG S_IRGRP S_IWGRP S_IXGRP
     S_IRWXO S_IROTH S_IWOTH S_IXOTH
-    
+
     # Setuid/Setgid/Stickiness.
 
     S_ISUID S_ISGID S_ISVTX S_ISTXT
@@ -5192,8 +5192,8 @@
     sub ordinal { unpack("c",$_[0]); } # same as ord()
 
 In addition to fields allowed in pack(), you may prefix a field with
-a %E<lt>numberE<gt> to indicate that
-you want a E<lt>numberE<gt>-bit checksum of the items instead of the items
+a %<number> to indicate that
+you want a <number>-bit checksum of the items instead of the items
 themselves.  Default is a 16-bit checksum.  Checksum is calculated by
 summing numeric values of expanded values (for string fields the sum of
 C<ord($char)> is taken, for bit fields the sum of zeroes and ones).
--- pod/perlop.pod	2000/02/24 18:06:41	1.1
+++ pod/perlop.pod	2000/02/24 18:09:36
@@ -95,7 +95,7 @@
 
 =head2 The Arrow Operator
 
-"C<-E<gt>>" is an infix dereference operator, just as it is in C
+"C<< -> >>" is an infix dereference operator, just as it is in C
 and C++.  If the right side is either a C<[...]>, C<{...}>, or a
 C<(...)> subscript, then the left side must be either a hard or
 symbolic reference to an array, a hash, or a subroutine respectively.
@@ -259,16 +259,16 @@
 
 =head2 Relational Operators
 
-Binary "E<lt>" returns true if the left argument is numerically less than
+Binary "<" returns true if the left argument is numerically less than
 the right argument.
 
-Binary "E<gt>" returns true if the left argument is numerically greater
+Binary ">" returns true if the left argument is numerically greater
 than the right argument.
 
-Binary "E<lt>=" returns true if the left argument is numerically less than
+Binary "<=" returns true if the left argument is numerically less than
 or equal to the right argument.
 
-Binary "E<gt>=" returns true if the left argument is numerically greater
+Binary ">=" returns true if the left argument is numerically greater
 than or equal to the right argument.
 
 Binary "lt" returns true if the left argument is stringwise less than
@@ -291,7 +291,7 @@
 Binary "!=" returns true if the left argument is numerically not equal
 to the right argument.
 
-Binary "E<lt>=E<gt>" returns -1, 0, or 1 depending on whether the left
+Binary "<=>" returns -1, 0, or 1 depending on whether the left
 argument is numerically less than, equal to, or greater than the right
 argument.
 
@@ -541,7 +541,7 @@
 In list context, it's just the list argument separator, and inserts
 both its arguments into the list.
 
-The =E<gt> digraph is mostly just a synonym for the comma operator.  It's useful for
+The => digraph is mostly just a synonym for the comma operator.  It's useful for
 documenting arguments that come in pairs.  As of release 5.001, it also forces
 any word to the left of it to be interpreted as a string.
 
@@ -643,7 +643,7 @@
 that 
 
 	q{foo{bar}baz} 
-	
+
 is the same as 
 
 	'foo{bar}baz'
@@ -1127,7 +1127,7 @@
 text is not evaluated as a command.  If the
 PATTERN is delimited by bracketing quotes, the REPLACEMENT has its own
 pair of quotes, which may or may not be bracketing quotes, e.g.,
-C<s(foo)(bar)> or C<sE<lt>fooE<gt>/bar/>.  A C</e> will cause the
+C<s(foo)(bar)> or C<< s<foo>/bar/ >>.  A C</e> will cause the
 replacement portion to be interpreted as a full-fledged Perl expression
 and eval()ed right then and there.  It is, however, syntax checked at
 compile-time.
@@ -1178,8 +1178,8 @@
     s/([^ ]*) *([^ ]*)/$2 $1/;	# reverse 1st two fields
 
 Note the use of $ instead of \ in the last example.  Unlike
-B<sed>, we use the \E<lt>I<digit>E<gt> form in only the left hand side.
-Anywhere else it's $E<lt>I<digit>E<gt>.
+B<sed>, we use the \<I<digit>> form in only the left hand side.
+Anywhere else it's $<I<digit>>.
 
 Occasionally, you can't use just a C</g> to get all the changes
 to occur that you might want.  Here are two common cases:
@@ -1317,8 +1317,8 @@
 The first pass is finding the end of the quoted construct, whether
 it be a multicharacter delimiter C<"\nEOF\n"> in the C<<<EOF>
 construct, a C</> that terminates a C<qq//> construct, a C<]> which
-terminates C<qq[]> construct, or a C<E<gt>> which terminates a
-fileglob started with C<E<lt>>.
+terminates C<qq[]> construct, or a C<< > >> which terminates a
+fileglob started with C<< < >>.
 
 When searching for single-character non-pairing delimiters, such
 as C</>, combinations of C<\\> and C<\/> are skipped.  However,
@@ -1374,7 +1374,7 @@
 
 The only interpolation is removal of C<\> from pairs C<\\>.
 
-=item C<"">, C<``>, C<qq//>, C<qx//>, C<<file*globE<gt>>
+=item C<"">, C<``>, C<qq//>, C<qx//>, C<< <file*glob> >>
 
 C<\Q>, C<\U>, C<\u>, C<\L>, C<\l> (possibly paired with C<\E>) are
 converted to corresponding Perl constructs.  Thus, C<"$foo\Qbaz$bar">
@@ -1409,7 +1409,7 @@
 
 Note also that the interpolation code needs to make a decision on
 where the interpolated scalar ends.  For instance, whether 
-C<"a $b -E<gt> {c}"> really means:
+C<< "a $b -> {c}" >> really means:
 
   "a " . $b . " -> {c}";
 
@@ -1584,7 +1584,7 @@
     while (($_ = <STDIN>) ne '0') { ... }
     while (<STDIN>) { last unless $_; ... }
 
-In other boolean contexts, C<E<lt>I<filehandle>E<gt>> without an
+In other boolean contexts, C<< <I<filehandle>> >> without an
 explicit C<defined> test or comparison elicit a warning if the B<-w>
 command-line switch (the C<$^W> variable) is in effect.
 
@@ -1595,18 +1595,18 @@
 the open() function, amongst others.  See L<perlopentut> and
 L<perlfunc/open> for details on this.
 
-If a E<lt>FILEHANDLEE<gt> is used in a context that is looking for
+If a <FILEHANDLE> is used in a context that is looking for
 a list, a list comprising all input lines is returned, one line per
 list element.  It's easy to grow to a rather large data space this
 way, so use with care.
 
-E<lt>FILEHANDLEE<gt> may also be spelled C<readline(*FILEHANDLE)>.
+<FILEHANDLE> may also be spelled C<readline(*FILEHANDLE)>.
 See L<perlfunc/readline>.
 
-The null filehandle E<lt>E<gt> is special: it can be used to emulate the
-behavior of B<sed> and B<awk>.  Input from E<lt>E<gt> comes either from
+The null filehandle <> is special: it can be used to emulate the
+behavior of B<sed> and B<awk>.  Input from <> comes either from
 standard input, or from each file listed on the command line.  Here's
-how it works: the first time E<lt>E<gt> is evaluated, the @ARGV array is
+how it works: the first time <> is evaluated, the @ARGV array is
 checked, and if it is empty, C<$ARGV[0]> is set to "-", which when opened
 gives you standard input.  The @ARGV array is then processed as a list
 of filenames.  The loop
@@ -1628,11 +1628,11 @@
 except that it isn't so cumbersome to say, and will actually work.
 It really does shift the @ARGV array and put the current filename
 into the $ARGV variable.  It also uses filehandle I<ARGV>
-internally--E<lt>E<gt> is just a synonym for E<lt>ARGVE<gt>, which
+internally--<> is just a synonym for <ARGV>, which
 is magical.  (The pseudo code above doesn't work because it treats
-E<lt>ARGVE<gt> as non-magical.)
+<ARGV> as non-magical.)
 
-You can modify @ARGV before the first E<lt>E<gt> as long as the array ends up
+You can modify @ARGV before the first <> as long as the array ends up
 containing the list of filenames you really want.  Line numbers (C<$.>)
 continue as though the input were one big happy file.  See the example
 in L<perlfunc/eof> for how to reset line numbers on each file.
@@ -1662,12 +1662,12 @@
 	# ...		# code for each line
     }
 
-The E<lt>E<gt> symbol will return C<undef> for end-of-file only once.  
+The <> symbol will return C<undef> for end-of-file only once.  
 If you call it again after this, it will assume you are processing another 
 @ARGV list, and if you haven't set @ARGV, will read input from STDIN.
 
 If angle brackets contain is a simple scalar variable (e.g.,
-E<lt>$fooE<gt>), then that variable contains the name of the
+<$foo>), then that variable contains the name of the
 filehandle to input from, or its typeglob, or a reference to the
 same.  For example:
 
@@ -1679,16 +1679,16 @@
 reference, it is interpreted as a filename pattern to be globbed, and
 either a list of filenames or the next filename in the list is returned,
 depending on context.  This distinction is determined on syntactic
-grounds alone.  That means C<E<lt>$xE<gt>> is always a readline() from
-an indirect handle, but C<E<lt>$hash{key}E<gt>> is always a glob().
+grounds alone.  That means C<< <$x> >> is always a readline() from
+an indirect handle, but C<< <$hash{key}> >> is always a glob().
 That's because $x is a simple scalar variable, but C<$hash{key}> is
 not--it's a hash element.
 
 One level of double-quote interpretation is done first, but you can't
-say C<E<lt>$fooE<gt>> because that's an indirect filehandle as explained
+say C<< <$foo> >> because that's an indirect filehandle as explained
 in the previous paragraph.  (In older versions of Perl, programmers
 would insert curly brackets to force interpretation as a filename glob:
-C<E<lt>${foo}E<gt>>.  These days, it's considered cleaner to call the
+C<< <${foo}> >>.  These days, it's considered cleaner to call the
 internal function directly as C<glob($foo)>, which is probably the right
 way to have done it in the first place.)  For example:
 


Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About