Slash Boxes
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
More | Login | Reply
Loading... please wait.
  • by Juerd (1796) on 2004.04.09 15:13 (#29989) Homepage
    A classic example of weird editor settings. Unless of course that is your favourite indenting style.

    Anyway, I think encode_url is a bad name for a function that does not URL-encode (i.e. the %-thing). It does not even have anything to do with URLs. In fact, I would not have used a separate sub for it.

    But, as always, it works and it serves a purpose. As does most software.
    • It just needed a %retab. Looks much neater now, darn tabs.

      The reason it's called encode_url is because it encodes the entities in a url. If it was going to do the %-thing, it would be escaping (using URI::Escape). At least that's how I distinguish between the two things, I could be wrong.
      • RFC 2396 calls it "Escaped Encoding" (2.4.1).

        Which means some people call it escaping, some call it encoding. Perlfaq9 calls it encoding, URI::Escape calls it escaping.

        The thing is exactly the same with HTML Entities: it is escaping AND encoding. Encoding because it changes in a way that can be reversed, escaped because most text is as it is and an escape character (% in a URI, & in HTML) is used to introduce an encoded octet/character..

        I'd expect a sub called encode_url to URI-encode because of the