my $value = '$value';
is($C->inline_get_slot_value($instance, $slot_name),
- 'exists $self->{"foo"} ? $self->{"foo"} : undef',
+ '$self->{"foo"}',
'... got the right code for get_slot_value');
is($C->inline_set_slot_value($instance, $slot_name, $value),
'... got the right code for initialize_slot');
is($C->inline_is_slot_initialized($instance, $slot_name),
- 'exists $self->{"foo"} ? 1 : 0',
+ 'exists $self->{"foo"}',
'... got the right code for get_slot_value');
is($C->inline_weaken_slot_value($instance, $slot_name),
my $value = '[]';
is($C->inline_get_slot_value($instance, $slot_name),
- 'exists $_[0]->{$attr_name} ? $_[0]->{$attr_name} : undef',
+ '$_[0]->{$attr_name}',
'... got the right code for get_slot_value');
is($C->inline_set_slot_value($instance, $slot_name, $value),
'... got the right code for initialize_slot');
is($C->inline_is_slot_initialized($instance, $slot_name),
- 'exists $_[0]->{$attr_name} ? 1 : 0',
+ 'exists $_[0]->{$attr_name}',
'... got the right code for get_slot_value');
is($C->inline_weaken_slot_value($instance, $slot_name),
is($accessor_string,
q|sub {
$_[0]->{$attr_name} = $_[1] if scalar @_ == 2;
-exists $_[0]->{$attr_name} ? $_[0]->{$attr_name} : undef;
+$_[0]->{$attr_name};
}|,
'... got the right code string for accessor');
is($reader_string,
q|sub {
-exists $_[0]->{$attr_name} ? $_[0]->{$attr_name} : undef;
+$_[0]->{$attr_name};
}|,
'... got the right code string for reader');