[Rio-pm] Perl Realtime Debug

Randal L. Schwartz merlyn em stonehenge.com
Quarta Setembro 14 17:15:54 PDT 2011


>>>>> "Thiago" == Thiago Jose Lucas <thiagojlucas at gmail.com> writes:

Thiago>     Sou iniciante em Perl e tenho uma dúvida. Quando queremos "ver" a execução
Thiago> (debug realtime) de um shellscript, usamos a opção "sh -x", preciso fazer o
Thiago> mesmo com uma rotina em perl que tenho aqui, para entendê-la.
Thiago>     Alguém sabe me dizer se há como fazer isso, ou se essa é a melhor maneira?

Thiago>     PS.: Tentei usar o "perl -d", mas gostaria que não houvesse interação
Thiago> (next, next)...

$ perldoc perldebug
...
       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 intervention, 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 compatibility.
...

-- 
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<merlyn at stonehenge.com> <URL:http://www.stonehenge.com/merlyn/>
Smalltalk/Perl/Unix consulting, Technical writing, Comedy, etc. etc.
See http://methodsandmessages.posterous.com/ for Smalltalk discussion


Mais detalhes sobre a lista de discussão Rio-pm