Another easy way to find sendmail without recursively searching directories etc. is
$path = `which sendmail`;
# Perhaps check the return value here
chomp $path;
This is assuming that you are dealing in a *nixy environment.

And as far as installing an application, well, again, if you're in a *nixy environment, there is no better installer for Perl stuff than the CPAN module.

If you put something like

WriteMakefile(
    # . . . blah blah blah . . .
    'PREREQ_PM' => {
      # your dependencies go here ... the CPAN
      # module will add them to the build list
            },
    'PM' => {
      'bin/myscript' => '$(INST_SCRIPT)/myscript.pl'
            },
    # . . . blah blah blah . . .
);
in your Makefile.PL, the script will generally be placed in /usr/bin. Installing with the CPAN module would also obviate your need to check dependencies and make updating a breeze. And you can do all sorts of other wacky things from Makefile.PL, such as prompting the user for input and building a configuration file.

I'm not an expert on the CPAN module, so I don't know how exactly you'd tell it to install such-and-such a tarball in such-and-such a directory (i.e., bypassing the 'get' step and eliminating the need to have people put the tarball in, for example, /root/.cpan/build).

So, as you can see, there would be some things to think about. Just throwin' the idea out there ...

Hope this helps :-)


In reply to Re: Installer Program by Starky
in thread Installer Program by Flame

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.