For Programmers: Free Programming Magazines  


Home > Archive > PERL Miscellaneous > June 2004 > Re: How to use 2 DIFFERENT VERSIONS of the SAME MODULE in the same









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Re: How to use 2 DIFFERENT VERSIONS of the SAME MODULE in the same
Gunnar Hjalmarsson

2004-06-29, 3:56 am

Yves Petinot wrote:
> Now my problem is that - obviously ??? - i cannot get perl to load
> the same module twice in a single interpreter.


Wouldn't something along this line be possible:

my %oldINC = %INC;
require '/path/to/old/version/module.pm';

# read old format of the database

%INC = %oldINC;
require module.pm; # load new version

# save the database in the new format

--
Gunnar Hjalmarsson
Email: http://www.gunnar.cc/cgi-bin/contact.pl
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com