Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number

Comment on

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

There were a couple of use cases of which this is one.

Another use is where you want to write a front-end to call a debugger, profiler, code coverage tool, or anything else that adds some sort of instrumentation (and thus, modules and options to Perl) before runnining it. In this situation, one may want to do a syntax check first before taking the plunge. So being able to correctly handle:

__END__ $x =
does matter.

But in the situation inside the debugger where one needs to be able to check for valid expressions or statements, wrapping inside a sub{ .. } is useful.

I hadn't thought about using this inside the debugger eval command to automatically figure out if a continuation is needed. So I will probably add that. Thanks!

It can also be used as a more fool-proof way to determine a source-code line that is shown is complete over the method currently in use by which is confused by:

eval " # not a comment ";
which thinks that the line inside the eval is a comment.

If "the more or less" code you use is interesting and useful, please expand upon that. Also, I don't understand what you mean by thinking of something "more elaborate". All I was looking for was something to get the job done. If it is interesting, elaborate on what you mean by "more elaborate".

It's only by having people work out various approaches that we've been able to weight the pros and cons of each and thus understand what the right thing is for particular situations. Thanks.

In reply to Re^3: How to do perl -c inside perl? by rockyb
in thread How to do perl -c inside perl? by rockyb

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 chilling in the Monastery: (5)
    As of 2018-06-23 07:17 GMT
    Find Nodes?
      Voting Booth?
      Should cpanminus be part of the standard Perl release?

      Results (125 votes). Check out past polls.