On 2022-06-01 2:54 a.m., Tom Molesworth via perl5-porters wrote: > On 2022-05-28 4:16 a.m., Ovid wrote: > > Not sure what it would take to do this, but this kind of error crops > up a few times: > > > > Can't locate object method "some_method" via package "Some::Class" > > > > In my case, it turns out that some CPAN testers were using versions of a > > Type::Tiny released eight years ago. > > > > It would be nice if the error looked like this: > > > > Can't locate object method "some_method" via package "Some::Class, > version 1.01" > > This effectively means "call the ->VERSION method", which would seem to add some > complexity? side effects of the method, what if it throws an exception, etc. This could be implemented using a simpler safer approach that may miss the version in edge cases but this doesn't have to give a version in every instance. The call can trap exceptions, or it can limit to reading $VERSION. > Aside from that, keeping the version *outside* the quoted string may help reduce > breakage for anything that's trying to parse the existing string. I agree with this, it is the most backwards compatible if the new information is just appended to the end of the string that was there before, and leave the old string exactly as it was. -- Darren DuncanThread Previous | Thread Next