[Southampton-pm] Devel::REPL

GARLAND DUNCAN duncan.garland at ntlworld.com
Thu Sep 4 02:24:53 PDT 2014


Following on from our discussion yesterday, here a bit of typical
too-early-in-the-morning typing:

motrak at upde-duncang:~$ repl

$ for (my $x=0;$x<10;$x==){

> print "$x\n";

> }
Compile error: syntax error at (eval 845) line 5, near "==)"
BEGIN not safe after errors--compilation aborted at (eval 845) line 7.

$ #edit

#edit opens an empty file with a temporay name, in this case
./tmp/9FjWRDLe0X.pl

If I re=type the code in the editor and exit, in runs:

0
1
2
3
4
5
6
7
8
9

The code block has been put into the history and can be re-run as a simple
command:

 $ for ( my $x = 0; $x < 10; $x++ ) {^J  print "$x\n";^J}
0
1
2
3
4
5
6
7
8
9

However, it can not be put back into the editor.

#edit open an empty document and does not accept a filename as an argument.

It re-inforces the view that Devel::REPL is quite good. No more, no less. A
definate 7 out of 10.

All the best.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.pm.org/pipermail/southampton-pm/attachments/20140904/8dcb83d0/attachment.html>


More information about the Southampton-pm mailing list