Dist::Zilla::Plugin::OSPrereqs - List prereqs conditional on operating system
version 0.011
In your dist.ini:
[OSPrereqs / MSWin32] Win32API::File = 0.11
or
[OSPrereqs] prereq_os = MSWin32 Win32API::File = 0.11
Some prefixes are recognized, i.e. ! (not), ~ (regex match), !~ (regex non-match). Regex matches are done case-insensitively for convenience:
!
~
!~
; require on non-Win32 system [OSPrereqs] prereq_os = !MSWin32 Proc::ProcessTable = 0.50 ; require on BSD [OSPrereqs] prereq_os = ~bsd BSD::Resource = 0 ; require on non-Windows system [OSPrereqs / !~win] Proc::ProcessTable = 0.50
This Dist::Zilla plugin allows you to specify OS-specific prerequisites. You must give the plugin a name corresponding to an operating system that would appear in $^O. Any prerequisites listed will be conditionally added to PREREQ_PM in the Makefile.PL
$^O
PREREQ_PM
This plugin works for Makefile.PL generated by the Dist::Zilla::Plugin::MakeMaker plugin or the Build.PL generated by the Dist::Zilla::Plugin::ModuleBuild plugin, and must appear in your dist.ini after whichever you use.
This plugin is a fairly gross hack, based on the technique used for Dist::Zilla::Plugin::DualLife and might break if/when Dist::Zilla changes how it generates install scripts.
Dist::Zilla::Plugin::DynamicPrereqs
Please report any bugs or feature requests through the issue tracker at https://github.com/dagolden/Dist-Zilla-Plugin-OSPrereqs/issues. You will be notified automatically of any progress on your issue.
This is open source software. The code repository is available for public review and contribution under the terms of the license.
https://github.com/dagolden/Dist-Zilla-Plugin-OSPrereqs
git clone https://github.com/dagolden/Dist-Zilla-Plugin-OSPrereqs.git
David Golden <dagolden@cpan.org>
Dave Rolsky <autarch@urth.org>
Ioan Rogers <ioanr@cpan.org>
Karen Etheridge <ether@cpan.org>
perlancar (@pc-office) <perlancar@gmail.com>
Steven Haryanto (on PC, Bandung) <stevenharyanto@gmail.com>
This software is Copyright (c) 2011 by David Golden.
This is free software, licensed under:
The Apache License, Version 2.0, January 2004
To install Dist::Zilla::Plugin::OSPrereqs, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Dist::Zilla::Plugin::OSPrereqs
CPAN shell
perl -MCPAN -e shell install Dist::Zilla::Plugin::OSPrereqs
For more information on module installation, please visit the detailed CPAN module installation guide.