line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Acme::CatalystX::ILoveDebug; |
2
|
1
|
|
|
1
|
|
1621
|
use Moose::Role; |
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
3
|
|
|
|
|
|
|
use namespace::autoclean; |
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
our $VERSION = '0.01'; |
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
requires 'uri_for'; |
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
around uri_for => sub { |
10
|
|
|
|
|
|
|
my ($orig, $self) = (shift, shift); |
11
|
|
|
|
|
|
|
my $params = ref($_[-1]) eq 'HASH' ? pop @_ : {}; |
12
|
|
|
|
|
|
|
$params->{dump_info} = 1; |
13
|
|
|
|
|
|
|
$self->$orig(@_, $params); |
14
|
|
|
|
|
|
|
}; |
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
1; |
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
=head1 NAME |
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
Acme::CatalystX::ILoveDebug - Make all uris generated by an application trigger the debug page. |
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
=head1 DESCRIPTION |
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
Frivolous L<Catalyst> application class role to demonstrate a trivial application class role. |
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
=head1 METHODS |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
=head2 uri_for |
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
Wraps the normal uri_for call, injecting a parameter of C<< dump_info => 1 >> |
31
|
|
|
|
|
|
|
into the call so that all URIs generated will cause the debug screen.. |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
=head1 AUTHOR |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
Tomas Doran (t0m) C<< <bobtfish@bobtfish.net> >>. |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
=head1 COPYRIGHT & LICENSE |
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
Copyright 2009 the above author(s). |
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
This sofware is free software, and is licensed under the same terms as perl itself. |
42
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
=cut |