is => 'rw',
isa => 'Int',
lazy => 1,
+
# The side effect is used to test that this was called
# lazily.
default => sub { $Lazy = 1 },
is => 'rw',
isa => 'Delegatee',
handles => [ 'units', 'color' ],
+
# if it's not lazy it makes a new object before we define
# Delegatee's attributes.
lazy => 1,
$self->ObjectCount( $self->ObjectCount() + 1 );
}
- sub _BuildIt {42}
+ sub _BuildIt { 42 }
sub _CallTrigger {
push @{ $_[0]->TriggerRecord() }, [@_];
{
$thing->Triggerish(42);
- is( scalar @{ $thing->TriggerRecord() }, 1, 'trigger was called' );
- is( $thing->Triggerish(), 42, 'Triggerish is now 42' );
+ is( scalar @{ $thing->TriggerRecord() }, 1, 'trigger was called' );
+ is( $thing->Triggerish(), 42, 'Triggerish is now 42' );
$thing->Triggerish(84);
is( $thing->Triggerish(), 84, 'Triggerish is now 84' );