SIOC/Forum.pm

filter: Statementstmt 78.5% 22 / 28 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 62.5% 5 / 8 Podpod n/a totaltotal 75.0% 27 / 36 CC 1 SCAR 3.2
CC
1
Cov
79%
__ANON__
2.0
__ANON__
2.0
__ANON__
2.0
CRAP 1.4
« SIOC/Usergroup.pm ↑ Summary SIOC/Item.pm »
1 ###########################################################
2 # SIOC::Forum
3 # Forum class for the SIOC ontology
4 ###########################################################
5 #
6 # $Id: Forum.pm 10 2008-03-01 21:38:39Z geewiz $
7 #
8  
9 package SIOC::Forum;
10  
11 3 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
12 3 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
13  
14 3 ▶use version; our $VERSION = qv(1.0.0);
Subroutine BEGIN: called CC=1 SCAR=0.0
15  
16 3 ▶use Moose;
Subroutine BEGIN: called CC=1 SCAR=0.0
17 3 ▶use MooseX::AttributeHelpers;
Subroutine BEGIN: called CC=1 SCAR=0.0
18  
19 3 extends 'SIOC::Container';
20  
21 ### optional attributes
22  
23 3 has 'host' => (
24 isa => 'SIOC::Site',
25 is => 'rw'
26 );
27  
28 has 'moderators' => (
29 isa => 'ArrayRef[SIOC::User]',
30 metaclass => 'Collection::Array',
31 is => 'rw',
32 0 ▶ default => sub { [] },
Subroutine __ANON__: not called CC=1 SCAR=6.9
33 3 provides => {
34 'push' => 'add_moderator'
35 },
36 );
37  
38 has 'scopes' => (
39 isa => 'ArrayRef[SIOC::Role]',
40 metaclass => 'Collection::Array',
41 is => 'rw',
42 0 ▶ default => sub { [] },
Subroutine __ANON__: not called CC=1 SCAR=6.9
43 3 provides => {
44 'push' => 'add_scope'
45 },
46 );
47  
48 ### methods
49  
50 0 ▶after 'fill_template' => sub {
Subroutine __ANON__: not called CC=1 SCAR=6.9
51 0 my ($self) = @_;
52
53 0 $self->set_template_var(host => $self->host);
54 0 $self->set_template_var(moderators => $self->moderators);
55 0 $self->set_template_var(scopes => $self->scopes);
56 3 };
57  
58 3 1;
59 __DATA__
« SIOC/Usergroup.pm ↑ Summary SIOC/Item.pm »