October 13, 2008, 02:25:00 *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: Revenue sharing launched. This is offered as a "thank you" for being a member of webmasterstalks.com community! If you have an Adsense/Yahoo publisher account then you can start right away !
 
  Home   Forum   Help Search Directory Calendar Login Register    RSS 2.0 feedAtom feed


News
Revenue sharing launched. This is offered as a "thank you" for being a member of webmasterstalks.com community! If you have an Adsense/Yahoo publisher account then you can start right away !
Pages: [1]
  Print  
Author Topic:

Debugging Perl

 (Read 1473 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!