September 20th-26th

Bug reports and bug fixes

  Fuzzing to find bugs

   More tickets were opened by Dan Collins and Brian Carpenter, results of
   fuzzing perl and uncovering interesting ways to crash perl.

   Brian Carpenter found two bugs causing a null pointer dereference,
leading
   to a segfault ([1]Perl #126191, [2]Perl #126192).

   Brian Carpenter found a couple of assertion failures ([3]Perl #126193,
   [4]Perl #126170).

   Dan Collins found a double free problem ([5]Perl #126199). Vincent Pit
was
   able to provide a summary of this bug in the form of:

 $[ .= *[ = 'y'

   which I found too cool to leave out.

   Dan Collins provided a segfault ([6]Perl #126204) caused by the following
   reduced regex:

 /(?[()-!])/

   [7]Perl #126206 is a floating point exception. Reported by Dan Collins.

   [8]Perl #126042 is a stack corruption caused by perl losing track of the
   stack pointer. Reported by Dan Collins, fixed by Father Chrysostomos.

   Father C. raised a problem with the implementation details of PL_sv_yes,
   and cautiously proposed at least a specific usage of it be removed from
   perl space. Zefram supported and added that -- even if implemented
   correctly -- it would still be wrong.

   [9]Perl #126064: Yet another stack corruption; like the previous one,
   reported by Dan Collins, fixed by Father Chrysostomos.

   [10]Perl #126188: When requiring [11]IO::File in an attempt to resolve
   missing method on a hash, a segfault happens. Yet more results of
fuzzing.
   Reported by Dan Collins.

   Ricardo Signes bumped another fuzzing bug which caused a segfault and
   Shlomi Fish provided a patch, seconded by Reini Urban and discussed and
   approved on #p5p - leading to the patch being applied. ([12]Perl #125350)

  Portability fixes

   Dan Collins provided a patch for compiling perl on GNU/Linux which was
   bisected to one of the recent AmigaOS-related changes. ([13]Perl #126152)

   Dan Collins reports a problem with building quadmath Perl. Bulk88
provided
   more comments and Lukas Mai delved into util.c finding a potential memory
   leak with the quadmath-related code. ([14]Perl #126203)

   Sisyphus raised an issue of a test that has been failing for him on
   Windows 7 since perl 5.23.3 having to do with read-only file attributes.
   With the help of Tony Cook the packaging problem was solved. ([15]Perl
   #126133)

   Bulk88 provided additional information to a ticket requested to revert a
   patch that caused a problem on Visual C. Karl Williamson does not wish to
   revert it and instead offers to handle the specific compiler explicitly.
   ([16]Perl #126045)

  sv_backoff optimisation

   Bulk88 provided a patch for making sv_backoff more tailcall friendly
   ([17]Perl #126171).

   sv_backoff would change its return value from int to void, but as Bulk88
   explains, since it was previously only returning a meaningless constant
   value and since it should be reached via the public API function
   sv_setsv(sv, &PL_sv_undef) (or several others) anyway, it shouldn't be a
   problem. He also added this explanation as a documentation patch.

  File::Find portability issue

   Robert Mah raised a problem with [18]File::Find working between CIFS and
   GNU/Linux systems - one supports nlink while the other does not and
   File::Find failed to understand this. Dave Mitchell showed the commit
that
   tries to identify it, and additional research by Robert has shown other C
   utilities seem to have this problem too. ([19]Perl #126144)

  More optimisations

   Bulk88 bumped a ticket he opened at the beginning of 2014 to optimize two
   functions using tied hashes. The bump resulted in additional comments
from
   Tony Cook, following several rounds of comments and fixes between Dave
   Mitchell and Bulk88. ([20]Perl #121348)

   He also provided a patch for optimizing some stack manipulation.
([21]Perl
   #126196)

  Mysterious mod_perl compilation crash

   Additional information provided by Michael Schout on a crash involving
   pre-compiling modules under mod_perl tracing back to commit which fixed a
   seemingly unrelated bug. ([22]Perl #126145)

  Documenting the names of types

   Linda Walsh opened a ticket regarding additional reference type
   documentation. Ricardo adds an explanation of Regexp vs. REGEXP and notes
   additional types that should probably be documented along the way.
   ([23]Perl #126150)

  Finding modules on case-insensitive filesystems

   Patrick Zimmermann raised an issue with loading modules on
   case-insensitive systems. Zefram provided an explanation on why this
   happens, unfortunately a combination of correct behavior with an API
   design of an optional import method in a module - something that cannot
be
   changed. ([24]Perl #126167)

  Crashing perl with x

   Dan Collins raised a problem with the x operator causing a segfault when
   operating on a list. The ticket contains an in-depth discussion on the
   problem and possible fixes. ([25]Perl #125937)

  What's in th %! hash

   Felipe Gasper opened a ticket suggesting to document the ability to use
   the values of %!. ([26]Perl #125350)

  Several regexp bugs

   Victor ADAM has raised a ticket that the regexp pattern ]]]]][\\ should
   raise an error but does not. Karl Williamson was able to reproduce, write
   a patch, and will seek additional cases before pushing it. ([27]Perl
   #126141)

   He opened several other regex-related tickets:

     * [28]Perl #126179: Regression with \N{}.
     * [29]Perl #126181: \c inside (?[]).
     * [30]Perl #126182: /(.(?2))((?<=(?=(?1)).))/ hangs, eats all available
       RAM.
     * [31]Perl #126185: /(?-p)/ should raise an error.
     * [32]Perl #126186: Document (*COMMIT:arg) and (*ACCEPT:arg).
     * [33]Perl #126177: (?n) should be documented.
     * [34]Perl #126187: /\p / and /\p^/ give strange warnings.
     * [35]Perl #126180: /(?[\ &!])/ segfaults.
     * [36]Perl #126178: /(?i/ and similar should raise an error.

Discussions

  Smart Match, again

   Ricardo Signes has laid out plans on cleaning up Smart Match and has
   provided [37]test cases for the new expected behavior of Smart Match.

   It would seem like Smart Match is going to get very clear, simple, and
   most importantly, expected syntax.

   The [38]thread itself is quite long and I recommend reading it only if
   you're interested in what people had snagged on. The aforementioned gist
   provides a clear spec of what Smart Match would become. The discussion
   thread also contains some comments by Zefram on what he believes is also
   confusion in Smart Match in [39]Perl 6.

  Revising version string semantics

   Following Lyon QA Hackathon and [40]its decisions, Ricardo Signes
provided
   [41]a summary and queried for any reasoned objections to moving forward
   with the recommendations. Questions were asked for clarifying specific
   situations and amending was done on the linked gist.

  Spaces in qr/\p L/

   Karl Williamson [42]asked for comments on having spaces when using \p
(the
   syntax for named Unicode properties) in regular expressions:

 qr/\p L/

   vs.

 qr/\p L/x

   Agreement that both should fail from Ricardo Signes, Yitzchak
   Scott-Thoennes, and Abigail.

  Removing legacy code from B

   Nicolas R. [43]suggested removing "dead code" from core (specifically
   [44]B relating to some PERL_VERSION checks and provided a patch removing
   it. This turned into a conversation on what "dead code" is and whether it
   should be removed.

   Main positions:

     * Dave Mitchell agrees with removing the code.
     * Tony Cook applied the patch.
     * Reini Urban disagrees, as it was used as boilerplate code on CPAN.
     * Todd Rinaldo supports removal and suggests considering adding docs.

   Continued discussion:

   Rocco Caputo asked about guidelines on obsolete implementations and dead
   code in general while Aristotle Pagaltzis asked to think of this change
in
   the context of the recently-surfaced concept of the [45]CPAN river and
   doubts whether the code in question is, in fact, dead code.

   Ricardo Signes proposed a practical solution along Todd's suggestion,
   opting for finding a proper place for any important information which
   might be lost in this commit - documentation.

   Bulk88 had offered an example with [46]Encode supporting older perl
   versions with what could be described as "dead code", which Ricardo
   explained as a incorrect example, since Encode can be installed on older
   perl versions, while new versions of [47]B cannot.

  Unshifting undef to @ISA

   Vadim Pushtaev opened [48]a ticket about unshifting more than one value
to
   @ISA, leading to a [49]discussion about the problem.

   Zefram was able to distill that example further. Aristotle Pagaltzis
   suggests this raises two bugs instead of one: A loop that occurring
   pushing undef to @ISA, and unshifting multiple defined values causing
perl
   to unshift undef. Eirik Berg Hanssen was able to suggest a third bug
which
   occurs inside an eval showing a different behavior.

   Paul "LeoNerd" Evans suggested a possible reason for the warnings which
   both Vadim and Zefram agree is the real cause. The problem? In Paul's own
   words:

     Random guess: 'unshift' has to create multiple holes at the start of
the
     array so it doesn't suffer O(n^2) behaviour.

   Zefram expands:

     Pretty much. ppunshift() internally performs an avunshift() followed by
     a bunch of avstore()s. avunshift() doesn't take parameters for the
     values to unshift; it always sticks undefs in. (Actually null pointers
     internally.) The av_store() calls invoke magic on the array.

   Dagfinn Ilmari Mannsåker reminds there is a separate bug unearthed during
   the debugging process in which storing undef values in @main::ISA warns
   101 times before dying when detecting inheritance recursion. Paul's
   observation should be noted:

     Oops; sounds like the code to detect and warn against the chance of an
     infinite recursion bug itself suffers an infinite recursion bug.

   Ilmari provided a patch to delay the @ISA set magic until all items are
   assigned (which is what is done in push but not unshift).

   Tony Cook explained why the original magic delay code for push (and thus
   the proposed same solution for unshift) is actually wrong and offered a
   different solution instead.

   Ilmari offered a new patch fixing both according to Tony's suggestion.

  Optimizing reference checks

   At the beginning of the month Jarkko Hietaniemi [50]raised a personal
   annoyance with the fact that:

 ref $foo eq 'ARRAY'

   actually gets compiled into a string eq against the string constant
ARRAY,
   which makes it not just inefficient, but also a possible problem with
   blessed references - whether arrayref or ARRAY package name, not to
   mention typo possibilities.

   Zefram suggested a similar solution to what [51]Params::Classify does.
   Kent noted that it's Perl should have a native typeof kind of check.

   Bulk88 further delved into implementation details of other languages in
   this respect and what possible changes could happen in perl 5 in order to
   accommodate this (and beyond). Unfortunately his email did not receive
   comments.

  Dereferencing and "anonymous scalars"

   Bob Kleemann hit [52]a snag when trying to dereference a variable
   referencing a previous variable with the same name using version numbers.

 my $v = shift;
 $v = \$v;
 say sprintf("v%vd", $$v); # prints address, not value

   Tony Cook explains it succinctly:

     You're setting $v to a reference to itself, so $$v is the value of $v,
     which is a reference [...].

   Bob found a solution as the following code:

 $v = \eval { $v };

   This introduced an interesting thread on what Eirik Berg Hanssen referred
   to as anonymous scalars.

   By the way, following an exhaustive explanation by Aristotle Pagaltzis,
   Bob eventually went with:

 $v = \do { my $copy = $v };

  AUTOLOAD on non-existing tied hash methods

   Bulk88 [53]asks whether AUTOLOAD should be called when some methods of a
   tied hash do not exist.

   Chas. Owen shared code demonstrating that the only function that must be
   handled is TIEHASH.

  Possible optimization for tied hashes

   Bulk88 [54]wondered about possibly calling scalar keys on a tied hash
   instead of iterating over the keys and values, which would result in a
   nice optimization. Tony Cook explained why it will not be suitable for
the
   purpose.

  stat with an array

   Following [55]a ticket raised by Jozef Mojzis, Dan Collins [56]writes
that
   a side effect of fixing at least two crash-inducing bugs, stat no longer
   works on arrays. He suggests declaring it a WONTFIX or add a warning and
a
   note in [57]perldelta.

   Father Chrysostomos [58]adds a reasonable use-case for stat(@_) and
   suggests researching additional usages before attempting to fix it, one
   way or the other, and Eirik Berg Hanssen offers reasons to both document
   in perldelta and raise a warning.

   Dan Collins provided a patch to warn with a documentation change.

  Stack overflow with XS_RETURN?

   Following [59]a ticket (mentioned above) referring to the x operator
   causing a segfault, Bulk88 [60]wondered whether the XS_RETURN family of
   macros could introduce a segfault as well. Dave Mitchell explained how it
   would not be possible, but added that maybe we should make it explicit in
   the documentation and by adding assertions.

  Negative values in XSRETURN

   Doug Bell [61]asked what should happen when XSRETURN receives a negative
   value as a parameter. Dave Mitchell, backed by H. Merijn Brand (Tux),
   suggests that since this corrupts the stack, an assertion should be
added.

   A patch provided and being smoked.

  Branch cleanups

   Dave Mitchell sent another email with [62]a list of temporary Git
branches
   to be deleted, asking people to prune them.

News

  perl 5.23.3 released!

   Peter Martini released [63]perl 5.23.3.

   His epigraph follows:

 Little of of all we value here
 Wakes on the morn of its hundredth year
 Without both feeling and looking queer.
 In fact, there’s nothing that keeps its youth,
 So far as I know, but a tree and truth.
 (This is a moral that runs at large;
 Take it. — You’re welcome. — No extra charge.)

     -- The Deacon’s Masterpiece or The Wonderful "One-Hoss Shay": A
Logical Story
 Oliver Wendell Holmes

   [64]The announcement.

  Encode 2.78 is out

   Dan Kogai announced a new version of [65]Encode. Biggest change is
   preloading the CP1252 encoding.

References

   Visible links
   1. https://rt.perl.org/Ticket/Display.html?id=126191
   2. https://rt.perl.org/Ticket/Display.html?id=126192
   3. https://rt.perl.org/Ticket/Display.html?id=126193
   4. https://rt.perl.org/Ticket/Display.html?id=126170
   5. https://rt.perl.org/Ticket/Display.html?id=126199
   6. https://rt.perl.org/Ticket/Display.html?id=126204
   7. https://rt.perl.org/Ticket/Display.html?id=126206
   8. https://rt.perl.org/Ticket/Display.html?id=126042
   9. https://rt.perl.org/Ticket/Display.html?id=126064
  10. https://rt.perl.org/Ticket/Display.html?id=126188
  11. https://metacpan.org/pod/IO::File
  12. https://rt.perl.org/Ticket/Display.html?id=125350
  13. https://rt.perl.org/Ticket/Display.html?id=126152
  14. https://rt.perl.org/Ticket/Display.html?id=126203
  15. https://rt.perl.org/Ticket/Display.html?id=126133
  16. https://rt.perl.org/Ticket/Display.html?id=126045
  17. https://rt.perl.org/Ticket/Display.html?id=126171
  18. https://metacpan.org/pod/File::Find
  19. https://rt.perl.org/Ticket/Display.html?id=126144
  20. https://rt.perl.org/Public/Bug/Display.html?id=121348
  21. https://rt.perl.org/Ticket/Display.html?id=126196
  22. https://rt.perl.org/Ticket/Display.html?id=126145
  23. https://rt.perl.org/Ticket/Display.html?id=126150
  24. https://rt.perl.org/Ticket/Display.html?id=126167
  25. https://rt.perl.org/Ticket/Display.html?id=125937
  26. https://rt.perl.org/Ticket/Display.html?id=126174
  27. https://rt.perl.org/Ticket/Display.html?id=126141
  28. https://rt.perl.org/Ticket/Display.html?id=126179
  29. https://rt.perl.org/Ticket/Display.html?id=126181
  30. https://rt.perl.org/Ticket/Display.html?id=126182
  31. https://rt.perl.org/Ticket/Display.html?id=126185
  32. https://rt.perl.org/Ticket/Display.html?id=126186
  33. https://rt.perl.org/Ticket/Display.html?id=126177
  34. https://rt.perl.org/Ticket/Display.html?id=126187
  35. https://rt.perl.org/Ticket/Display.html?id=126180
  36. https://rt.perl.org/Ticket/Display.html?id=126178
  37. https://gist.github.com/rjbs/fb5716d7dbd4f23939ea
  38.
http://www.nntp.perl.org/group/perl.perl5.porters/2015/09/msg230881.html
  39.
http://www.nntp.perl.org/group/perl.perl5.porters/2015/09/msg231292.html
  40. https://gist.github.com/dagolden/9559280
  41.
http://www.nntp.perl.org/group/perl.perl5.porters/2015/09/msg231216.html
  42.
http://www.nntp.perl.org/group/perl.perl5.porters/2015/09/msg231263.html
  43.
http://www.nntp.perl.org/group/perl.perl5.porters/2015/09/msg230985.html
  44. https://metacpan.org/pod/B
  45. http://neilb.org/tag/cpan-river/
  46. https://metacpan.org/pod/Encode
  47. https://metacpan.org/pod/B
  48. https://rt.perl.org/Ticket/Display.html?id=126082
  49.
http://www.nntp.perl.org/group/perl.perl5.porters/2015/09/msg231063.html
  50.
http://www.nntp.perl.org/group/perl.perl5.porters/2015/09/msg230637.html
  51. https://metacpan.org/pod/Params::Classify
  52.
http://www.nntp.perl.org/group/perl.perl5.porters/2015/09/msg231048.html
  53.
http://www.nntp.perl.org/group/perl.perl5.porters/2015/09/msg231207.html
  54.
http://www.nntp.perl.org/group/perl.perl5.porters/2015/09/msg231210.html
  55. https://rt.perl.org/Ticket/Display.html?id=126162
  56.
http://www.nntp.perl.org/group/perl.perl5.porters/2015/09/msg231304.html
  57. https://metacpan.org/pod/perldelta
  58.
http://www.nntp.perl.org/group/perl.perl5.porters/2015/09/msg231309.html
  59. https://rt.perl.org/Ticket/Display.html?id=125937
  60.
http://www.nntp.perl.org/group/perl.perl5.porters/2015/09/msg231329.html
  61.
http://www.nntp.perl.org/group/perl.perl5.porters/2015/06/msg228284.html
  62.
http://www.nntp.perl.org/group/perl.perl5.porters/2015/09/msg231254.html
  63. https://metacpan.org/release/PCM/perl-5.23.3/
  64.
http://www.nntp.perl.org/group/perl.perl5.porters/2015/09/msg231173.html
  65. https://metacpan.org/pod/Encode
September 20th-26th

Bug reports and bug fixes

  Fuzzing to find bugs

   More tickets were opened by Dan Collins and Brian Carpenter, results of
   fuzzing perl and uncovering interesting ways to crash perl.

   Brian Carpenter found two bugs causing a null pointer dereference,
leading
   to a segfault ([1]Perl #126191, [2]Perl #126192).

   Brian Carpenter found a couple of assertion failures ([3]Perl #126193,
   [4]Perl #126170).

   Dan Collins found a double free problem ([5]Perl #126199). Vincent Pit
was
   able to provide a summary of this bug in the form of:

 $[ .= *[ = 'y'

   which I found too cool to leave out.

   Dan Collins provided a segfault ([6]Perl #126204) caused by the following
   reduced regex:

 /(?[()-!])/

   [7]Perl #126206 is a floating point exception. Reported by Dan Collins.

   [8]Perl #126042 is a stack corruption caused by perl losing track of the
   stack pointer. Reported by Dan Collins, fixed by Father Chrysostomos.

   Father C. raised a problem with the implementation details of PL_sv_yes,
   and cautiously proposed at least a specific usage of it be removed from
   perl space. Zefram supported and added that -- even if implemented
   correctly -- it would still be wrong.

   [9]Perl #126064: Yet another stack corruption; like the previous one,
   reported by Dan Collins, fixed by Father Chrysostomos.

   [10]Perl #126188: When requiring [11]IO::File in an attempt to resolve
   missing method on a hash, a segfault happens. Yet more results of
fuzzing.
   Reported by Dan Collins.

   Ricardo Signes bumped another fuzzing bug which caused a segfault and
   Shlomi Fish provided a patch, seconded by Reini Urban and discussed and
   approved on #p5p - leading to the patch being applied. ([12]Perl #125350)

  Portability fixes

   Dan Collins provided a patch for compiling perl on GNU/Linux which was
   bisected to one of the recent AmigaOS-related changes. ([13]Perl #126152)

   Dan Collins reports a problem with building quadmath Perl. Bulk88
provided
   more comments and Lukas Mai delved into util.c finding a potential memory
   leak with the quadmath-related code. ([14]Perl #126203)

   Sisyphus raised an issue of a test that has been failing for him on
   Windows 7 since perl 5.23.3 having to do with read-only file attributes.
   With the help of Tony Cook the packaging problem was solved. ([15]Perl
   #126133)

   Bulk88 provided additional information to a ticket requested to revert a
   patch that caused a problem on Visual C. Karl Williamson does not wish to
   revert it and instead offers to handle the specific compiler explicitly.
   ([16]Perl #126045)

  sv_backoff optimisation

   Bulk88 provided a patch for making sv_backoff more tailcall friendly
   ([17]Perl #126171).

   sv_backoff would change its return value from int to void, but as Bulk88
   explains, since it was previously only returning a meaningless constant
   value and since it should be reached via the public API function
   sv_setsv(sv, &PL_sv_undef) (or several others) anyway, it shouldn't be a
   problem. He also added this explanation as a documentation patch.

  File::Find portability issue

   Robert Mah raised a problem with [18]File::Find working between CIFS and
   GNU/Linux systems - one supports nlink while the other does not and
   File::Find failed to understand this. Dave Mitchell showed the commit
that
   tries to identify it, and additional research by Robert has shown other C
   utilities seem to have this problem too. ([19]Perl #126144)

  More optimisations

   Bulk88 bumped a ticket he opened at the beginning of 2014 to optimize two
   functions using tied hashes. The bump resulted in additional comments
from
   Tony Cook, following several rounds of comments and fixes between Dave
   Mitchell and Bulk88. ([20]Perl #121348)

   He also provided a patch for optimizing some stack manipulation.
([21]Perl
   #126196)

  Mysterious mod_perl compilation crash

   Additional information provided by Michael Schout on a crash involving
   pre-compiling modules under mod_perl tracing back to commit which fixed a
   seemingly unrelated bug. ([22]Perl #126145)

  Documenting the names of types

   Linda Walsh opened a ticket regarding additional reference type
   documentation. Ricardo adds an explanation of Regexp vs. REGEXP and notes
   additional types that should probably be documented along the way.
   ([23]Perl #126150)

  Finding modules on case-insensitive filesystems

   Patrick Zimmermann raised an issue with loading modules on
   case-insensitive systems. Zefram provided an explanation on why this
   happens, unfortunately a combination of correct behavior with an API
   design of an optional import method in a module - something that cannot
be
   changed. ([24]Perl #126167)

  Crashing perl with x

   Dan Collins raised a problem with the x operator causing a segfault when
   operating on a list. The ticket contains an in-depth discussion on the
   problem and possible fixes. ([25]Perl #125937)

  What's in th %! hash

   Felipe Gasper opened a ticket suggesting to document the ability to use
   the values of %!. ([26]Perl #125350)

  Several regexp bugs

   Victor ADAM has raised a ticket that the regexp pattern ]]]]][\\ should
   raise an error but does not. Karl Williamson was able to reproduce, write
   a patch, and will seek additional cases before pushing it. ([27]Perl
   #126141)

   He opened several other regex-related tickets:

     * [28]Perl #126179: Regression with \N{}.
     * [29]Perl #126181: \c inside (?[]).
     * [30]Perl #126182: /(.(?2))((?<=(?=(?1)).))/ hangs, eats all available
       RAM.
     * [31]Perl #126185: /(?-p)/ should raise an error.
     * [32]Perl #126186: Document (*COMMIT:arg) and (*ACCEPT:arg).
     * [33]Perl #126177: (?n) should be documented.
     * [34]Perl #126187: /\p / and /\p^/ give strange warnings.
     * [35]Perl #126180: /(?[\ &!])/ segfaults.
     * [36]Perl #126178: /(?i/ and similar should raise an error.

Discussions

  Smart Match, again

   Ricardo Signes has laid out plans on cleaning up Smart Match and has
   provided [37]test cases for the new expected behavior of Smart Match.

   It would seem like Smart Match is going to get very clear, simple, and
   most importantly, expected syntax.

   The [38]thread itself is quite long and I recommend reading it only if
   you're interested in what people had snagged on. The aforementioned gist
   provides a clear spec of what Smart Match would become. The discussion
   thread also contains some comments by Zefram on what he believes is also
   confusion in Smart Match in [39]Perl 6.

  Revising version string semantics

   Following Lyon QA Hackathon and [40]its decisions, Ricardo Signes
provided
   [41]a summary and queried for any reasoned objections to moving forward
   with the recommendations. Questions were asked for clarifying specific
   situations and amending was done on the linked gist.

  Spaces in qr/\p L/

   Karl Williamson [42]asked for comments on having spaces when using \p
(the
   syntax for named Unicode properties) in regular expressions:

 qr/\p L/

   vs.

 qr/\p L/x

   Agreement that both should fail from Ricardo Signes, Yitzchak
   Scott-Thoennes, and Abigail.

  Removing legacy code from B

   Nicolas R. [43]suggested removing "dead code" from core (specifically
   [44]B relating to some PERL_VERSION checks and provided a patch removing
   it. This turned into a conversation on what "dead code" is and whether it
   should be removed.

   Main positions:

     * Dave Mitchell agrees with removing the code.
     * Tony Cook applied the patch.
     * Reini Urban disagrees, as it was used as boilerplate code on CPAN.
     * Todd Rinaldo supports removal and suggests considering adding docs.

   Continued discussion:

   Rocco Caputo asked about guidelines on obsolete implementations and dead
   code in general while Aristotle Pagaltzis asked to think of this change
in
   the context of the recently-surfaced concept of the [45]CPAN river and
   doubts whether the code in question is, in fact, dead code.

   Ricardo Signes proposed a practical solution along Todd's suggestion,
   opting for finding a proper place for any important information which
   might be lost in this commit - documentation.

   Bulk88 had offered an example with [46]Encode supporting older perl
   versions with what could be described as "dead code", which Ricardo
   explained as a incorrect example, since Encode can be installed on older
   perl versions, while new versions of [47]B cannot.

  Unshifting undef to @ISA

   Vadim Pushtaev opened [48]a ticket about unshifting more than one value
to
   @ISA, leading to a [49]discussion about the problem.

   Zefram was able to distill that example further. Aristotle Pagaltzis
   suggests this raises two bugs instead of one: A loop that occurring
   pushing undef to @ISA, and unshifting multiple defined values causing
perl
   to unshift undef. Eirik Berg Hanssen was able to suggest a third bug
which
   occurs inside an eval showing a different behavior.

   Paul "LeoNerd" Evans suggested a possible reason for the warnings which
   both Vadim and Zefram agree is the real cause. The problem? In Paul's own
   words:

     Random guess: 'unshift' has to create multiple holes at the start of
the
     array so it doesn't suffer O(n^2) behaviour.

   Zefram expands:

     Pretty much. ppunshift() internally performs an avunshift() followed by
     a bunch of avstore()s. avunshift() doesn't take parameters for the
     values to unshift; it always sticks undefs in. (Actually null pointers
     internally.) The av_store() calls invoke magic on the array.

   Dagfinn Ilmari Mannsåker reminds there is a separate bug unearthed during
   the debugging process in which storing undef values in @main::ISA warns
   101 times before dying when detecting inheritance recursion. Paul's
   observation should be noted:

     Oops; sounds like the code to detect and warn against the chance of an
     infinite recursion bug itself suffers an infinite recursion bug.

   Ilmari provided a patch to delay the @ISA set magic until all items are
   assigned (which is what is done in push but not unshift).

   Tony Cook explained why the original magic delay code for push (and thus
   the proposed same solution for unshift) is actually wrong and offered a
   different solution instead.

   Ilmari offered a new patch fixing both according to Tony's suggestion.

  Optimizing reference checks

   At the beginning of the month Jarkko Hietaniemi [50]raised a personal
   annoyance with the fact that:

 ref $foo eq 'ARRAY'

   actually gets compiled into a string eq against the string constant
ARRAY,
   which makes it not just inefficient, but also a possible problem with
   blessed references - whether arrayref or ARRAY package name, not to
   mention typo possibilities.

   Zefram suggested a similar solution to what [51]Params::Classify does.
   Kent noted that it's Perl should have a native typeof kind of check.

   Bulk88 further delved into implementation details of other languages in
   this respect and what possible changes could happen in perl 5 in order to
   accommodate this (and beyond). Unfortunately his email did not receive
   comments.

  Dereferencing and "anonymous scalars"

   Bob Kleemann hit [52]a snag when trying to dereference a variable
   referencing a previous variable with the same name using version numbers.

 my $v = shift;
 $v = \$v;
 say sprintf("v%vd", $$v); # prints address, not value

   Tony Cook explains it succinctly:

     You're setting $v to a reference to itself, so $$v is the value of $v,
     which is a reference [...].

   Bob found a solution as the following code:

 $v = \eval { $v };

   This introduced an interesting thread on what Eirik Berg Hanssen referred
   to as anonymous scalars.

   By the way, following an exhaustive explanation by Aristotle Pagaltzis,
   Bob eventually went with:

 $v = \do { my $copy = $v };

  AUTOLOAD on non-existing tied hash methods

   Bulk88 [53]asks whether AUTOLOAD should be called when some methods of a
   tied hash do not exist.

   Chas. Owen shared code demonstrating that the only function that must be
   handled is TIEHASH.

  Possible optimization for tied hashes

   Bulk88 [54]wondered about possibly calling scalar keys on a tied hash
   instead of iterating over the keys and values, which would result in a
   nice optimization. Tony Cook explained why it will not be suitable for
the
   purpose.

  stat with an array

   Following [55]a ticket raised by Jozef Mojzis, Dan Collins [56]writes
that
   a side effect of fixing at least two crash-inducing bugs, stat no longer
   works on arrays. He suggests declaring it a WONTFIX or add a warning and
a
   note in [57]perldelta.

   Father Chrysostomos [58]adds a reasonable use-case for stat(@_) and
   suggests researching additional usages before attempting to fix it, one
   way or the other, and Eirik Berg Hanssen offers reasons to both document
   in perldelta and raise a warning.

   Dan Collins provided a patch to warn with a documentation change.

  Stack overflow with XS_RETURN?

   Following [59]a ticket (mentioned above) referring to the x operator
   causing a segfault, Bulk88 [60]wondered whether the XS_RETURN family of
   macros could introduce a segfault as well. Dave Mitchell explained how it
   would not be possible, but added that maybe we should make it explicit in
   the documentation and by adding assertions.

  Negative values in XSRETURN

   Doug Bell [61]asked what should happen when XSRETURN receives a negative
   value as a parameter. Dave Mitchell, backed by H. Merijn Brand (Tux),
   suggests that since this corrupts the stack, an assertion should be
added.

   A patch provided and being smoked.

  Branch cleanups

   Dave Mitchell sent another email with [62]a list of temporary Git
branches
   to be deleted, asking people to prune them.

News

  perl 5.23.3 released!

   Peter Martini released [63]perl 5.23.3.

   His epigraph follows:

 Little of of all we value here
 Wakes on the morn of its hundredth year
 Without both feeling and looking queer.
 In fact, there’s nothing that keeps its youth,
 So far as I know, but a tree and truth.
 (This is a moral that runs at large;
 Take it. — You’re welcome. — No extra charge.)

     -- The Deacon’s Masterpiece or The Wonderful "One-Hoss Shay": A
Logical Story
 Oliver Wendell Holmes

   [64]The announcement.

  Encode 2.78 is out

   Dan Kogai announced a new version of [65]Encode. Biggest change is
   preloading the CP1252 encoding.

References

   Visible links
   1. https://rt.perl.org/Ticket/Display.html?id=126191
   2. https://rt.perl.org/Ticket/Display.html?id=126192
   3. https://rt.perl.org/Ticket/Display.html?id=126193
   4. https://rt.perl.org/Ticket/Display.html?id=126170
   5. https://rt.perl.org/Ticket/Display.html?id=126199
   6. https://rt.perl.org/Ticket/Display.html?id=126204
   7. https://rt.perl.org/Ticket/Display.html?id=126206
   8. https://rt.perl.org/Ticket/Display.html?id=126042
   9. https://rt.perl.org/Ticket/Display.html?id=126064
  10. https://rt.perl.org/Ticket/Display.html?id=126188
  11. https://metacpan.org/pod/IO::File
  12. https://rt.perl.org/Ticket/Display.html?id=125350
  13. https://rt.perl.org/Ticket/Display.html?id=126152
  14. https://rt.perl.org/Ticket/Display.html?id=126203
  15. https://rt.perl.org/Ticket/Display.html?id=126133
  16. https://rt.perl.org/Ticket/Display.html?id=126045
  17. https://rt.perl.org/Ticket/Display.html?id=126171
  18. https://metacpan.org/pod/File::Find
  19. https://rt.perl.org/Ticket/Display.html?id=126144
  20. https://rt.perl.org/Public/Bug/Display.html?id=121348
  21. https://rt.perl.org/Ticket/Display.html?id=126196
  22. https://rt.perl.org/Ticket/Display.html?id=126145
  23. https://rt.perl.org/Ticket/Display.html?id=126150
  24. https://rt.perl.org/Ticket/Display.html?id=126167
  25. https://rt.perl.org/Ticket/Display.html?id=125937
  26. https://rt.perl.org/Ticket/Display.html?id=126174
  27. https://rt.perl.org/Ticket/Display.html?id=126141
  28. https://rt.perl.org/Ticket/Display.html?id=126179
  29. https://rt.perl.org/Ticket/Display.html?id=126181
  30. https://rt.perl.org/Ticket/Display.html?id=126182
  31. https://rt.perl.org/Ticket/Display.html?id=126185
  32. https://rt.perl.org/Ticket/Display.html?id=126186
  33. https://rt.perl.org/Ticket/Display.html?id=126177
  34. https://rt.perl.org/Ticket/Display.html?id=126187
  35. https://rt.perl.org/Ticket/Display.html?id=126180
  36. https://rt.perl.org/Ticket/Display.html?id=126178
  37. https://gist.github.com/rjbs/fb5716d7dbd4f23939ea
  38.
http://www.nntp.perl.org/group/perl.perl5.porters/2015/09/msg230881.html
  39.
http://www.nntp.perl.org/group/perl.perl5.porters/2015/09/msg231292.html
  40. https://gist.github.com/dagolden/9559280
  41.
http://www.nntp.perl.org/group/perl.perl5.porters/2015/09/msg231216.html
  42.
http://www.nntp.perl.org/group/perl.perl5.porters/2015/09/msg231263.html
  43.
http://www.nntp.perl.org/group/perl.perl5.porters/2015/09/msg230985.html
  44. https://metacpan.org/pod/B
  45. http://neilb.org/tag/cpan-river/
  46. https://metacpan.org/pod/Encode
  47. https://metacpan.org/pod/B
  48. https://rt.perl.org/Ticket/Display.html?id=126082
  49.
http://www.nntp.perl.org/group/perl.perl5.porters/2015/09/msg231063.html
  50.
http://www.nntp.perl.org/group/perl.perl5.porters/2015/09/msg230637.html
  51. https://metacpan.org/pod/Params::Classify
  52.
http://www.nntp.perl.org/group/perl.perl5.porters/2015/09/msg231048.html
  53.
http://www.nntp.perl.org/group/perl.perl5.porters/2015/09/msg231207.html
  54.
http://www.nntp.perl.org/group/perl.perl5.porters/2015/09/msg231210.html
  55. https://rt.perl.org/Ticket/Display.html?id=126162
  56.
http://www.nntp.perl.org/group/perl.perl5.porters/2015/09/msg231304.html
  57. https://metacpan.org/pod/perldelta
  58.
http://www.nntp.perl.org/group/perl.perl5.porters/2015/09/msg231309.html
  59. https://rt.perl.org/Ticket/Display.html?id=125937
  60.
http://www.nntp.perl.org/group/perl.perl5.porters/2015/09/msg231329.html
  61.
http://www.nntp.perl.org/group/perl.perl5.porters/2015/06/msg228284.html
  62.
http://www.nntp.perl.org/group/perl.perl5.porters/2015/09/msg231254.html
  63. https://metacpan.org/release/PCM/perl-5.23.3/
  64.
http://www.nntp.perl.org/group/perl.perl5.porters/2015/09/msg231173.html
  65. https://metacpan.org/pod/Encode

Reply via email to