develooper Front page | perl.perl5.changes | Postings from July 2020

[Perl/perl5] 32f4ed: Suppress 2 runtime warnings

From:
James E Keenan
Date:
July 1, 2020 03:13
Subject:
[Perl/perl5] 32f4ed: Suppress 2 runtime warnings
Message ID:
Perl/perl5/push/refs/heads/core-p7/bda551-ccd88f@github.com
  Branch: refs/heads/core-p7
  Home:   https://github.com/Perl/perl5
  Commit: 32f4eda240add83b5e1371521fbad115701e28b6
      https://github.com/Perl/perl5/commit/32f4eda240add83b5e1371521fbad115701e28b6
  Author: James E Keenan <jkeenan@cpan.org>
  Date:   2020-06-30 (Tue, 30 Jun 2020)

  Changed paths:
    M t/io/argv.t

  Log Message:
  -----------
  Suppress 2 runtime warnings


  Commit: bcaf54dc9f8137b79728c575bb692fa63e843a7f
      https://github.com/Perl/perl5/commit/bcaf54dc9f8137b79728c575bb692fa63e843a7f
  Author: James E Keenan <jkeenan@cpan.org>
  Date:   2020-06-30 (Tue, 30 Jun 2020)

  Changed paths:
    M t/io/argv.t

  Log Message:
  -----------
  Add descriptions to most tests lacking them


  Commit: 553f2732da713c3e71e1a71b23b1db7736e69fe9
      https://github.com/Perl/perl5/commit/553f2732da713c3e71e1a71b23b1db7736e69fe9
  Author: James E Keenan <jkeenan@cpan.org>
  Date:   2020-06-30 (Tue, 30 Jun 2020)

  Changed paths:
    M t/io/layers.t

  Log Message:
  -----------
  t/io/layers.t: Handle uninitialized warnings

Running with warnings enabled reveals 3 instances of uninitialized value
warnings.  The tied object is not defined even though the code appears
to assign a value to it.  Add tests that demonstrate this, then suppress
the uninitialized value warnings.


  Commit: 7dcedefc9b3902170f7b4d6a975a4b49ab427b23
      https://github.com/Perl/perl5/commit/7dcedefc9b3902170f7b4d6a975a4b49ab427b23
  Author: James E Keenan <jkeenan@cpan.org>
  Date:   2020-06-30 (Tue, 30 Jun 2020)

  Changed paths:
    M t/io/pipe.t

  Log Message:
  -----------
  t/io/pipe.t:  Suppress "Can't exec ..." warning

File did not previously run with warnings.  Once they're default, this
became apparent and unavoidable.


  Commit: 0901af29f02462676cd77adb88be92995b83b3d7
      https://github.com/Perl/perl5/commit/0901af29f02462676cd77adb88be92995b83b3d7
  Author: James E Keenan <jkeenan@cpan.org>
  Date:   2020-06-30 (Tue, 30 Jun 2020)

  Changed paths:
    M t/io/print.t

  Log Message:
  -----------
  Suppress 3 warnings

File did not previously run with warnings.  Adapt.


  Commit: c54736bd87af9f4a4957142eabded6e922f70ffb
      https://github.com/Perl/perl5/commit/c54736bd87af9f4a4957142eabded6e922f70ffb
  Author: James E Keenan <jkeenan@cpan.org>
  Date:   2020-06-30 (Tue, 30 Jun 2020)

  Changed paths:
    M t/io/read.t

  Log Message:
  -----------
  Suppress one 'used only once' warning


  Commit: cb3bf169a6e1a66ba02e4c50a527025fec0f2576
      https://github.com/Perl/perl5/commit/cb3bf169a6e1a66ba02e4c50a527025fec0f2576
  Author: James E Keenan <jkeenan@cpan.org>
  Date:   2020-06-30 (Tue, 30 Jun 2020)

  Changed paths:
    M t/io/read.t

  Log Message:
  -----------
  t/io/read.t:  Add descriptions and test for return values


  Commit: c3aea3a8fc5ade60c482644dc2da5b17c9cbd274
      https://github.com/Perl/perl5/commit/c3aea3a8fc5ade60c482644dc2da5b17c9cbd274
  Author: James E Keenan <jkeenan@cpan.org>
  Date:   2020-06-30 (Tue, 30 Jun 2020)

  Changed paths:
    M t/io/say.t

  Log Message:
  -----------
  t/io/say.t: Suppress one "used only once" warning

Now that strict and warnings are on by default, use "no strict 'refs'"
only where it's absolutely needed for compilation.


  Commit: 5e7d078718920f811f518beb88d23a4c35b08584
      https://github.com/Perl/perl5/commit/5e7d078718920f811f518beb88d23a4c35b08584
  Author: James E Keenan <jkeenan@cpan.org>
  Date:   2020-06-30 (Tue, 30 Jun 2020)

  Changed paths:
    M t/io/tell.t

  Log Message:
  -----------
  t/io/tell.t:  Suppress warnings

Use "no strict 'refs'" only where it's absolutely needed for
compilation.


  Commit: ccd88fa66c77a403ad5b4558ade1f80f4f614b50
      https://github.com/Perl/perl5/commit/ccd88fa66c77a403ad5b4558ade1f80f4f614b50
  Author: James E Keenan <jkeenan@cpan.org>
  Date:   2020-06-30 (Tue, 30 Jun 2020)

  Changed paths:
    M t/io/utf8.t

  Log Message:
  -----------
  t/io/utf8.t:  Suppress or capture warnings

Also, use "no strict" only where absolutely necessary.

Some blocks containing loops of tests had to be disaggregated to get a
clear focus on what was throwing warnings and what was not.


Compare: https://github.com/Perl/perl5/compare/bda5511b459a...ccd88fa66c77



nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About