blib/lib/Template/Plugin/Devel/StackTrace.pm

filter: Statementstmt 95.6% 22 / 23 Branchbran 50.0% 1 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 7 / 7 Podpod 100% 1 / 1 totaltotal 93.9% 31 / 33 CC 2 SCAR 2.4
CC
2
Cov
92%
new
2.1
BEGIN
1.0
BEGIN
1.0
CRAP 1.3
↑ Summary
1 package Template::Plugin::Devel::StackTrace;
2 2 ▶use Devel::StackTrace;
Subroutine BEGIN: called CC=1 SCAR=0.0
3 2 ▶use Template::Plugin;
Subroutine BEGIN: called CC=1 SCAR=0.0
4  
5 2 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
6 2 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
7  
8 =head1 NAME
9  
10 Template::Plugin::Devel::StackTrace - A Template Plugin To Use Devel::StackTrace objects
11  
12 =head1 VERSION
13  
14 Version 0.01
15  
16 =cut
17 2 ▶use vars qw($VERSION @ISA);
Subroutine BEGIN: called CC=1 SCAR=0.0
18 BEGIN
19 2 ▶{
Subroutine BEGIN: called CC=1 SCAR=0.0
20 2 $VERSION = '0.02';
21 2 @ISA = qw(Template::Plugin);
22 }
23  
24  
25 =head1 SYNOPSIS
26  
27 [%
28 USE Devel.StackTrace;
29 Devel.StackTrace.as_string;
30 %]
31 or
32 [%
33 USE Devel.StackTrace({ignore_package => 'Net::Server'});
34 Catalyst.log.warn(Devel.StackTrace.as_string);
35 %]
36  
37 =head1 DESCRIPTION
38  
39 Gives you a back an instance of a Devel::StackTrace.
40  
41 =head1 METHODS
42  
43 =head2 new
44  
45 This is used internally. You won't be using it from your templates.
46  
47 =cut
48  
49 1 ▶sub new {
Subroutine new: called CC=2 SCAR=7.4
Pod documented
50 1 shift; #Shift off classname
51 1 shift; #Shift off context
52 0 ▶ my %args = ref($_[0]) eq 'HASH' ? %{$_[0]} : ();
Branch: 1 branch
BranchTrueFalseTotal
ref $_[0] eq 'HASH' ? : 0 1 1
53  
54 # boolean args: now, today, last_day_of_month
55 1 return Devel::StackTrace->new(%args);
56 }
57  
58 =head1 CONSTRUCTOR
59  
60 The constructor is the same as Devel::StackTrace
61  
62 =head2 as_string
63  
64 See L<Devel::StackTrace>
65  
66 =head1 SEE ALSO
67  
68 L<Devel::StackTrace>
69  
70 =head1 AUTHOR
71  
72 Samuel Kaufman, C<< <skaufman at cpan.org> >>
73  
74 =head1 BUGS
75  
76 Please report any bugs or feature requests to C<bug-template-plugin-devel-stacktrace at rt.cpan.org>, or through
77 the web interface at L<http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Template-Plugin-Devel-StackTrace>. I will be notified, and then you'll
78 automatically be notified of progress on your bug as I make changes.
79  
80  
81  
82  
83 =head1 SUPPORT
84  
85 You can find documentation for this module with the perldoc command.
86  
87 perldoc Template::Plugin::Devel::StackTrace
88  
89  
90 You can also look for information at:
91  
92 =over 4
93  
94 =item * RT: CPAN's request tracker
95  
96 L<http://rt.cpan.org/NoAuth/Bugs.html?Dist=Template-Plugin-Devel-StackTrace>
97  
98 =item * AnnoCPAN: Annotated CPAN documentation
99  
100 L<http://annocpan.org/dist/Template-Plugin-Devel-StackTrace>
101  
102 =item * CPAN Ratings
103  
104 L<http://cpanratings.perl.org/d/Template-Plugin-Devel-StackTrace>
105  
106 =item * Search CPAN
107  
108 L<http://search.cpan.org/dist/Template-Plugin-Devel-StackTrace>
109  
110 =back
111  
112  
113 =head1 ACKNOWLEDGEMENTS
114  
115  
116 =head1 COPYRIGHT & LICENSE
117  
118 Copyright 2008 Samuel Kaufman, all rights reserved.
119  
120 This program is free software; you can redistribute it and/or modify it
121 under the same terms as Perl itself.
122  
123  
124 =cut
125  
126 2 1; # End of Template::Plugin::Devel::StackTrace
↑ Summary