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
X::Seq don't say which Seq the exception occurred on #6033
Comments
From @samcvCODE: STDERR: I have had lines that have multiple sequences on that, and it is very difficult to know which Seq it was without a nice error. |
From @moritzOn Tue, 24 Jan 2017 23:15:32 -0800, samantham@posteo.net wrote:
What would you suggest we do? The point of the Seq iterator is that it doesn't generally store the old values, so pretty much by definition we *can't* give more details about the contents of the Seq, and we generally don't know which variable it's stored in either. Unless somebody has a good idea on how to improve this, I'd close it as "sadly won't fix". Cheers, |
The RT System itself - Status changed from 'new' to 'open' |
From @samcvOn Wednesday, 25 January 2017 01.45.59 PST you wrote:
I don't want the values of the Seq, I want the name of the variable. |
From @moritzOn 25.01.2017 10:47, Samantha McVey wrote:
Trying to find the name of a variable (if there is one at all) from the -- |
From @lizmatI think this is a basic misunderstanding about what an Iterator is and what a Seq. The basic thing is the Iterator. .Seq is nothing but method Seq() { Seq.new(self.iterator) } In other words, a Seq is just a wrapper around an Iterator. In general, you shouldn’t be asking a Seq for its Iterator. You could argue that is something that is only done internally to make things work(tm). Also, unless you’re writing iterators yourself, you should never even need to know about iterators. So I’m wondering what you’re trying to achieve. If you change the code to: my $thing = (1,3,4); $thing.iterator; $thing.iterator it would just give you two iterators. Each iterating over the whole list. Not sure if that’s what you wanted to do, but that cannot be determined from the code provided. Also, I’m not sure how we can improve the error message: most Seq’s are created inside the core setting. And when the “already consumed” error occurs, it’s going to be hard to find out where that Seq got created. So I would categorize this bug as a DIHWIDT
|
Migrated from rt.perl.org#130638 (status was 'open')
Searchable as RT130638$
The text was updated successfully, but these errors were encountered: