[Catalyst-commits] r14209 -
trunk/examples/CatalystAdvent/lib/CatalystAdvent
dpetrov at dev.catalyst.perl.org
dpetrov at dev.catalyst.perl.org
Sun Dec 11 09:50:56 GMT 2011
Author: dpetrov
Date: 2011-12-11 09:50:56 +0000 (Sun, 11 Dec 2011)
New Revision: 14209
Modified:
trunk/examples/CatalystAdvent/lib/CatalystAdvent/Pod.pm
Log:
Fix the Pod Parser to parse links correctly
Modified: trunk/examples/CatalystAdvent/lib/CatalystAdvent/Pod.pm
===================================================================
--- trunk/examples/CatalystAdvent/lib/CatalystAdvent/Pod.pm 2011-12-11 00:07:13 UTC (rev 14208)
+++ trunk/examples/CatalystAdvent/lib/CatalystAdvent/Pod.pm 2011-12-11 09:50:56 UTC (rev 14209)
@@ -54,11 +54,16 @@
return $self->SUPER::seqL($link);
}
- $targ ||= $text;
+ $page ||= $text;
$text = Pod::Xhtml::_htmlEscape($text);
+ $page = Pod::Xhtml::_htmlEscape($page);
$targ = Pod::Xhtml::_htmlEscape($targ);
- return qq{<a href="http://metacpan.org/module/$targ">$text</a>};
+ if ($targ) {
+ return qq{<a href="http://metacpan.org/module/$page#$targ">$text</a>};
+ }
+
+ return qq{<a href="http://metacpan.org/module/$page">$text</a>};
}
sub title { $_[0]->{_title} }
More information about the Catalyst-commits
mailing list