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

I've the following code

#!/usr/bin/perl -w use Win32::CaptureIE; StartIE; Navigate('http://www.google.co.in/'); my $img = CaptureElement('tab_user_options'); $img->Write("ie-elem.png"); QuitIE;

I'm getting following error

Can't locate loadable object for module Win32::Screenshot in @INC (@IN +C contains: C:/Perl/lib C:/Perl/site/lib .) at C:/Perl/site/lib/Win32 +/CaptureIE.pm line 62 Compilation failed in require at C:/Perl/site/lib/Win32/CaptureIE.pm l +ine 62. BEGIN failed--compilation aborted at C:/Perl/site/lib/Win32/CaptureIE. +pm line 62. Compilation failed in require at D:\Project\Automation\Mailing\ScreenS +hot3.pl line 2. BEGIN failed--compilation aborted at D:\Project\Automation\Mailing\Scr +eenShot3.pl line 2.
Could any one please help

Replies are listed 'Best First'.
Re: Win32::Screenshot in @INC
by moritz (Cardinal) on Jul 25, 2011 at 12:29 UTC

    This error typically means that the module wasn't properly installed, for example only the .pm files copied into the module path, but not the other necessary files.

    How did you install the module?

      Initially I've installed PERL.

      Then through CPAN I've installed Win32::CaptureIE, I've used the following command

      CPAN> Install Win32::CaptureIE

      But Still It was giving error like @INC few .pm files were not found, then I've manually copied the required files into this location C:/Perl/lib C:/Perl/site/lib since(@INC contains: C:/Perl/lib C:/Perl/site/lib .)

        The error message you posted says states that Win32::Screenshot isn't installed. This module is a dependencie of Win32::CaptureIE. Have you tried installing that module?

        You may want to check your cpan configuration, you can set it to automatically install dependencies, something like:

        o conf prerequisites_policy follow o conf commit