Add CXSA and S::N to meta recommends
Peter Rabbitson [Tue, 6 Nov 2012 15:24:36 +0000 (16:24 +0100)]
Makefile.PL

index a8379e2..64a9109 100644 (file)
@@ -12,11 +12,19 @@ requires 'Module::Runtime' => '0.012';
 requires 'Scalar::Util';
 requires 'MRO::Compat' if $] < 5.009_005;
 
+my $recommends = {
+  'Sub::Name' => '0.05',
+  # when changing CXSA version don't forget to adjust lib/Class/Accessor/Grouped.pm as well
+  'Class::XSAccessor' => '1.15',
+};
+
+recommends( $_ => $recommends->{$_} )
+  for keys %$recommends;
+
 if (can_xs or $Module::Install::AUTHOR) {
-  requires 'Sub::Name' => '0.05';
+  requires 'Sub::Name' => $recommends->{'Sub::Name'};
 
-  # when changing don't forget to adjust lib/Class/Accessor/Grouped.pm as well
-  requires 'Class::XSAccessor' => '1.15'
+  requires 'Class::XSAccessor' => $recommends->{'Class::XSAccessor'}
     if $] > '5.008'; # CXSA does not work on 5.6
 }