| 1 | package Net::ACME::X::HashBase; | ||||||||||
| 2 | |||||||||||
| 3 | 9 | ▶ | use strict; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 4 | 9 | ▶ | use warnings; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 5 | |||||||||||
| 6 | 9 | ▶ | use parent qw( Net::ACME::X::OverloadBase ); | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 7 | |||||||||||
| 8 | 22 | ▶ | sub new { | ||||||||
|
Subroutine
new: called CC=2 SCAR=6.9
Pod
undocumented
| |||||||||||
| 9 | 22 | my ( $class, $string, $props_hr ) = @_; | |||||||||
| 10 | |||||||||||
| 11 | 22 | $class->_check_overload(); | |||||||||
| 12 | |||||||||||
| 13 | 22 | ▶ | my %attrs = $props_hr ? %$props_hr : (); | ||||||||
|
Branch: 1 branch
| |||||||||||
| 14 | |||||||||||
| 15 | 22 | return bless [ $string, \%attrs ], $class; | |||||||||
| 16 | } | ||||||||||
| 17 | |||||||||||
| 18 | 41 | ▶ | sub get { | ||||||||
|
Subroutine
get: called CC=1 SCAR=0.0
Pod
undocumented
| |||||||||||
| 19 | 41 | my ( $self, $attr ) = @_; | |||||||||
| 20 | |||||||||||
| 21 | #Do we need to clone this? Could JSON suffice, or do we need Clone? | ||||||||||
| 22 | 41 | return $self->[1]{$attr}; | |||||||||
| 23 | } | ||||||||||
| 24 | |||||||||||
| 25 | 45 | ▶ | sub to_string { | ||||||||
|
Subroutine
to_string: called CC=1 SCAR=0.0
Pod
undocumented
| |||||||||||
| 26 | 45 | my ($self) = @_; | |||||||||
| 27 | |||||||||||
| 28 | 45 | return $self->[0]; | |||||||||
| 29 | } | ||||||||||
| 30 | |||||||||||
| 31 | 9 | 1; | |||||||||