I admit that I rarely use the debugger as it's intended to be used, but I find that I often use the debugger as a perl REPL, (Read-Eval-Print Loop) to do some quick manual testing of a new sub. Just run perl -d somefile.pl, and then type p mynewfunc('testvalue') to see the output.
I guess I should add by way of context that most of the perl code we write around here isn't object oriented at all, it's just long driver scripts being used to kick off the "real" processing code. As such, it's almost all standalone scripts, so the debugger is really the easiest (and fastest) way to load up a file and invoke pieces of it when the file was not necessarily designed to be invoked piecemeal.
--
@/=map{[/./g]}qw/.h_nJ Xapou cets krht ele_ r_ra/;
map{y/X_/\n /;print}map{pop@$_}@/for@/
-
Are you posting in the right place? Check out Where do I post X? to know for sure.
-
Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
<code> <a> <b> <big>
<blockquote> <br /> <dd>
<dl> <dt> <em> <font>
<h1> <h2> <h3> <h4>
<h5> <h6> <hr /> <i>
<li> <nbsp> <ol> <p>
<small> <strike> <strong>
<sub> <sup> <table>
<td> <th> <tr> <tt>
<u> <ul>
-
Snippets of code should be wrapped in
<code> tags not
<pre> tags. In fact, <pre>
tags should generally be avoided. If they must
be used, extreme care should be
taken to ensure that their contents do not
have long lines (<70 chars), in order to prevent
horizontal scrolling (and possible janitor
intervention).
-
Want more info? How to link
or How to display code and escape characters
are good places to start.
|