undyingking: (Default)
undyingking ([personal profile] undyingking) wrote2008-01-01 05:28 pm
Entry tags:

Manipulating Perl include path

I have a wee problem in a current project. My code uses the XML::Parser module, and it needs to be a recent version. So I've uploaded this to the server and am adding it to the include path with the help of a use lib in the normal sort of way.

Unfortunately, elsewhere on the server there seems to be an old version of the module, and it seems to be using this one in preference to my nice shiny new one.

Is there any way I can, at run-time, compel it to look for the module only in my preferred part of the include path? Maybe by monkeying with whatever environment variable it is that controls the said path?

I thought of renaming the version of the module that I uploaded, and using it under the new name, but that seems a bit drastic. But maybe it's not really.

[identity profile] undyingking.livejournal.com 2008-01-02 12:19 pm (UTC)(link)
Yeah, there's a monstrous great dependency tree alas.

Since posting, I've got round it by writing my own XML parser for just the bits I needed (!), but I shall bear your @INC suggestions in mind for the future, thanks!