Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

minor bug in cpan -- the i command does not find author #7221

Closed
p5pRT opened this issue Apr 8, 2004 · 10 comments
Closed

minor bug in cpan -- the i command does not find author #7221

p5pRT opened this issue Apr 8, 2004 · 10 comments

Comments

@p5pRT
Copy link

p5pRT commented Apr 8, 2004

Migrated from rt.perl.org#28385 (status was 'resolved')

Searchable as RT28385$

@p5pRT
Copy link
Author

p5pRT commented Apr 8, 2004

From Steve.Tolkin@fmr.com

Created by steve.tolkin@fmr.com

In the cpan shell help says that the command
i
provides information about any of authors, bundles, distributions,
modules
But it does not find authors; for proof see the transcript below.

I do not know whether the fix is to change the description of i,
or the behavior of i, but these should agree.

C​:\TEMP>perl -MCPAN -e shell

cpan shell -- CPAN exploration and modules installation (v1.7601)
ReadLine support enabled

cpan> help

Display Information
command argument description
a,b,d,m WORD or /REGEXP/ about authors, bundles, distributions,
modules
i WORD or /REGEXP/ about anything of above
r NONE reinstall recommendations
ls AUTHOR about files in the author's directory

Download, Test, Make, Install...
get download
make make (implies get)
test MODULES, make test (implies make)
install DISTS, BUNDLES make install (implies test)
clean make clean
look open subshell in these dists' directories
readme display these dists' README files

Other
h,? display this menu ! perl-code eval a perl command
o conf [opt] set and query options q quit the cpan shell
reload cpan load CPAN.pm again reload index load newer indices
autobundle Snapshot force cmd unconditionally do
cmd
cpan> i stolkin
CPAN​: Storable loaded ok
Going to read C​:\_myhome\.cpan\Metadata
  Database was generated on Thu, 08 Apr 2004 08​:51​:18 GMT
Strange distribution name [stolkin]
No objects found of any type for argument stolkin

cpan> a stolkin
Author id = STOLKIN
  EMAIL tolkin@​attbi.com
  FULLNAME Steven Tolkin

cpan>

Perl Info

Flags:
    category=library
    severity=low

Site configuration information for perl v5.8.0:

Configured by ActiveState at Tue Feb  4 18:07:44 2003.

Summary of my perl5 (revision 5 version 8 subversion 0) configuration:
  Platform:
    osname=MSWin32, osvers=4.0, archname=MSWin32-x86-multi-thread
    uname=''
    config_args='undef'
    hint=recommended, useposix=true, d_sigaction=undef
    usethreads=undef use5005threads=undef useithreads=define
usemultiplicity=define
    useperlio=define d_sfio=undef uselargefiles=define usesocks=undef
    use64bitint=undef use64bitall=undef uselongdouble=undef
    usemymalloc=n, bincompat5005=undef
  Compiler:
    cc='cl', ccflags ='-nologo -Gf -W3 -MD -Zi -DNDEBUG -O1 -DWIN32
-D_CONSOLE -DNO_STRICT -DHAVE_DES_FCRYPT  -DPERL_IMPLICIT_CONTEXT
-DPERL_IMPLICIT_SYS -DUSE_PERLIO -DPERL_MSVCRT_READFIX',
    optimize='-MD -Zi -DNDEBUG -O1',
    cppflags='-DWIN32'
    ccversion='', gccversion='', gccosandvers=''
    intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=1234
    d_longlong=undef, longlongsize=8, d_longdbl=define, longdblsize=10
    ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='__int64',
lseeksize=8
    alignbytes=8, prototype=define
  Linker and Libraries:
    ld='link', ldflags ='-nologo -nodefaultlib -debug -opt:ref,icf
-libpath:"C:\Perl\lib\CORE"  -machine:x86'
    libpth="C:\Perl\lib\CORE"
    libs=  oldnames.lib kernel32.lib user32.lib gdi32.lib winspool.lib
comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib
netapi32.lib uuid.lib wsock32.lib mpr.lib winmm.lib  version.lib
odbc32.lib odbccp32.lib msvcrt.lib
    perllibs=  oldnames.lib kernel32.lib user32.lib gdi32.lib
winspool.lib  comdlg32.lib advapi32.lib shell32.lib ole32.lib
oleaut32.lib  netapi32.lib uuid.lib wsock32.lib mpr.lib winmm.lib
version.lib odbc32.lib odbccp32.lib msvcrt.lib
    libc=msvcrt.lib, so=dll, useshrplib=yes, libperl=perl58.lib
    gnulibc_version='undef'
  Dynamic Linking:
    dlsrc=dl_win32.xs, dlext=dll, d_dlsymun=undef, ccdlflags=' '
    cccdlflags=' ', lddlflags='-dll -nologo -nodefaultlib -debug
-opt:ref,icf  -libpath:"C:\Perl\lib\CORE"  -machine:x86'

Locally applied patches:
    ACTIVEPERL_LOCAL_PATCHES_ENTRY


@INC for perl v5.8.0:
    c:/Perl/lib
    c:/Perl/site/lib
    .


Environment for perl v5.8.0:
    HOME=c:\_myhome
    LANG (unset)
    LANGUAGE (unset)
    LD_LIBRARY_PATH (unset)
    LOGDIR (unset)
 
PATH=C:\PROGRA~1\MICROS~3\Common\msdev98\BIN;C:\PROGRA~1\MICROS~3\VC98\B
IN;C:\PROGRA~1\MICROS~3\Common\TOOLS\WINNT;C:\PROGRA~1\MICROS~3\Common\T
OOLS;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Program
Files\Fidelity\Security Configuration;C:\MyApp3;C:\MyApp4;C:\PROGRAM
FILES\THINKPAD\UTILITIES;C:\Program
Files\Hummingbird\Connectivity\7.10\Accessories\;C:\Program Files\ATI
Technologies\ATI Control Panel;C:\Program
Files\Symantec\pcAnywhere\;c:\_myhome\mybin;c:\bin;c:\usr\local\wbin;c:\
perl\bin;c:\emacs\bin;c:\_otherbin;c:\ant\bin;C:\PROGRA~1\IBM\SQLLIB\BIN
;C:\PROGRA~1\IBM\SQLLIB\FUNCTION;C:\PROGRA~1\IBM\SQLLIB\SAMPLES\REPL;C:\
PROGRA~1\NcFTP;c:\j2sdk1.4.1_02\bin;;C:\PROGRA~1\Brio\BRIOQU~1\PROGRAM
    PERL_BADLANG (unset)
    SHELL (unset)

@p5pRT
Copy link
Author

p5pRT commented Jul 12, 2005

From @schwern

[Steve.Tolkin@​fmr.com - Thu Apr 08 15​:07​:50 2004]​:
In the cpan shell help says that the command
i
provides information about any of authors, bundles, distributions,
modules
But it does not find authors;

It does find authors, but unlike "a", "i" does not automatically upcase
your search string.

cpan> i MSCHWERN
Strange distribution name [MSCHWERN]
Author id = MSCHWERN
  EMAIL mschwern@​cpan.org
  FULLNAME Michael G Schwern

cpan> i mschwern
Strange distribution name [mschwern]
No objects found of any type for argument mschwern

The attached patch makes "i" upcase its argument when its searching for
authors.

PS That "Strange distribution name" warning is part of a sanity check
when searching for distributions. The check is not aware that its being
run via "i" and thus is normal to be given strange names.

But that's for another bug.

@p5pRT
Copy link
Author

p5pRT commented Jul 12, 2005

From @schwern

CPAN.pm.patch
--- lib/CPAN.pm	2005/07/12 06:32:29	1.5
+++ lib/CPAN.pm	2005/07/12 07:09:18
@@ -1484,12 +1484,14 @@
     my($self) = shift;
     my(@args) = @_;
     my(@type,$type,@m);
-    @type = qw/Author Bundle Distribution Module/;
     @args = '/./' unless @args;
     my(@result);
