Skip Menu |

This queue is for tickets about the PAR CPAN distribution.

Report information
The Basics
Id: 5938
Status: rejected
Priority: 0/
Queue: PAR

People
Owner: Nobody in particular
Requestors: george [...] gamespanker.com
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: (no value)
Fixed in: (no value)

Attachments


Subject: Win32::Daemon with PAR (0.79)
the service works fine as perl, but when I try to use PAR to convert it to an exe when I run it I get the following error. Can't locate loadable object for module Win32::Daemon in @INC (@INC contains: CODE(0xdadd68) CODE(0xd294f8) .) at ../blib/lib/PAR/Heavy.pm line 101 Compilation failed in require at script/gtheperlgod.pl line 3. BEGIN failed--compilation aborted at script/gtheperlgod.pl line 3. line 3 happens to be where I call use Win32::Daemon; Usually par takes care of grabbing whatever is needed to make the 3executable, but it doesn't seem to grab Win32::Daemon in this case. I am trying to avoid having to install perl on every machine that I want to setup a service on. Any help would be great feel free to contact me for more information. george@gamespanker.com
#!perl use Win32::Daemon; my $param = shift; my $servicename = 'ServiceName'; %Hash = ( machine => '', name => $servicename, display => 'Displayed Name', path => $^X, user => '', pwd => '', description => 'Description of the service.', parameters => 'c:\perlzone\service\gtheperlgod.pl "c:\perlzone\service"' ); if ($param eq "-install") { if (Win32::Daemon::CreateService(\%Hash)) { print "\n$servicename installed successfully!\n"; } else { print "\n$servicename installtion failed: " . Win32::FormatMessage(Win32::Daemon::GetLastError()); } exit(); } if ($param eq "-uninstall") { if (Win32::Daemon::DeleteService ('', $servicename)) { print "\n$servicename uninstalled successfully!\n"; } else { print "\n$servicename uninstallation failed: " . Win32::FormatMessage(Win32::Daemon::GetLastError()); } exit(); } open (LOG, ">> $0.log"); select(LOG); $| = 1; Win32::Daemon::StartService(); logwrite("Service Starting"); while (SERVICE_STOPPED != Win32::Daemon::State()) { if (SERVICE_START_PENDING == Win32::Daemon::State()) { Win32::Daemon::State(SERVICE_RUNNING); logwrite("Service Started"); } if (SERVICE_STOP_PENDING == Win32::Daemon::State()) { Win32::Daemon::State(SERVICE_STOPPED); logwrite("Service Stopping"); } if (SERVICE_RUNNING == Win32::Daemon::State()) { # Program Here logwrite("Failure: net send gebitt Hi") if (system("net send gebitt Hi")); sleep(30); } sleep(1); } Win32::Daemon::StopService(); logwrite("Service Stopped\n"); sub logwrite { print "[" . localtime() . "] $_[0]\n"; }
Date: Tue, 6 Apr 2004 03:21:16 +0800
From: Autrijus Tang <autrijus [...] autrijus.org>
To: Guest via RT <bug-PAR [...] rt.cpan.org>
CC: "AdminCc of cpan Ticket #5938": ;
Subject: Re: [cpan #5938] Win32::Daemon with PAR (0.79)
RT-Send-Cc:
On Mon, Apr 05, 2004 at 03:00:15PM -0400, Guest via RT wrote: Show quoted text
> Can't locate loadable object for module Win32::Daemon in @INC (@INC contains: CODE(0xdadd68) CODE(0xd294f8) .) at ../blib/lib/PAR/Heavy.pm line 101 Compilation failed in require at script/gtheperlgod.pl line 3.
Which PAR version was this? Is your Daemon.dll named Daemon.dll and not daemon.dll? It should be in auto/Win32/Daemon/. Thanks, /Autrijus/
Download (untitled)
application/pgp-signature 187b

Message body not shown because it is not plain text.

OP didn't react for two years.