Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Errors while running Win32::Process on WinXP

by moked (Beadle)
on Dec 30, 2004 at 09:48 UTC ( #418224=perlquestion: print w/ replies, xml ) Need Help??
moked has asked for the wisdom of the Perl Monks concerning the following question:

Hi Monks

while running the next code on WinXP

#!/usr/bin/perl -w

use strict;
use Win32::Process::Info;

my $pi = Win32::Process::Info->new (undef, 'WMI'); #line 6

I got the next error:
Odd number of elements in anonymous hash at C:/Perl/lib/Win32/Process/Info.pm line 202.
Can't locate object method "_Typelibs" via package "Win32::OLE::Const" at C:/Perl/lib/Win32/OLE/Cons t.pm line 20.
Compilation failed in require at C:/Perl/lib/Win32/Process/Info/WMI.pm line 162.
BEGIN failed--compilation aborted at C:/Perl/lib/Win32/Process/Info/WMI.pm line 162.
Compilation failed in require at C:/Perl/lib/Win32/Process/Info.pm line 199. at C:\try8.pl line 6

my perl version is 5.8.6
and my Win32::Process::Info::VERSION is 1.003

I'm kind of stuck with this error
and I need help
am I missing a module?
has anyone ever see this error?

Comment on Errors while running Win32::Process on WinXP
Re: Errors while running Win32::Process on WinXP
by PodMaster (Abbot) on Dec 30, 2004 at 10:30 UTC
    my perl version is 5.8.6 and my Win32::Process::Info::VERSION is 1.003
    The error message clearly identifies Win32::OLE::Const, so which version of Win32::OLE::Const version do you have (or rather which version of Win32::OLE)? Try upgrading.

    MJD says "you can't just make shit up and expect the computer to know what you mean, retardo!"
    I run a Win32 PPM repository for perl 5.6.x and 5.8.x -- I take requests (README).
    ** The third rule of perl club is a statement of fact: pod is sexy.

      I Do seem to have a problem with my Win32::OLE
      I tried to find the version and what I got was:

      C:\>perl -MWin32::OLE::Const -e "die $Win32::OLE::Const::VERSION"
      and the output was
      Win32::OLE object version 0.1403 does not match $Win32::OLE::VERSION 0 +.17 at C:/Perl/lib/DynaLoader. pm line 253. Compilation failed in require at C:/Perl/lib/Win32/OLE/Const.pm line 7 +. BEGIN failed--compilation aborted at C:/Perl/lib/Win32/OLE/Const.pm li +ne 7. Compilation failed in require. BEGIN failed--compilation aborted.
      which of these versions is the bad one?
      when I intalled the Win32-OLE.ppd I saw that it was installed into
      C:\perl\site\lib and NOT C:\perl\lib
      is this OK??
Re: Errors while running Win32::Process on WinXP
by sasikumar (Monk) on Dec 30, 2004 at 10:31 UTC
    Hi moked

    Please use the module Win32::Process::Info and Win32::OLE from active state. Use the ppm to install your module. Active state has the version 1.002. This should fix your problem.

    In the command prompt type
    ppm install Win32-Process-Info ppm install Win32-OLE

    (I have asumed that you have used the active state perl)

    Thanks
    SasiKumar
      I have istalled all of the above

      and the error messege remains

      Moked
Re: Errors while running Win32::Process on WinXP
by sasikumar (Monk) on Dec 30, 2004 at 13:48 UTC

    Please let us know the version of all the packages. I dont have a winxp system to reproduce the problem.
    Thanks
    SasiKumar
Re: Errors while running Win32::Process on WinXP
by moked (Beadle) on Dec 30, 2004 at 14:21 UTC
    As I wrote Befroe, it seems the error is in the Win32::OLE
    since I tried to find the Win32::OLE version so I wrote:

    C:\>perl -MWin32::OLE::Const -e "die $Win32::OLE::Const::VERSION"
    and the output was
    Win32::OLE object version 0.1403 does not match $Win32::OLE::VERSION 0 +.17 at C:/Perl/lib/DynaLoader. pm line 253. Compilation failed in require at C:/Perl/lib/Win32/OLE/Const.pm line 7 +. BEGIN failed--compilation aborted at C:/Perl/lib/Win32/OLE/Const.pm li +ne 7. Compilation failed in require. BEGIN failed--compilation aborted.
    does antone knows how to deal with this error?

      The Win32 libraries should reside under X:/Perl/lib/Win32 (where X is the drive you installed Perl on). You can do one of the following.

      1. move the Win32 directory from c:/Perl/lib to c:/Perl/site/lib (ending up with OLE::Const at c:/Perl/lib/Win32/OLE/Const.pm) and reinstall Win32::OLE
      2. or delete the Win32 directory from c:/Perl/lib/ and reinstall any missing modules

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://418224]
Approved by BrowserUk
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others pondering the Monastery: (13)
As of 2015-07-02 13:07 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (38 votes), past polls