I've grown accustomed to using IPython to try things out whilst learning Python, and now I have to learn Perl for a new job.
Is there anything out there like IPython for Perl? In particular, I'm interested in completion and access to help.
I usually just use perl -de0, but I've heard of:
Devel::REPL
perlconsole
You can have a less featurefull environment by using the debugger "stand-alone".
perl -de 42
(42 is just a constant in order to have a non null "script" loaded).
From there, you can use My::Module and so on. I'm not sure there is a full irb-like program.
[UPDATED FOR RECENT CHANGES]
IPython is no longer just Python; Jupyter can be used for any language with a kernel implementation. Zakariyya Mughal released a Perl kernel last year, so I would recommend trying/contributing to that.
From Perl FAQ:
Perl FAQ 3.7
Is there a perl shell?
Not really. Perl is a programming language, not a command interpreter.
This was the reason why I swhitched from Perl to Python.
Anythow, several python shell workarounds do exist, but they are not even close to IPython
Related
I am using Crimson Editor as a text editor and I think it suports only Active Perl as a compiler. I downloaded some new CPAN modules for emailing etc etc. I added them in Perl library but program still doesn't recognize those modules. Can you please help me? Is Active Perl doesn't support any extra modules? If so, what do you suggest me for Perl compiler?
Is Active Perl doesnt support any extra modules?
It does, but it has its own way of doing it called PPM. Because many Perl modules require Unix tools and a C compiler, these are pre-built for you. Unfortunately these packages are often well behind CPAN release and are often missing CPAN modules altogether.
If so, what do you suggest me for Perl compiler?
On Windows, I'd recommend using Strawberry Perl. It comes with a full environment necessary for building and installing Perl modules, including a C compiler. Then you can install things using the normal CPAN tools like cpan or cpanm.
I am using Chrimson Editor
It doesn't look like that editor has been updated in over 10 years, and it's very Windows specific. I'd suggest an editor like Sublime Text. It's cross-platform, so you're not stuck with a Windows-specific editor, it has good Perl support, and it's kept up to date.
I would also not get too attached to relying on your IDE to do all your compiling and running of code for you. If you do, you're limited to what your IDE supports, and your IDE can get in the way of understanding your tools. Instead, I'd suggest getting used to using the tools directly. Learn how to use Perl on the command line rather than via the IDE.
I want to practice Perl in Windows Vista 32bit, how can I do it ?
Thanks.
Just an alternative to active perl is strawberry perl, each has it's own merits to use, but I would say that the initially active perl is better implemented (for instance it implements the .pl extension by default, adds perl to the PATH variable etc.) but strawberry perl makes it incredibly easy to install new modules, and generally is really good to use as well.
download Active perl and enjoy
http://www.activestate.com/activeperl
You can use ActivePerl.
ActivePerl is a good Windows Perl interpreter
I'm looking for a light and portable perl release and found this one, but it seems there is no activity since 2003, which could be ok for me but I want to know if there is known issues.
So, if you can provide me some feedbacks, you're wellcome :)
From my experience, the best way to make distributable Perl scripts for Windows systems is to use a packager like PAR::Packer or ActiveState's PerlApp.
Of course this only works if you don't need to do anything on the fly. But it works really well if you have a collection of scripts that you want to move around and use on many systems.
As a replacement for .bat files, as you indicate in your comments, I have found that I can install enough CPAN modules with Strawberry Perl to make more-or-less cross-platform Perl scripts.
See also Is there a portable Perl? which points to the portable version of Strawberry Perl
There is also a Portable Perl from PortableApps
NB: I have used neither one
ActiveState Perl installs an IIS script mapping for the extension .plx. Is this actually used in real life or just something specific to ActiveState?
No, it's not just from ActiveState. O'Reilly's Learning Perl on Win32 systems recommends naming scripts with a .plx extension to disambiguate them from perl modules (with .pm) and non-executable perl libraries (.pl). Nowadays however I'd name anything that is going to be directly run as .pl.
This is a matter of personal preference. It is not something unique to ActiveState. PLX stands for Perl Executable Script which is perhaps a bit more defined then PL which stands for Perl Script (apparently originally Perl Library as another user wrote). However, on CPAN you see numerous places where PLX is used as extension so it is perhaps not so rare as it seems:
On CPAN acx.plx
kobesearch.cpan.org on SerialPort
tag.plx on CPAN
etc.
UPDATE: here's an earlier discussion of the same discussing whether *.pl or *.plx should be used. It also mentions that Prolog uses *.pl as well and playlist is yet another use.
Google shows some matches and there are quite a few of them on CPAN. In fact, originally, .pl stood for 'Perl library'.
I have a bunch of Perl scripts and Perl modules given to me by someone. I have a driver program that tests all these scripts and modules. I want to generate a call graph and see the flow.
Is there something available for Perl for doing this?
I'd like something like pycallgraph (for python). I am running all this in AIX.
Simon Cozens tells you how to do it in Profiling Perl on Perl.com. He uses a combination of Devel::DProf and GraphViz.