| 1 | package Net::Kubernetes::Resource::Role::Spec; | ||
| 2 | # ABSTRACT: Resource role for types that have a spec | ||
| 3 | 4 | $Net::Kubernetes::Resource::Role::Spec::VERSION = '1.03'; | |
| 4 | 4 | ▶ | use Moose::Role; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 5 | |||
| 6 | 4 | has spec => ( | |
| 7 | is => 'rw', | ||
| 8 | isa => 'HashRef', | ||
| 9 | required => 1 | ||
| 10 | ); | ||
| 11 | |||
| 12 | 8 | ▶ | around "as_hashref" => sub { |
|
Subroutine
__ANON__: called CC=1 SCAR=0.0
| |||
| 13 | 8 | my ($orig, $self) = @_; | |
| 14 | 8 | my $ref = $self->$orig; | |
| 15 | 8 | $ref->{spec} = $self->spec; | |
| 16 | 8 | return $ref; | |
| 17 | 4 | }; | |
| 18 | |||
| 19 | 4 | return 42; | |
| 20 | |||
| 21 | __END__ | ||