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

[perl #133796] Long error message, which writes a full content ofvariable supposed to be package name.

Thread Previous
From:
Dan Book via RT
Date:
January 25, 2019 17:05
Subject:
[perl #133796] Long error message, which writes a full content ofvariable supposed to be package name.
Message ID:
rt-4.0.24-24552-1548435927-786.133796-15-0@perl.org
On Fri, 25 Jan 2019 05:53:52 -0800, jkeenan@pobox.com wrote:
> On 1/24/19 8:15 AM, Robertas Stankevič (via RT) wrote:
> > # New Ticket Created by  Robertas Stankevič
> > # Please include the string:  [perl #133796]
> > # in the subject line of all future correspondence about this issue.
> > # <URL: https://rt.perl.org/Ticket/Display.html?id=133796 >
> >
> > Error message can become very long, depending on variable.
> 
> perl -le '$_ = "a" x 1e2; print 1; print 2, poa $_'
> 
> OUTPUTS:
> 1
>  Can't locate object method "poa" via package
>  "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
>  (perhaps you forgot to load
>  "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"?)
> at -e line 1.
> 
> Originally I got >1e5 length message, because of mistyping 'pos'.
> Maybe
> ellipsis would fit here.
> >
> 
> My 2 cents:  I believe it would be next to impossible to develop a
> rule
> which says one particular error message is too long while another one
> is
> the right length.  So I don't believe any change in this area is
> warranted.
> 
> Thank you very much.
> Jim Keenan

I believe there is a maximum package name size; since this is trying to interpret it as a package name via indirect syntax, perhaps that would be a sensible limit for the error message?

---
via perlbug:  queue: perl5 status: open
https://rt.perl.org/Ticket/Display.html?id=133796

Thread Previous


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