in reply to Re: Parse POD of a method from perl module
in thread Parse POD of a method from perl module

Hi Rolf, Thanks for your reply. I need to retrieve the POD for a specific method and want to provide that to RIDE (IDE for Robot framework I am using). I need to show the POD as a description/information about the method in RIDE. I saw couple of Perl modules like Pod::Simple, Pod::Parser but they work on the whole module. And my requirement is for the method.
  • Comment on Re^2: Parse POD of a method from perl module

Replies are listed 'Best First'.
Re^3: Parse POD of a method from perl module
by LanX (Saint) on May 13, 2014 at 22:45 UTC
    i.o.W. your input are
    • name of the head1
    • path of a module
    and you just want the POD-content, no source code?

    As mentioned ready-to-use solutions expect you to follow certain conventions!

    But a simple perl-script to parse everything between =head1 NAME and =cut is straight forwardly implemented with a flip-flop range and easily adapted if your format has variations (different conventions¹)

    Cheers Rolf

    ( addicted to the Perl Programming Language)

    ¹) e.g are you aware that your example is "invalid" POD b/c of missing empty lines?

      Hi Rolf, I don't need the source code. Yes looks like it's better to write some code to parse my modules and retrieve everything between =head1 and =cut as per the method name. Thanks a ton for the help.