1StackTrace::Auto(3)   User Contributed Perl Documentation  StackTrace::Auto(3)
2
3
4

NAME

6       StackTrace::Auto - a role for generating stack traces during
7       instantiation
8

VERSION

10       version 1.001
11

SYNOPSIS

13       First, include StackTrace::Auto in a Moose or Mooclass...
14
15         package Some::Class;
16         # NOTE: Moo can also be used here instead of Moose
17         use Moose;
18         with 'StackTrace::Auto';
19
20       ...then create an object of that class...
21
22         my $obj = Some::Class->new;
23
24       ...and now you have a stack trace for the object's creation.
25
26         print $obj->stack_trace->as_string;
27

PERL VERSION

29       This library should run on perls released even a long time ago.  It
30       should work on any version of perl released in the last five years.
31
32       Although it may work on older versions of perl, no guarantee is made
33       that the minimum required version will not be increased.  The version
34       may be increased for any reason, and there is no promise that patches
35       will be accepted to lower the minimum required perl.
36

ATTRIBUTES

38   stack_trace
39       This attribute will contain an object representing the stack at the
40       point when the error was generated and thrown.  It must be an object
41       performing the "as_string" method.
42
43   stack_trace_class
44       This attribute may be provided to use an alternate class for stack
45       traces.  The default is Devel::StackTrace.
46
47       In general, you will not need to think about this attribute.
48
49   stack_trace_args
50       This attribute is an arrayref of arguments to pass when building the
51       stack trace.  In general, you will not need to think about it.
52

AUTHORS

54       •   Ricardo SIGNES <cpan@semiotic.systems>
55
56       •   Florian Ragwitz <rafl@debian.org>
57
59       This software is copyright (c) 2022 by Ricardo SIGNES.
60
61       This is free software; you can redistribute it and/or modify it under
62       the same terms as the Perl 5 programming language system itself.
63
64
65
66perl v5.38.0                      2023-07-21               StackTrace::Auto(3)
Impressum