in reply to RFC: Name and/or API for module ("HTML::RewriteURLs")

First, since you don't rewrite_html in a general way, but only URLS, and only those that are relative to a given base, you actually do relocate_rel_url.
From this follows, second, that the package name is HTML::RelocateRelativeURL proper (which is as ugly as the regex you use :-), probably with the shortcut HTML::RRU (like Data::Dump::Streamer which comes optionally with the alias DDS).

perl -le'print map{pack c,($-++?1:13)+ord}split//,ESEL'

Replies are listed 'Best First'.
Re^2: RFC: Name and/or API for module ("HTML::RewriteURLs")
by Corion (Patriarch) on Jul 25, 2015 at 10:42 UTC

    Hmm - I'm not too fond of "RelocateRelativeURL" because it's unwieldly, but maybe just HTML::MakeRelativeURL is good enough. The function names will need a good new name but that should come once I've found the module name ;)

      Ok - next shot: HTML::RebaseURL. How's that?

      update:Golfed down a bit: HTML::Rebase might suffice.

      perl -le'print map{pack c,($-++?1:13)+ord}split//,ESEL'

        First thing that came to me as well was something Rebase. I like HTML::LocalizeURLs or HTML::URLLocalize as well.

        -stevieb