[Southampton-pm] Devel::REPL

Vytautas D vytdau at gmail.com
Thu Sep 4 15:23:23 PDT 2014


Hi Duncan,

Thanks for taking your time and writing this. I knew that it makes this
temporary file, but didn't know whether you can access it.

Anyway, here you go, now it's possible, just replace my attached Editor.pm
wherever your Devel::REPL::Plugin::Editor is ( perl -e 'use
Devel::REPL::Plugin::Editor; use Data::Dumper; print Dumper(\%INC);' | grep
Editor ).

for old behaviour, use it the same way ( #edit ).
For reusable #edit - just pass an argument ( #edit /tmp/foo.pl ).

Hope it helps :)

- Vytas



On Thu, Sep 4, 2014 at 10:24 AM, GARLAND DUNCAN <duncan.garland at ntlworld.com
> wrote:

> 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.
>
>
> _______________________________________________
> Southampton-pm mailing list
> Southampton-pm at pm.org
> http://mail.pm.org/mailman/listinfo/southampton-pm
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.pm.org/pipermail/southampton-pm/attachments/20140904/53d92f06/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Editor.pm
Type: application/x-perl
Size: 2750 bytes
Desc: not available
URL: <http://mail.pm.org/pipermail/southampton-pm/attachments/20140904/53d92f06/attachment.bin>


More information about the Southampton-pm mailing list