The code you have posted seems to work fine to the extent I can test it. I left out the sub Startup ... and made 3 changes:
#use System::System_Constants; ... our $progname = q{Constants::APPLICATION_SERVICE_NAME_SHORT}; ... #Log("\n ProgName: $progname \n");
I simply tested with:
$ cat pm_perlsvc.pl #!/usr/bin/env perl use strict; use warnings; use PerlSvc;
which produces
$ pm_perlsvc.pl Path: /Users/ken/tmp/pm_perlsvc.pl Program Dir: /Users/ken/tmp/ Logfile: /Users/ken/tmp/SCC_Service.log
I see you've used File::Spec->splitpath() to get the path elements. For portability, I would recommend using File::Spec->catpath() rather than the concatenation operator (.) when joining path elements.
You haven't shown the code where you are attempting to call PerlSvc::Startup() which makes debugging from this end rather difficult.
I notice a lot of variables declared with our. If they need to be declared like this, check that you're not modifying $PerlSvc::path, $PerlSvc::directory, etc. outside of the PerlSvc package; if our $whatever is not a requirement, change it to my $whatever.
If none of that helps, post the code with the call to PerlSvc::Startup() for a better answer.
-- Ken
In reply to Re: PerlSVC and Cwd::abs_path
by kcott
in thread PerlSVC and Cwd::abs_path
by chowlb
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |