Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Comment on

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

Whoa, had no idea that this would spark such a lively discussion. Excellent.

I had intended to use say as an example - but it turned out to be the problem, huh? Ha! Go figure.

LanX - did not know about use if, so that's a neat plus. Hopefully you haven't quite yet learned your lesson about reading and replying to my ridiculously long posts ♥

Also comforting is that most of my solutions will work with normal non-CORE:: namespace imports.

As for all the advice in regards to how I ran into this question - debug output style/best practices and such - in the future I'll be going with aitap's great suggestion: Log::Log4perl. Very flexible and feature-rich, thanks for the tip!

BrowserUk, after diving the rabbit hole of replies, my question is/was/will be where do these definitions reside and how do I get at them?
Not so much how to get around a silly design decision I made =D
As usual, thanks for pointing me towards some great reading material. I'll definitely be playing around with Devel::Pragma to investigate any future questions in this vein.

So here we go:

  • say lives in CORE::, where it can (usually) be accessed
  • See ex::override for overriding CORE:: functions.
  • use feature 'say' enables say as an operator - which means that once created it cannot be redefined.
  • use if works, but has some constraints concerning order of your sub and verbosity definitions.
  • Using say for debugging is silly - but educational!

Thanks to all of you for the great replies and entertaining repartee ;)

Strange things are afoot at the Circle-K.


In reply to Re: Redefining Imported Subs: of scope and no by temporal
in thread Redefining Imported Subs: of scope and no by temporal

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!
  • 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
  • Outside of code tags, you may need to use entities for some characters:
            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?
    Username:
    Password:

    What's my password?
    Create A New User
    Chatterbox?
    and the web crawler heard nothing...

    How do I use this? | Other CB clients
    Other Users?
    Others wandering the Monastery: (4)
    As of 2014-09-23 03:54 GMT
    Sections?
    Information?
    Find Nodes?
    Leftovers?
      Voting Booth?

      How do you remember the number of days in each month?











      Results (210 votes), past polls