Loading ...
Sorry, an error occurred while loading the content.

Re: [PBML] Doubt about debugging perlscript

Expand Messages
  • merlyn@stonehenge.com
    ... hellojins I am a novice to perl. I would like to know whether something similar hellojins to set -x option in Unix shell scripting is there in perl.
    Message 1 of 2 , Apr 24 2:48 AM
    • 0 Attachment
      >>>>> "hellojins" == hellojins <jins.thomas@...> writes:

      hellojins> I am a novice to perl. I would like to know whether something similar
      hellojins> to set -x option in Unix shell scripting is there in perl.

      Yes. In "perldoc perldebug" notice:

      Here's an example of using the $ENV{PERLDB_OPTS} variable:

      $ PERLDB_OPTS="NonStop frame=2" perl -d myprogram

      That will run the script myprogram without human interven-
      tion, printing out the call tree with entry and exit
      points. Note that "NonStop=1 frame=2" is equivalent to "N
      f=2", and that originally, options could be uniquely
      abbreviated by the first letter (modulo the "Dump*"
      options). It is nevertheless recommended that you always
      spell them out in full for legibility and future compati-
      bility.

      You can modify that to trace individual lines as well.

      --
      Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
      <merlyn@...> <URL:http://www.stonehenge.com/merlyn/>
      Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
      See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!
    Your message has been successfully submitted and would be delivered to recipients shortly.