Closed evgmik closed 6 years ago
Hi @evgmik,
The use of cached_format_data
and the if-condition is a performance optimization with the objective to only perform a write command if the format needs to be changed.
So, format_data
is only called if the cached value and the supplied function argument are not equal (ne
is used to test strings for inequality; !=
is used to test numeric values for inequality).
Best, Simon
Hi, I am looking at I am looking at
sub set_data_format_precision
inLab::Moose::Instrument::SCPIBlock
inside there are the following linesnote the call for
$self->cached_format_data();
in the 3rd line. Consequently setter refuses to change format if it does not coincide with what already set. Is it a bug or I missing some deep logic?