Re: [Perl-unix-users] debugging option

2003-01-24 Thread Parashar Vivek
Hi !!!
friend you can use ddd i.e visual debugger
i think it might prove helpful.

regards
vivek

> [EMAIL PROTECTED] wrote:
> 
> 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

-- 



===
 Peaceful Crazy
Feelin'  

===

   Feel free to mail me at :

[EMAIL PROTECTED]
[EMAIL PROTECTED]






===
If God made men, Samuel Colt made then equal.

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



RE: [Perl-unix-users] debugging option

2003-01-24 Thread Matt Schneider
Diar,

There is also a -d option that runs the perl debugger.  This is an option
that allows you to step through the running program one line of code at a
time and to things like print to the screen exactly what a variable contains
a particular point.  It is very robust but takes a bit to get familiar with
because it has so many commands.

Matt Schneider 
Programmer/System Administrator 
SKLD Information Services, LLC 



-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Thursday, January 23, 2003 1: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
___
Perl-Unix-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs



RE: [Perl-unix-users] debugging option

2003-01-24 Thread Jenda Krynicky
From: Matt Schneider <[EMAIL PROTECTED]>
> There is also a -d option that runs the perl debugger.  This is an
> option that allows you to step through the running program one line of
> code at a time and to things like print to the screen exactly what a
> variable contains a particular point.  It is very robust but takes a
> bit to get familiar with because it has so many commands.
> 
> Matt Schneider 

If you are not a commandline-geek you may want to try 
http://world.std.com/~aep/ptkdb/

Jenda
= [EMAIL PROTECTED] === http://Jenda.Krynicky.cz =
When it comes to wine, women and song, wizards are allowed 
to get drunk and croon as much as they like.
-- Terry Pratchett in Sourcery

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



RE: [Perl-unix-users] Hash in win and Unix

2003-01-24 Thread Craig B. Nakata
Pablo,

For @keys=%gen try
@keys = keys(%gen)

Hope this helps
Craig

> -Original Message-
> From: [EMAIL PROTECTED] [mailto:perl-unix-
> [EMAIL PROTECTED]] On Behalf Of [EMAIL PROTECTED]
> Sent: Thursday, January 23, 2003 7:36 AM
> To: [EMAIL PROTECTED]
> Subject: [Perl-unix-users] Hash in win and Unix
> 
> Ok, for those of you that ask for an example:
> in windows I read a file and store as hash, let's say %gen.
> 
>  @keys=%gen;
> print $keys[0];#will produce the rigth thing, 'At1G0100'
> 
> But if in Unix I read a list from a file, let's say @list_names
>  print $list_names[34];# will produce 'At1G0100', and
>  print $gen{$list_names[34]}; #won't work, again not in unix but fine
> in windows.
>  print $gen{$keys[0]};# it will work fine, printing the contents of the
> hash.
> 
> Thanks for the interest.
> Pablo T.
> 
> ___
> Perl-Unix-Users mailing list
> [EMAIL PROTECTED]
> To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

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



RE: [Perl-unix-users] debugging option

2003-01-24 Thread Craig B. Nakata
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



Devel-Trace-0.10.readme
Description: Binary data