Alex Rivera | Logout

Which cpan modules are the best to read and study?

Asked 2011-03-02T21:22:10.683
10

I've looked into the source code of DBIx::Class recently and found that I don't understand a thing (though I mastered a couple tricks while trying to).

So my question is: which CPAN modules are a must read for someone who wants to learn, and in what order?

Edit
Report

2 Answers

6

I learned quite a bit (tie-ing, platform independent filesystem access, etc) by reading the code for File::chdir. It is also a very handy module to use in your scripts, I use it all the time.

I would also add to bvr's list: read the source for modules that you use frequently, since you are already familiar with their expected behavior, you can more clearly see what is being done to achieve that result.

answered 2011-03-02T22:13:24.867
3

The question is what you want to learn, but it is certainly good idea to study various modules, because you learn to read other people code and learn various tricks. Some random recommendations I can think of

  • start with smaller modules with clear interface you know and are interested in
  • once you feel familiar with organization of modules and basics, try something larger
  • try rather newer modules
  • look into test suite and into examples
  • if you don't understand specific piece, try to make reduced example a play with it

It is hard to recommend something specific, but I liked my recent look into Web::Scraper module.

answered 2011-03-02T21:50:16.513

Your Answer