MelaOS has asked for the wisdom of the Perl Monks concerning the following question:

hi o wise mens of perlmonks,
i'm currently new to a company where they are using perl cgi, xslt, javascript and axkit to create web apps. as they list all of the functions in the perl modules, .pm files, there seems to be quite a lot of redundancy as there's no documentation for all of these files.
thus my question here, is there any functions, editor or whatever that i can use to list down all the functions within these multiple .pm files, perhaps something like javadoc or ndoc, etc?
any help would be extremely helpful :)
thanks in advance,
~melaos
  • Comment on how to list down all functions in multiple pm files?

Replies are listed 'Best First'.
Re: how to list down all functions in multiple pm files?
by Anonymous Monk on May 01, 2008 at 04:21 UTC
Re: how to list down all functions in multiple pm files?
by rudder (Scribe) on May 01, 2008 at 07:03 UTC

    Here's something pretty cheesy that may or may not be useful:

    cd where/perl/modules/are grep -Hr '^sub' * > ~/all_funcs.txt grep -Hr '^use' * > ~/all_uses.txt
      hi guys,
      thanks for the awesome n fast response.
      unfortunately you're right as rain as there is no tests too. so most of the stuff if we're lucky we stumbled upon some useful code or we check with the senior. and there's only one person there left who long enough to know at least some of the codes..i'll try out the method to see which is more useful. my end in mind is to have a clear listing of all the functions and what they do to prevent further code rot and redundant work.
      ~ thanks
Re: how to list down all functions in multiple pm files?
by andreas1234567 (Vicar) on May 01, 2008 at 06:15 UTC
    as there's no documentation
    Then I assume there are no tests as well?

    eyepopslikeamosquito wrote What is the best way to add tests to existing code? 4 yearts ago, but it still stands. Writing tests is a great way to understand and improve upon existing code.

    --
    No matter how great and destructive your problems may seem now, remember, you've probably only seen the tip of them. [1]