| 1 | package Wikibase::Datatype::Form; | ||
| 2 | |||
| 3 | 26 | ▶ | use strict; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 4 | 26 | ▶ | use warnings; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 5 | |||
| 6 | 26 | ▶ | use Mo qw(build default is); |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 7 | 26 | ▶ | use Mo::utils::Array qw(check_array_object); |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 8 | |||
| 9 | 26 | our $VERSION = 0.40; | |
| 10 | |||
| 11 | 26 | has grammatical_features => ( | |
| 12 | default => [], | ||
| 13 | is => 'ro', | ||
| 14 | ); | ||
| 15 | |||
| 16 | 26 | has id => ( | |
| 17 | is => 'ro', | ||
| 18 | ); | ||
| 19 | |||
| 20 | 26 | has representations => ( | |
| 21 | default => [], | ||
| 22 | is => 'ro', | ||
| 23 | ); | ||
| 24 | |||
| 25 | 26 | has statements => ( | |
| 26 | default => [], | ||
| 27 | is => 'ro', | ||
| 28 | ); | ||
| 29 | |||
| 30 | 34 | ▶ | sub BUILD { |
|
Subroutine
BUILD: called CC=1 SCAR=0.0
Pod
undocumented
| |||
| 31 | 34 | my $self = shift; | |
| 32 | |||
| 33 | # Check grammatical features. | ||
| 34 | 34 | check_array_object($self, 'grammatical_features', 'Wikibase::Datatype::Value::Item'); | |
| 35 | |||
| 36 | # Check representations. | ||
| 37 | 32 | check_array_object($self, 'representations', 'Wikibase::Datatype::Value::Monolingual'); | |
| 38 | |||
| 39 | # Check statements. | ||
| 40 | 30 | check_array_object($self, 'statements', 'Wikibase::Datatype::Statement'); | |
| 41 | |||
| 42 | 28 | return; | |
| 43 | } | ||
| 44 | |||
| 45 | 26 | 1; | |
| 46 | |||
| 47 | __END__ | ||