in reply to Re^3: I wish to monitor and react according to windows "Task Manager"
in thread I wish to monitor and react according to windows "Task Manager"

for only these two lines:
use Win32::Process::Info;
#!/usr/bin/perl -w
use strict;
my $pi = Win32::Process::Info->new (undef, 'WMI');

I get:
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:\try7.pl line 6

What culd be the cause?
  • Comment on Re^4: I wish to monitor and react according to windows "Task Manager"

Replies are listed 'Best First'.
Re^5: I wish to monitor and react according to windows "Task Manager"
by Corion (Patriarch) on Dec 29, 2004 at 11:35 UTC

    I count four lines:

    #!/usr/bin/perl -w use strict; use Win32::Process::Info; my $pi = Win32::Process::Info->new (undef, 'WMI');

    and for me, using Windows 2000 and Perl 5.8.5, the snippet compiles without any problem. I'm using version 1.002 of Win32::Process::Info:

    C:\Projekte>perl -MWin32::Process::Info -e "die $Win32::Process::Info: +:VERSION" 1.002 at -e line 1, <DATA> line 164.
      I am using Perl 5.8.6 on windows XP
      and my Win32::Process::Info is of version 1.003

      Do you think XP might be the problem?
        Do you think XP might be the problem?

        I'm using 5.8.4 on XP with Win32::Process::Info v1.002 and it works okay.

        I have downloaded 5.8.6 and I might get around to installing it later--I'll update and /msg you this if I do.


        Examine what is said, not who speaks.
        Silence betokens consent.
        Love the truth but pardon error.