HMI/Catalyst/Controller/Queue.pm

filter: Statementstmt 49.0% 26 / 53 Branchbran 0.0% 0 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 64.2% 9 / 14 Podpod 100% 4 / 4 totaltotal 53.4% 39 / 73 CC 2 SCAR 6.6
CC
2
Cov
47%
details
6.0
halt
2.0
start
2.0
CRAP 1.9
« HMI/Catalyst/Controller/Root.pm ↑ Summary HMI/Catalyst.pm »
1 package # hide from PAUSE
2 Hopkins::Plugin::HMI::Catalyst::Controller::Queue;
3 1 ▶BEGIN {
Subroutine BEGIN: called CC=1 SCAR=0.0
4 1 $Hopkins::Plugin::HMI::Catalyst::Controller::Queue::VERSION = '0.900';
5 }
6  
7 1 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
8 1 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
9  
10 =head1 NAME
11  
12 Hopkins::Plugin::HMI::Catalyst::Controller::Queue
13  
14 =head1 DESCRIPTION
15  
16 =cut
17  
18 1 ▶use base 'Hopkins::Plugin::HMI::Catalyst::Controller';
Subroutine BEGIN: called CC=1 SCAR=0.0
19  
20 =head1 METHODS
21  
22 =cut
23  
24 =over 4
25  
26 =item halt
27  
28 =cut
29  
30 0 ▶sub halt : Local
Subroutine halt: not called CC=1 SCAR=6.9
31 {
32 0 my $self = shift;
33 0 my $c = shift;
34 0 my $name = shift;
35  
36 0 $c->config->{hopkins}->queue($name)->halt;
37  
38 0 $c->res->redirect($c->req->referer);
39 1 ▶}
Subroutine BEGIN: called CC=1 SCAR=0.0
40  
41 =item start
42  
43 =cut
44  
45 0 ▶sub start : Local
Subroutine start: not called CC=1 SCAR=6.9
Pod documented
46 {
47 0 my $self = shift;
48 0 my $c = shift;
49 0 my $name = shift;
50  
51 0 $c->config->{hopkins}->queue($name)->start;
52  
53 0 $c->res->redirect($c->req->referer);
54 1 ▶}
Subroutine BEGIN: called CC=1 SCAR=0.0
55  
56 =item freeze
57  
58 =cut
59  
60 0 ▶sub freeze : Local
Subroutine freeze: not called CC=1 SCAR=6.9
Pod documented
61 {
62 0 my $self = shift;
63 0 my $c = shift;
64 0 my $name = shift;
65  
66 0 $c->config->{hopkins}->queue($name)->freeze;
67  
68 0 $c->res->redirect($c->req->referer);
69 1 ▶}
Subroutine BEGIN: called CC=1 SCAR=0.0
70  
71 =item thaw
72  
73 =cut
74  
75 0 ▶sub thaw : Local
Subroutine thaw: not called CC=1 SCAR=6.9
Pod documented
76 {
77 0 my $self = shift;
78 0 my $c = shift;
79 0 my $name = shift;
80  
81 0 $c->config->{hopkins}->queue($name)->thaw;
82  
83 0 $c->res->redirect($c->req->referer);
84 1 ▶}
Subroutine BEGIN: called CC=1 SCAR=0.0
85  
86 =item details
87  
88 =cut
89  
90 0 ▶sub details : Local
Subroutine details: not called CC=2 SCAR=17.9
Pod documented
91 {
92 0 my $self = shift;
93 0 my $c = shift;
94 0 my $name = shift;
95  
96 0 my $queue = $c->config->{hopkins}->queue($name);
97  
98 0 ▶ $c->res->redirect($c->uri_for('/status')) if not defined $queue;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $queue 0 0 0
99  
100 0 $c->stash->{queue} = $queue;
101 0 $c->stash->{template} = 'queue/details.tt';
102 1 ▶}
Subroutine BEGIN: called CC=1 SCAR=0.0
103  
104 =back
105  
106 =head1 AUTHOR
107  
108 Mike Eldridge <diz@cpan.org>
109  
110 =head1 LICENSE
111  
112 This program is free software; you may redistribute it
113 and/or modify it under the same terms as Perl itself.
114  
115 =cut
116  
117 1 1;
« HMI/Catalyst/Controller/Root.pm ↑ Summary HMI/Catalyst.pm »