How to choose from two versions of the same named module. 
Author Message
 How to choose from two versions of the same named module.

Hi,

I hope that subject line says it all. I have HTML parser 2.23 installed
on my hosting companies' server in the perl lib dir, but I want to use
the new  version 3.07. I can't however remove the old version or do
anything as root..

I downloaded the new version and did the regular stuff
perl Makefile.PL
make
make test

 Then....

#!/usr/bin/perl -w

     BEGIN {

       }

Or I also tried the use lib...

        use lib '/home2/kwinternet/webclient/HTML-Parser-3.07';

use strict;
use HTML::Parser 3.00 ();

But always get the error HTML::Parser version 3 required--this is only
version 2.23

I think I can do something like in the Camel book where you wipe out the

Thanks,

Eric



Sun, 15 Sep 2002 03:00:00 GMT  
 How to choose from two versions of the same named module.

Quote:
> I hope that subject line says it all. I have HTML parser 2.23 installed
> on my hosting companies' server in the perl lib dir, but I want to use
> the new  version 3.07. I can't however remove the old version or do
> anything as root..
[snip]
> Or I also tried the use lib...
> use lib '/home2/kwinternet/webclient/HTML-Parser-3.07';
> use strict;
> use HTML::Parser 3.00 ();
> But always get the error HTML::Parser version 3 required--this is only
> version 2.23

Hi,


this to where the system's .pm files are. Note where,

Does your own Parser.pm exist in a subdirectory HTML directly beneath
/home2/kwinternet/webclient/HTML-Parser-3.07? If not, adjust 'use lib'
accordingly.

best regards,
randy kobes



Sun, 15 Sep 2002 03:00:00 GMT  
 How to choose from two versions of the same named module.
Thanks very much for your reply. The Parser.pm is located in
/home2/kwinternet/webclient/HTML-Parser-3.07 but I still am getting the
version error.

I did notice from looking at the /usr/bin/perl5/site_perl that Parser.pm is
located under HTML but in the 3.07 version Parser.pm is NOT located beneath
the HTML directory. It is below HTML-Parser-3.07/. So basicly there is no
such thing as HTML::Parser with 3.07! :) It should be just Parser :) But of
course that doesn't work either.

Now I am confused! Is this a bug? It doesn't seem to match up.. Maybe I
should rename the HTML-Parser-3.0.7 dir to HTML because of my local install?
I have not had problems like this with LWP or URI modules.

Thanks again,

Eric

Quote:

> Hi,


> this to where the system's .pm files are. Note where,

> Does your own Parser.pm exist in a subdirectory HTML directly beneath
> /home2/kwinternet/webclient/HTML-Parser-3.07? If not, adjust 'use lib'
> accordingly.

> best regards,
> randy kobes



Sun, 15 Sep 2002 03:00:00 GMT  
 How to choose from two versions of the same named module.

Quote:

>> Does your own Parser.pm exist in a subdirectory HTML directly beneath
>> /home2/kwinternet/webclient/HTML-Parser-3.07? If not, adjust 'use lib'
>> accordingly.

> Thanks very much for your reply. The Parser.pm is located in
> /home2/kwinternet/webclient/HTML-Parser-3.07 but I still am getting the
> version error.
> I did notice from looking at the /usr/bin/perl5/site_perl that Parser.pm is
> located under HTML but in the 3.07 version Parser.pm is NOT located beneath
> the HTML directory. It is below HTML-Parser-3.07/. So basicly there is no
> such thing as HTML::Parser with 3.07! :) It should be just Parser :) But of
> course that doesn't work either.

Hi,
   The Parser.pm file below HTML-Parser-3.07, when installed,
will go into an HTML subdirectory - check out the blib/lib
subdirectory. So you could either use this blib/lib in 'use lib'
in your script, or a better solution is to run Makefile.PL as
        perl Makefile.PL PREFIX=/path/to/my/private/lib
        make
        make test
        make install
