Try using "my" in a REPL and you won't fair any better.
Yes, yes, I know, with some arcane commands and such I can get the debugger to do those thing, but why should I have too?
Yes, yes, I know, if one bothers to even take a few minutes to look up just the barest of information about these "arcane" commands, one would likely quite quickly find "x" which is all that is needed to make "perl -dex" a REPL. But why bother when one can instead spend that time composing a node to demonstrate how little one knows about the debugger and how uninterested one is in learning more. :)
% perl -dex DB<1> x @foo= 1..10 0 1 1 2 2 3 3 4 4 5 5 6 6 7 7 8 8 9 9 10 DB<2> x "@foo" 0 '1 2 3 4 5 6 7 8 9 10' DB<3>
But seriously, a debugger is so not a REPL.
No, it is much more useful. It is just trivial to use it as a REPL and is always handy on any standard Perl installation.
A REPL is useful for experimenting. A debugger is also useful for experimenting but is even more useful for experimenting in the context of the middle of some script or module code.
When I wrote each Win32API:: module I would use the Perl debugger to experiment with the API that I had just wrapped in order to document it properly (the official API documentation was usually vague about several interesting points, for example).
- tye
In reply to Re^3: RFC: IPerl - Interactive Perl ( read-eval-print loop ) (-de_)
by tye
in thread RFC: IPerl - Interactive Perl ( read-eval-print loop )
by mseabrook
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |