| blib/lib/Mojo/Util/Model/User.pm | |||
|---|---|---|---|
| Criterion | Covered | Total | % |
| statement | 3 | 3 | 100.0 |
| branch | n/a | ||
| condition | n/a | ||
| subroutine | 1 | 1 | 100.0 |
| pod | n/a | ||
| total | 4 | 4 | 100.0 |
| line | stmt | bran | cond | sub | pod | time | code |
|---|---|---|---|---|---|---|---|
| 1 | package Mojo::Util::Model::User; | ||||||
| 2 | 31 | 31 | 24732 | use Mojo::Util::Model -base; | |||
| 31 | 79 | ||||||
| 31 | 314 | ||||||
| 3 | |||||||
| 4 | our $VERSION = '0.0.19'; | ||||||
| 5 | |||||||
| 6 | has [qw(id email first_name last_name age)]; | ||||||
| 7 | |||||||
| 8 | =head2 full_name | ||||||
| 9 | |||||||
| 10 | Returns the full name of the user. | ||||||
| 11 | |||||||
| 12 | =cut | ||||||
| 13 | |||||||
| 14 | has 'full_name' => sub { | ||||||
| 15 | my $self = shift; | ||||||
| 16 | return $self->first_name . ' ' . $self->last_name; | ||||||
| 17 | }; | ||||||
| 18 | |||||||
| 19 | 1; |