Skip Menu |

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

Report information
The Basics
Id: 85237
Status: patched
Priority: 0/
Queue: Text-Lorem-More

People
Owner: Nobody in particular
Requestors: DOHERTY [...] cpan.org
Cc:
AdminCc:

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



Subject: mailto generates "mailto:+email" instead of processing the +email directive
Here's a patch.
Subject: 0001-RT-85237-Fix-mailto-which-failed-to-include-an-email.patch
From 988e9ab3e80971d2a2c6a85f04017bb55a098e4c Mon Sep 17 00:00:00 2001 From: Mike Doherty <doherty@pythian.com> Date: Mon, 13 May 2013 14:00:16 -0300 Subject: [PATCH] RT#85237: Fix mailto, which failed to include an email --- lib/Text/Lorem/More.pm | 2 +- t/85237-mailto-doesnt-process-+email.t | 14 ++++++++++++++ 2 files changed, 15 insertions(+), 1 deletion(-) create mode 100644 t/85237-mailto-doesnt-process-+email.t diff --git a/lib/Text/Lorem/More.pm b/lib/Text/Lorem/More.pm index df15afb..91b5506 100644 --- a/lib/Text/Lorem/More.pm +++ b/lib/Text/Lorem/More.pm @@ -235,7 +235,7 @@ http://+hostname:+port/+path _END_ port => sub { int rand(1 + (2 ** 15)) }, - mailto => \"mailto:+email", + mailto => [ ['mailto:+email'] ], tld => "topleveldomain", diff --git a/t/85237-mailto-doesnt-process-+email.t b/t/85237-mailto-doesnt-process-+email.t new file mode 100644 index 0000000..c45a0cf --- /dev/null +++ b/t/85237-mailto-doesnt-process-+email.t @@ -0,0 +1,14 @@ +use strict; +use warnings; + +use Test::More; +use Text::Lorem::More qw/lorem/; + +my $count = 2 ** 8; +plan tests => 2*$count; + +for (1 .. $count) { + my $mailto = lorem->mailto; + unlike $mailto => qr{\Q+email}, "+email got processed"; + like $mailto => qr{mailto:.+\@.+\.\w+}, "Looks like mailto has an email in it"; +} -- 1.8.2.2