[Pdx-pm] maintaining your own perl tree

J. Shirley jshirley at gmail.com
Wed Aug 27 10:08:03 PDT 2008


On Wed, Aug 27, 2008 at 9:40 AM, Allison Randal <allison at perl.org> wrote:
> Peter Scott wrote:
>>
>> At 01:18 AM 8/27/2008, Allison Randal wrote:
>>>
>>> If you compile your perl in some custom location (/usr/local or
>>> /opt/perl), and make sure it knows to respond to '#!/usr/bin/perl' on the
>>> shebang line (it's a configuration option when compiling perl, the shebang
>>> line doesn't have to match the path),
>>
>> What option is that?  I'm only familiar with the one that tells it to
>> overwrite /usr/bin/perl in addition to building somewhere else.
>
> I don't know the Configure flag, because I always use the interactive
> configuration (I always compile perl for myself, because I never install
> modules using CPAN.pm on a vendor install of perl, and vendor distribution
> systems never have all the modules I need):
>
> Installation prefix to use? (~name ok) [/opt/perl/5.8.8]
>
> [...]
>
> Do you want to install perl as /usr/bin/perl? [n]
>
> [...]
>
> I can use the #! construct to start perl on your system. This will
> make startup of perl scripts faster, but may cause problems if you
> want to share those scripts and perl is not in a standard place
> (/opt/perl/5.8.8/bin/perl) on all your platforms. The alternative is to
> force
> a shell by starting the script with a single ':' character.
>
> What shall I put after the #! to start up perl ("none" to not use #!)?
> [/opt/perl/5.8.8/bin/perl]
>
> (Which I always change to /usr/bin/perl.)
>
> Allison
> _______________________________________________
> Pdx-pm-list mailing list
> Pdx-pm-list at pm.org
> http://mail.pm.org/mailman/listinfo/pdx-pm-list
>

That's the $Config{perlpath} var, btw.  Very useful to reference if
you're doing script generation, like Catalyst's startup scripts, etc.

We generate our scripts with:
    $self->{startperl} = "#!$Config{perlpath} -w";

-J


More information about the Pdx-pm-list mailing list