Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?

Comment on

( #3333=superdoc: print w/replies, xml ) Need Help??

Another approach is to subclass the module, or intercept calls. For a work project, I wasn't happy with the Pod::Html output, so I hacked in some changes that vary depending on the version:

sub per_version { if ($Pod::Html::VERSION eq '1.01') { # perl5.005_03 *Pod::Html::process_text2 = \&Pod::Html::process_text1; undef *Pod::Html::process_text1; *Pod::Html::process_text1 = \&my_process; @options = qw/ --recurse --header /; } elsif ($Pod::Html::VERSION =~ /^1\.0[34]$/) { # perl-5.6.0, 5.6.1, 5.8.0 *Pod::Html::process_L2 = \&Pod::Html::process_L; undef *Pod::Html::process_L; *Pod::Html::process_L = \&my_oldprocess; @options = qw/ --recurse /; } else { die "Don't know how to hack Pod::Html v$Pod::Html::VERSION\n"; } sub my_process ($$;$$) { my($lev, $rstr, $func, $closing) = @_; my $closer = '>' x (($closing||0) + 1); if ($func && $func eq 'L') { # suppress 'the ... manpage' markup $$rstr =~ s{^ ^ ( \w+ (?: ::\w+ )* ) (?: -(?!$closer)> (\w+) )? (.*?) (\s* $closer) }{ defined($2) ? qq{$1-E<gt>$2$3|$1/"item_$2$4} : "$1$3|$1$4" }xe; } Pod::Html::process_text2($lev, $rstr, $func, $closing); } sub my_oldprocess { my($str) = @_; $str =~ s,^(\w+(::\w+)*)$,$1|$1/,; Pod::Html::process_L2($str); }

This approach isn't always the right one, but it's a useful tool to have.


In reply to Re: Re: Re: Re: Safe::Logs - Feedback appreciated by hv
in thread Safe::Logs - Feedback appreciated by fokat

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, 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, 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.
  • Log In?

    What's my password?
    Create A New User
    and all is quiet...

    How do I use this? | Other CB clients
    Other Users?
    Others making s'mores by the fire in the courtyard of the Monastery: (1)
    As of 2018-07-21 08:01 GMT
    Find Nodes?
      Voting Booth?
      It has been suggested to rename Perl 6 in order to boost its marketing potential. Which name would you prefer?

      Results (445 votes). Check out past polls.