Skip Menu |

This queue is for tickets about the Text-Typography CPAN distribution.

Report information
The Basics
Id: 79229
Status: open
Priority: 0/
Queue: Text-Typography

Owner: Nobody in particular
Requestors: arc [...]

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)

Subject: Spurious "uninitialized value" warnings
The attached patch suppresses some "uninitialized value" warnings in Text::Typography. Thanks.
Subject: warnings.diff
Download warnings.diff
text/x-diff 1.2k
From c0bf6aa9cdf106d4477b3666c9a06c1143a5d777 Mon Sep 17 00:00:00 2001 From: Aaron Crane <> Date: Sun, 26 Aug 2012 15:14:52 +0100 Subject: [PATCH] Suppress "uninitialized value" warnings If an optional capturing group is missing in the input, $1 will be undef. In this case, $1 was then being used in the right-hand side of an s///, which then produced the warning. Fix this by instead having a required capturing group, optionally containing the appropriate thing. --- lib/Text/ | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/Text/ b/lib/Text/ index 6da4dd8..de9eb72 100644 --- a/lib/Text/ +++ b/lib/Text/ @@ -540,7 +540,7 @@ sub EducateQuotes { } {$1&#8216;}xg; # Single closing quotes: s { - ($close_class)? + ($close_class?) ' (?(1)| # If $1 captured, then do nothing; (?=\s | s\b) # otherwise, positive lookahead for a whitespace @@ -569,7 +569,7 @@ sub EducateQuotes { # Double closing quotes: s { - ($close_class)? + ($close_class?) " (?(1)|(?=\s)) # If $1 captured, then do nothing; # if not, then make sure the next char is whitespace. --
Download (untitled) / with headers
text/plain 170b
I am seeing this issue as well. The `local $^W = 0;` line doesn't prevent the warnings. Changing that to `no warnings 'uninitialized';` would also eliminate the warnings.

This service is sponsored and maintained by Best Practical Solutions and runs on infrastructure.

Please report any issues with to