N
Nick of course
I am convertion a class in which objects are currently implemented as
blessed hashes to use 'fields' instead.
In the existing class there are many simple methods that ane currently
written using syntax similar to that below:
sub setfoo99 { $_[0]->{foo} = 99 }
The equivalent new syntax is:
sub setfoo99 {
my __PACKAGE__ $self = shift;
$self->{foo} = 99
}
Is there an alternative syntax that eliminates the need for an
intermediate typed variable but still ensures compile time key lookup
blessed hashes to use 'fields' instead.
In the existing class there are many simple methods that ane currently
written using syntax similar to that below:
sub setfoo99 { $_[0]->{foo} = 99 }
The equivalent new syntax is:
sub setfoo99 {
my __PACKAGE__ $self = shift;
$self->{foo} = 99
}
Is there an alternative syntax that eliminates the need for an
intermediate typed variable but still ensures compile time key lookup