Please take this as observations from someone who probably isn't as deep in perl as many here. I know that BrowserUK
and many others have a MUCH larger body of knowledge concerning perl than I do.
I do think perl does have a future, but it currently rests in very narrow verticals.
Myself, I use it mostly for administrative tasks, though I have written other things (desktop and command line stuff for $work) in it as well. I find that perl is much easier to get things done on the machine with than bash/ksh/csh/flavor-of-the-decade-sh. Many sysadmins I know use perl extensively to get things done. I've almost completely foregone sh in lieu of perl.
That said, I do think that there are some things that could improve traction outside of the narrow verticals:
- Threading. While there are facilities for it, using them seems very onerous. I'm not sure if that's my lack of experience talking (I could see threading being onerous nearly anywhere) or if use threads; is just painful. I seem to recall a meditation recently that expressed much gnashing of teeth concerning the state of p5 threading, but I also seem to recall that it was mostly performance, not usability related.
- OOP. Moose/Moo/Mouse/M.next seems to be attempting to address this, but I do feel it needs to be baked in a bit better, if not by default. That said, I haven't even messed with the current options yet, as I usually just use hashes to get stuff done. Further up in this thread there have been statements to the effect of "no one who uses perl regularly would use it anyway", which I disagree with. I could easily see good OOP being useful to Mojolicious and Dancer projects to name a couple of things off the top of my head.
- Saner defaults. As mentioned above: Strict and Warnings should probably be on by default, but I also know that will break lots of existing code and will wreak havoc with one liners. I'm not sure how to address this in a logical manner. Perhaps something like use bootstrap;, but that's not really an improvement.
- Fix subroutines to accept parameters. While my ($foo, $bar, $bat) = @_ is usable, it reduces the readability of the code to someone who is unfamiliar with the language. It's my understanding that there's some stuff in 5.20 that may address this in a fashion.
I think there are a lot of smart people working in P5P. I appreciate all of their work. I hope that perl 6 will actually make it to the sunshine and still be "perl enough" that it gets some traction within the community, though the little I've read is that many are not impressed by what they've seen.
All of the above said, in my narrow vertical I typically use perl for (administrative tasks), cluster management software is getting more and more useable. Salt is a REALLY REALLY powerful tool that's very usable. I don't think it has the capabilities of replacing perl outright for me, but it's making once hugely difficult stuff (multi-machine deployment and management) significantly easier. As these tools get more powerful, I do think that perl becomes far more niche, but I don't think it'll hit "dead" for quite some time.