I find a few reasons to not oppose to this (considered evil) path:

  1. Using a module that is not maintained and nobody took over, several patches were proposed but nobody uploaded a fixed version.
    Of course you can apply the patches locally before you install it, but that is no guarantee it is also fixed on other systems.
    It is way more reliable to overrule the faulty sub or make a new one foced into the faulty package thereby making sure it works.
  2. The package owner/maint has explicitely said *not* to add the requested/required functionality (they might even have documented so), so adding the desired method by forcing it into the package is relatively safe. (problematic would only be a new maintainer who disagrees with the refusal and putting it in later anyway)
  3. When working in supporting a module that is evolving, adding methods that are not yet implemented or have been removed, all guarded by version checks is a very fine way to make your module work for the end-users regardless of the changes in the underlying module(s). I do this very regularly. (example)
  4. Overruling CORE::GLOBAL functions in test files to provide stubs.

Enjoy, Have FUN! H.Merijn

In reply to Re^3: Use cases for 'sub Pckg::func { }' ? by Tux
in thread Use cases for 'sub Pckg::func { }' ? by LanX

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.