Expand $^O at build time when generating Config::_V()
authorNicholas Clark <nick@ccl4.org>
Tue, 19 Jun 2012 14:50:47 +0000 (16:50 +0200)
committerNicholas Clark <nick@ccl4.org>
Tue, 10 Jul 2012 11:08:55 +0000 (13:08 +0200)
commitf0b0a4d296551cb3df320db39ea6327996961d9c
tree09f55944a32b01661cf25e497c6054c0a6177d7f
parentf711619fd1eeb97e4fd8ecb19fb934b351190e86
Expand $^O at build time when generating Config::_V()

Config::_V() is how perl -V is implemented internally, and is called called
directly from the interpreter's switch passing routine. Hence the value of
$^O at runtime will always be the same as the value of $^O at build time,
so conditionals dependent on the value of $^O will always take the same
execution path. So only generate the relevant code, and hence avoid shipping
VMS and Cygwin specific code except on those platforms. (But add a sanity
test in Config::_V() to ensure that the runtime $^O has the correct value -
ie that the Perl code and the perl binary correspond.)
configpm