Editor with embedded perl interpreter?


P

Paolo

I don't remember the name of this application for Windows but i've
make use of that once.

Do you know an editor which allows the execution of Perl-script
on selected text?

The Perl-script are in a submenu of the Tools menu.
 
Ad

Advertisements

J

Jürgen Exner

Paolo said:
I don't remember the name of this application for Windows but i've
make use of that once.

Do you know an editor which allows the execution of Perl-script
on selected text?

A namesake of yours just posted exactly the same question in the
deprecated NG CLP. Maybe you can ask him to share the replies with you.
I won't type the same answer twice.

jue
 
P

Paolo

A namesake of yours just posted exactly the same question in the
deprecated NG CLP. Maybe you can ask him to share the replies with you.
I won't type the same answer twice.

Ok, i've posted this question in comp.lang.perl but this NG is *broken*
(?)...
hence i've posted also in CLPM. Your answer in CLP? ...but CLP is not
accessibile
on my news-server!
 
R

Randal L. Schwartz

Paolo> Ok, i've posted this question in comp.lang.perl but this NG is *broken* (?)...

Not broken. Officially dead since 1995. If your ISP allows you to *post* to
CLP, then it's your ISP that is *broken*. :)

print "Just another Perl hacker,"; # the original
 
P

Paolo

Not broken. Officially dead since 1995. If your ISP allows you to
*post* to
CLP, then it's your ISP that is *broken*. :)

.... :) yes, my ISP allows to post to CLP!
 
Ad

Advertisements

C

cartercc

Do you know an editor which allows the execution of Perl-script
on selected text?

I see two things here, both of which I would classify as semi-
important.

(1) For my money, vi is simply without any question far better than
any other editor. The benefits vi gives you are far greater than
anything you might get with a Lisp-like top level that interactively
executes your scripts.

(2) That said, I find the absence of a Perl top level somewhat
curious. Python has one, and interactive building of scripts can be
helpful. Why doesn't Perl have a top level?

CC
 
C

cartercc

I have no idea what you're asking about, but Devel::REPL might be the
answer.

(and 'perl -de1' another simpler answer)

//Makholm

An environment where you can evaluate expressions. In EMACS for
example, you can interactively evaluate Lisp expressions and functions
until they do what you want, and then add them to a source file. You
build your programs one expression or function at a time in a bottom
up fashion. This also helps with errors, since no expression gets
added to the source until it performs as expected -- therefore, you
never get any compile or run error when you compile the source.

CC
 
P

Peter Makholm

cartercc said:
An environment where you can evaluate expressions. In EMACS for

Then I lied as both Devel::REPL and the standard perl debugger with a
trivial script (perl -de1) will provide you with the read, print,
eval loop you want.

//Makholm
 
C

cartercc

Then I lied as both Devel::REPL and the standard perl debugger with a
trivial script (perl -de1) will provide you with the read, print,
eval loop you want.

Thanks for your help.

I have two computers, both PCs, one running Windows XP and the other
Red Hat 7.3, both with Perl 5.8. On my Windows machine, PPM can't find
Devel-REPL and CPAN doesn't work (this is running ActiveState). On my
Linux machine, CPAN reported a successful install of Devel-REPL but
can't find it. I don't have time to look at it today, but I'll follow
up on it.

As to the Debugger, I use it occasionally, but it's pretty creaky
compared to the debugger in, say, Visual Studio. In EMACS, you can
compile and load in one key chord and run your compiled code IN THE
SAME ENVIRONMENT. IOW, the editor, run time, and interpreter all work
together. You can modify the same function a dozen times and run it in
a couple of minutes, and you can also look at the stack trace if you
want to. This is NOT how the Perl debugger works.

CC
 
B

Bart Lateur

cartercc said:
On my Windows machine, PPM can't find
Devel-REPL and CPAN doesn't work (this is running ActiveState).

What do you mean, "CPAN doesn't work"? This is a Pure Perl module, so
installing it with CPAN *should* work. All you have to do is download a
suitable make tool, for example Microsoft's (old but free) nmake. See

http://johnbokma.com/perl/make-for-windows.html

for details.

And second, even though ActiveState's repository doesn't list it,
according to Kobes' Search, there *are* PPM repositories that carry
Devel::REPL, including 1 for perl 5.8. See the bottom of the page at

http://cpan.uwinnipeg.ca/dist/Devel-REPL

including instructions on how to use that repository, if you click on
its link.
 
Ad

Advertisements

C

cartercc

What do you mean, "CPAN doesn't work"?

What I mean is that, when I give the command at the command prompt,
the machine just sits and I have to ctl-C to recover. This is the
command:
perl -MCPAN -e shell
I agree that my phrasing was less than artful.
And second, even though ActiveState's repository doesn't list it,
according to Kobes' Search, there *are* PPM repositories that carry
Devel::REPL, including 1 for perl 5.8.

Okay, I'll look at this. Thanks for your help.

CC
 
P

Paolo

I see two things here, both of which I would classify as semi-
important.

....as for me "editor with perl-interpreter embedded" means the
chance for execution of "perl-script" on selected part of a text.

example:

[...] (...)
....this is only an (100)
example... (101)
[...] (...)

if i select the line 100, 101 and run the script suppress-dots (included
in library of script executable...), i obtain:

[...] (...)
this is only an (100)
example (101)
[...] (...)

This result is easily carried out with external perl-script but i've
to manage text file I/O.
 
R

RedGrittyBrick

Paolo said:
I see two things here, both of which I would classify as semi-
important.

...as for me "editor with perl-interpreter embedded" means the
chance for execution of "perl-script" on selected part of a text.

example:

[...] (...)
...this is only an (100)
example... (101)
[...] (...)

if i select the line 100, 101 and run the script suppress-dots (included
in library of script executable...), i obtain:

[...] (...)
this is only an (100)
example (101)
[...] (...)

This result is easily carried out with external perl-script but i've
to manage text file I/O.

Did you want something like the following?

In vim
:100,101!suppress_dots.pl
 
B

Bart Lateur

cartercc said:
What I mean is that, when I give the command at the command prompt,
the machine just sits and I have to ctl-C to recover. This is the
command:
perl -MCPAN -e shell

That starts the shell, i.e. it's waiting for yoru commands.

Try

install Devel::REPL

at the prompt. Type "exit" when finished.

It should work, if you have nmake. Really.
 
Ad

Advertisements

D

David Combs

^^^^^^^^^^^^^^^^


TextPad, see:
http://johnbokma.com/textpad/textpad-subversion.html

You can run a command on a selection.

And Emacs, of course.

Interesting. HOW?

Easy enough to make a *shell*-buf and run perl from there,
of course, but somehow binding Perl into emacs itself, so
it can act as part of the emacs interpreter? So it could
work on eg "selected text"? (In what way would that be
different from a "region"?)



Thanks!!!!

David
 
Ad

Advertisements


Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top