Re: [PATCH] cflags.SH: rethink of the gcc -std=c89 and -pedantic
[p5sagit/p5-mst-13.2.git] / lib / Exporter / Heavy.pm
index 53341a2..27774c5 100644 (file)
@@ -5,8 +5,8 @@ no strict 'refs';
 
 # On one line so MakeMaker will see it.
 require Exporter;  our $VERSION = $Exporter::VERSION;
-$Carp::Internal{"Exporter::Heavy"} = 1;
-our $Verbose;
+# Carp does this now for us, so we can finally live w/o Carp
+#$Carp::Internal{"Exporter::Heavy"} = 1;
 
 =head1 NAME
 
@@ -70,7 +70,7 @@ sub heavy_export {
            $cache_is_current = 1;
        }
 
-       if ($imports[0] =~ m#^[/!:]#){
+       if (grep m{^[/!:]}, @imports) {
            my $tagsref = \%{"${pkg}::EXPORT_TAGS"};
            my $tagdata;
            my %imports;
@@ -103,7 +103,7 @@ sub heavy_export {
                }
 
                warn "Import ".($remove ? "del":"add").": @names "
-                   if $Verbose;
+                   if $Exporter::Verbose;
 
                if ($remove) {
                   foreach $sym (@names) { delete $imports{$sym} } 
@@ -169,7 +169,7 @@ sub heavy_export {
            # barewords twice... both with and without a leading &.
            # (Technique could be applied to $export_cache at cost of memory)
            my @expanded = map { /^\w/ ? ($_, '&'.$_) : $_ } @$fail;
-           warn "${pkg}::EXPORT_FAIL cached: @expanded" if $Verbose;
+           warn "${pkg}::EXPORT_FAIL cached: @expanded" if $Exporter::Verbose;
            @{$fail_cache}{@expanded} = (1) x @expanded;
        }
        my @failed;
@@ -189,7 +189,7 @@ sub heavy_export {
     }
 
     warn "Importing into $callpkg from $pkg: ",
-               join(", ",sort @imports) if $Verbose;
+               join(", ",sort @imports) if $Exporter::Verbose;
 
     foreach $sym (@imports) {
        # shortcut for the common case of no type character