I am new to PERL. Does anyone know of a PERL IDE for Linux ( I am using SuSE 8.2 Pro). I would like to find something that would allow some form of debugging (i.e. breakpoints, watches,...). Is this possible with PERL. TIA Darrell Cormier
I do not know but here are some possibilities. http://www.perlmonks.org/ (they are very helpful) perldoc debug Another way is to trap the WARN and DIE signals and make them write to a log file for viewing after the script runs. I guess one could view the log file with tail -f also. #!/usr/bin/perl ############################ # # this is the main area # # start by calling &setup_debugging(); # it will set things up and call main() # the main program logic is in main() and the subs it calls # ############################ &setup_debugging($my_logger_file_path); exit; sub main { # main program logic &example_sub(); } sub example_sub { if (1 == 2) {die ('Something is very wrong here.');} else {warn ('Everything is fine here.');} } ############################ # # this sets up the warns and dies and logging as local variables # then it calls main() # ############################ sub setup_debugging { my ($log_file_name) = @_; # set at least 3 local variables # these three vars are known by main and its subs # 1) $SIG{'__DIE__'} # 2) $SIG{'__WARN__'} # 3) $log (the object that logs die and warn messages) local ($log); local $SIG{'__DIE__'} = my_die; local $SIG{'__WARN__'} = my_warn; # initialize the logger $log = new MyLogger($log_file_name); $log->add_message("Start of Job."); &main(); $log->add_message("End of Job."); } sub my_die { my ($message) = @_; # add the message to the log file # exit the script. $log->add_message('Fatal Error: ' . $message); exit; } sub my_warn { my ($message) = @_; # add the message to the log file $log->add_message($message); }
* joe budd
I do not know but here are some possibilities.
http://www.perlmonks.org/ (they are very helpful)
perldoc debug
Another way is to trap the WARN and DIE signals and make them write to a log file for viewing after the script runs. I guess one could view the log file with tail -f also.
perl -MCPAN -e 'install Devel::ptkdb' now you can start perl-scripts with graphical debugger perl -d:ptkdb test_debug.pl cu -- RayMan
On Thursday 19 June 2003 03:07, Darrell Cormier wrote:
I am new to PERL. Does anyone know of a PERL IDE for Linux ( I am using SuSE 8.2 Pro). I would like to find something that would allow some form of debugging (i.e. breakpoints, watches,...). Is this possible with PERL.
There's Komodo from Activestate. It's commercial software and I haven't used it myself. It's won awards though, so it can't be that bad. If it's just a debugger you want, try ddd. That's a free "debugger front end", and it's very good. I've used it extensively for C and C++ work, and I'm pretty sure it does Perl too. It's on the SuSE disks. To be honest, there isn't much choice for what you want because there isn't much demand. A decent editor and the -d flag are all that most people require. -- "...our desktop is falling behind stability-wise and feature wise to KDE ...when I went to Mexico in December to the facility where we launched gnome, they had all switched to KDE3." - Miguel de Icaza, March 2003
Derek Fountain wrote:
On Thursday 19 June 2003 03:07, Darrell Cormier wrote:
I am new to PERL. Does anyone know of a PERL IDE for Linux ( I am using SuSE 8.2 Pro). I would like to find something that would allow some form of debugging (i.e. breakpoints, watches,...). Is this possible with PERL.
There's Komodo from Activestate. It's commercial software and I haven't used it myself. It's won awards though, so it can't be that bad.
If it's just a debugger you want, try ddd. That's a free "debugger front end", and it's very good. I've used it extensively for C and C++ work, and I'm pretty sure it does Perl too. It's on the SuSE disks.
To be honest, there isn't much choice for what you want because there isn't much demand. A decent editor and the -d flag are all that most people require.
Thanks for everyones' inputs. I will try some of these suggestions. Thanks again, Darrell Cormier
participants (4)
-
Darrell Cormier
-
Derek Fountain
-
joe budd
-
Remo Behn