perl.rst
author Oleksandr Gavenko <gavenkoa@gmail.com>
Sat, 10 Feb 2018 01:36:16 +0200
changeset 2229 1a0b6597e594
parent 1912 8b81a8f0f692
permissions -rw-r--r--
Mark block quot in HTMLe.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
1479
446235725c2b Print stack trace in Perl.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
     1
.. -*- coding: utf-8; -*-
446235725c2b Print stack trace in Perl.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
     2
446235725c2b Print stack trace in Perl.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
     3
=======
446235725c2b Print stack trace in Perl.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
     4
 Perl.
446235725c2b Print stack trace in Perl.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
     5
=======
446235725c2b Print stack trace in Perl.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
     6
.. contents::
1905
fba288d59662 Include only local subsections into TOC. This prevent duplication of
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1480
diff changeset
     7
   :local:
1479
446235725c2b Print stack trace in Perl.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
     8
446235725c2b Print stack trace in Perl.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
     9
Print stack trace in Perl.
446235725c2b Print stack trace in Perl.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    10
==========================
446235725c2b Print stack trace in Perl.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    11
::
446235725c2b Print stack trace in Perl.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    12
446235725c2b Print stack trace in Perl.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    13
  use Devel::StackTrace;
446235725c2b Print stack trace in Perl.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    14
  my $trace = Devel::StackTrace->new;
446235725c2b Print stack trace in Perl.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    15
  print $trace->as_string; # like carp
1480
c8f7a7a5c5f8 Print execution trace in Perl.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1479
diff changeset
    16
c8f7a7a5c5f8 Print execution trace in Perl.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1479
diff changeset
    17
Print execution trace in Perl.
c8f7a7a5c5f8 Print execution trace in Perl.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1479
diff changeset
    18
==============================
c8f7a7a5c5f8 Print execution trace in Perl.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1479
diff changeset
    19
c8f7a7a5c5f8 Print execution trace in Perl.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1479
diff changeset
    20
``Devel::Trace`` print out each line before it is executed (like ``sh -x``).
c8f7a7a5c5f8 Print execution trace in Perl.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1479
diff changeset
    21