July 04, 2008, 23:52:29 *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: Please support SEO4smf further development donating here or use paypal button from left menu.
 
  Home   Forum   Help Search Directory Calendar Login Register    RSS 2.0 feedAtom feed


News
Please support SEO4smf further development donating here or use paypal button from left menu.
Pages: [1]
  Print  
Author Topic:

Debugging Perl

 (Read 1345 times)
0 Members and 1 Guest are viewing this topic.
xulescu
Full Member
***

Points: 8
Offline Offline

Posts: 245


WWW
« on: August 02, 2006, 21:07:42 »


How can I debug perl programs ? I have some sources from someone else and I need to see why are not working anymore ...


Thanks

Logged



TheGodFather
Administrator
Hero Member
*****

Points: 202
Offline Offline

Posts: 2570



WWW
« Reply #1 on: August 02, 2006, 21:15:29 »

add in your source :

use diagnostics;
use warnings;

or add -w to your perl interpreter or -W for all warnings

This are just to see warnings ... but it can help

Regards
Logged

sintex
Jr. Member
**

Points: 7
Offline Offline

Posts: 96


« Reply #2 on: August 02, 2006, 21:32:35 »

Hi,

Just try: perl -d program.pl

or install through cpan the Tk Perl debuger (Devel::ptkdb debugger)

Code:
perl -MCPAN -e'install Tk'
perl -MCPAN -e'install Devel::ptkdb'

and to debug
Code:
perl -d:ptkdb bug.pl bug.pl


Have a nice day Smiley
« Last Edit: August 02, 2006, 23:54:18 by TheGodFather » Logged
xulescu
Full Member
***

Points: 8
Offline Offline

Posts: 245


WWW
« Reply #3 on: August 03, 2006, 16:50:53 »

Thanks ... I will try that. What is Cpan ?
Logged

TheGodFather
Administrator
Hero Member
*****

Points: 202
Offline Offline

Posts: 2570



WWW
« Reply #4 on: August 03, 2006, 20:43:14 »

Quote
Comprehensive Perl Archive Network. The central Web repository for Perl modules and extensions.

Regards
Logged

Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.4 | SMF © 2006, Simple Machines LLC
Seo4Smf v0.2 © Webmaster's Talks

TinyPortal v0.9.7 © Bloc
Valid XHTML 1.0! Valid CSS!