allow exporting to main
[gitmo/Moose.git] / lib / Moose / Exporter.pm
index 0e07062..b2e04e6 100644 (file)
@@ -301,7 +301,6 @@ sub _make_import_sub {
     my $exporting_package = shift;
     my $exporter          = shift;
     my $exports_from      = shift;
-    my $export_to_main    = shift;
 
     return sub {
 
@@ -338,13 +337,6 @@ sub _make_import_sub {
         strict->import;
         warnings->import;
 
-        # we should never export to main
-        if ( $CALLER eq 'main' && !$export_to_main ) {
-            warn
-                qq{$class does not export its sugar to the 'main' package.\n};
-            return;
-        }
-
         my $did_init_meta;
         for my $c ( grep { $_->can('init_meta') } $class, @{$exports_from} ) {
             # init_meta can apply a role, which when loaded uses