2008/8/12 Amit Saxena <[EMAIL PROTECTED]>:
> Hello all,
>
> Is there a way through which I can get following information while executing
> a perl program :-
>
>   - Details of every argument passed to the subroutine and the value (if
>   any) returned from the subroutine
>   - All the SQL statements printed (something like DBI_trace in perl)
>   - Last but not the least, variable value (if possible) affected at
>   various statements
>
> The reason why I need this is I need to inspect a very long perl program
> which in turn uses few perl modules. If I will get some facility like what I
> have asked in the email, I will just execute the program to get all the
> information in a very big log file. Still inspecting the program execution
> pattern like the order in which the subroutines are called, the arguments
> passed and returned and the SQL statement executed will help me to locate
> places where all I need to do the modification.
>
> The other alternative is to use debugger but that's highly interactive.
> Though Perl DBI allows embedding Perl DBI trace statements at various places
> in the program, it requires changes to the complete program which I don't
> want to do.

Are you saying you do not want to use -d?

Have you read this:
http://perldoc.perl.org/perldebtut.html#Stepping-through-code

Failing that I will have to pepper you program with print statements
(and sleep's) and use DBI trace.

Good luck,
Dp.

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/


Reply via email to