Loginskip to content

Archive for October, 2006

In fact, the debugger for Perl is a

Saturday, October 28th, 2006

In fact, the debugger for Perl is a plugin written using hooks enabled by the -dflag. It’s possible to write programs that do things with those hooks other than present an interactive command line-oriented interface, and several people have done so. We’ve already seen one example, Devel::Coveragein Chapter 6, and we’ll visit Devel::DProfin Chapter 11. 7.2 Starting The -d command line option makes your script run under the debugger. You can either add it to the options in the #! line at the beginning of your script, or you can override the options by explicitly running the script through perl. So for example, if wombat.pl currently has the -w option set, you can either change its first line to #!/usr/bin/perl -wd or you can type % perl -wd wombat.pl to debug it without having to change the script. Unlike some debuggers, with this one you supply arguments to the program on the command line, not as part of a debugger command; for example: % perl -wd wombat.pl kangaroo platypus wallaby The debugger will announce itself and provide a prompt: Loading DB routines from perl5db.pl version 1.07 Emacs support available. Enter h or `h h’ for help. main::(wombat.pl:1): my $marsupial = shift; DB<1> From now on we will elide everything before the first prompt (and the code on which it is stopped) when reproducing debugger sessions. To begin, let’s look at some simple commands. The very first of interest, of course, is hfor help. The output from this is several screens long, which gives us an opportunity to mention an option we can apply to all commands: put a vertical bar (|) before any command and it will run the output through your pager (the program that prints things one screen at a time, waiting for you to tell it when to continue more or less moreor less). 7.2.1 Watch the Code Execute: s, n, r Enter this simple program into debug.pl: #!/usr/local/bin/perl -w
Note: If you are looking for high quality webhost to host and run your jsp application check Vision jsp hosting services

In fact, the debugger for Perl is a

Saturday, October 28th, 2006

6.5 Acceptance Testing You need a way to

Saturday, October 28th, 2006

6.5 Acceptance Testing You need a way to

Saturday, October 28th, 2006

PERL_DL_NONLAZY=1 /usr/bin/perl -Iblib/arch -Iblib/lib -I/usr/ lib/perl5/5.6.0/i586-linux -I/usr/lib/perl5/5.6.0 -e

Friday, October 27th, 2006

PERL_DL_NONLAZY=1 /usr/bin/perl -Iblib/arch -Iblib/lib -I/usr/ lib/perl5/5.6.0/i586-linux -I/usr/lib/perl5/5.6.0 -e

Friday, October 27th, 2006

As if that weren’t enough these Perl people really

Friday, October 27th, 2006

As if that weren’t enough these Perl people really

Friday, October 27th, 2006

Note by the way that the -e flag

Friday, October 27th, 2006

Note by the way that the -e flag

Friday, October 27th, 2006