line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Text::Template::Simple::Dummy; |
2
|
|
|
|
|
|
|
# Dummy Plug provided by the nice guy Mr. Ikari from NERV :p |
3
|
|
|
|
|
|
|
# All templates are compiled into this package. |
4
|
|
|
|
|
|
|
# You can define subs/methods here and then access |
5
|
|
|
|
|
|
|
# them inside templates. It is also possible to declare |
6
|
|
|
|
|
|
|
# and share package variables under strict (safe mode can |
7
|
|
|
|
|
|
|
# have problems though). See the Pod for more info. |
8
|
60
|
|
|
60
|
|
184
|
use strict; |
|
60
|
|
|
|
|
55
|
|
|
60
|
|
|
|
|
1264
|
|
9
|
60
|
|
|
60
|
|
169
|
use warnings; |
|
60
|
|
|
|
|
55
|
|
|
60
|
|
|
|
|
1111
|
|
10
|
60
|
|
|
60
|
|
218
|
use Text::Template::Simple::Caller; |
|
60
|
|
|
|
|
54
|
|
|
60
|
|
|
|
|
919
|
|
11
|
60
|
|
|
60
|
|
185
|
use Text::Template::Simple::Util qw(); |
|
60
|
|
|
|
|
62
|
|
|
60
|
|
|
|
|
4134
|
|
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
our $VERSION = '0.90'; |
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
sub stack { # just a wrapper |
16
|
8
|
|
50
|
8
|
1
|
19
|
my $opt = shift || {}; |
17
|
8
|
50
|
|
|
|
19
|
Text::Template::Simple::Util::fatal('tts.caller.stack.hash') |
18
|
|
|
|
|
|
|
if ref $opt ne 'HASH'; |
19
|
8
|
|
|
|
|
12
|
$opt->{frame} = 1; |
20
|
8
|
|
|
|
|
47
|
return Text::Template::Simple::Caller->stack( $opt ); |
21
|
|
|
|
|
|
|
} |
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
1; |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
__END__ |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
=head1 NAME |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
Text::Template::Simple::Dummy - Container class |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
=head1 SYNOPSIS |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
TODO |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
=head1 DESCRIPTION |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
This document describes version C<0.90> of C<Text::Template::Simple::Dummy> |
38
|
|
|
|
|
|
|
released on C<5 July 2016>. |
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
All templates are compiled into this class. |
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
=head1 FUNCTIONS |
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
C<Text::Template::Simple::Dummy> contains some utility functions |
45
|
|
|
|
|
|
|
that are accessible by all templates. |
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
=head2 stack |
48
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
Issues a full stack trace and returns the output as string dump. Accepts |
50
|
|
|
|
|
|
|
options as a hash reference: |
51
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
stack({ opt => $option, frame => $backtrace_level }); |
53
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
Can be used inside templates like this: |
55
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
<%= stack() %> |
57
|
|
|
|
|
|
|
|
58
|
|
|
|
|
|
|
See L<Text::Template::Simple::Caller> for more information. |
59
|
|
|
|
|
|
|
|
60
|
|
|
|
|
|
|
=head1 AUTHOR |
61
|
|
|
|
|
|
|
|
62
|
|
|
|
|
|
|
Burak Gursoy <burak@cpan.org>. |
63
|
|
|
|
|
|
|
|
64
|
|
|
|
|
|
|
=head1 COPYRIGHT |
65
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
Copyright 2004 - 2016 Burak Gursoy. All rights reserved. |
67
|
|
|
|
|
|
|
|
68
|
|
|
|
|
|
|
=head1 LICENSE |
69
|
|
|
|
|
|
|
|
70
|
|
|
|
|
|
|
This library is free software; you can redistribute it and/or modify |
71
|
|
|
|
|
|
|
it under the same terms as Perl itself, either Perl version 5.24.0 or, |
72
|
|
|
|
|
|
|
at your option, any later version of Perl 5 you may have available. |
73
|
|
|
|
|
|
|
=cut |