develooper Front page | perl.perl5.porters | Postings from June 2022

Re: Pre-RFC: Improve “wide character” warnings

Thread Previous | Thread Next
Branislav Zahradník
June 8, 2022 08:39
Re: Pre-RFC: Improve “wide character” warnings
Message ID:
On Wed, 8 Jun 2022 at 09:05, Alexander Hartmaier <>

> Can we please skip the string-using intermediate step and go right to how
> Python does it with exception classes?
There already was such discussions

Regarding exception classes, I though that as as well, introducing classes
with overloaded stringify should do the trick
but I was told otherwise (I don't remember enough to find that discussion
as well, maybe it was on IRC)
so result: behaviour of "if (ref $@)" to detect perl and custom exception
will change

As result, I also played with internals with implementation of stash-to-sv
relation (so -> operator can call methods even on non-refs)
that is possible but raises another problem (if you are in "cannot do"
mood) - it will prohibit "$class->method"

This can be mitigated by two approaches:
a) limit this behaviour to exceptions
b) introduce mandatory usage of class literal (ie, requires new internals)

- My::Package:: - already supported, treated specially but producing
- ${var}:: - new syntax, convert dynamic string into class literal

Class literal can still be allowed to use indirect syntax (especially with
"new" and "throw")

Best regards,

Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About