Skip Menu |

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the Module-CoreList CPAN distribution.

Report information
The Basics
Id: 21924
Status: open
Priority: 0/
Queue: Module-CoreList

People
Owner: RGARCIA [...] cpan.org
Requestors: burak [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Wishlist
Broken in: (no value)
Fixed in: (no value)



Subject: A more friendly interface
These two patches (for the module & cli util) adds support for case- insensitive search and using "-" instead of "::". So that, we can type: corelist file-spec-functions instead of corelist File::Spec::Functions
Subject: Module-Corelist.patch
sub first_release { my ($discard, $module, $version) = @_; $module =~ s{\-}{::}g; # so that one can write CGI-Cookie my $tmp; my @perls; foreach my $perl (keys %version) { foreach my $probe (keys %{ $version{$perl} }) { if(lc $probe eq lc $module) { $tmp = $probe; next if $version && not $version{$_}{ $probe } >= $version; push @perls, $perl; } } } $_[1] = $tmp if $tmp; # fix the module name return unless @perls; return (sort { $released{$a} cmp $released{$b} } @perls)[0]; }
Subject: corelist.patch
sub module_version { my($mod,$ver) = @_; if ( $Opts{v} ) { return printf " %-24s %-10s\n", $mod, $Module::CoreList::version{$Opts{v}}{$mod} || 'undef'; } $ver = "" unless defined $ver; my $ret = Module::CoreList->first_release($mod, $ver); my $msg = "$mod $ver"; if( defined $ret ) { $msg .= " was "; $msg .= "first " unless $ver; $msg .= "released with perl $ret" } else { $msg .= " was not in CORE (or so I think)"; } print "\n",$msg,"\n"; if(defined $ret and exists $Opts{a} and $Opts{a}){ for my $v( sort keys %Module::CoreList::version ){ printf " %-10s %-10s\n", $v, $Module::CoreList::version{$v}{$mod} || 'undef' if exists $Module::CoreList::version{$v}{$mod}; } print "\n"; } }
From: MSCHWERN [...] cpan.org
On Thu Oct 05 17:06:11 2006, BURAK wrote: Show quoted text
> These two patches (for the module & cli util) adds support for case- > insensitive search and using "-" instead of "::". So that, we can type: > > corelist file-spec-functions > > instead of > > corelist File::Spec::Functions
The case-sensitive searching, ok. But the dashes I'm not so hot on. Traditionally dashes mean "distribution" while colons mean "module". File::Spec::Functions, a module, is part of the File-Spec distribution. Conflating the two now means we can't add a distribution search later.
On Thu Oct 05 17:06:11 2006, BURAK wrote: Show quoted text
> These two patches (for the module & cli util) adds support for case- > insensitive search and using "-" instead of "::". So that, we can type: > > corelist file-spec-functions > > instead of > > corelist File::Spec::Functions
I'd rather see a "-i" option for case insensitive search than have it be a default. I don't think dashes is a good idea as the connection between module names and distribution names is only a convention and could be misleading if people thought CoreList was about distributions instead of modules. David
07 Eki. 2009 Çar., 06:30:50 tarihinde, DAGOLDEN yazdı: Show quoted text
> On Thu Oct 05 17:06:11 2006, BURAK wrote:
> > These two patches (for the module & cli util) adds support for case- > > insensitive search and using "-" instead of "::". So that, we can
type: Show quoted text
> > > > corelist file-spec-functions > > > > instead of > > > > corelist File::Spec::Functions
> > I'd rather see a "-i" option for case insensitive search than have it
be Show quoted text
> a default. > > I don't think dashes is a good idea as the connection between module > names and distribution names is only a convention and could be > misleading if people thought CoreList was about distributions instead
of Show quoted text
> modules.
Ok. Good point Show quoted text
> David