| 1 | 1 | ▶ | use 5.008; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 2 | 1 | ▶ | use warnings; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 3 | 1 | ▶ | use strict; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 4 | |||||||||||
| 5 | package Class::Scaffold::BusinessObject; | ||||||||||
| 6 | 1 | ▶ | BEGIN { | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 7 | 1 | $Class::Scaffold::BusinessObject::VERSION = '1.102280'; | |||||||||
| 8 | } | ||||||||||
| 9 | # ABSTRACT: Base class for framework business objects | ||||||||||
| 10 | 1 | ▶ | use Error::Hierarchy::Util 'assert_defined'; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 11 | 1 | ▶ | use parent qw( | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 12 | Class::Scaffold::Storable | ||||||||||
| 13 | Class::Scaffold::HierarchicalDirty | ||||||||||
| 14 | 1 | ); | |||||||||
| 15 | 1 | __PACKAGE__->mk_scalar_accessors(qw(key_name)) | |||||||||
| 16 | ->mk_abstract_accessors(qw(key object_type)); | ||||||||||
| 17 | 1 | ▶ | use constant DEFAULTS => (key_name => 'key field',); | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 18 | |||||||||||
| 19 | # Each business object can tell its defining key, e.g. handle for persons, | ||||||||||
| 20 | # domainname for domains etc. | ||||||||||
| 21 | |||||||||||
| 22 | 0 | ▶ | sub check { } | ||||||||
|
Subroutine
check: not called CC=1 SCAR=0.0
Pod
documented
| |||||||||||
| 23 | |||||||||||
| 24 | 0 | ▶ | sub used_objects { | ||||||||
|
Subroutine
used_objects: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||
| 25 | 0 | my $self = shift; | |||||||||
| 26 | 0 | ($self->object_type => $self->key); | |||||||||
| 27 | } | ||||||||||
| 28 | |||||||||||
| 29 | 0 | ▶ | sub assert_key { | ||||||||
|
Subroutine
assert_key: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||
| 30 | 0 | my $self = shift; | |||||||||
| 31 | 0 | local $Error::Depth = $Error::Depth + 1; | |||||||||
| 32 | 0 | assert_defined $self->key, | |||||||||
| 33 | sprintf('called without defined %s', $self->key_name); | ||||||||||
| 34 | } | ||||||||||
| 35 | |||||||||||
| 36 | 0 | ▶ | sub store { | ||||||||
|
Subroutine
store: not called CC=2 SCAR=17.9
Pod
documented
| |||||||||||
| 37 | 0 | my $self = shift; | |||||||||
| 38 | 0 | ▶ | if ($self->key) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 39 | 0 | $self->update; | |||||||||
| 40 | } else { | ||||||||||
| 41 | 0 | $self->insert; | |||||||||
| 42 | } | ||||||||||
| 43 | } | ||||||||||
| 44 | 1 | ▶ | use constant SKIP_COMPARABLE_KEYS => ('key_name'); | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 45 | |||||||||||
| 46 | 0 | ▶ | sub apply_instruction_container { } | ||||||||
|
Subroutine
apply_instruction_container: not called CC=1 SCAR=0.0
Pod
documented
| |||||||||||
| 47 | 1 | 1; | |||||||||
| 48 | |||||||||||
| 49 | |||||||||||
| 50 | __END__ | ||||||||||