Stories
Slash Boxes
Comments
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
 Full
 Abbreviated
 Hidden
More | Login | Reply
Loading... please wait.
  • CC=gcc ? How strange. Do you mean they have reinstalled a perl over the Solaris-provided one ? What does perl -V:cc say ?
    • Last I checked, Solaris (version 7, I think, and possibly 8), needed me to do a lot of CC=gcc LD=gcc stuff to compile XS modules, but that was because I hadn't installed Sun's compiler. On some systems we made the changes directly to the Config.pm module and it worked.

      However, I've left off [perl.org] trying to interfere with the system Perl on any machine. Even on my LFS [linuxfromscratch.org] machines there's a Perl compiled when installing the system in /usr/bin, but the Perl I use for programming and installing modules with is in /u

      --
      J. David works really hard, has a passion for writing good software, and knows many of the world's best Perl programmers
      • You remember me this (unanswered) post [develooper.com] by Alan Burlison (Sun's Perl guy).
        • by pudge (1) on 2002.06.19 10:07 (#9731) Homepage Journal
          I hacked Config.pm in MacPerl to return different values based on the binary. Config.pm can have a hash called %preconfig which will allow overrides. MacPerl's looks sorta like:
          {
                  local $^W;
                  my $inst = ($ENV{MACPERL} || "") . "site_perl:";
                  my $arch = $MacPerl::Architecture || "";
                  my $cc   = $MacPerl::Compiler || "";
           
                  %preconfig = (
                          installsitelib          => $inst,
                          installsitearch         => "$inst$arch:",
                          archname                => $arch,
                          myarchname              => $arch,
                          cc                      => $cc,
                  );
          }
          Of course, those two $MacPerl:: vars are hardcoded into the respective binaries[*], but almost any method of dynamic discovery could be used.

          * Although, MacPerl works kinda weirdly ... the last line of perlmain.c:xs_init is:
          av_push(PL_preambleav, newSVpv("BEGIN { bootstrap MacPerl; bootstrap OSA; bootstrap XL;  }",0));
          That's what gives us $MacPerl:: variables working automatically. The bad part here is that Config.pm when called either as -MConfig or -V will be executed *before* xs_init(), so those variables are never populated. Wheeeeee.
          perl -e 'use Config "myconfig"; print myconfig'
          That works, though.