[perl #28385] minor bug in cpan -- the i command does not find author
authorMichael G Schwern <schwern@pobox.com>
Tue, 12 Jul 2005 00:16:49 +0000 (17:16 -0700)
committerSteve Hay <SteveHay@planit.com>
Wed, 13 Jul 2005 08:34:53 +0000 (08:34 +0000)
From: "Michael G Schwern via RT" <perlbug-followup@perl.org>
Message-ID: <rt-3.0.11-28385-116951.3.97645870397305@perl.org>

(and remove a couple of unused variables)

p4raw-id: //depot/perl@25133

lib/CPAN.pm

index abcc85e..0914e3f 100644 (file)
@@ -1454,13 +1454,14 @@ sub m { # emacs confused here }; sub mimimimimi { # emacs in sync here
 sub i {
     my($self) = shift;
     my(@args) = @_;
-    my(@type,$type,@m);
-    @type = qw/Author Bundle Distribution Module/;
     @args = '/./' unless @args;
     my(@result);
-    for $type (@type) {
+    for my $type (qw/Bundle Distribution Module/) {
        push @result, $self->expand($type,@args);
     }
+    # Authors are always uppercase.
+    push @result, $self->expand("Author", map { uc $_ } @args);
+
     my $result = @result == 1 ?
        $result[0]->as_string :
             @result == 0 ?