I need some help with Text::WikiFormat. This otherwise excellent module is giving me the blues with discovering CamelCase links and with some implementing some additional formatting --

Not only my CamelCase words are becoming links (as they should), UPPERCASE words are also becoming links (as they should not). How can I prevent that from happening?

I want to implement some additional formatting that this module does not do... for example, I want to highlight any passed searchterm using a simple

s/\b($searchterm)\b/<span class="hilite">$1<\/span>/gi

At this time I am first Text::WikiFormat-ting and then running it through my own post formatting. Is there any way I can add my own method to the module so I don't have to do the pass through the text twice? The docs (and the source) seem to suggest I can, but I have been unable to take this into the "implemented and works" territory.

(besides the above highlight formatting, I have a few other additional things that I am doing similarly that T::W doesn't provide, but would be nice if I can add the functionality to it)

Update: making the following change in the regexp in the source of T::W does the trick for disabling UPPERCASE links, however, I am wondering if there is any way to "override" (is that the correct phrase I am seeking here?) the existing functionality without actually modifying the code?

#$text =~ s|(?<!["/>=])\b([A-Za-z]+(?:[A-Z]\w+)+)| # $tags->{link}->($1, $opts)|egx # if !defined $opts->{implicit_links} or $opts->{implicit_links}; $text =~ s|(?<!["/>=])\b([A-Z][a-z0-9]+([A-Z][a-z0-9]*)+)| $tags->{link}->($1, $opts)|egx if !defined $opts->{implicit_links} or $opts->{implicit_links};
--

when small people start casting long shadows, it is time to go to bed

In reply to formatting with Text::WikiFormat by punkish

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.