-
Notifications
You must be signed in to change notification settings - Fork 576
warn broken when operand is overloaded #13641
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
From schmorp@schmorp.deCreated by schmorp@schmorp.de"warn" is documented to append the file/line number text when the warning howver, it doesn't do so when the last argument is overloaded to one practical difference is that warning messages that end with such here is a test script: package X; use overload '""' => sub { 1 }; our $one = bless []; $SIG{__WARN__} = sub { warn $_[0] }; # line 7 warn $one; # line 9 perl 5.12.5 output: 1 at /tmp/x line 9. perl 5.18.1 output: 1 at /tmp/x line 7. i.e., the line number is wrong in 5.18.1. this *could* be construed as a documentation bug (as apparently, there was Perl Info
|
From zefram@fysh.orgschmorp@schmorp.de wrote:
It was a deliberate change to preserve blessed objects rather than -zefram |
The RT System itself - Status changed from 'new' to 'open' |
From schmorp@schmorp.deOn Tue, Mar 04, 2014 at 03:13:32AM -0800, Zefram via RT <perlbug-followup@perl.org> wrote:
Thats a completely useless change of course(*). OTOH, the disadvantage of
"clearer"? The documentation is absolutely clear that line number info is (*) you can just define your own warn function that accepts objects if -- |
From schmorp@schmorp.deOn Tue, Mar 04, 2014 at 03:13:32AM -0800, Zefram via RT <perlbug-followup@perl.org> wrote:
Indeed, I just realised (in another debugging session) that line number Again, I can only urge you to undo this needless and pointless change - it -- |
From zefram@fysh.orgMarc Lehmann wrote:
You're free to stringify a reference yourself before passing it to warn, -zefram |
From schmorp@schmorp.deOn Thu, Mar 06, 2014 at 02:35:46AM -0800, Zefram via RT <perlbug-followup@perl.org> wrote:
Which is the same choice the former arrangement gave me, of course. I have The former arrangement, however, is a) backwards compatible and b) works So the fact remains that its a pointless and unneeded change, only That we even have this discussion is shocking, to be honest. p5p *needs* The fact that you can't even admit that this is a bug completely -- |
From zefram@fysh.orgI've corrected and clarified the documentation in commit -zefram |
@xsawyerx - Status changed from 'open' to 'resolved' |
Migrated from rt.perl.org#121372 (status was 'resolved')
Searchable as RT121372$
The text was updated successfully, but these errors were encountered: