| 1 | package ICANN::RST::Base; | ||||||||||
| 2 | # ABSTRACT: base class for other things. | ||||||||||
| 3 | 1 | ▶ | use Carp; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 4 | 1 | ▶ | use YAML::XS; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 5 | 1 | ▶ | use strict; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 6 | |||||||||||
| 7 | 0 | ▶ | sub new { | ||||||||
|
Subroutine
new: not called CC=2 SCAR=17.9
Pod
undocumented
| |||||||||||
| 8 | 0 | my ($package, $id, $ref, $spec) = @_; | |||||||||
| 9 | |||||||||||
| 10 | 0 | ▶ | carp("No reference for '$id'") unless (defined($ref)); | ||||||||
|
Branch: 1 branch
| |||||||||||
| 11 | |||||||||||
| 12 | return bless( | ||||||||||
| 13 | { | ||||||||||
| 14 | 0 | %{$ref}, | |||||||||
| 15 | 'id' => $id, | ||||||||||
| 16 | 'spec' => $spec, | ||||||||||
| 17 | }, | ||||||||||
| 18 | $package, | ||||||||||
| 19 | ); | ||||||||||
| 20 | } | ||||||||||
| 21 | |||||||||||
| 22 | 0 | ▶ | sub id { $_[0]->{'id'} } | ||||||||
|
Subroutine
id: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||
| 23 | 0 | ▶ | sub order { int($_[0]->{'Order'}) } | ||||||||
|
Subroutine
order: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||
| 24 | 0 | ▶ | sub spec { $_[0]->{'spec'} } | ||||||||
|
Subroutine
spec: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||
| 25 | |||||||||||
| 26 | 0 | ▶ | sub dump { | ||||||||
|
Subroutine
dump: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||
| 27 | 0 | my $self = shift; | |||||||||
| 28 | 0 | my %hash = %{$self}; | |||||||||
| 29 | 0 | delete($hash{'spec'}); | |||||||||
| 30 | 0 | return YAML::XS::Dump(\%hash); | |||||||||
| 31 | } | ||||||||||
| 32 | |||||||||||
| 33 | 1 | 1; | |||||||||
| 34 | |||||||||||
| 35 | __END__ | ||||||||||