All you need to do is specify both a LIB and a PREFIX args to Makefile.PL and your binaries will be installed where you order.

This is the classic "Hello World!" (in C XS) installed completely into /tmp so that all you need to do is use lib '/tmp' and it will just work....

C:\Local>perl Makefile.PL LIB=/tmp PREFIX=/tmp Writing Makefile for Local C:\Local>nmake Microsoft (R) Program Maintenance Utility Version 1.50 Copyright (c) Microsoft Corp 1988-94. All rights reserved. cl -c -nologo -O1 -MD -Zi -DNDEBUG -DWIN32 -D_CONSOLE -DNO_ST +RICT -DHAVE_DES_FCRYPT -DPERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS -D +PERL_MSVCRT_READFIX -O1 -MD -Zi -DNDEBUG -DVERSION=\"0.01\" -DXS_ +VERSION=\"0.01\" -ID:\Perl\lib\CORE Local.c "Running Mkbootstrap for Local ()" [snip rest of blah] C:\Local>nmake test Microsoft (R) Program Maintenance Utility Version 1.50 Copyright (c) Microsoft Corp 1988-94. All rights reserved. D:\Perl\bin\perl.exe -Iblib\arch -Iblib\lib -ID:\Perl\lib -ID: +\Perl\lib test.pl 1..1 ok 1 Hello, world! C:\Local>nmake install Microsoft (R) Program Maintenance Utility Version 1.50 Copyright (c) Microsoft Corp 1988-94. All rights reserved. Installing \tmp\MSWin32-x86-multi-thread\auto\Local\Local.bs Installing \tmp\MSWin32-x86-multi-thread\auto\Local\Local.dll Installing \tmp\MSWin32-x86-multi-thread\auto\Local\Local.exp Installing \tmp\MSWin32-x86-multi-thread\auto\Local\Local.lib Installing \tmp\MSWin32-x86-multi-thread\auto\Local\Local.pdb Installing \tmp\Local.pm Installing \tmp\auto\Local\autosplit.ix Writing \tmp\MSWin32-x86-multi-thread\.\auto\Local\.packlist Appending installation info to \tmp\MSWin32-x86-multi-thread\./perlloc +al.pod C:\Local>cd c:\tmp C:\tmp>type test.pl #!/usr/bin/perl use lib '/tmp'; use Local; hello(); C:\tmp>test.pl Hello, world! C:\tmp>

cheers

tachyon


In reply to Re: Tweaking DynaLoader's path without write access to the perl installation by tachyon
in thread Tweaking DynaLoader's path without write access to the perl installation by mhi

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.