in reply to Module Version Number?
Basically it gives you a form that lists all of your modules in a dropdown box, you pick the module, click "Module details", and it will show you module name, version, and files contained within it, including full path to those files. It also links the module name to the appropriate CPAN module search, so you can find the documentation on it, and read up on how to use it.
Short and sweet.
Update: I turned this into a Snippet and added a bunch of new features, which you can find over here: MoDetails v0.2
#!/usr/bin/perl use strict; use CGI qw(:standard); use ExtUtils::Installed; my $script = $ENV{'SCRIPT_NAME'}; my $cpan = "http://search.cpan.org/search"; my $inst = ExtUtils::Installed->new(); my $cgi = CGI->new(); print header(), start_html(); print_form(); print_results($cgi) if $cgi->param('mod'); sub print_form { push my @modules, $inst->modules(); my $modname = $cgi->param('mod'); print start_form(-name =>"modules", -action =>"$script?mod=$modname"), popup_menu(-name =>'mod', -value =>\@modules), submit(-label=>'Module Details'), end_form; } sub print_results { my $module = $cgi->param('mod'); print p(font({-face=>'courier'}, b("Module"), ":", a({-href=>"${cpan}?query=$module&mode=module"}, "cpan://$module"))); print p(font({-face=>'courier'}, b("Version"), ":", $inst->version($module))); push my @filelist, $inst->files($module); print p(font({-face=>'courier'}, b("Files"), ":", br(), join br(), $inst->files($module))); } print end_html();
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Module Version Number?
by cal (Beadle) on Nov 02, 2002 at 18:04 UTC |