[Southampton-pm] Devel::REPL

GARLAND DUNCAN duncan.garland at ntlworld.com
Tue Sep 9 00:30:36 PDT 2014


Well done.

On 9 September 2014 08:05, Vytautas D <vytdau at gmail.com> wrote:

> 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 (:
>
> https://metacpan.org/pod/Devel::REPL::Plugin::Editor
>
> -Vytas
>
> On Thu, Sep 4, 2014 at 11:23 PM, Vytautas D <vytdau at gmail.com> wrote:
>
>> 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
>>>
>>
>>
>
> _______________________________________________
> 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/20140909/4296fe76/attachment.html>


More information about the Southampton-pm mailing list