Pod::Usage seems to rely on underlying "formatters", including perldoc.

What's your point here? If you think Pod::Usage is running an external command, you're mistaken. Oversimplifying a bit, the family of Pod::* modules in the core do use each other, so that Pod::Usage and Pod::Perldoc can use the same parser and formatters (see Pod::Simple), but when just converting some POD to text there is no need to call external commands.

Explain to me your objection. ... Does your object rely simply on ...

I already named almost all of my objections to your suggestion, and so I feel I might be being trolled, but for the sake of explanation:

system(qq{perldoc $0});

Add to that the facts that calling an external program is fairly wasteful and that the solution was already found using modules that have been in the Perl core for over 20 years, that rounds out the reasons why I objected.

Remember that this is all in the context of providing help to others, so if you've been using this in your own code then you're free to do so, but it's not something I would recommend to anyone else.

perldoc is just a Perl script, and here you said:

I swear, "shelling-out" to actual Perl scripts from a Perl script is one of the most offensive things I can see in Perl code. All the wasted cycles, dead electrons, PIDs, (oh the horror!) and server fan RPMs that are consumed for no reason

In reply to Re^4: Printing POD info to terminal window without exiting by haukex
in thread Printing POD info to terminal window without exiting by cr8josh

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.