Debugging Perl programs in KDevelop - perl

I can create new Perl projects in KDevelop, and KDevelop provides automatic syntax highlighting of my .pl files. However, I don't see a way to debug my Perl programs (e.g. add breakpoints, debug step-by-step, etc.).
Is this possible with KDevelop?

According to this table in perlmonks, Perl debugging is not supported by KDevelop. You can use Eclipse with EPIC to debug Perl scripts.

Related

Vim plugin does not recognize existing Perl support

I've been using the CoqIDE plugin for Vim on Linux machines for editing Coq files. Now I'm trying to install it on Windows 8. But when I try to source the plugin, I get
Your vim doesn't support Perl. Install it before using CoqIDE mode.
which is strange, because with :version I clearly see +perl/dyn included. Is this different from the +perl that I need?
I heard somewhere that you need to have Perl installed before Vim to get a Perl-enabled Vim, so I tried that as well. I uninstalled Vim, installed Strawberry Perl 5.18.2.2 (64bit), and reinstalled Vim. Still the same problem.
If the solution involves manually compiling binaries, I would really appreciate detailed instructions as I don't have any experience with it.
+perl/dyn just specifies that Vim has been compiled with dynamic Perl support; it doesn't yet check that the Perl library can be loaded successfully. To do that, try executing a Perl command, e.g.:
:perl VIM::Msg("Hello")
This probably yields on your system:
E370: Could not load library perl510.dll
Sorry, this command is disabled: the Perl library could not be loaded.
Next, you'd then have to investigate whether a proper Perl version has been installed and the DLL is accessible (though the PATH).
Download DWIMPerl for windows. I'm running win7 64 and gvim 7.4.2. Using strawberryperl and activeperl resulted in :echo has('perl') to yield 0. By switching to DWIMPerl (and ensuring my PATH env variables are proper) :echo has('perl') now yields 1 using the standard gvim distribution. This is important for vim extensions like dbext which require proper support for perl interfaces.

CGI IDE on Windows

Is there a way to use NetBeans or Eclipse for an old Perl CGI application in a Windows environment?
I currently have NetBeans for PHP.
NOTE: I am a .NET dev and have done PHP back in the day. I know very little about CGI, I just need to modify an existing legacy app.
If you got only one CGI application: Use a text editor or use the IDEs you know as text editors to edit this file.
Eclipse has a EPIC plugin which could handle Perl files up to some point.
If you want to edit more than one Perl application, try out Padre, the Perl IDE. It's written in Perl and mostly for Perl (but it supports many other languages like PHP and some non-languages like CSS or HTML).
You could get it from CPAN using your installed CPAN client or from the Padre download page at http://padre.perlide.org/download.html if you don't have any installed Perl.
The download package includes Strawberry Perl which is a full Perl interpreter for windows.

How can I get Perl's debugger and gVim to work together on Linux?

Is there a way to get Perl's debugger and gVim to work together on Linux? I.e. step through code in gVim and see the values of watched variables controlling the debugger from within gVim?
You can try this vim script: http://vim.sourceforge.net/scripts/script.php?script_id=663 for debug perl scripts in your vim editor.
This is a decent plugin with some debugger integration: http://www.vim.org/scripts/script.php?script_id=556.

