in reply to Patching a Package (Scalar::Util)

That's about the best you're gonna get. I'd add it to the @EXPORT, @EXPORT_OK, and %EXPORT_TAGS, too. And, comment the f@#$ out of it.

My criteria for good software:
  1. Does it work?
  2. Can someone else come in, make a change, and be reasonably certain no bugs were introduced?

Replies are listed 'Best First'.
Re^2: Patching a Package (Scalar::Util)
by tall_man (Parson) on Apr 19, 2006 at 19:32 UTC
    Scalar::Util only exports refaddr by request, but your suggestion is good. I have added the following (within the if test):
    # Allow users of Scalar::Util to import the new symbol on request. push @Scalar::Util::EXPORT_OK,'refaddr';