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


in reply to Re^2: Can't locate WWW/Mechanize/Firefox.pm in @INC
in thread Can't locate WWW/Mechanize/Firefox.pm in @INC

Don't guess! The answer based on a guess has very little value as a response to a question from someone who's trying to help.

Try the command suggested in Re: Can't locate WWW/Mechanize/Firefox.pm in @INC and then tell us what it does (more on this -- how to execute -- is below).
And don't rely on external tools (either Check_INC.pl, which you don't show) nor where to tell you something about Perl that you can learn from your own Perl.

$ perl -v ; perl -e "print join \"\n\", @INC" can both help, or, use this little piece of code, which appeared here recently:

#! /usr/bin/perl use 5.016; # adjust to suit the version identified from the + C:> prompt with <c>perl -v
use ExtUtils::Installed; my $module; my $inst = ExtUtils::Installed->new(); my (@modules) = $inst->modules(); foreach $module (@modules) { say "$module"; } </c>

The die $^X command gets executed from your command prompt, "C:\>" by preference (mine, an idiosyncracy) like this:
perl -E "die $^X;"
which will print something like this: C:\Perl\bin\perl.exe at -e line 1. where the part before the "(period)exe" is your path to perl.

... but at a quick glance, it appears from the content of your second code block that you're executing Oracle's 5.8 version of Perl... in which case, perhaps you didn't ask (Active State?) to add 5.16 to your path. So check your path too... is there an instance of Perl that's not in an Oracle directory?

Oh yes; @Annonymous Monk doesn't live here. But you can address Monks by name, by [name]... for example, to say your name to call you attention to this, I use that form of address: Pavan Renjal

Update: http://www.perl.com/pub/2002/05/14/mod_perl.html (under the heading "use(), require(), do(), %INC and @INC Explained" may be illuminating.

Replies are listed 'Best First'.
Re^4: Can't locate WWW/Mechanize/Firefox.pm in @INC
by Pavan Renjal (Initiate) on Jan 17, 2013 at 21:52 UTC
    ww Thanks for the reply! I have executed the codes and i got the following results. 1.Perl version
    C:\>perl -v This is perl 5, version 16, subversion 2 (v5.16.2) built for MSWin32-x +86-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.ActiveSt +ate.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 ki +t. 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 Pa +ge.
    2. I executed the 2nd code for INC
    C:\> perl -e "print join \"\n\", @INC" 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-th +read 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-th +read 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 the 3rd code and i got the following details:
    C:\Perl Scripts>Module.pl Set up gcc environment - 3.4.5 (mingw-vista special r3) ActivePerl::CPAN::Config ActivePerl::Config ActivePerl::DocTools ActivePerl::PPM ActiveState::PerlCritic ActiveState::RelocateTree ActiveState::Scineplex ActiveState::Utils Algorithm::C3 Algorithm::Diff Apache::DBI AppConfig Archive::Extract Archive::Tar Archive::Zip AutoLoader B::Debug B::Keywords Bit::Vector CGI CPAN::Meta CPAN::Meta::Requirements CPAN::Meta::YAML CPANPLUS CPANPLUS::Dist::Build Carp::Clan Class::Accessor Class::C3 Class::Data::Inheritable Class::Default Class::Load Class::Load::XS Clone Compress::Raw::Bzip2 Compress::Raw::Zlib Config::Tiny DBD::CSV DBD::ODBC DBD::Oracle DBD::Pg DBD::SQLite DBI Data::Dump Data::Dumper Data::JavaScript::Anon Data::OptList Date::Calc Devel::GlobalDestruction Devel::NYTProf Devel::StackTrace Devel::Symdump Digest::HMAC Digest::MD2 Digest::MD5 Digest::SHA Digest::SHA1 Dist::CheckConflicts Email::Address Encode Encode::Locale Eval::Closure Exception::Class Exporter ExtUtils::Install File::Fetch File::HomeDir File::Listing File::Next File::Which GD GD::Graph GD::Text HTML::Form HTML::Parser HTML::Selector::XPath HTML::Tagset HTML::Template HTML::Tree HTTP::Cookies HTTP::Daemon HTTP::Date HTTP::Message HTTP::Negotiate HTTP::Tiny IO::Compress IO::Socket::SSL IO::String IPC::Cmd IPC::Run JSON JSON::Any LWP LWP::MediaTypes LWP::Protocol::https List::MoreUtils Locale-Maketext Locale::Codes MRO::Compat Mail::Sender Memoize MinGW Module::Build Module::CoreList Module::Implementation Module::Load::Conditional Module::Metadata Module::Pluggable Module::Pluggable::Fast Module::Runtime Moose Mozilla::CA Net Net::Daemon Net::HTTP Net::SSLeay Net::Telnet Object::Accessor Object::Import PPI PPIx::Regexp PPIx::Utilities PPM::Repositories Package::DeprecationManager Package::Stash Package::Stash::XS Params::Check Params::Classify Params::Util Parse::CPAN::Meta Perl Perl::Critic PerlIO::via::QuotedPrint Pod Pod::Simple RPC::PlServer Readonly Readonly::XS SQL::Statement Safe Scope::Guard Shell Shell::Command Spiffy Storable Sub::Exporter Sub::Install Sub::Name Sub::Uplevel Sys::Syslog Task::Weaken Tcl Template Template::Provider::FromDATA Term::ANSIColor Term::ReadKey Term::ReadLine::Perl Test::Differences Test::Exception Test::Harness Test::Simple Text Text::Autoformat Text::CSV_XS Text::Diff Text::Glob Text::Reform Text::SimpleTable Time::Local Tkx Try::Tiny UNIVERSAL::require URI Unicode::Collate Unicode::Normalize WWW::Mechanize WWW::RobotRules Win32 Win32::API Win32::AuthenticateUser Win32::Clipboard Win32::Console Win32::Console::ANSI Win32::EventLog Win32::File Win32::FileSecurity Win32::IPC Win32::Internet Win32::Job Win32::NetAdmin Win32::NetResource Win32::ODBC Win32::OLE Win32::PerfLib Win32::Pipe Win32::Process Win32::Registry Win32::Service Win32::Shortcut Win32::Sound Win32::TieRegistry Win32::WinError Win32API::Net Win32API::Registry XML::Parser XML::Simple YAML::LibYAML ap-iis-config autodie bignum dmake lib libwww-perl mylib threads::shared version
    4. The 4th code gave me the following results:
    C:\>perl -E "die $^X;" C:\Perl\bin\perl.exe at -e line 1.

    For the next query "... but at a quick glance, it appears from the content of your second code block that you're executing Oracle's 5.8 version of Perl... in which case, perhaps you didn't ask (Active State?) to add 5.16 to your path. So check your path too... is there an instance of Perl that's not in an Oracle directory?"

    Please help me understand this. How do i check the path? "is there an instance of Perl that's not in an Oracle directory?" - How do i check this? Thanks for the link related to INC. Thanks for all your time and help!

      path with no arguments from your command prompt will show the existing path. you can add to it, change it, etc. Your "2." seems to say that the Oracle @inc may be higher (earlier) in your path than the 5.16 path... or that 5.16 doesn't have a proper path to your modules (which should be in a series of directories subordinate to the dir named Perl.

      As to an additional instance of Perl, you've answered that with perl -v which says immediately that 5.16 was executing. So, you've already checked that.

      But we still don't have quite enough info to give you an Rx for a cure.