Why doesn't opendir have the same policies as open in Perl Best Practices?

Is there a reason why it opendirdoes not have the same policies openas Perl Best Practices ?

I think of at least these two rules:

+5
source share
3 answers

The original rule from Perl Best Practices (for the first policy you specified) was

Do not use descriptor descriptors

which applies to much more than just that open. Perl :: The critic is mainly based on PBP, but it differs (from perldoc):

Perl:: Critic - Perl. , . Perl:: Critic Perl:: Critic:: Policy, . "Perl Best Practices". Perl:: Critic PBP , Conway.

, , Perl:: Critic opendir, , . , PBP open. CPAN ( , ).

PBP, , opendir. , CPAN , . , .

: , PBP -

.

, , , ( , ).

+3

: , "lint-ish" .

FYI: , -, open + block Ruby: open/close, sub - . , .

0

? , , - ,

0

All Articles