Bugzilla – Bug 9708
Can't locate Win32::Locale
Last modified: 2009-07-31 10:30:52 UTC
There was a crasher on my Windows system running the Perl code: Can't locate Win32/Locale.pm in @INC (@INC contains: C:/Program Files/SqueezeCenter 7.3 Trunk/server C:/Perl/site/lib C:/Perl/lib .) at C:/Program Files/SqueezeCenter 7.3 Trunk/server/Slim/Utils/OS/Win32.pm line 10. BEGIN failed--compilation aborted at C:/Program Files/SqueezeCenter 7.3 Trunk/server/Slim/Utils/OS/Win32.pm line 10. Compilation failed in require at C:/Program Files/SqueezeCenter 7.3 Trunk/server/Slim/Utils/OSDetect.pm line 90. BEGIN failed--compilation aborted at C:\Program Files\SqueezeCenter 7.3 Trunk\server\slimserver.pl line 116.[/code] There was no Win32::Locale.pm in my ActiveState Perl 5.8 installation. Had to download it and install in my Perl\lib\Win32 folder. [url]http://search.cpan.org/~sburke/Win32-Locale-0.04/Locale.pm[/url]
Win32::Locale is in our CPAN folder. Don't know why it's not bound in to the binary.
Ok, I see it in \server\CPAN\arch\5.8\MSWin32-x86-multi-thread\Win32 What do you mean by "bound in to the binary"? The EXE version? Running the non-EXE Perl code, how is it supposed to be found?
Would the following change work? Index: /Users/mh/Documents/workspace/7.3/server/Slim/Utils/OS/Win32.pm =================================================================== --- /Users/mh/Documents/workspace/7.3/server/Slim/Utils/OS/Win32.pm (revision 23540) +++ /Users/mh/Documents/workspace/7.3/server/Slim/Utils/OS/Win32.pm (working copy) @@ -7,7 +7,6 @@ use Scalar::Util qw(blessed); use Win32; use Win32::OLE::NLS; -use Win32::Locale; use POSIX qw(LC_CTYPE LC_TIME); use base qw(Slim::Utils::OS); @@ -152,6 +151,8 @@ } sub localeDetails { + require Win32::Locale; + my $langid = Win32::OLE::NLS::GetSystemDefaultLCID(); my $lcid = Win32::OLE::NLS::MAKELCID($langid); my $linfo = Win32::OLE::NLS::GetLocaleInfo($lcid, Win32::OLE::NLS::LOCALE_IDEFAULTANSICODEPAGE());
could you please give me the full command line you're using? I can't reproduce this issue by simply running "perl slimserver.pl"
(In reply to comment #3) > Would the following change work? Yeah, that appears to work.
(In reply to comment #4) > could you please give me the full command line you're using? I can't reproduce > this issue by simply running "perl slimserver.pl" C:\>"C:\Perl\bin\perl.exe" "C:\Program Files\SqueezeCenter 7.3 Trunk\server\slimserver.pl" --playeraddr 192.168.9.11 --cliaddr 192.168.9.11 --streamaddr 192.168.9.11 --httpaddr 192.168.9.11 --httpport 80 --prefsdir "D:\slim\11\prefs" --cachedir "D:\slim\11\cache" --logdir "D:\slim\11\logs"
change 23541 - thanks! Need to postpone module loading, as the library path isn't initialized yet when S::U::OS classes are loaded.
This bug has been fixed in the 7.3.0 release version of SqueezeCenter! Please download the new version from http://www.slimdevices.com/su_downloads.html if you haven't already. If you are still experiencing this problem, feel free to reopen the bug with your new comments and we'll have another look.
Reduce number of active targets for SC