Resource/Language.pm

filter: Statementstmt 73.9% 34 / 46 Branchbran 0.0% 0 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 52.6% 10 / 19 Podpod 88.8% 8 / 9 totaltotal 68.4% 52 / 76 CC 2 SCAR 6.4
CC
2
Cov
71%
new
6.0
code
2.0
description
2.0
CRAP 1.9
« Resource/Store.pm ↑ Summary Resource/TranslationProject.pm »
1 # Copyright (C) 2017 Koha-Suomi
2 #
3 # This file is part of Pootle-Client.
4  
5 package Pootle::Resource::Language;
6  
7 1 ▶use Modern::Perl '2015';
Subroutine BEGIN: called CC=1 SCAR=0.0
8 1 ▶use utf8;
Subroutine BEGIN: called CC=1 SCAR=0.0
9 1 binmode STDOUT, ':encoding(UTF-8)';
10 1 binmode STDERR, ':encoding(UTF-8)';
11 1 ▶use feature 'signatures'; no warnings "experimental::signatures";
Subroutine BEGIN: called CC=1 SCAR=0.0
Subroutine BEGIN: called CC=1 SCAR=0.0
12 1 ▶use Carp::Always;
Subroutine BEGIN: called CC=1 SCAR=0.0
13 1 ▶use Try::Tiny;
Subroutine BEGIN: called CC=1 SCAR=0.0
14 1 ▶use Scalar::Util qw(blessed);
Subroutine BEGIN: called CC=1 SCAR=0.0
15  
16 =head2 Pootle::Resource::Language
17  
18 Pootle Language-object
19  
20 =cut
21  
22 1 ▶use base('Pootle::Resource');
Subroutine BEGIN: called CC=1 SCAR=0.0
23  
24 1 ▶use Params::Validate qw(:all);
Subroutine BEGIN: called CC=1 SCAR=0.0
25  
26 1 ▶use Pootle::Logger;
Subroutine BEGIN: called CC=1 SCAR=0.0
27 1 my $l = bless({}, 'Pootle::Logger'); #Lazy load package logger this way to avoid circular dependency issues with logger includes from many packages
28  
29 0 ▶sub new($class, @params) {
Subroutine new: not called CC=2 SCAR=17.9
Pod undocumented
30 0 ▶ $l->debug("Initializing ".__PACKAGE__." with parameters: ".$l->flatten(@params)) if $l->is_debug();
Branch: 1 branch
BranchTrueFalseTotal
if $l->is_debug 0 0 0
31 0 my %self = validate(@params, {
32 code => 1,
33 description => 1,
34 fullname => 1,
35 nplurals => 1,
36 pluralequation => 1,
37 resource_uri => 1,
38 specialchars => 1,
39 translation_projects => { type => ARRAYREF },
40 });
41 0 my $s = bless(\%self, $class);
42  
43 0 return $s;
44 }
45  
46 0 ▶sub code($s) { return $s->{code} }
Subroutine code: not called CC=1 SCAR=6.9
Pod documented
47 0 ▶sub description($s) { return $s->{description} }
Subroutine description: not called CC=1 SCAR=6.9
Pod documented
48 0 ▶sub fullname($s) { return $s->{fullname} }
Subroutine fullname: not called CC=1 SCAR=6.9
Pod documented
49 0 ▶sub nplurals($s) { return $s->{nplurals} }
Subroutine nplurals: not called CC=1 SCAR=6.9
Pod documented
50 0 ▶sub pluralequation($s) { return $s->{pluralequation} }
Subroutine pluralequation: not called CC=1 SCAR=6.9
Pod documented
51 0 ▶sub resource_uri($s) { return $s->{resource_uri} }
Subroutine resource_uri: not called CC=1 SCAR=6.9
Pod documented
52 0 ▶sub specialchars($s) { return $s->{specialchars} }
Subroutine specialchars: not called CC=1 SCAR=6.9
Pod documented
53 0 ▶sub translation_projects($s) { return $s->{translation_projects} }
Subroutine translation_projects: not called CC=1 SCAR=6.9
Pod documented
54  
55 =head2 Accessors
56  
57 =over 4
58  
59 =item B<code>
60  
61 =item B<description>
62  
63 =item B<fullname>
64  
65 =item B<nplurals>
66  
67 =item B<pluralequation>
68  
69 =item B<resource_uri>
70  
71 =item B<specialchars>
72  
73 =item B<translation_projects>
74  
75 =cut
76  
77 1 1;
« Resource/Store.pm ↑ Summary Resource/TranslationProject.pm »