FWIW, I can confirm that $^X isn't working properly on Solaris.

It seems that - on Linux - the path to the executable is determined via /proc/self/exe1. At least that's the impression I get from a quick look at the source, as well as the strace output of perl -e 'print "$^X\n"'.  Unfortunately, Solaris doesn't seem to have /proc/self/exe.

A little digging shows that - on Solaris (10) - something like

$ perl -e 'printf "%s\n", readlink "/proc/self/path/a.out"' /usr/local/perl-5.8.4/bin/perl

may have a better chance to provide the info that the symlink /proc/self/exe holds on Linux... (on this Solaris box, I currently don't have Perl-5.10, so I tested with an older version — the $^X mechanism doesn't seem to have changed much since, anyway).

(might do some more thorough digging later... as time permits — in which case I'll update the node)

___

1 in case you want to look at the respective code fragments yourself, grep for one of S_set_caret_X, S_procself_val, PROCSELFEXE_PATH, HAS_PROCSELFEXE.

___

Update: (Note to the OP) In case the /proc/self/path/a.out symlink is working for you, too, you could try to extend the Configure script here (line 15563):

procselfexe='' val="$undef" case "$d_readlink" in "$define") if $issymlink /proc/self/exe ; then $ls -l /proc/self/exe > reflect if $contains /`basename $ls` reflect >/dev/null 2>&1; then echo "You have Linux-like /proc/self/exe." procselfexe='"/proc/self/exe"' val="$define" fi fi ...

and see if it works then...


In reply to Re: Relocatable Perl 5.10.0 on Solaris by almut
in thread Relocatable Perl 5.10.0 on Solaris by Anonymous Monk

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.