Why are use warnings; use strict; not default in Perl?

前端 未结 6 1657
北海茫月
北海茫月 2020-12-03 10:00

I\'m wondering why

use warnings;
use strict;

are not default in Perl. They\'re needed for every script. If someone (for good reason) need

6条回答
  •  旧巷少年郎
    2020-12-03 10:25

    You can use the common::sense module, if you need:

    use utf8;
    use strict qw(vars subs);
    use feature qw(say state switch);
    no warnings;
    use warnings qw(FATAL closed threads internal debugging pack
                    portable prototype inplace io pipe unpack malloc
                    deprecated glob digit printf layer
                    reserved taint closure semicolon);
    no warnings qw(exec newline unopened);

    It reduces the memory usage.

提交回复
热议问题