Skip to content

Commit 08655e8

Browse files
committed
Example, how to use requires_by_perl on D::Z::PluginBundle::RJBS
1 parent ae6fe79 commit 08655e8

File tree

1 file changed

+7
-10
lines changed

1 file changed

+7
-10
lines changed

cpanfile

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -98,16 +98,13 @@ if ( "$]" >= 5.020 ) {
9898
requires 'Dist::Zilla::PluginBundle::DROLSKY';
9999
requires 'Dist::Zilla::PluginBundle::Milla';
100100

101-
if ( "$]" < 5.026 ) {
102-
requires 'Dist::Zilla::PluginBundle::RJBS', '==5.023';
103-
}
104-
elsif ( "$]" < 5.034 ) {
105-
requires 'Dist::Zilla::PluginBundle::RJBS', '==5.025';
106-
}
107-
else {
108-
# 5.028 requires v5.36 whereas newer versions only v5.34
109-
requires 'Dist::Zilla::PluginBundle::RJBS', '>5.028';
110-
}
101+
requires_by_perl 'Dist::Zilla::PluginBundle::RJBS',
102+
5.020 => undef,
103+
5.026 => '==5.023',
104+
5.034 => '==5.025',
105+
# 5.028 requires v5.36 whereas following versions only v5.34, so omit it
106+
'>5.028'
107+
;
111108

112109
requires 'Dist::Zilla::PluginBundle::Starter::Git';
113110
requires 'Dist::Zilla::Plugin::CheckChangeLog';

0 commit comments

Comments
 (0)