-    for $type (@type) {
+    for $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 ?

@p5pRT
Copy link
Author

p5pRT commented Jul 12, 2005

The RT System itself - Status changed from 'new' to 'open'

@p5pRT
Copy link
Author

p5pRT commented Jul 12, 2005

From @schwern

Forgot to CC p5p with my patch. Pumpkings and pumpkinglets, there's a
patch for this bug. Please have a look at it in RT.

@p5pRT
Copy link
Author

p5pRT commented Jul 12, 2005

From Steve.Tolkin@fmr.com

Thank you for providing the patch.
Is there any easy way to learn when it has been added to a distribution?

Steve
--
Steve Tolkin Steve . Tolkin at FMR dot COM 617-563-0516
Fidelity Investments 82 Devonshire St. V4D Boston MA 02109
There is nothing so practical as a good theory. Comments are by me,
not Fidelity Investments, its subsidiaries or affiliates.

-----Original Message-----
From​: Michael G Schwern via RT [mailto​:perlbug-followup@​perl.org]
Sent​: Tuesday, July 12, 2005 3​:16 AM
To​: Tolkin, Steve
Subject​: [perl #28385] minor bug in cpan -- the i command does not find
author

[Steve.Tolkin@​fmr.com - Thu Apr 08 15​:07​:50 2004]​:
In the cpan shell help says that the command
i
provides information about any of authors, bundles, distributions,
modules
But it does not find authors;

It does find authors, but unlike "a", "i" does not automatically upcase
your search string.

cpan> i MSCHWERN
Strange distribution name [MSCHWERN]
Author id = MSCHWERN
  EMAIL mschwern@​cpan.org
  FULLNAME Michael G Schwern

cpan> i mschwern
Strange distribution name [mschwern]
No objects found of any type for argument mschwern

The attached patch makes "i" upcase its argument when its searching for
authors.

PS That "Strange distribution name" warning is part of a sanity check
when searching for distributions. The check is not aware that its being
run via "i" and thus is normal to be given strange names.

But that's for another bug.

@p5pRT
Copy link
Author

p5pRT commented Jul 12, 2005

From @schwern

On Tue, Jul 12, 2005 at 07​:14​:06AM -0400, Tolkin, Steve wrote​:

Thank you for providing the patch.
Is there any easy way to learn when it has been added to a distribution?

Somebody will come along and say "thanks, applied" which means its in the
development version and will be in the next 5.9.x release. As for stable
you'll just have to watch the Changes log of the next 5.8.x release.

And hopefully this will make it into the CPAN version of CPAN.pm.

--
Michael G Schwern schwern@​pobox.com http​://www.pobox.com/~schwern
Ahh email, my old friend. Do you know that revenge is a dish that is best
served cold? And it is very cold on the Internet!

@p5pRT
Copy link
Author

p5pRT commented Jul 13, 2005

From @steve-m-hay

Michael G Schwern via RT wrote​:

Forgot to CC p5p with my patch. Pumpkings and pumpkinglets, there's a
patch for this bug. Please have a look at it in RT.

Thanks. Applied as change 25133.


Radan Computational Ltd.

The information contained in this message and any files transmitted with it are confidential and intended for the addressee(s) only. If you have received this message in error or there are any problems, please notify the sender immediately. The unauthorized use, disclosure, copying or alteration of this message is strictly forbidden. Note that any views or opinions presented in this email are solely those of the author and do not necessarily represent those of Radan Computational Ltd. The recipient(s) of this message should check it and any attached files for viruses​: Radan Computational will accept no liability for any damage caused by any virus transmitted by this email.

@p5pRT
Copy link
Author

p5pRT commented Jul 13, 2005

From @steve-m-hay

Now fixed in bleadperl so should be in 5.8.8, otherwise 5.10.

(And I'll email CPAN.pm's maintainer to let him know of this fix (and
other recent fixes), so the next CPAN.pm release will hopefully also
have it.)

@p5pRT
Copy link
Author

p5pRT commented Jul 13, 2005

@steve-m-hay - Status changed from 'open' to 'resolved'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant