If you're looking to conform to some standard way of doing this you may want to look at the FHS, which contains all the detail you could ever want on the subject.

Personally I'd say install your binaries in /usr/bin or /usr/local/bin, /bin is supposed to contain only essential binaries and should preferably not be cluttered by user applications (as a rule of thumb, /bin should contain only the binaries you need after a boot if you cannot mount anything except the root partition). perl isn't usually installed in /bin, and neither should your apps be.

As for the libraries, I usuall install somewhere in @INC. If your app will only be installed on a range of machines which belong to your organisation, then you could install in a custom directory and use lib, but I think it's too much of a bother to keep track of which apps need which library paths and only use this method when I'm testing a newer version of the libraries with an older one still installed. Also, installing libraries all over the filesystem can make it hard for someone else to maintain the system because they have to check all your custom paths as well as the usual ones for outdated library versions.

Another good thing to do is to convert your Perl tar.gz packages into the package format native to your platform( for example .rpm for Fedora) and install from there. This is trivially easy to do on .deb-based systems, due to the very useful dh-make-perl script, and I'd guess something similar is available for rpm as well (or you could always use dh-make-perl and then convert the resulting .deb into .rpm with alien). Sticking to the system packaging format makes it easier for an admin to know what version of what software is installed where, which application a particular file belongs to etc. It also simplifies installation and update for multiple machines.


Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it. -- Brian W. Kernighan

In reply to Re: RFC: Perl Application installation locations by tirwhan
in thread RFC: Perl Application installation locations by blm

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.