Am 06.02.26 um 3:28 PM schrieb Thomas Lamprecht:
> Am 06.02.26 um 14:08 schrieb Fiona Ebner:
>>> +sub detect_architecture {
>>> + my ($self) = @_;
>>> + return;
>> Thinking through it again, should we rather just die here instead of
>> returning undef? It seems to me that the contract for the method is
>> currently "either return the detected architecture or die". Then patch
>
> That description of the contract is not correct, for normal os types
> it fails if the arch could not be detected, for unmanaged this should
> not be the case, as we never can detect it there by design, and returning
> undef is more correct as of now.
Since there is no documentation, I took 'contract' to be "the current
behavior and expectation of the use sites". But changing this is fine by
me too.
>
>> 4/4 would not be needed. Your new implementation adds a "or return
>> undef" to the contract making it more complicated.
>