<div dir="ltr">Upstream accepted my patch, and yet made it even better by introducing #redit command to fix whatever typo you left in previous #edit session! Author left my way as well. So you can still pass an argument to open custom file, but that's more typing (:<div><br></div><div><a href="https://metacpan.org/pod/Devel::REPL::Plugin::Editor">https://metacpan.org/pod/Devel::REPL::Plugin::Editor</a><br></div><div><br></div><div>-Vytas</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Sep 4, 2014 at 11:23 PM, Vytautas D <span dir="ltr"><<a href="mailto:vytdau@gmail.com" target="_blank">vytdau@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div><div><div><div>Hi Duncan,<br><br></div>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.<br><br>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 ).<br>
<br></div>for old behaviour, use it the same way ( #edit ).<br>For reusable #edit - just pass an argument ( #edit /tmp/<a href="http://foo.pl" target="_blank">foo.pl</a> ).<br><br></div></div>Hope it helps :)<br><br></div>- Vytas<br><div>
<div><div><br></div></div></div></div><div class="gmail_extra"><br><br><div class="gmail_quote"><div><div class="h5">On Thu, Sep 4, 2014 at 10:24 AM, GARLAND DUNCAN <span dir="ltr"><<a href="mailto:duncan.garland@ntlworld.com" target="_blank">duncan.garland@ntlworld.com</a>></span> wrote:<br>
</div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="h5"><div dir="ltr"><div><div>Following on from our discussion yesterday, here a bit of typical too-early-in-the-morning typing:<br>
<br>motrak@upde-duncang:~$ repl<br>                                                                                                                                                                                                     $ for (my $x=0;$x<10;$x==){<br>

                                                                                                                                                                                                     > print "$x\n";<br>

                                                                                                                                                                                                     > }<br>Compile error: syntax error at (eval 845) line 5, near "==)"<br>

BEGIN not safe after errors--compilation aborted at (eval 845) line 7.<br>                                                                                                                                                                                                     $ #edit<br>

<br></div>#edit opens an empty file with a temporay name, in this case ./tmp/9FjWRDLe0X.pl<br><br></div>If I re=type the code in the editor and exit, in runs:<br><br><div><div>0<br>1<br>2<br>3<br>4<br>5<br>6<br>7<br>8<br>

9<br><br></div><div>The code block has been put into the history and can be re-run as a simple command:<br><br> $ for ( my $x = 0; $x < 10; $x++ ) {^J  print "$x\n";^J}<br>0<br>1<br>2<br>3<br>4<br>5<br>6<br>
7<br>
8<br>9<br><br></div><div>However, it can not be put back into the editor.<br><br></div><div>#edit open an empty document and does not accept a filename as an argument.<br><br></div><div>It re-inforces the view that Devel::REPL is quite good. No more, no less. A definate 7 out of 10.<br>

<br></div><div>All the best.<br>                                                     <br></div></div></div>
<br></div></div>_______________________________________________<br>
Southampton-pm mailing list<br>
<a href="mailto:Southampton-pm@pm.org" target="_blank">Southampton-pm@pm.org</a><br>
<a href="http://mail.pm.org/mailman/listinfo/southampton-pm" target="_blank">http://mail.pm.org/mailman/listinfo/southampton-pm</a><br></blockquote></div><br></div>
</blockquote></div><br></div>