1StackTrace::Auto(3) User Contributed Perl Documentation StackTrace::Auto(3)
2
3
4
6 StackTrace::Auto - a role for generating stack traces during
7 instantiation
8
10 version 0.102080
11
13 First, include StackTrace::Auto in a Moose class...
14
15 package Some::Class;
16 use Moose;
17 with 'StackTrace::Auto';
18
19 ...then create an object of that class...
20
21 my $obj = Some::Class->new;
22
23 ...and now you have a stack trace for the object's creation.
24
25 print $obj->stack_trace->as_string;
26
28 stack_trace
29 This attribute will contain an object representing the stack at the
30 point when the error was generated and thrown. It must be an object
31 performing the "as_string" method.
32
33 stack_trace_class
34 This attribute may be provided to use an alternate class for stack
35 traces. The default is Devel::StackTrace.
36
37 In general, you will not need to think about this attribute.
38
39 stack_trace_args
40 This attribute is an arrayref of arguments to pass when building the
41 stack trace. In general, you will not need to think about it.
42
44 · Ricardo SIGNES <rjbs@cpan.org>
45
46 · Florian Ragwitz <rafl@debian.org>
47
49 This software is copyright (c) 2010 by Ricardo SIGNES.
50
51 This is free software; you can redistribute it and/or modify it under
52 the same terms as the Perl 5 programming language system itself.
53
54
55
56perl v5.12.1 2010-07-27 StackTrace::Auto(3)