Ticket #66 (closed enhancement: fixed)
Add support for plugins loaded from within PAR files
| Reported by: | tsee | Owned by: | |
|---|---|---|---|
| Priority: | minor | Milestone: | |
| Component: | plugins | Version: | |
| Keywords: | Cc: |
Description
Instead of expecting the user to perform a plugin installation using the cpan shell, (s)he can just drop the .pm files in the correct directory in the configuration path (i.e. .padre/plugins/Padre/Plugin/Foo.pm).
That, however, doesn't take care of more complicated use cases where there are multiple .pm files, other files or even module dependencies. The following scheme should make it very simple to get a plugin to work:
The plugin author builds a PAR distribution from his plugin _and_all_dependencies_: (using PAR::Dist::FromCPAN)
cpan2par -p Padre::Plugin::Foo --follow --merge
Renames it to simply the plugin name: (this could be made optional)
mv Padre-Plugin-Foo-VERSION....par Foo.par
And provides it as a download. The users can then download those .par files and drop them into ~/.padre/plugins et voila, the plugin and all its dependencies are now available for Padre!
The next (simple) step would be to provide a menu entry "install plugin" which takes a URL of a plugin which is then fetched and move to the correct location.
The attached patch implements the whole scheme except for the menu entry.
Best regards,
Steffen
