blib/lib/Keystone/Resolver/DB/User.pm untested

filter: Statementstmt 0.0% 0 / 21 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 10 Podpod 0.0% 0 / 6 totaltotal 0.0% 0 / 37 CC 1 SCAR 6.9
CC
1
Cov
0%
table
2.0
fields
2.0
mandatory_fields
2.0
CRAP 2.0
1 # $Id: User.pm,v 1.7 2007-09-12 22:14:52 mike Exp $
2  
3 package Keystone::Resolver::DB::User;
4  
5 use strict;
6 use warnings;
7 use Keystone::Resolver::DB::Object;
8  
9 use vars qw(@ISA);
10 @ISA = qw(Keystone::Resolver::DB::Object);
11  
12 sub table { "user" }
13  
14 sub fields { (id => undef,
15 site_id => undef,
16 admin => undef,
17 name => undef,
18 email_address => undef,
19 password => undef,
20 ) }
21  
22 sub mandatory_fields { qw(name email_address password) }
23  
24 sub search_fields { (admin => [ qw(User Administrator Wizard) ],
25 name => "t30",
26 email_address => "t50",
27 ) }
28  
29 sub sort_fields { ("email_address") }
30  
31 # It doesn't seem right that we have to define the "admin" enumeration
32 # in two different places, but it can't easily fit into fields()
33 # because that as to encapsulate recipes, too.
34 #
35 sub display_fields { (admin => [ qw(User Administrator Wizard) ],
36 name => "Lt",
37 email_address => "t",
38 password => "t",
39 ) }
40  
41 1;