I'm trying to install PerlQt, and I'm in over my head, so I'm not sure whether I'm asking for the right sort of advice for that particular task. I know the Trolltech Qt library package itself is present and I know where that is (four different releases of it, in fact), so that's not the problem.

I think the problem might be that I'm trying to install this module with a version of perl that is not /usr/bin/perl. This linux machine has /usr/bin/perl, and that's fine -- I assume that there's a bunch of ubuntu sysadmin-type stuff using it, and I don't want to screw that up.

But for the apps that are going to be using Qt, I have (let's call it) /pkg/alt/bin/perl, which has been built with a separate set of libraries, has a different default @INC, etc etc. (This is a network path, and lots of different linux boxes will use it, so the apps using this version of perl don't have dependencies on various machine-local perls and libraries.)

As I struggle to figure out why Perl/Qt is not installing, I'm noticing that there are a lot of perl scripts being included with (or created by) the module distro, and these all start with #!/usr/bin/perl -- and I'm wondering...

When I start with the normal first step -- perl Makefile.PL -- is using the perl version that I want (my PATH puts /pkg/alt/bin ahead of /usr/bin), but what can I do (if anything) to make sure that all steps in the module install process invoke /pkg/alt/bin/perl instead of /usr/bin/perl ?

(As indicated above, I don't know if this is really the reason why Perl/Qt is not installing, but just on first principles, this seems like a general problem that's bound to bite me, so... Has anyone dealt with this?)

UPDATE: I have the following plan for finding and altering all the perl script files in the module distro (including, in the case of Perl/Qt, the "*.pl.in" files that are used to generate "localized" perl scripts for the installation):

find . -type f | xargs grep -l '#!/usr/bin/perl' | xargs -L 1 perl -i.orig -pe 's:#!/usr/bin/perl:#!/usr/bin/env perl: +'
or something to that effect. Alas, it doesn't solve the problem I'm still having with getting Perl/Qt installed, but... seems like a "good enough" idea. Any better suggestions?

(updated that pipeline to use "xargs -L 1" in the last step, to run perl -i on each file one at a time.)


In reply to Module Installation Puzzle: using a non-default perl by graff

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.