Jim, I don't have a Windows license or test system. But since I can't
reproduce this error on macOS or Linux it may either be a Windows thing
or related to the Perl version (5.14.1?) or both. The lowest Perl
version I tested was 5.18.

Most likely the problem you're seeing is due to your using Plugin.pm for the scanner as well as the server side module. The scanner by default doesn't have all the Slim::Web infrastructure (and shouldn't!). On Linux/Mac, where we're running Perl directly, those dependencies would simply be loaded - which you should not do. You don't want all that overhead in your scanner.

On Windows OTOH we don't have Perl, but run bundled up Perl versions with all the LMS code required to run that bundle. scanner.exe doesn't come with the Slim::Web stuff, therefore the scanner would fail on Windows.

(the same applies for Slim::Networking::Async and the like - don't use them in the scanner!)

Two solutions:

* re-factor your code to separate out scanner related code into a scanner specific module (that's the preferred way)

* wrap the Settings import in a "if (!main::SCANNER)" condition like you do for a lot of the initialization. You'd have to "require" rather than "use" then in that case.

The second way might be easier in the short term, but risks to break again and again, as you introduce code not suitable for the scanner.
_______________________________________________
plugins mailing list
[email protected]
http://lists.slimdevices.com/mailman/listinfo/plugins

Reply via email to