It seems to be duplicate define in "twiki/bin/configure" line 288-294:
unless ( $TWiki::cfg{DetailedOS} ) {
$TWiki::cfg{DetailedOS} = $^O;
unless ( $TWiki::cfg{DetailedOS} ) {
require Config;
$TWiki::cfg{DetailedOS} = $Config::Config{osname};
}
}
First, one "unless" statement is enough to this case; second, "
$^O" is identical to $Config{'osname'}, I don't think need another $Config::Config{osname}. And according to the CPAN Config page, perhaps use $Config{'osname'} is better than "$Config::Config{osname}" though they will return the same resule. Here is my suggestion:
unless ( $TWiki::cfg{DetailedOS} ) {
$TWiki::cfg{DetailedOS} = $^O;
}
Thanks,
Phillip
--
TWiki:Main/PhillipHuang - 2011-08-16
Not sure if we can drop the second check. TWiki (and Perl) runs on many different platforms and versions. There was probably a reason to have the double check with fallback.
--
TWiki:Main.PeterThoeny - 2011-08-19
The only case where this can happen is if Perls $^O returns undef, a null string, or 0. If Perl is properly built and ported, it
cant happen. This seems unlikely (and I wouldn't code it this way). But it's harmless - and not worth the trouble of making the edit and testing.
I'm closing 'no action required'.
--
Timothe Litt - 2014-01-25