| 1 | ########################################################### | ||
| 2 | # SIOC::Role | ||
| 3 | # Role class for the SIOC ontology | ||
| 4 | ########################################################### | ||
| 5 | # | ||
| 6 | # $Id: Role.pm 10 2008-03-01 21:38:39Z geewiz $ | ||
| 7 | # | ||
| 8 | |||
| 9 | package SIOC::Role; | ||
| 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 | |||
| 18 | 3 | extends 'SIOC'; | |
| 19 | |||
| 20 | ### optional attributes | ||
| 21 | |||
| 22 | 3 | has 'owner' => ( | |
| 23 | isa => 'SIOC::User', | ||
| 24 | is => 'rw', | ||
| 25 | ); | ||
| 26 | |||
| 27 | 3 | has 'scope' => ( | |
| 28 | isa => 'SIOC::Forum', | ||
| 29 | is => 'rw', | ||
| 30 | ); | ||
| 31 | |||
| 32 | ### methods | ||
| 33 | |||
| 34 | 0 | ▶ | after 'fill_template' => sub { |
|
Subroutine
__ANON__: not called CC=1 SCAR=6.9
| |||
| 35 | 0 | my ($self) = @_; | |
| 36 | |||
| 37 | 0 | $self->set_template_vars({ | |
| 38 | function_of => $self->function_of, | ||
| 39 | scope => $self->scope | ||
| 40 | }); | ||
| 41 | 3 | }; | |
| 42 | |||
| 43 | ### EOC | ||
| 44 | |||
| 45 | 3 | 1; | |
| 46 | __END__ | ||