lib/Bracket/Form/Register.pm

filter: Statementstmt 90.9% 20 / 22 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 75.0% 3 / 4 Podpod n/a totaltotal 88.4% 23 / 26 CC 1 SCAR 2.2
CC
1
Cov
91%
__ANON__
2.0
BEGIN
1.0
__ANON__
1.0
CRAP 1.2
« lib/Bracket/Schema.pm ↑ Summary lib/Bracket.pm »
1 package Bracket::Form::Register;
2  
3 4 ▶use HTML::FormHandler::Moose;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 4 extends 'HTML::FormHandler::Model::DBIC';
5 4 with 'HTML::FormHandler::Render::Table';
6  
7 4 has '+item_class' => ( default => 'Player' );
8  
9 4 has_field 'first_name' => ( type => 'Text', required => 1 );
10 4 has_field 'last_name' => ( type => 'Text' );
11 4 has_field 'email' => (
12 type => 'Email',
13 required => 1,
14 unique => 1,
15 );
16 4 has_field 'password' => ( type => 'Password', required => 1 );
17 4 has_field 'password_confirm' => ( type => 'PasswordConf' );
18 4 has_field 'submit' => ( type => 'Submit', value => 'Register' );
19  
20 has '+unique_messages' =>
21 1 ▶ ( default => sub { { player_email => 'Email address already registered' } } );
Subroutine __ANON__: called CC=1 SCAR=0.0
22  
23 # Insert basic role record into player_roles table on registration
24 0 ▶after 'update_model' => sub {
Subroutine __ANON__: not called CC=1 SCAR=6.9
25 0 my $self = shift;
26
27 0 $self->item->update_or_create_related('player_roles', { role => 2});
28 4 };
29  
30 4 ▶no HTML::FormHandler::Moose;
Subroutine BEGIN: called CC=1 SCAR=0.0
31 4 __PACKAGE__->meta->make_immutable;
32  
33 4 1
« lib/Bracket/Schema.pm ↑ Summary lib/Bracket.pm »