Bugzilla – Bug 5644
Make it possible to run plugin without PAR during development
Last modified: 2009-08-31 05:57:17 UTC
It would be a good idea to make it possible to run a plugin without building the PAR file during development. There seems to be some code regarding this, unfortunately is seems to require you to move files around before building the PAR. The current implementation allows you to run with PAR with a structure like: =================================== DynamicPlayList HTML Plugin.pm =================================== Or a structure like: =================================== DynamicPlayList HTML lib Dummy.pm Plugins DynamicPlayList Plugin.pm =================================== In the second case the Dummy.pm is required to get Slim::Utils::PluginManager to add the lib to the @INC The PluginBuilder tool in tools/PluginBuilder requires you to have a structure like this when building the PAR: ===================================== DynamicPlayList HTML lib Plugins DynamicPlayList Plugin.pm ==================================== (Note, no Dummy.pm file is of course required here). The major thing to fix is to make it possible to run without a PAR during development and building the PAR from the same directory structure without moving the Plugin.pm file around. One way to do this would be to also add the 'lib' to the @INC if a Plugins directory was found in the lib directory. However, I really think that the best solution would be to get rid of all the special cases and just support one placement and position of the Plugin.pm file. There is no reason to have all these alternative, since all plugins will need to change to 7.0 anyway and we don't need to think about backward compatibility. So, just decide on a SINGLE structure that works for both development and building of PAR file for production.
Created attachment 2204 [details] Patch that add lib to @INC if Plugins directory exist
Will look at this post-7.0.
Can't we close this or is it still open because some clean-up remains ? Someone has made a correction related to this since this bug report was written, because it now works perfectly to develop without a PAR file with a structure like this: =================================== DynamicPlayList HTML lib Plugins DynamicPlayList Plugin.pm =================================== When a PAR is built it will be used instead of the .pm files.