From: Michael G Schwern Date: Tue, 12 Jul 2005 00:16:49 +0000 (-0700) Subject: [perl #28385] minor bug in cpan -- the i command does not find author X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=190aa8358ff15caf49faee81d14f298d768b1227;p=p5sagit%2Fp5-mst-13.2.git [perl #28385] minor bug in cpan -- the i command does not find author From: "Michael G Schwern via RT" Message-ID: (and remove a couple of unused variables) p4raw-id: //depot/perl@25133 --- diff --git a/lib/CPAN.pm b/lib/CPAN.pm index abcc85e..0914e3f 100644 --- a/lib/CPAN.pm +++ b/lib/CPAN.pm @@ -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 ?