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

Hi,

I have Installed a Strawbery 5.30 on my Win7 machine.

Then used CPAN to install Win32::Capture module for my old program, which went OK.

When running the program always get the below error:

@INC seems to contain all paths...

D:\DOcuments\myscripts\pod_check>pod_check.pl

Can't locate Win32/Capture.pm in @INC (you may need to install the Win32::Capture module) (@INC contains: D:\Strawberry\perl D:\Strawberry D:/Strawberry/perl/site/lib D:/Strawberry/perl/vendor/lib D:/Strawberry/perl/lib) at D:\DOcuments\myscripts\pod_check\pod_check.pl line 99.

BEGIN failed--compilation aborted at D:\DOcuments\myscripts\pod_check\pod_check.pl line 99.

An advice would be appreciated.

thanks

  • Comment on Failes to find a module with Strawbery 5.30

Replies are listed 'Best First'.
Re: Failes to find a module with Strawbery 5.30
by syphilis (Archbishop) on Jul 01, 2019 at 08:29 UTC
    Can't locate Win32/Capture.pm in @INC ...

    For me on Strawberry-5.30.0 the building of Win32::GUI::DIBitmap is being skipped because that module can't be built using gcc. At least that's what the Makefile.PL claims.
    Therefore that module does not get installed.
    However, that module is a pre-requisite for Win32::Capture ... therefore Win32::Capture won't install.
    You can force the installation of Win32::Capture by cd'ing to the Win32::Capture build directory and running gmake install
    For me that build directory was C:\Users\me\.cpan\build\Win32-Capture-1.6-1.
    However, doing so is futile:
    C:\>perl -MWin32::Capture -le 1 Can't locate Win32/GUI/DIBitmap.pm in @INC (you may need to install th +e Win32::GUI::DIBitmap module) (@INC contains: C:/_64/strawberry-5.30 +.0/perl/site/lib C:/_64/strawberry-5.30.0/perl/vendor/lib C:/_64/stra +wberry-5.30.0/perl/lib) at C:/_64/strawberry-5.30.0/perl/site/lib/Win +32/Capture.pm line 8. BEGIN failed--compilation aborted at C:/_64/strawberry-5.30.0/perl/sit +e/lib/Win32/Capture.pm line 8. Compilation failed in require at -e line 1.
    I don't see much chance of a workaround. According to its Makefile.pl, Win32::GUI::DIBitmap won't even build with 64 bit msvc compiler.
    Do you have a 32 bit Microsoft compiler handy ?

    Another hack is to edit Win32/Capture.pm so that it no longer tries to load Win32::GUI::DIBitmap, but I suspect (untested) that might render Win32::Capture unusable.
    Still, it's something else for you to try if you think it might be useful.

    Cheers,
    Rob

      Thanks,Rob. Very usefull info...Will try to get away without this module.

Re: Failes to find a module with Strawbery 5.30
by haukex (Archbishop) on Jul 01, 2019 at 08:22 UTC

    Have you checked that Capture.pm actually exists in one of those locations? Do you perhaps have two versions of Perl on this machine (and the installation accidentally went to the wrong one)? What method did you use to install the module (cpan, cpanm, etc.)? Perhaps you could try running the installation again and showing us the output, in <code> tags.

      This worked !!!

      C:\> cpan cpan> look PAR::Packer C:\Dwimperl\cpan\build\PAR-Packer-1.014-81Pw9j> perl Makefile.pl C:\Dwimperl\cpan\build\PAR-Packer-1.014-81Pw9j> dmake -f Makefile inst +all

      thanks,All this was checked and retried upfront.