Jifty/Model/SessionCollection.pm

filter: Statementstmt 62.5% 10 / 16 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 42.8% 3 / 7 Podpod 100% 4 / 4 totaltotal 62.9% 17 / 27 CC 1 SCAR 4.5
CC
1
Cov
62%
record_class
2.0
current_user
2.0
expired_update
2.0
CRAP 1.6
« Jifty/Test/Dist.pm ↑ Summary Jifty/Action/Autocomplete.pm »
1 1 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
2 1 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
3  
4 package Jifty::Model::SessionCollection;
5  
6 1 ▶use base qw/Jifty::Collection/;
Subroutine BEGIN: called CC=1 SCAR=0.0
7  
8 =head1 NAME
9  
10 Jifty::Model::SessionCollection - Specialized handling of the session collection
11  
12 =head2 METHODS
13  
14 =head2 record_class
15  
16 This deals with collections of L<Jifty::Model::Session>s.
17  
18 =cut
19  
20 0 ▶sub record_class { 'Jifty::Model::Session' }
Subroutine record_class: not called CC=1 SCAR=6.9
Pod documented
21  
22  
23 =head2 current_user
24  
25 Everyone is treated as the superuser when dealing with session
26 objects. This avoids infinite recursion, as otherwise it would try to
27 look up the current user in the session object to find out who we
28 are...
29  
30 =cut
31  
32 0 ▶sub current_user { return Jifty->app_class('CurrentUser')->superuser }
Subroutine current_user: not called CC=1 SCAR=6.9
Pod documented
33  
34 =head2 expired_update
35  
36 find sessions where updated time is expired.
37  
38 =cut
39  
40 0 ▶sub expired_update {
Subroutine expired_update: not called CC=1 SCAR=6.9
Pod documented
41 0 my ($self,$dt) = @_;
42 0 $self->limit( column => 'updated', operator => '<', value => $dt );
43 }
44  
45 =head2 expired_create
46  
47 find sessions where created time is expired.
48  
49 =cut
50  
51 0 ▶sub expired_create {
Subroutine expired_create: not called CC=1 SCAR=6.9
Pod documented
52 0 my ($self,$dt) = @_;
53 0 $self->limit( column => 'created', operator => '<', value => $dt, );
54 }
55  
56 1 1;
« Jifty/Test/Dist.pm ↑ Summary Jifty/Action/Autocomplete.pm »