Aaargh!!!!  Comes from looking at your own code too long.   Thanks.

Chris D. Garringer
LAN/WAN Manager
Master Certified Netware Engineer
Microsoft Certified Systems Engineer
Certified Solaris Administrator
Red Hat Certified Engineer
[EMAIL PROTECTED]
fax 713-896-5266


>>> "Bill Odom" <[EMAIL PROTECTED]> 08/10/01 10:01AM >>>
Chris Garringer [mailto:[EMAIL PROTECTED]] said:
>
> I need to read a Win2k Event log (Application).
> ...
> I got the Win32::Eventlog module and setup per the documentation
> ...
> use Win32::Eventlog;
> ...
> I get a compile-time error
> Can't locate object method new via package
> "Win32::Eventlog (perhaps you forgot to load Win32::Eventlog
>

It's a case problem.  Try Win32::EventLog (notice the uppercase 'L'
there in the middle of 'EventLog') instead of Win32::Eventlog.

--Bill


-----Original Message-----
From: Chris Garringer [mailto:[EMAIL PROTECTED]]
Sent: Friday, August 10, 2001 9:15 AM
To: [EMAIL PROTECTED]
Subject: Win32::Eventlog on ActiveState


I need to read a Win2k Event log (Application).  I am running Active State
(downloaded last week) on this machine.  I got the Win32::Eventlog module
and setup per the documentation (I think)
use strict;
use Win32::Eventlog;
..
$Win32::Eventlog::GetMessageText=1;
my
$evtflags=$Win32::Eventlog::EVENTLOG_BACKWARDS_READ|$Win32::Eventlog::EVENTL
OG_SEQUENTIAL_READ;
.
..
$evthandle=Win32::Eventlog->new("Application")||($message=$message."Cannot
open eventlog\n");
...
...

I get a compile-time error
Can't locate object method new via package "Win32::Eventlog (perhaps you
forgot to load Win32::Eventlog

It is obviously loaded, I get no complaints about the variables used before
the call to new.  I have compared this to the documentation and it is an
exact match.  I also tried it without the || <statement> and got the same
problem.  What am I doing wrong?  Or is the documentation wrong?



Chris D. Garringer
LAN/WAN Manager
Master Certified Netware Engineer
Microsoft Certified Systems Engineer
Certified Solaris Administrator
Red Hat Certified Engineer
[EMAIL PROTECTED]
fax 713-896-5266


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to