rjbs / Pod-Weaver

recombine pod documents into awesomer pod documents
26 stars 28 forks source link

How to remove a plugin from a plugin bundle? #51

Open hakonhagland opened 3 years ago

hakonhagland commented 3 years ago

I am trying to update Dir::Manifest to not use rt.cpan.org as the bugtracker link in the Pod. Currently, the distribution's weaver.ini file (see: https://github.com/shlomif/Dir-Manifest/blob/master/p5/Dir-Manifest/weaver.ini) looks like this:

[@SHLOMIF]

Where the plugin bundle Pod::Weaver::PluginBundle::SHLOMIF uses Pod::Weaver::Section::Support to add the bug tracker information to the Pod documentation for the module. The problem is that the default bugtracker for [Support] (see attribute bugs) is RT. I would like to change the bugs attribute to become metadata instead of rt. I tried to change weaver.ini to:

[@Filter]
-bundle = @SHLOMIF
-remove = Support
[Support]
all_modules = 1
bugs = metadata
perldoc = 0
bugs_content = "Please report any bugs or feature requests through the web interface at {WEB}. You will be automatically notified of any progress on the request by the system."
repository_link = both

but when running dzil build I get the following error:

$ dzil build
[DZ] beginning to build Dir-Manifest
[DZ] guessing dist's main_module is lib/Dir/Manifest.pm
Pod::Weaver::PluginBundle::Filter (for section @Filter) does not appear to be installed
[...]

and I cannot find any module Pod::Weaver::PluginBundle::Filter on metacpan.org. Any ideas how I can achieve this?

karenetheridge commented 3 years ago

You can't use a weaver bundle without getting all its plugins. Your best option is to rewrite your weaver.ini so it doesn't use the bundle, but rather does the equivalent of what the bundle does, minus the plugin(s) that you do not want.

perlancar commented 2 years ago

Being hit with this issue just now. There should be a @Filter-like mechanism like in dist.ini.