On Sunday, Nov 17, 2002, at 20:22 US/Pacific, Peter N Lewis wrote:

At 11:39 -0800 16/11/02, drieux wrote:

[jeeves: 1:] perl -MConfig -e 'print "$Config{osname} \n"; '

As for how this gets set - it gets set when your version of perl
is built for that specific OS.
which in turn is stored in Config.pm, typically somewhere like /Library/Perl/darwin/Config.pm or System/Library/Perl/darwin/Config.pm

this can be handy if you need to "correct" any settings (such as library or include paths).
Randell has already done the PANIC MOMENT about not
dwiddling the Config.pm file directly.

Remember that the token $^O - the 'osname' that this version
of perl is built with can be directly accessed IN perl itself
without the need for the Config.pm that is dynamically built
when you build perl itself... so dithering the Config.pm will
have the grotesque ugly of 'psycho-version-skew' with the
Config.pm handing out one set of values and perl itself living
in a different world.

YOU DO NOT WANT THAT EXPERIENCE. { unless you are way bored... 8-)}

there are three perfectly SANE ways to manage 'correct library settings'

a) use lib "$ENV{HOME}/lib/perl";
b) PERL5LIB - the environmental variable
c) rebuild your perl code itself to include the appropriate additional paths

the later seems 'odd' to some - but if you are doing things like
wanting to allow the vendor to supply their updates to perl stuff
in their 'happy place' - yet want to be 'old fashion' about always
installing the CPAN stuff, et al, in /usr/local, then you wind up
opting in for things like:

{ from the perl -V output }
Characteristics of this binary (from libperl):
Compile-time options: USE_64_BIT_INT USE_LARGE_FILES
Built under solaris
Compiled at Aug 25 2002 12:19:33
@INC:
/usr/local/lib/perl5/5.6.1/sun4-solaris-64int
/usr/local/lib/perl5/5.6.1
/usr/local/lib/perl5/site_perl/5.6.1/sun4-solaris-64int
/usr/local/lib/perl5/site_perl/5.6.1
/usr/local/lib/perl5/site_perl
/usr/local/lib/perl5/vendor_perl/5.6.1/sun4-solaris-64int
/usr/local/lib/perl5/vendor_perl/5.6.1
/usr/local/lib/perl5/vendor_perl
/usr/perl5/5.6.1/lib/sun4-solaris-64int
/usr/perl5/5.6.1/lib
/usr/perl5/site_perl/5.6.1/sun4-solaris-64int
/usr/perl5/site_perl/5.6.1
/usr/perl5/site_perl
/usr/perl5/vendor_perl/5.6.1/sun4-solaris-64int
/usr/perl5/vendor_perl/5.6.1
/usr/perl5/vendor_perl
.

because you needed to rebuild it anyway to throw the 'USE_LARGE_FILES'
flag any way.... unlike say the darwin version that apple provided that
just did the Right Thing the first time anyway...

The above pattern also allows one to differenciate in their Makefile.PL
whether they can detect the sitelib is the only option or if set, can
we install into installvendorlib ..... as well as where to put the
architecture dependent components, et al....



ciao
drieux

---

Reply via email to