develooper Front page | perl.perl5.porters | Postings from April 2003

Re: [PATCH 5.8.0 UTIL] Fix installhtml for splitting and PM/POD conflicts

Thread Previous | Thread Next
From:
Steve Hay
Date:
April 2, 2003 05:10
Subject:
Re: [PATCH 5.8.0 UTIL] Fix installhtml for splitting and PM/POD conflicts
Message ID:
3E8AE096.9000002@uk.radan.com
Rafael Garcia-Suarez wrote:

>Yes, I'm inclined to apply something like the patch below along your
>patch. Thoughts ?
>
>Index: lib/Pod/Html.pm
>===================================================================
>--- lib/Pod/Html.pm     (revision 1050)
>+++ lib/Pod/Html.pm     (working copy)
>@@ -1965,12 +1965,12 @@
> }
> 
> #
>-# similar to htmlify, but turns spaces into underscores
>+# similar to htmlify, but turns non-alphanumerics into underscores
> #
> sub anchorify {
>     my ($anchor) = @_;
>     $anchor = htmlify($anchor);
>-    $anchor =~ s/\s/_/g; # fixup spaces left by htmlify
>+    $anchor =~ s/\W/_/g;
>     return $anchor;
> }
> 
>End of Patch.
>  
>
I'm happy with this.  Since the anchor and filename are never actually 
seen by the "users", it doesn't really matter how much they are altered 
so long as they work.  This seems like a clean, simple way to guarantee 
that.

Steve


Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About