in reply to Re^2: macOS Fcntl.pm missing F_NOCACHE
in thread macOS Fcntl.pm missing F_NOCACHE
"Using the raw numeric value worked!"
That's basically good news and allows you to move forward.
Having said that, raw numbers appearing in your code is less good: their purpose would be unclear to a new maintainer, and possibly even to you when the code is revisited at some future time. I'd consider using F_NOCACHE, adding a comment to explain what it is, and maybe even a condition to only use it for macOS.
Although moot if you've decided not to currently use F_NOCACHE, that advice is valid generally, whenever numbers just appear in your code. I often use constant to provide names for array indices: for example, $data[PHONE] would be clearer than $data[7].
— Ken
|
|---|