where /path/to/my/private/lib is a directory that you have
write access to. Then use this directory, with the appropriate
subdirectory, in 'use lib' - see the entry in perlfaq8 for
more details. In this way you can maintain your own private
perl library in one central location. If you do this, it may be
worth setting up the CPAN.pm module - for this you can use your
own private MyConfig.pm configuration file where you can,
for example, set 'makepl_arg' to always set the PREFIX
as above - see 'perldoc CPAN' for further info.

best regards,
randy kobes



Sun, 15 Sep 2002 03:00:00 GMT  
 How to choose from two versions of the same named module.



Quote:

> If you have another moment, one more question. Do you think I could use
something
> like ./ for the PREFIX in order to make a package that could be uploaded
to
> another server with FTP only? I and one or two others have been trying to
find a
> way to install stuff like this on servers that don't allow telnet access.

Hi,
    You could try it and see .... Another way might be to just
ftp the blib/ directory that is created after the 'make' step -
I think all the necessary files, in the proper directory structure,
are there.

best regards,
randy kobes



Sun, 15 Sep 2002 03:00:00 GMT  
 How to choose from two versions of the same named module.
Hi,

THANKS!!!!! I had redo the steps you showed with both the parser and libwww that
I was also using but after that everything was fine! I think the fact that many
older versions of libs (LWP URI  HTML) I was using were also installed on the
server fooled me into thinking I was using a version that I was not.

I ended up with just having to use

use lib '/home/kwinternet/webclient/LIBS/lib/perl5/site_perl';

for any libs I care to install there. So that makes life much easier... I guess I
have just been lucky in the past that I didn't have to do it this way before.

If you have another moment, one more question. Do you think I could use something
like ./ for the PREFIX in order to make a package that could be uploaded to
another server with FTP only? I and one or two others have been trying to find a
way to install stuff like this on servers that don't allow telnet access.

Again thanks!!

Eric



Mon, 16 Sep 2002 03:00:00 GMT  
 How to choose from two versions of the same named module.
)     You could try it and see .... Another way might be to just
) ftp the blib/ directory that is created after the 'make' step -
) I think all the necessary files, in the proper directory structure,
) are there.

No, that won't work since in blib they are called "lib" and "arch"
and Perl will expect them to be called, for example, "lib" and
"lib/i386-linux-thread" [or whatever].

Unless you are planning to require:

    use lib qw( ./lib ./arch );



) >
) > If you have another moment, one more question. Do you think I
) > could use something like ./ for the PREFIX in order to make a
) > package that could be uploaded to
) > another server with FTP only? I and one or two others have
) > been trying to find a way to install stuff like this on
) > servers that don't allow telnet access.

To prevent confusing MakeMaker, use "../lib" for PREFIX and
this should work between very similar machines with very similar
versions of Perl [ie. where the "arch" names are the same and the
lib and/or site directories are configured the same].

"perl Makefile.PL" can be strongly affected by the presence of
subdirectories and files with certain names, so avoid adding files
and subdirectories into the directory where you are building a
module.
--
Tye McQueen    Nothing is obvious unless you are overlooking something
         http://www.metronet.com/~tye/ (scripts, links, nothing fancy)



Mon, 16 Sep 2002 03:00:00 GMT  
 
 [ 7 post ] 

 Relevant Pages 

1. Question about choosing $VERSION for new CPAN module

2. Two versions of the same module

3. Two modules of same name conflict each other

4. Help choosing names =~ Perl-SQL

5. Help choosing names =~ Perl-SQL

6. Compile-time choosing of "use module"

7. Choosing a time module and working with it

8. Problem with two versions of Perl installed

9. operator++ for naming Perl-Versions

10. perl module to compare two files?

11. Two bugs in HTML-Tree modules?

12. Searching for two perl modules: DBD::Oracle and DBD::DB2

 

 
Powered by phpBB® Forum Software