Editor with embedded perl interpreter?

Discussion in 'Perl Misc' started by Paolo, Nov 12, 2008.

  1. Paolo

    Paolo Guest

    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.
    ---
    THANX4URTIME!
     
    Paolo, Nov 12, 2008
    #1
    1. Advertising

  2. Paolo <> wrote:
    >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
     
    Jürgen Exner, Nov 12, 2008
    #2
    1. Advertising

  3. Paolo

    Paolo Guest

    > 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!
    --
    THANX
     
    Paolo, Nov 12, 2008
    #3
  4. Paolo

    John Bokma Guest

    Paolo <> wrote:

    > 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.


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

    You can run a command on a selection.

    And Emacs, of course.

    --
    John http://johnbokma.com/ - Hacking & Hiking in Mexico

    Perl help in exchange for a gift:
    http://johnbokma.com/perl/help-in-exchange-for-a-gift.html
     
    John Bokma, Nov 13, 2008
    #4
  5. >>>>> "Paolo" == Paolo <> writes:

    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

    --
    Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
    <> <URL:http://www.stonehenge.com/merlyn/>
    Smalltalk/Perl/Unix consulting, Technical writing, Comedy, etc. etc.
    See http://methodsandmessages.vox.com/ for Smalltalk and Seaside discussion
     
    Randal L. Schwartz, Nov 13, 2008
    #5
  6. Paolo

    Paolo Guest


    > 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!
     
    Paolo, Nov 13, 2008
    #6
  7. Paolo

    cartercc Guest

    On Nov 12, 3:48 pm, Paolo <> wrote:
    > 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
     
    cartercc, Nov 13, 2008
    #7
  8. Paolo

    cartercc Guest

    On Nov 13, 12:14 pm, Peter Makholm <> wrote:
    > cartercc <> writes:
    > > (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?

    >
    > 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
     
    cartercc, Nov 13, 2008
    #8
  9. cartercc <> writes:

    > 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
     
    Peter Makholm, Nov 13, 2008
    #9
  10. Paolo

    cartercc Guest

    On Nov 13, 2:31 pm, Peter Makholm <> wrote:
    > cartercc <> writes:
    > 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
     
    cartercc, Nov 13, 2008
    #10
  11. Paolo

    Bart Lateur Guest

    cartercc wrote:

    >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.

    --
    Bart.
     
    Bart Lateur, Nov 14, 2008
    #11
  12. Paolo

    cartercc Guest

    On Nov 13, 9:37 pm, Bart Lateur <> wrote:
    > 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
     
    cartercc, Nov 14, 2008
    #12
  13. Paolo

    Paolo Guest

    > 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.
     
    Paolo, Nov 14, 2008
    #13
  14. Paolo wrote:
    >> 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

    --
    RGB
     
    RedGrittyBrick, Nov 14, 2008
    #14
  15. Paolo

    Bart Lateur Guest

    cartercc wrote:

    >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.

    --
    Bart.
     
    Bart Lateur, Nov 15, 2008
    #15
  16. Paolo

    David Combs Guest

    In article <Xns9B54C5F3BAFD0castleamber@130.133.1.4>,
    John Bokma <> wrote:
    >Paolo <> wrote:
    >
    >> 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.

    >
    >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
     
    David Combs, Nov 29, 2008
    #16
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Stylus Studio
    Replies:
    0
    Views:
    689
    Stylus Studio
    Aug 3, 2004
  2. Tim Stanka
    Replies:
    0
    Views:
    317
    Tim Stanka
    Jul 19, 2004
  3. Replies:
    3
    Views:
    392
    Jeff Shannon
    Oct 21, 2004
  4. Replies:
    3
    Views:
    764
    Ziga Seilnacht
    Jan 3, 2007
  5. Paolo
    Replies:
    1
    Views:
    2,502
    Jürgen Exner
    Nov 12, 2008
Loading...

Share This Page