Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re^3: lspm - list names and descriptions of Perl modules in a directory

by jwkrahn (Abbot)
on Jul 16, 2006 at 12:19 UTC ( [id://561556]=note: print w/replies, xml ) Need Help??


in reply to Re^2: lspm - list names and descriptions of Perl modules in a directory
in thread lspm — list names and descriptions of Perl modules in a directory

I also noticed that if a module has a corresponding POD file (for example: POSIX.pm and POSIX.pod) the description is in the POD file and won't get picked up at all. I applied this patch which seems to fix this (it also prevents POSIX.pm from appearing twice in the resulting list):
202,204c202,206 < return unless /\.p(?:m|od)\z/; < s/\.pod\z/.pm/; # if it's POD, parse t +he corresponding code < return if not -f; --- > return unless -f and /\A(.+)\.pm\z/; > my $module = $1; > my $version = get_module_version( "$mo +dule.pm" ) || -e "$module.pod" && get_module_version( + "$module.pod" ); > my $desc = get_module_description( +"$module.pm", $opt_limit ) || -e "$module.pod" && get_module_descript +ion( "$module.pod", $opt_limit ); > 207,209c209,211 < get_module_version( $_ ), < get_module_description( $_, $o +pt_limit ), < $opt_path ? $File::Find::name +: undef, --- > $version, > $desc, > $opt_path ? $File::Find::name +: undef
HTH
  • Comment on Re^3: lspm - list names and descriptions of Perl modules in a directory
  • Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://561556]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others learning in the Monastery: (2)
As of 2024-12-07 02:37 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Which IDE have you been most impressed by?













    Results (49 votes). Check out past polls.