| 1 | package Role::TinyCommons::Collection::PickItems; | ||||||||||
| 2 | |||||||||||
| 3 | 4 | ▶ | use Role::Tiny; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 4 | |||||||||||
| 5 | 4 | our $AUTHORITY = 'cpan:PERLANCAR'; # AUTHORITY | |||||||||
| 6 | 4 | our $DATE = '2024-01-16'; # DATE | |||||||||
| 7 | 4 | our $DIST = 'Role-TinyCommons-Collection'; # DIST | |||||||||
| 8 | 4 | our $VERSION = '0.010'; # VERSION | |||||||||
| 9 | |||||||||||
| 10 | ### required methods | ||||||||||
| 11 | |||||||||||
| 12 | 4 | requires 'pick_items'; | |||||||||
| 13 | |||||||||||
| 14 | ### provided methods | ||||||||||
| 15 | |||||||||||
| 16 | 0 | ▶ | sub pick_item { | ||||||||
|
Subroutine
pick_item: not called CC=2 SCAR=17.9
Pod
documented
| |||||||||||
| 17 | 0 | my ($self, %args) = @_; | |||||||||
| 18 | 0 | my @items = $self->pick_items(n => 1, %args); | |||||||||
| 19 | 0 | ▶ | @items ? $items[0] : undef; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 20 | } | ||||||||||
| 21 | |||||||||||
| 22 | 4 | 1; | |||||||||
| 23 | # ABSTRACT: The pick_items() interface | ||||||||||
| 24 | |||||||||||
| 25 | __END__ | ||||||||||