CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
INDEX
Search Posts SEARCH
POSTS
Who's Online WHO'S
ONLINE
Log in LOG
IN

Home: Perl Programming Help: Beginner:
Can't locate WWW/Mechanize/Firefox.pm in @INC

 



Pavan Renjal
Novice

Jan 13, 2013, 11:30 AM

Post #1 of 10 (1362 views)
Can't locate WWW/Mechanize/Firefox.pm in @INC Can't Post

I am a newbie and i need to understand why i am receiving the below error:

Can't locate WWW/Mechanize/Firefox.pm in @INC (@INC contains: C:/Perl/site/lib C
:/Perl/lib .) at C:\Perl Scripts\Open_Site.pl line 4.
BEGIN failed--compilation aborted at C:\Perl Scripts\Open_Site.pl line 4.

I have tried to install WWW::Mechanize::Firefox using cpan but it didnt install it properly. Moreover i have Oracle in my system which has a older version of Pearl. So i am not sure what is the exact root cause. If it is due to conflicts between different versions of pearl, please suggest how can i uninstall the older version present in Oracle and make it work with the newer version?

In Reply To


7stud
Enthusiast

Jan 13, 2013, 9:54 PM

Post #2 of 10 (1355 views)
Re: [Pavan Renjal] Can't locate WWW/Mechanize/Firefox.pm in @INC [In reply to] Can't Post


Quote
I am a newbie and i need to understand why i am receiving the below error:


You will get the same result if you run a program with this line:


Code
use non_existent;


@INC is a perl array that contains directory names. perl searches in each of those directories for the modules that you specify in a use statement. perl does not look in any other directories. You can see which directories are included in @INC by running this program:


Code
use strict;  
use warnings;
use 5.012;

for (@INC) {
say;
}


But what you really want to know is why didn't cpan install your module correctly. To determine that, you'll have to post some more information. To begin with, you should always post your operating system when asking about installation issues. Also, you should not make readers guess what command you might have used to try and install the module. You should also figure out how to print the version of perl you are using to make sure you are using your perl and not the system perl, something like 'where perl'.


(This post was edited by 7stud on Jan 13, 2013, 9:57 PM)


Pavan Renjal
Novice

Jan 14, 2013, 11:20 AM

Post #3 of 10 (1350 views)
Re: [7stud] Can't locate WWW/Mechanize/Firefox.pm in @INC [In reply to] Can't Post

@Tstud: Thanks for the reply! I will make sure i follow what you adviced.

Please see the specifications below:


1. Please find the perl version info below:

C:\Perl Scripts>perl -v

This is perl 5, version 16, subversion 2 (v5.16.2) built for MSWin32-x86-multi-t
hread
(with 1 registered patch, see perl -V for more detail)

Copyright 1987-2012, Larry Wall

Binary build 1602 [296513] provided by ActiveState http://www.ActiveState.com
Built Dec 19 2012 12:35:59

Perl may be copied only under the terms of either the Artistic License or the
GNU General Public License, which may be found in the Perl 5 source kit.

Complete documentation for Perl, including FAQ lists, should be found on
this system using "man perl" or "perldoc perl". If you have access to the
Internet, point your browser at http://www.perl.org/, the Perl Home Page.



2. I executed the code for INC and i got the following results:

C:\>cd perl scripts

C:\Perl Scripts>Check_INC.pl
C:\Perl\lib
C:\oracle\product\10.2.0\db_1\perl\5.8.3\lib\MSWin32-x86
C:\oracle\product\10.2.0\db_1\perl\5.8.3\lib/MSWin32-x86-multi-thread
C:\oracle\product\10.2.0\db_1\perl\5.8.3\lib
C:\oracle\product\10.2.0\db_1\perl\5.8.3\lib\MSWin32-x86
C:\oracle\product\10.2.0\db_1\perl\site\5.8.3
C:\oracle\product\10.2.0\db_1\perl\site\5.8.3\lib/MSWin32-x86-multi-thread
C:\oracle\product\10.2.0\db_1\perl\site\5.8.3\lib
C:\oracle\product\10.2.0\db_1\sysman\admin\scripts
C:\oracle\product\10.2.0\db_1\perl\lib\5.8.3\MSWin32-x86
C:\oracle\product\10.2.0\db_1\perl\lib\5.8.3
C:\oracle\product\10.2.0\db_1\perl\5.8.3\lib\MSWin32-x86-multi-thread
C:\oracle\product\10.2.0\db_1\perl\site\5.8.3
C:\oracle\product\10.2.0\db_1\perl\site\5.8.3\lib/MSWin32-x86-multi-thread
C:\oracle\product\10.2.0\db_1\perl\site\5.8.3\lib
C:\oracle\product\10.2.0\db_1\sysman\admin\scripts
C:/Perl/site/lib
C:/Perl/lib
.

