Skip to Content.
Sympa Menu

devel - Re: [sympa-developpers] Why autodie?

Subject: Developers of Sympa

List archive

Chronological Thread  
  • From: IKEDA Soji <address@concealed>
  • To: address@concealed
  • Subject: Re: [sympa-developpers] Why autodie?
  • Date: Sat, 24 Feb 2018 19:16:34 +0900

On Thu, 22 Feb 2018 11:19:19 +0100
Marc Chantreux <address@concealed> wrote:

> > I think Marc/eiro summed it up with the sentence: "die early". It allows
> > failures to be found early, even in places developers did not expect.
> > As using it enforces usage of try/catch patterns at high level in the
> > code,
> > failures will always be caught.
>
> that is exactly the point.
>
> thanks for rephrazing it

My opinion is ---

Known by their names, Perl's builtin functions are low-level
functions as thin wrapper of system calls. Their results are not
straightly connected to result of each test unit. Programmers
should write the code to decide what result is allowed and/or
disallowed.

In short, "early" check [1] of result is required to make test unit
working expectedly.

autodie warns this obvious fact, without giving any suggestions
how we should do. I feel it is, at least for our project, not
desired.


[1] Note that "early check" includes ignoring results. For example,
we usually need not checking result of close() (of course we may
do, but gain little). However, in some cases we evidently should
check, such as when we closed pipe. It is also we who decide
whether result should be checked or not, not only it is expected or
not.


Regards,

-- Soji

> marc
>


--
株式会社 コンバージョン
ITソリューション部 システムソリューション1グループ 池田荘児
〒140-0014 東京都品川区大井1-49-15 アクセス大井町ビル4F
e-mail address@concealed TEL 03-6429-2880
https://www.conversion.co.jp/



Archive powered by MHonArc 2.6.19+.

Top of Page