On Sat, 3 Apr 2004 12:00:12 -0800, you wrote:

>When I install a newly compiled script as a service, I see the following
>at the command line:
>
>C:\Development\soap>welagent -install
>Sagiss Windows Event Log Agent 0.1
>Use of uninitialized value in concatenation (.) or string at
>/PerlApp/Win32/Daem
>on/Simple.pm line 239.
>    Installed successfully
>    C:\Development\soap\welagent.exe
>Use of uninitialized value in concatenation (.) or string at
>/PerlApp/Win32/Daem
>on/Simple.pm line 240.
>
>=======================
>The 'use' statement I've got in my script is as follows:
>
>use Win32::Daemon::Simple
>    Service => 'welagent',
>    Name => 'Sagiss Windows Event Log Agent',
>    Version => '0.1',
>    Info => {
>        display =>  'Sagiss Windows Event Log Agent',
>        description => 'Polls local Windows event logs and sends events
>to remote server',
>        interactive => 0,
>    },
>    Params => { # the default parameters
>        Tick => 0,
>        Talkative => 0,
>        Interval => 10, # minutes
>        LogFile => undef,
>        Description => <<'*END*',
>Tick : (0/1) controls whether the service writes a "tick" message to
>the log once a minute if there's nothing to do
>Talkative : controls the amount of logging information
>Interval : how often does the service look for new or modified files
>(in minutes)
>LogFile : the path to the log file
>...
>*END*
>    };
>
>
>=======================
>Did I leave something off that '-install' needs?  I tried starting off
>with a very pared-back 'use' statement (including just the Service,
>Name, Version, and Info options), but found that it wouldn't run at all
>without 'Params => {Tick => 0}'.  So I added the 'Params' back, but I'm
>wondering if I need to add back some more.  What are the minimum
>parameters I need to specify?
>
>It appears to be working OK, but I'd like to eliminate the complaining
>it does when I install the service.

I looked in the source, and it appears the print statement is printing
the value of the 'parameters' key stored in the Info hash without
checking to see if it exists. When you use the module with a compiled
file, no value is stored for that hash key. If I've interpreted the code
correctly, adding

parameters => "",

to the Info hash should keep it quiet. In that case, reporting a bug
would be a good idea.

-- 
Eric Amick
Columbia, MD

_______________________________________________
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to