Hacker News new | ask | show | jobs
by kbenson 3858 days ago
The biggest problem I have programming Perl 5 is discovery of what the best current module is to get past the pain points of the past, and the best way I know of that is to keep current with community discussions. E.g. Path::Tiny is awesome for automating a lot of the file ops you could want to do into one simple, useful, well structured place. As soon as you're exposed to it, you'll immediately want to scrap the use of 3-4 other modules you might have been using in lieu of it. What's the best way to learn about it? Possibly reading Perl community blog posts. It's unfortunate, but with a couple decades worth of modules on CPAN, it can be hard to find the gems of the bunch without some help.
2 comments

That's what the mstpan posts on http://shadow.cat/blog/matt-s-trout/ are for; I'll be doing more starting Dec 1.
Yeah, I'm aware of Task::Kensho (although I forget about it all too often). But even that is at this point more a point-in-time snapshot of what was relevant a year or two ago. In most cases, they are still relevant and some of the best choices, but there are new items that aren't on the list (e.g. Path::Tiny) that I would argue really should be.

I understand it's a trade off. We don't have a large standard library in Perl like Python does, and that means there's a bit of searching required to find what to use, but that's often a benefit as well as a drawback. Would we have Path::Tiny if we had something that provided some but not all of the capability, and not as well? Would we have DateTime (or would it be popular) if we had a core DateTime-like module that was problematic, but mostly worked? Part of the beauty of having a small core set of libraries and an large and vibrant set of extended libraries is that the constant churn leads to newer and better things. Really what I'm lamenting, is that while there are these benefits to the churn, it still does lead to some painful situations where you find you've been using a poor choice for your needs just because you didn't know of the better choice that was out there. It's acceptable if it leads to DBIC, DateTime, Path::Tiny, etc, but it still sucks some times.

I'm right there with you. Having a small core has several drawbacks.

Having a LARGE core does as well, and mostly that any modules in the Perl core seem to also have their API and features frozen in time. Even if those features and API are not so good - it's in core! So, there's a reason to keep them how broken they are for backwards-compatibility sake.

I've also felt the burn of a core module that's then removed, and the new maintainer now going absolutely wild changing things. I understand exactly why they want to change things, and would not disagree with their ideas in a vacuum, but it causes great grief to me when I'm supporting apps that relied on in-core modules that have been upgraded out of core.

I wanna say that this problem is being used as a lesson for Perl 6 - that the core for the, "official/main/whatever" distro is going to be kept very spartan, but it's going to be encouraged to build upon that distro for your own Perl 6 releases. So, if you want the, "Web Framework" release, it'll come with all the bits and pieces you need to get that going - however editorialized that selection will be.

Moritz talks about this concept, here:

http://perlgeek.de/blog-en/perl-6/how-core-is-core.html

Although this post is pretty old, and I'd hate to say that their line of thinking now.