http://www.perlmonks.org?node_id=11106158

elliott9 has asked for the wisdom of the Perl Monks concerning the following question:

I'll start by saying I am new to Perl.

Short Story: How can I rename the namespace of a Perl package? Either doing this on an already installed package OR do this on a new package before I compile it?

Long Story (if you are interested):

I have an existing Perl script that runs a package imported from a vendor named Infoblox that we use to automate changes to records on a server. The Perl packages are custom to Infoblox AND the version of their OS that happens to be on that server. We'll call this package version 7.

I need a way to, without disturbing existing functionality, run scripts from the same Linux machine that interact with a different Infoblox server that runs a newer version of the Infoblox operating system. Since they have released a newer version of their OS (version 8) they also have a newer version of their Perl package. After testing I am unable to make API calls to the version 7 server using the version 8 perl package. Likewise I am not able to make API calls to the version 8 server using the version 7 perl package. I tried installing them at the same time but since they use the same namespace of "Infoblox" that did not work out at all.

I have no experience creating perl packages but it seems that I should be able to alter something in the new package before I compile and install it which would give it a unique namespace. Any tips on where that would be? ALternatively I thought I could use CPAN or package or some kind to rename the existing (version 7) already installed package to something unique which would mean installing version 8 package would work okay. I found Package::Rename on metacpan.org but have been unable to figure out how to make it work.

Any help would be appreciated.