File Coverage

blib/lib/CatalystX/Profile/Controller/ControlProfiling.pm
Criterion Covered Total %
statement 10 18 55.5
branch n/a
condition n/a
subroutine 6 7 85.7
pod 1 1 100.0
total 17 26 65.3


line stmt bran cond sub pod time code
1             # ABSTRACT: Control profiling within your application
2             package CatalystX::Profile::Controller::ControlProfiling;
3             BEGIN {
4 1     1   638 $CatalystX::Profile::Controller::ControlProfiling::VERSION = '0.02';
5             }
6 1     1   7 use Moose;
  0         0  
  1         8  
7 1     1   5419 use namespace::autoclean;
  0         0  
  1         9  
8              
9 1     1   135 BEGIN { extends 'Catalyst::Controller' }
10              
11 1     1   4489 use Devel::NYTProf;
  0         0  
  1         93  
12              
13             sub stop_profiling : Local {
14 0     0 1   my ($self, $c) = @_;
15 0           DB::finish_profile();
16 0           $c->log->debug('Profiling has now been disabled');
17 0           $c->body('Profiling finished');
18 1     1   4 }
  0         0  
  1         10  
19              
20             1;
21              
22              
23             __END__
24             =pod
25              
26             =head1 NAME
27              
28             CatalystX::Profile::Controller::ControlProfiling - Control profiling within your application
29              
30             =head1 VERSION
31              
32             version 0.02
33              
34             =head1 DESCRIPTIONS
35              
36             Some actions you can use to control profiling
37              
38             =head1 ACTIONS
39              
40             =head2 stop_profiling
41              
42             Stop and finish profiling, and write all the output. This can be a bit
43             slow while the profiling data is written, but that's normal.
44              
45             =head1 AUTHOR
46              
47             Oliver Charles <oliver.g.charles@googlemail.com>
48              
49             =head1 COPYRIGHT AND LICENSE
50              
51             This software is copyright (c) 2011 by Oliver Charles.
52              
53             This is free software; you can redistribute it and/or modify it under
54             the same terms as the Perl 5 programming language system itself.
55              
56             =cut
57