Little Question on Perl and "strict"

fosaq

Dabbler
Joined
Jun 24, 2020
Messages
17
I'm playing around with some perl scripts and found, that "strict" can be implicitly enabled since version 5.12.
On TrueNAS 12.0-U8 version 5.30.2 is installed and this feature seems not to be active (for compatibility reasons I think because it would break many scripts?).
Is there a way to activate the "strictness" of perl, with a tunable maybe?
 

jgreco

Resident Grinch
Joined
May 29, 2011
Messages
18,680
I'm guessing not much of the base system is perl anymore although I think some reporting scripts use it.

Is there a reason not to enable strict in the scripts you want to use?
 

fosaq

Dabbler
Joined
Jun 24, 2020
Messages
17
I use strict and I want it to be implicitly enabled (like the perl doc's say) so that scripts without strict would break.

Besides working on something else I'm using this "PID fan controller" script in my test system which has no strict in it and I wonder why the heck it even work.
At the moment I try to improve this script and solve some issues (adding strict, logfile behavior, etc.).
 
Last edited:
Top