Holy monks,

I am trying to build a few perl rpms on different versions of redhat linux. The spec file contains commands that determine a few directories in /usr/lib/perl5:

perl -V:installvendorlib
perl -V:installvendorarch
I've observed that the above works on some versions only and returns a null string on others. I want to know how these variables are assigned values. Also, is there a simple perl one-liner that returns a list of all such configuration parameters - perhaps as a hash with key and value pairs?

perl's manpage mentions

-V:configvars
and nothing more that that. I also looked in the perlrun manpage but could not find anything useful.

Many thanks!
<Update:

I was looking at the Config module, and figure out I can get all the values I want using

use Config;
foreach (keys %Config) {
  print "$_ => $Config{$_}\n";
}
For some reason, the installvendorlib variable is not defined on one machine. Is there a way to fix this other than recompiling and reinstalling perl ?

Thanks,
Linuxfan


In reply to Obtaining list of all -V configvars to perl command line by linuxfan

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.