| 1 | package OPTIMADE::PropertyDefinitions::EntryType; | ||||||||||
| 2 | |||||||||||
| 3 | # ABSTRACT: OPTIMADE Entry Type | ||||||||||
| 4 | 2 | our $VERSION = '0.1.0'; # VERSION | |||||||||
| 5 | |||||||||||
| 6 | 2 | ▶ | use strict; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 7 | 2 | ▶ | use warnings; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 8 | |||||||||||
| 9 | 2 | ▶ | use OPTIMADE::PropertyDefinitions::Property; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 10 | |||||||||||
| 11 | sub new | ||||||||||
| 12 | 0 | ▶ | { | ||||||||
|
Subroutine
new: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||
| 13 | 0 | my( $class, $parent, $name ) = @_; | |||||||||
| 14 | 0 | return bless { parent => $parent, name => $name }, $class; | |||||||||
| 15 | } | ||||||||||
| 16 | |||||||||||
| 17 | sub property($) | ||||||||||
| 18 | 0 | ▶ | { | ||||||||
|
Subroutine
property: not called CC=2 SCAR=17.9
Pod
undocumented
| |||||||||||
| 19 | 0 | my( $self, $property ) = @_; | |||||||||
| 20 | 0 | ▶ | die "no such property '$property'\n" unless $self->raw->{properties}{$property}; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 21 | 0 | return OPTIMADE::PropertyDefinitions::Property->new( $self, $property ); | |||||||||
| 22 | } | ||||||||||
| 23 | |||||||||||
| 24 | sub properties() | ||||||||||
| 25 | 0 | ▶ | { | ||||||||
|
Subroutine
properties: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||
| 26 | 0 | my( $self ) = @_; | |||||||||
| 27 | 0 | return map { OPTIMADE::PropertyDefinitions::Property->new( $self, $_ ) } | |||||||||
| 28 | 0 | sort keys %{$self->raw->{properties}}; | |||||||||
| 29 | } | ||||||||||
| 30 | |||||||||||
| 31 | 0 | ▶ | sub name() { $_[0]->{name} } | ||||||||
|
Subroutine
name: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||
| 32 | 0 | ▶ | sub parent() { $_[0]->{parent} } | ||||||||
|
Subroutine
parent: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||
| 33 | |||||||||||
| 34 | 0 | ▶ | sub raw() { $_[0]->parent->raw->{entrytypes}{$_[0]->name} } | ||||||||
|
Subroutine
raw: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||
| 35 | |||||||||||
| 36 | 2 | 1; | |||||||||