Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re^4: INSTALLSCRIPT Not Working

by bergbrains (Acolyte)
on Sep 27, 2010 at 18:37 UTC ( [id://862269]=note: print w/replies, xml ) Need Help??


in reply to Re^3: INSTALLSCRIPT Not Working
in thread INSTALLSCRIPT Not Working

No go. INSTALLBIN doesn't help. Still goes into the bin dir under the PREFIX dir.

I suspect that it's a packaging mistake, not a MakeMaker problem.

...so I followed up on that and, for instance in Perl::Tidy, the script is specified as EXE_SCRIPT:

EXE_FILES => ['bin/perltidy'],

From the MakeMaker man page:

EXE_FILES

Ref to array of executable files. The files will be copied to the INST_SCRIPT directory. Make realclean will delete them from there again.

If your executables start with something like #!perl or #!/usr/bin/perl MakeMaker will change this to the path of the perl 'Makefile.PL' was invoked with so the programs will be sure to run properly even if perl is not in /usr/bin/perl.

So, problem solved. Thanks for your help.

Replies are listed 'Best First'.
Re^5: INSTALLSCRIPT Not Working
by bergbrains (Acolyte) on Oct 04, 2010 at 18:07 UTC

    It's just a matter of time before I forget the solution I found here, so I know I'll be back one day and wanted to clear up what I found as a solution here and what the problem actually appears to have been.

    First of all, EXE_FILES is obviously not the solution. Forget that. Neither was the problem in ExtUtils::MakeMaker, rather it was with the way that CPANPLUS was building and executing the "perl Makefile.PL". What seems to have been happening is that, in addition to the value that I was setting for PREFIX or INSTALL_BASE for the makemakerflags, the entire line was being appended to the value of PREFIX, so I'd wind up with something like this in my Makefile after the configuration was executed:

    INSTALL_BASE = /home/nypntdev/iprs_perl INSTALLSCRIPT=/home/nypntdev/iprs_perl/x86_64/bin

    The solution was to populate the PERL_MM_OPT environment variable that is used by ExtUtils::MakeMaker. http://search.cpan.org/~mschwern/ExtUtils-MakeMaker/lib/ExtUtils/MakeMaker.pm#PERL_MM_OPT says:

    Command line options used by MakeMaker->new(), and thus by WriteMakefile(). The string is split on whitespace, and the result is processed before any actual command line arguments are processed.
    So, there you have it.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://862269]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others having a coffee break in the Monastery: (5)
As of 2024-04-23 22:31 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found