This doesn't seem to have any effect here. I guess this sets the locale for the OLE lookups, but my problem is that the global environment has changed
I've discovered that LC_NUMERIC is being changed, which means that
print "LOCALE " . setlocale(LC_NUMERIC) . "\n";
my $winmgmts = Win32::OLE->GetObject("winmgmts:");
print "LOCALE " . setlocale(LC_NUMERIC) . "\n";
setlocale(LC_NUMERIC, 'C');
print "LOCALE " . setlocale(LC_NUMERIC) . "\n";
prints
LOCALE C
LOCALE German_Germany.1252
LOCALE C
Which answers most of my questions. The issues still bothering me are:
- What should I do to avoid this sort of thing in the future (it's already cost myself and my colleagues 3 days)
- What other strange global side-effects might Win32::OLE
be having?
|