CC: | Keith Thompson <kst [...] mib.org> |
Subject: | Display glitch in Config::Tiny 2.12 POD |
Date: | Tue, 24 Aug 2010 16:18:28 -0700 |
To: | bug-Config-Tiny [...] rt.cpan.org |
From: | Keith Thompson <kst [...] mib.org> |
There's a display glitch in the Config::Tiny 2.12 embedded POD
documentation.
You can see it by visiting
<http://search.cpan.org/~adamk/Config-Tiny-2.12/lib/Config/Tiny.pm>
and searching for the second occurrence of "errstr"; it's shown
as "... you can recover via <Config::Tiny-errstr>>."
Here's a diff for a proposed fix:
========================================================================
--- Tiny.pm.orig 2010-08-24 16:09:09.000000000 -0700
+++ Tiny.pm 2010-08-24 16:07:40.000000000 -0700
@@ -196,7 +196,7 @@
Returns the object on success, or C<undef> on error.
When C<read> fails, C<Config::Tiny> sets an error message internally
-you can recover via C<<Config::Tiny->errstr>>. Although in B<some>
+you can recover via C<< Config::Tiny->errstr >>. Although in B<some>
cases a failed C<read> will also set the operating system error
variable C<$!>, not all errors do and you should not rely on using
the C<$!> variable.
========================================================================
An alternative fix:
========================================================================
--- Tiny.pm.orig 2010-08-24 16:09:09.000000000 -0700
+++ Tiny.pm 2010-08-24 16:19:54.000000000 -0700
@@ -196,7 +196,7 @@
Returns the object on success, or C<undef> on error.
When C<read> fails, C<Config::Tiny> sets an error message internally
-you can recover via C<<Config::Tiny->errstr>>. Although in B<some>
+you can recover via C<Config::Tiny-E<gt>errstr>. Although in B<some>
cases a failed C<read> will also set the operating system error
variable C<$!>, not all errors do and you should not rely on using
the C<$!> variable.
========================================================================
Reference: "perldoc perlpod":
A more readable, and perhaps more "plain" way is to use an alternate
set of delimiters that doesn’t require a single ">" to be escaped.
With the Pod formatters that are standard starting with perl5.5.660,
doubled angle brackets ("<<" and ">>") may be used if and only if there
is whitespace right after the opening delimiter and whitespace right
before the closing delimiter! For example, the following will do the
trick:
C<< $a <=> $b >>
I'm using Config::Tiny version 2.12.
(Though it shouldn't be relevent, I'm using Perl 5.10.0 on Ubuntu 9.04.)
--
Keith Thompson (The_Other_Keith) kst@mib.org <http://www.ghoti.net/~kst>
Nokia
"We must do something. This is something. Therefore, we must do this."
-- Antony Jay and Jonathan Lynn, "Yes Minister"