Category Archives: Modules

Bonus @INC directories

Marek Rouchal wrote to me with an interesting addendum to my previous post Who makes it into @INC first?. Besides the different ways to add directories, some of them also load additional subdirectories that you don’t specify.

Who makes it into @INC first?

Perl finds modules by looking through the list of directories in @INC. There are many ways to add paths to that array, and although I’ve used all of them at some point, I’ve never quite thought about what happens when I use all of them together. Remember that Perl uses the first matching module name […]