Preferences/Schema/ResultSet/PrfOwnerType.pm

filter: Statementstmt 45.8% 11 / 24 Branchbran 0.0% 0 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 60.0% 3 / 5 Podpod 100% 2 / 2 totaltotal 48.4% 16 / 33 CC 2 SCAR 10.4
CC
2
Cov
42%
setup_from_source
6.0
get_from_source
2.0
BEGIN
1.0
CRAP 2.8
« Preferences/Schema/Result/PrfDefault.pm ↑ Summary Preferences/Schema/ResultSet/PrfDefault.pm »
1  
2 package OpusVL::Preferences::Schema::ResultSet::PrfOwnerType;
3  
4 1 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
5 1 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
6 1 ▶use Moose;
Subroutine BEGIN: called CC=1 SCAR=0.0
7  
8 1 extends 'DBIx::Class::ResultSet';
9  
10 sub setup_from_source
11 {
12 0 ▶ my $self = shift;
Subroutine setup_from_source: not called CC=2 SCAR=17.9
Pod documented
13 0 my $source = shift;
14  
15 0 my $table = $source->from;
16 0 my $rs = $source->source_name;
17  
18 0 my $type = $self->get_from_source ($source);
19  
20 0 ▶ unless ($type)
Branch: 1 branch
BranchTrueFalseTotal
unless ($type) 0 0 0
21 {
22 0 $type = $self->create
23 ({
24 owner_table => $table,
25 owner_resultset => $rs
26 });
27 }
28  
29 0 return $type;
30 }
31  
32 sub get_from_source
33 {
34 0 ▶ my $self = shift;
Subroutine get_from_source: not called CC=1 SCAR=6.9
Pod documented
35 0 my $source = shift;
36  
37 0 my $table = $source->from;
38 0 my $rs = $source->source_name;
39  
40 0 return $self->find
41 ({
42 owner_table => $table,
43 owner_resultset => $rs
44 });
45 }
46  
47 1 return 1;
48  
49 __END__
50  
51 =pod
52  
53 =encoding UTF-8
54  
55 =head1 NAME
56  
57 OpusVL::Preferences::Schema::ResultSet::PrfOwnerType
58  
59 =head1 VERSION
60  
61 version 0.24
62  
63 =head1 DESCRIPTION
64  
65 =head1 METHODS
66  
67 =head2 setup_from_source
68  
69 =head2 get_from_source
70  
71 =head1 ATTRIBUTES
72  
73 =head1 LICENSE AND COPYRIGHT
74  
75 Copyright 2012 OpusVL.
76  
77 This software is licensed according to the "IP Assignment Schedule" provided with the development project.
78  
79 =head1 AUTHOR
80  
81 OpusVL - www.opusvl.com
82  
83 =head1 COPYRIGHT AND LICENSE
84  
85 This software is copyright (c) 2011 by OpusVL - www.opusvl.com.
86  
87 This is free software; you can redistribute it and/or modify it under
88 the same terms as the Perl 5 programming language system itself.
89  
90 =cut
« Preferences/Schema/Result/PrfDefault.pm ↑ Summary Preferences/Schema/ResultSet/PrfDefault.pm »