Disallow numbers in imports for consistency with Sub::Exporter
[p5sagit/Sub-Exporter-Progressive.git] / lib / Sub / Exporter / Progressive.pm
index 4db4cf1..1d01d57 100644 (file)
@@ -3,7 +3,7 @@ package Sub::Exporter::Progressive;
 use strict;
 use warnings;
 
-our $VERSION = '0.001007';
+our $VERSION = '0.001008';
 
 use Carp 'croak';
 use List::Util 'first';
@@ -29,6 +29,8 @@ sub import {
          $full_exporter ||= Sub::Exporter::build_exporter($export_data->{original});
 
          goto $full_exporter;
+      } elsif (defined(my $num = first { !ref and m/^\d/ } @args)) {
+         die "cannot export symbols with a leading digit: '$num'";
       } else {
          require Exporter;
          s/ \A - /:/xm for @args;