3 ms·
The problem with perl is that it got a bad rap and has never shaken it. The "perl is line noise that makes magic" sort of reputation. The people who love perl
by jcoby 16y ago
The problem with perl is that it got a bad rap and has never shaken it. The "perl is line noise that makes magic" sort of reputation. The people who love perl don't seem to be interested in moving the language forward and shedding the old ways of doing things.
Now.. CPAN.
Let me explain my latest round with fighting Perl/CPAN. I wanted a perl interactive mode. When I want to test out something in Ruby I use irb. In Python, I can type in `python` and enter interactive mode. Even PHP has a rudimentary interactive mode now.
So I try looking at `perl --help`. Nothing there. So I turn to google and find that I need a REPL whatever that is. So I try to figure out what a REPL is. Find that. Now I find that I need to run a little script to run Devel::REPL. Doesn't work. So I load up CPAN and type in `install Devel::REPL`. No less than thirty minutes later, 150 or so screens of noise, and at least 25 questions that I have to hit [enter] for I get a failed install. I have no clue what failed -- something to do with tests (the error is 4 screens back in the middle of even more text) so I try to force the install. I'm now 45 minutes into this and finally get Devel::REPL installed. I fire up re.pl and I get `SCALAR(0x100b81070) is not of type SCALAR at /opt/local/lib/perl5/site_perl/5.8.9/namespace/clean.pm line 56`. All of this for a feature that should come with a base install.
This is just one example of why I avoid perl as much as possible.
- dotandimet 16y agoPerl has a built-in REPL, it's called the debugger. perl -d myscript.pl starts a debugging session on a given script, but you can start the debugger without one, just by passing an empty program on the command line: perl -d -E 3 (-E is new in Perl 5.10, if you have an older perl, use -e; "3" has no significance, any expression will do). You'll get a prompt, type "h" for brief help, or just use x EXPRESSION to evaluate any Perl expression and see what it returns.
- microtherion 16y agoNotwithstanding your apparent problems with CPAN, the traditional way to go to an interactive mode in perl is perl -de0 which still seems to work.
- mst 16y agoAs the author of Devel::REPL, I've never seen that error or have it reported. If you want to email me (address in profile) I'd love to figure out what went wrong so nobody else has the same problem in future.