| 1 | package API::Docker::Role::Entity; | ||
| 2 | # ABSTRACT: The client reference an entity delegates through | ||
| 3 | 53 | our $VERSION = '0.006'; | |
| 4 | 53 | ▶ | use Moo::Role; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 5 | 53 | ▶ | use namespace::clean; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 6 | |||
| 7 | |||
| 8 | 53 | has client => ( | |
| 9 | is => 'ro', | ||
| 10 | weak_ref => 1, | ||
| 11 | ); | ||
| 12 | |||
| 13 | # The hook API::Docker::Role::Type's BUILDARGS reads. Its constructor sorts | ||
| 14 | # every key into "a field of this definition" or "a field the daemon sent | ||
| 15 | # that the model has not heard of", and `client` is neither: without this it | ||
| 16 | # would land in unknown_fields and TO_JSON would try to send the client | ||
| 17 | # object back to the engine. Anything an entity role adds as an attribute of | ||
| 18 | # its own belongs in this list. | ||
| 19 | 35 | ▶ | sub _entity_attributes { return ('client') } |
|
Subroutine
_entity_attributes: called CC=1 SCAR=0.0
| |||
| 20 | |||
| 21 | |||
| 22 | 53 | 1; | |
| 23 | |||
| 24 | __END__ | ||