What's a good development environment for Perl? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 2 months ago.
Improve this question
I develop applications using PHP or Java and will study Perl for the first time.
For PHP and Java, there are integrated development environments such as Eclipse, and debugging environment was regulated well, but, in the case of Perl, what kind of development environment do people use?
Is there a recommended IDE?
I would prefer a free debugging environment.
As Sinan stated, there are some IDEs for Perl. Padre is worth a mention. It is being actively developed by the Perl community.
From perlfaq3: Is there an IDE or Windows Perl Editor?, where it looks much nicer.
If the Padre people want their stuff in here, just add the right bits. The source lives in my perlfaq github repo. You can fork it, edit the file right in GitHub, and send me a pull request.
Is there an IDE or Windows Perl Editor?
Perl programs are just plain text, so any editor will do.
If you're on Unix, you already have an IDE--Unix itself. The Unix
philosophy is the philosophy of several small tools that each do one
thing and do it well. It's like a carpenter's toolbox.
If you want an IDE, check the following (in alphabetical order, not
order of preference):
Eclipse
The Eclipse Perl Integration Project integrates Perl
editing/debugging with Eclipse.
Enginsite
Perl Editor by EngInSite is a complete integrated development
environment (IDE) for creating, testing, and debugging Perl
scripts; the tool runs on Windows 9x/NT/2000/XP or later.
Komodo
ActiveState's cross-platform (as of October 2004, that's Windows,
Linux, and Solaris), multi-language IDE has Perl support, including
a regular expression debugger and remote debugging.
Open Perl IDE
Open Perl IDE is an integrated development environment for writing
and debugging Perl scripts with ActiveState's ActivePerl
distribution under Windows 95/98/NT/2000.
OptiPerl
OptiPerl is a Windows IDE with simulated CGI environment, including
debugger and syntax highlighting editor.
PerlBuilder
PerlBuidler is an integrated development environment for Windows
that supports Perl development.
visiPerl+
From Help Consulting, for Windows.
Visual Perl
Visual Perl is a Visual Studio.NET plug-in from ActiveState.
Zeus
Zeus for Window is another Win32 multi-language editor/IDE that
comes with support for Perl
For editors: if you're on Unix you probably have vi or a vi clone
already, and possibly an Emacs too, so you may not need to download
anything. In any Emacs, the cperl-mode (M-x cperl-mode) gives you
perhaps the best available Perl editing mode in any editor.
If you are using Windows, you can use any editor that lets you work
with plain text, such as NotePad or WordPad. Word processors, such as
Microsoft Word or WordPerfect, typically do not work since they insert
all sorts of behind-the-scenes information, although some allow you to
save files as "Text Only". You can also download text editors designed
specifically for programming, such as Textpad
and UltraEdit, among others.
If you are using Mac OS, the same concerns apply. MacPerl (for Classic
environments) comes with a simple editor. Popular external editors are
BBEdit or Alpha. Mac OS X users can use Unix editors as well.
GNU Emacs
MicroEMACS
XEmacs
Jed
or a vi clone such as
Elvis FTP, WWW
Vile
Vim
For vi lovers in general, Windows or elsewhere: vi
nvi (available from CPAN in src/misc/) is
yet another vi clone, unfortunately not available for Windows, but in
Unix platforms you might be interested in trying it out, firstly
because strictly speaking it is not a vi clone, it is the real vi, or
the new incarnation of it, and secondly because you can embed Perl
inside it to use Perl as the scripting language. nvi is not alone in
this, though: at least also vim and vile offer an embedded Perl.
The following are Win32 multilanguage editor/IDESs that support Perl:
Codewright
MultiEdit
SlickEdit
There is also a toyedit Text widget based editor written in Perl that
is distributed with the Tk module on CPAN. The ptkdb is a Perl/tk based debugger that acts
as a development environment of sorts. Perl Composer is an IDE for Perl/Tk GUI
creation.
In addition to an editor/IDE you might be interested in a more powerful
shell environment for Win32. Your options include
Bash from the Cygwin package
Ksh from the MKS Toolkit, or the Bourne shell
of the U/WIN environment
Tcsh, see also Using csh & tcsh
Zsh
MKS and U/WIN are commercial (U/WIN is free for educational and
research purposes), Cygwin is covered by the GNU Public License (but
that shouldn't matter for Perl use). The Cygwin, MKS, and U/WIN all
contain (in addition to the shells) a comprehensive set of standard
UNIX toolkit utilities.
If you're transferring text files between Unix and Windows using FTP be
sure to transfer them in ASCII mode so the ends of lines are
appropriately converted.
On Mac OS the MacPerl Application comes with a simple 32k text editor
that behaves like a rudimentary IDE. In contrast to the MacPerl
Application the MPW Perl tool can make use o Shell f the MPW itself as
an editor (with no 32k limit).
Affrus is a full Perl development environment with full debugger support.
Alpha is an editor, written and extensible in Tcl, that nonetheless has built in support for several popular markup and programming
languages including Perl and HTML.
BBEdit and BBEdit Lite are text editors for Mac OS that have a Perl sensitivity mode.
Pepper and Pe are programming language sensitive text editors for Mac
OS X and BeOS respectively.
Perl has very good debugging support. Read perldoc perldebug for details.
There are a bunch of IDEs such as ActiveState's Komodo, EPIC etc but I prefer to combine GVim (see also .vimrc for Perl programmers) with the command line. Others prefer Emacs.
Padre is getting better, but it's currently not quite up there with Komodo or EPIC.
That said, it is comparable with Ultraedit or Notepad++ at this point, less than a year after the first line of code was written.
With about 30 people actively committing, 35-40 plugins either released or in development, and translations in 20 languages, it is also moving ahead incredibly quickly.
So right now, I agree that EPIC is probably the way to go, since you've used Eclipse already.
But by this time next year it's probably going to be a different story.
If you're already familiar with debugging in Eclipse, then the EPIC plugin is exactly what you're looking for.
It's got stepped debugging within the Debug perspective, like with other languages in Eclipse. It's not as strong as the Java support, but it's got an easier learning curve than e.g. "perl -d" (the 'standard' way to debug Perl), or even learning a new editor like Emacs, with its Perl debugging integration.
What I use -- and what I've gotten the impression that most other serious Perl developers use -- is a good text editor. The only "integration" I have is via user-defined tools. For Perl, that's these:
perl -Mstrict -cw <file> # Perl "lint"
perl <file> # run file
perl -d <file> # run file in debugger
I have others for checking files in/out of version control, browsing history, etc. A good configurable editor (I'm partial to UltraEdit) will allow you to build your own environment using the tools you want instead of foisting an all-encompassing solution on you.
Komodo Edit is a free editor from Active State, probably not as feature rich as the full IDE but I find it very useful for Perl development, and it supports multiple languages.
You didn't specify which platform you're on, but on the Macintosh, TextMate is a very popular choice for Perl development. It's completely replaced Vim for me, and while it's not a full IDE, it's got alot of neat integrations in bundles specially targeted towards Perl development.

How can I set up Eclipse to edit Perl without the runtime checking?

I'm working on a project that include both Java (on the client side) and Perl (on the server side), and I would really like to use Eclipse to edit my Perl scripts instead of going to another editor. I've tried to use the EPIC plugin. However, I have no way of setting up a run environment for these scripts on my local machine, so the plugin displays all kinds of errors related to missing libraries and other external dependencies.
I just want a text editor with nice syntax highlighting for Perl. Any suggestions? Any way that you can turn off the runtime error checking when using the EPIC plugin? I wasn't able to find anything with a quick search.
It isn't a setting, per se, in the workbench. It's a per-project setting.
While in your Perl project, select Project->Properties. In that dialog, click on "Builders". You probably have just the one-- "Perl Auto Builder". De-select it and click "Ok".
Unfortunately, you'll have to do this for each separate Perl project.
You could try Perlipse, which appears to be an active project.
You didn't indicate your OS. Try Padre - it is cross-platform. It can be installed with the CPAN shell (if you use Strawberry Perl on Windows, you will need at least the version from October). Padre is still rapidly evolving, but already has support for Perl 5 and 6 (6 will require a plugin). HTML, JavaScript and CSS (also with plugins). Many other plugins are already written, for example for Perl::Critic.
Emacs is a great text editor for Perl.
cperl-mode has the best Perl syntax highlighting support of any
editor (even Padre), and Emacs should meet all of your editing needs.
It is easily scriptable, and there are thousands of extensions
available for it. (Some even make support for Perl better, like Stylish::REPL.)
Use EditPlus, simplest editor for syntax highlighting. Works well for Perl.