Schema/AppKitAuthDB/ResultSet/Aclfeature.pm untested

filter: Statementstmt 0.0% 0 / 20 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 5 Podpod 0.0% 0 / 2 totaltotal 0.0% 0 / 27 CC 1 SCAR 6.9
CC
1
Cov
0%
sorted
2.0
descriptions
2.0
BEGIN
2.0
CRAP 2.0
1 package OpusVL::AppKit::Schema::AppKitAuthDB::ResultSet::Aclfeature;
2  
3 use strict;
4 use warnings;
5  
6 use base 'DBIx::Class::ResultSet';
7  
8 sub sorted
9 {
10 my $self = shift;
11 return $self->search(undef, { order_by => ['feature'] });
12 }
13  
14 sub descriptions
15 {
16 my $self = shift;
17 my @all = $self->all;
18 my %names;
19 for my $f (@all)
20 {
21 my ($app, $feature) = $f->feature =~ m|^(.+)/(.*)$|;
22 # auto vivification?
23 $names{$app}->{$feature} = $f->feature_description;
24 }
25 return \%names;
26 }
27  
28 1;
29  
30 __END__