Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much

Comment on

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

I read the linked blog, and I'm still not clear on why you need to distinguish the two. At least as a first cut, wouldn't it be adequate to just print out all of the effects of the use/require? As in, symbol table entries, variable assignments, etc.? You can figure out what package a particular subroutine was defined in via B::Deparse's coderef2text, so you can still group things by package and then output an alias statement (sub A::f {...}; *B::g = *A::f;) rather than a redefinition (sub A::F {...}; sub B::g { ... }) or a chained assignment: *A::f = *B::g = sub { ... }.

I have to admit that I haven't thought very hard about it, though.

I guess I can see the value in making the output code look as much as possible like the input code, although for things where this would be useful, I'm not sure if that's relevant. (If you're debugging something that autogenerates classes, then there's really no input that's useful to imitate.)

In reply to Re: Was a module use'd or require'd? by sfink
in thread Was a module use'd or require'd? by Ovid

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 musing on the Monastery: (4)
    As of 2018-07-16 03:24 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 (330 votes). Check out past polls.