| 1 | package Fey::Role::ColumnLike; | ||||||||||
| 2 | |||||||||||
| 3 | 27 | ▶ | use strict; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 4 | 27 | ▶ | use warnings; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 5 | 27 | ▶ | use namespace::autoclean; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 6 | |||||||||||
| 7 | 27 | our $VERSION = '0.44'; | |||||||||
| 8 | |||||||||||
| 9 | 27 | ▶ | use Moose::Role; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 10 | |||||||||||
| 11 | # This seems weird, but basically we're saying that column-like things | ||||||||||
| 12 | # do these four roles, but the implementation is different for | ||||||||||
| 13 | # column-like things (than for example, selectable things). | ||||||||||
| 14 | 27 | with( | |||||||||
| 15 | 'Fey::Role::Selectable' => { -excludes => 'is_selectable' }, | ||||||||||
| 16 | 'Fey::Role::Comparable' => { -excludes => 'is_comparable' }, | ||||||||||
| 17 | 'Fey::Role::Groupable' => { -excludes => 'is_groupable' }, | ||||||||||
| 18 | 'Fey::Role::Orderable' => { -excludes => 'is_orderable' }, | ||||||||||
| 19 | ); | ||||||||||
| 20 | |||||||||||
| 21 | 27 | requires '_build_id', 'is_alias'; | |||||||||
| 22 | |||||||||||
| 23 | 152 | ▶ | sub _containing_table_name_or_alias { | ||||||||
|
Subroutine
_containing_table_name_or_alias: called CC=2 SCAR=6.9
| |||||||||||
| 24 | 152 | my $t = $_[0]->table(); | |||||||||
| 25 | |||||||||||
| 26 | 152 | ▶ | $t->is_alias() ? $t->alias_name() : $t->name(); | ||||||||
|
Branch: 1 branch
| |||||||||||
| 27 | } | ||||||||||
| 28 | |||||||||||
| 29 | 27 | ▶ | sub is_selectable { return $_[0]->table() ? 1 : 0 } | ||||||||
|
Subroutine
is_selectable: called CC=2 SCAR=6.9
Pod
documented
Branch: 1 branch
| |||||||||||
| 30 | |||||||||||
| 31 | 86 | ▶ | sub is_comparable { return $_[0]->table() ? 1 : 0 } | ||||||||
|
Subroutine
is_comparable: called CC=2 SCAR=6.9
Pod
documented
Branch: 1 branch
| |||||||||||
| 32 | |||||||||||
| 33 | 5 | ▶ | sub is_groupable { return $_[0]->table() ? 1 : 0 } | ||||||||
|
Subroutine
is_groupable: called CC=2 SCAR=6.9
Pod
documented
Branch: 1 branch
| |||||||||||
| 34 | |||||||||||
| 35 | 18 | ▶ | sub is_orderable { return $_[0]->table() ? 1 : 0 } | ||||||||
|
Subroutine
is_orderable: called CC=2 SCAR=6.9
Pod
documented
Branch: 1 branch
| |||||||||||
| 36 | |||||||||||
| 37 | 27 | 1; | |||||||||
| 38 | |||||||||||
| 39 | # ABSTRACT: A role for "column-like" behavior | ||||||||||
| 40 | |||||||||||
| 41 | __END__ | ||||||||||