Dist-Zilla-Plugin-OptionalFeature
view release on metacpan or search on metacpan
lib/Dist/Zilla/Plugin/OptionalFeature.pm view on Meta::CPAN
on: e.g. C<< cpanm --interactive Foo::Bar >>).
The feature I<name> and I<description> are required. The name can be extracted
from the plugin name.
You can specify requirements for different phases and relationships with:
[OptionalFeature / Feature_name]
-description = description
-phase = test
-relationship = requires
Fitz::Fotz = 1.23
Text::SoundEx = 3
If not provided, C<-phase> defaults to C<runtime>, and C<-relationship> to
C<requires>.
To specify feature requirements for multiple phases, provide them as separate
plugin configurations (keeping the feature name and description constant):
[OptionalFeature / Feature_name]
lib/Dist/Zilla/Plugin/OptionalFeature.pm view on Meta::CPAN
specify either or both of C<-phase> or C<-relationship>, these values default
to C<runtime> and C<requires> respectively.
The example below is equivalent to the synopsis example above, except for the
name of the resulting plugin:
[OptionalFeature]
-name = XS_Support
-description = XS implementation (faster, requires a compiler)
-phase = runtime
-relationship = requires
Foo::Bar::XS = 1.002
B<NOTE>: It is advised that you only specify I<one> prerequisite for a given
feature -- and if necessary, create a separate distribution to encapsulate the
code needed to make that feature work (along with all of its dependencies).
This allows external projects to declare a prerequisite not just on your
distribution, but also a particular feature of that distribution.
=for Pod::Coverage mvp_aliases BUILD before_build metadata register_prereqs
( run in 0.857 second using v1.01-cache-2.11-cpan-0d8aa00de5b )