felwithe
felwithe

Reputation: 2744

Perl: how to use local copy of module instead of installed version?

I'm making changes to an installed Perl module, and I'd like to make those changes in a local copy first before copying them to the installed copy.

No matter what I do, I can't seem to get Perl to use the local version over the installed version. I tried pushing the local directory to the beginning and end of @INC, hoping that would do it, but it didn't.

The only solution I've found is renaming everything, which I actually started to do, but it involves so many files that I'm just making a mess by going into every file and renaming everything. Is there an easier way to do this?

Upvotes: 2

Views: 404

Answers (1)

nebulous
nebulous

Reputation: 766

use lib 'your/local/lib/path';
use MyModule; #this should load ./your/local/lib/path/MyModule.pm

Can you post an example of what doesn't work?

Upvotes: 2

Related Questions