summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFlorian Ragwitz <rafl@debian.org>2012-09-19 14:42:03 -0400
committerFlorian Ragwitz <rafl@debian.org>2012-09-19 14:42:03 -0400
commita681e3bc71273f7123957d39f54aa7037c435f18 (patch)
tree842724d98bfe04261fb22ca0d26aeaec5d2e4735
parent8f9354bcd8ac5dfa69f214d7882498ccc12863bf (diff)
downloadperl-a681e3bc71273f7123957d39f54aa7037c435f18.tar.gz
Quote corelist bugtracker urls
XSLoader started to have a bugtracker URL containing single quotes, which is also what we currently quote bug trackers with.
-rwxr-xr-xPorting/corelist.pl11
1 files changed, 10 insertions, 1 deletions
diff --git a/Porting/corelist.pl b/Porting/corelist.pl
index b5e2645e86..1c22f2b039 100755
--- a/Porting/corelist.pl
+++ b/Porting/corelist.pl
@@ -251,7 +251,7 @@ foreach my $module ( sort keys %module_to_upstream ) {
if $dist;
$bug_tracker = $bug_tracker->{web} if ref($bug_tracker) eq "HASH";
- $bug_tracker = defined $bug_tracker ? "'$bug_tracker'" : 'undef';
+ $bug_tracker = defined $bug_tracker ? quote($bug_tracker) : 'undef';
next if $bug_tracker eq "'http://rt.perl.org/perlbug/'";
$tracker .= sprintf " %-24s=> %s,\n", "'$module'", $bug_tracker;
}
@@ -363,3 +363,12 @@ sub calculate_delta {
return \%changed, \%removed;
}
+
+sub quote {
+ my ($str) = @_;
+ # There's gotta be something already doing this properly that we could just
+ # reuse, but I can't quite thing of where to look for it, so I'm gonna do
+ # the simplest possible thing that'll allow me to release 5.17.4. --rafl
+ $str =~ s/'/\\'/g;
+ "'${str}'";
+}