Okay, here's this thing that really goes on my tits, internet-wise. Namely, all those crufty URIs hanging around all over the web with their ghastly .cgi and .pl. That's bad, because it isn't forward compatible. Perl guys like us are responsible.

Imagine you have programmed a super excellent piece of web software, say a dictionary application, and installed it in http://example.com/dict.pl. What if one day Perl isn't good enough because it's much more excellent in Rules on Raiby or HPH or whatever - then you deploy the new one with a different URI and bookmarks and links break and your loyal users are up in arms.

By content negotiation, a feature built into HTTP, you can have your link be http://example.com/dict. You are able to switch the implementation, but the interface stays the same. Properly configured, the web server will know what to run.

So, in conclusion, it's not necessary to expose the underlying technology through the URI. The next time you administrator types are going to deploy a new Apache2, use the config below and you web author types make sure to link to resources without the file endings.

<IfModule mime_module> AddHandler cgi-script .cgi # .cgi files are handled by mod_cgi </IfModule> <IfModule negotiation_module> MultiviewsMatch Any </IfModule> <IfModule perl_module> <Files *.pl> # .pl files are handled by mod_perl2 SetHandler modperl PerlResponseHandler ModPerl::Registry </Files> </IfModule>
http://httpd.apache.org/docs/2.2/ http://perl.apache.org/docs/2.0/user/config/config.html

In reply to URI Style by Anonymous Monk

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.