| 1 | package Ordeal::Model::Card; | ||||||||||
| 2 | |||||||||||
| 3 | # vim: ts=3 sts=3 sw=3 et ai : | ||||||||||
| 4 | |||||||||||
| 5 | 5 | ▶ | use 5.020; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 6 | 5 | ▶ | use strict; # redundant, but still useful to document | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 7 | 5 | ▶ | use warnings; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 8 | 5 | { our $VERSION = '0.003'; } | |||||||||
| 9 | 5 | ▶ | use English qw< -no_match_vars >; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 10 | 5 | ▶ | use Mo qw< default >; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 11 | |||||||||||
| 12 | 5 | ▶ | use experimental qw< signatures postderef >; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 13 | 5 | ▶ | no warnings qw< experimental::signatures experimental::postderef >; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 14 | |||||||||||
| 15 | use overload | ||||||||||
| 16 | 0 | ▶ | ne => sub { shift->compare_ne(@_) }, | ||||||||
|
Subroutine
__ANON__: not called CC=1 SCAR=6.9
| |||||||||||
| 17 | 0 | ▶ | bool => sub { return 1 }, | ||||||||
|
Subroutine
__ANON__: not called CC=1 SCAR=6.9
| |||||||||||
| 18 | 5 | ▶ | fallback => 0; # false but defined, disables Magic Autogeneration | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 19 | |||||||||||
| 20 | 5 | has content_type => (default => undef); | |||||||||
| 21 | 5 | has group => (default => ''); | |||||||||
| 22 | 5 | has id => (default => undef); | |||||||||
| 23 | 5 | has name => (default => ''); | |||||||||
| 24 | |||||||||||
| 25 | 0 | ▶ | sub compare_ne ($self, $other, $x) { return $self->id ne $other->id } | ||||||||
|
Subroutine
compare_ne: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||
| 26 | |||||||||||
| 27 | 1 | ▶ | sub data ($self, $data = undef) { | ||||||||
|
Subroutine
data: called CC=4 SCAR=14.5
Pod
documented
| |||||||||||
| 28 | 1 | ▶ | $self->{data} = $data if @_ > 1; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 29 | 1 | ▶ | $self->{data} = $self->{data}->($self) if ref $self->{data}; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 30 | 1 | return $self->{data}; | |||||||||
| 31 | } | ||||||||||
| 32 | |||||||||||
| 33 | 5 | 1; | |||||||||
| 34 | __END__ | ||||||||||