3. I executed where perl and i got the following path:

C:\Perl Scripts>where perl
C:\Perl\bin\perl.exe

4. I am using ActivePerl-5.16.2.1602, OS is Windows 7 Home Premium, Service Pack 1 is installed.

Please let me know if you require anything else. I hope this thing gets resolved soon. Thanks for all your help!



In Reply To

Quote
I am a newbie and i need to understand why i am receiving the below error:


You will get the same result if you run a program with this line:


Code
use non_existent;


@INC is a perl array that contains directory names. perl searches in each of those directories for the modules that you specify in a use statement. perl does not look in any other directories. You can see which directories are included in @INC by running this program:


Code
use strict;  
use warnings;
use 5.012;

for (@INC) {
say;
}


But what you really want to know is why didn't cpan install your module correctly. To determine that, you'll have to post some more information. To begin with, you should always post your operating system when asking about installation issues. Also, you should not make readers guess what command you might have used to try and install the module. You should also figure out how to print the version of perl you are using to make sure you are using your perl and not the system perl, something like 'where perl'.



7stud
Enthusiast

Jan 14, 2013, 1:41 PM

Post #4 of 10 (1339 views)
Re: [Pavan Renjal] Can't locate WWW/Mechanize/Firefox.pm in @INC [In reply to] Can't Post

It's clear from your @INC output that the directories in @INC are all related to perl 5.8.3. Yet the command named 'perl' is connected to perl-5.16.2--as seen in your "perl -v" output. How did you install perl 5.16.2? Are there uninstall directions that came with perl 5.16.2?


Pavan Renjal
Novice

Jan 15, 2013, 12:39 PM

Post #5 of 10 (1331 views)
Re: [7stud] Can't locate WWW/Mechanize/Firefox.pm in @INC [In reply to] Can't Post

@7stud: I have installed Active Perl. I am using the perl that came as part of Active perl installation. I have the following reference to uninstall Active Perl, not sure if you were looking for this:


http://docs.activestate.com/activeperl/5.10/install.html#uninstalling%20activeperl%20on%20windows



In Reply To
It's clear from your @INC output that the directories in @INC are all related to perl 5.8.3. Yet the command named 'perl' is connected to perl-5.16.2--as seen in your "perl -v" output. How did you install perl 5.16.2? Are there uninstall directions that came with perl 5.16.2?



Pavan Renjal
Novice

Jan 15, 2013, 12:42 PM

Post #6 of 10 (1330 views)
Re: [Pavan Renjal] Can't locate WWW/Mechanize/Firefox.pm in @INC [In reply to] Can't Post

@7stud: Just wanted to know, what if i uninstall the perl that is part of Oracle or uninstall the Oracle itself? Do you think that should work? Or do we have any workaround for this?

In Reply To


7stud
Enthusiast

Jan 15, 2013, 12:54 PM

Post #7 of 10 (1326 views)
Re: [Pavan Renjal] Can't locate WWW/Mechanize/Firefox.pm in @INC [In reply to] Can't Post

Never delete the system's perl, python, ruby, etc.


Quote
Also, you should not make readers guess what command you might have used to try and install the module.



(This post was edited by 7stud on Jan 15, 2013, 12:58 PM)


Pavan Renjal
Novice

Jan 15, 2013, 12:58 PM

Post #8 of 10 (1322 views)
Re: [7stud] Can't locate WWW/Mechanize/Firefox.pm in @INC [In reply to] Can't Post

Ok, then how do we resolve this issue? Please share your thoughts on this, i need to make this thing work somehow.


7stud
Enthusiast

Jan 15, 2013, 12:59 PM

Post #9 of 10 (1320 views)
Re: [Pavan Renjal] Can't locate WWW/Mechanize/Firefox.pm in @INC [In reply to] Can't Post


Quote
Also, you should not make readers guess what command you might have used to try and install the module.



Pavan Renjal
Novice

Jan 15, 2013, 1:14 PM

Post #10 of 10 (1317 views)
Re: [7stud] Can't locate WWW/Mechanize/Firefox.pm in @INC [In reply to] Can't Post

cpan>install WWW::Mechanize::Firefox

I have used the above command to install CPAN module www::mechanize::firefox module. But this installation didnt look to be successful.

(This post was edited by Pavan Renjal on Jan 15, 2013, 1:15 PM)

 
 


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives