Try Devel::Trace you can get it from CPAN or you add print statements (that
write to a log file) to your script.
Your problem sound more like a user lp does not have permission to do
something (e.g., access a file or run a command) or it could be a path or
environment problem, since lp does not has no user environment.  You might
have you script print some of the environment variables to a log file.
Since I have no idea what your script is doing I'm only guessing.

Hope this helps,
Craig

> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:perl-unix-
> [EMAIL PROTECTED]] On Behalf Of
> [EMAIL PROTECTED]
> Sent: Thursday, January 23, 2003 12:44 PM
> To: [EMAIL PROTECTED]
> Subject: [Perl-unix-users] debugging option
> 
> Is there a more detailed debugging option to use on perl besides -w? I am
> currently using #!/bin/perl -w but it does not catch the error I am
> running
> into. Something equivalent to the -x option shell scripts use, would be
> really useful. The script is used for printing to an IBM printer. It
> determines the report type, size and then it prints to the printer. The
> script itself does not seem to contain any errors, because it works fine
> if
> I run it as user root, but the problem is when I run it as user lp, and is
> something I have no control of, since the third party software my company
> uses (vista plus,) requires lp to run it. When the script is run by user
> lp, it finishes right away, giving no error messages, but report is not
> printed, and if I do echo $?, it shows exit status 30. As a matter of fact
> the script seems to work fine only by user root, no other ID's, which
> leads
> me to believe it is a permissions issue, but where? I have nothing to work
> with. If I can look at what the script is doing step by step and determine
> at what point if any it gets stuck, then I may get somewhere.
> 
> 
> _______________________________________________
> Perl-Unix-Users mailing list
> [EMAIL PROTECTED]
> To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Attachment: Devel-Trace-0.10.readme
Description: Binary data

Reply via email to