develooper Front page | perl.perl5.porters | Postings from January 2018

Re: [perl #132783] Blead Breaks CPAN: ADAMK/SQL-String-0.02.tar.gz

Thread Previous | Thread Next
From:
Zefram
Date:
January 31, 2018 13:10
Subject:
Re: [perl #132783] Blead Breaks CPAN: ADAMK/SQL-String-0.02.tar.gz
Message ID:
20180131131033.GP22873@fysh.org
Smylers wrote:
>Why is it wrong for that to warn?

The question is whether .= stringifies its rhs in this case.  If it
stringifies, passing an actual string to the lhs overload, then it is
correct to gripe about undef.  If it does not stringify, and so passes
the rhs value to the lhs overload as-is, then it is up to the overload
method to determine what operand values are valid, and .= has no business
opining on the matter.

In fact both 5.26.0 and 5.27.8 are agreed: .= does not stringify the rhs
in this case.  They do not call stringification overloads, and do not
flatten references.  They pass the rhs value to the lhs overload as-is.

-zefram

Thread Previous | Thread Next


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