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__
31  
32 =pod
33  
34 =encoding UTF-8
35  
36 =head1 NAME
37  
38 OpusVL::AppKit::Schema::AppKitAuthDB::ResultSet::Aclfeature
39  
40 =head1 VERSION
41  
42 version 2
43  
44 =head1 AUTHOR
45  
46 Colin Newell <colin@opusvl.com>
47  
48 =head1 COPYRIGHT AND LICENSE
49  
50 This software is copyright (c) 2016 by OpusVL.
51  
52 This is free software; you can redistribute it and/or modify it under
53 the same terms as the Perl 5 programming language system itself.
54  
55 =cut