author | Oleksandr Gavenko <gavenkoa@gmail.com> |
Mon, 22 Feb 2016 12:46:36 +0200 | |
changeset 1905 | fba288d59662 |
parent 1480 | c8f7a7a5c5f8 |
child 1912 | 8b81a8f0f692 |
permissions | -rw-r--r-- |
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 |
.. include:: HEADER.rst |
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 |
======= |
446235725c2b
Print stack trace in Perl.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
5 |
Perl. |
446235725c2b
Print stack trace in Perl.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
6 |
======= |
446235725c2b
Print stack trace in Perl.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
7 |
.. contents:: |
1905
fba288d59662
Include only local subsections into TOC. This prevent duplication of
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1480
diff
changeset
|
8 |
:local: |
1479
446235725c2b
Print stack trace in Perl.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
9 |
|
446235725c2b
Print stack trace in Perl.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
10 |
Print stack trace in Perl. |
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 |
|
446235725c2b
Print stack trace in Perl.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
14 |
use Devel::StackTrace; |
446235725c2b
Print stack trace in Perl.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
15 |
my $trace = Devel::StackTrace->new; |
446235725c2b
Print stack trace in Perl.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
16 |
print $trace->as_string; # like carp |
1480
c8f7a7a5c5f8
Print execution trace in Perl.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1479
diff
changeset
|
17 |
|
c8f7a7a5c5f8
Print execution trace in Perl.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1479
diff
changeset
|
18 |
Print execution trace in Perl. |
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 |
|
c8f7a7a5c5f8
Print execution trace in Perl.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1479
diff
changeset
|
21 |
``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
|
22 |