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
more given nonsense: what's a topicalizer? #11327
Comments
From tchrist@perl.comWhen you run this: use 5.010; You get: other In other words, it does the right thing, and then blows up. use 5.010; Which correctly prints: other which is just ridiculous. What does it think while (<DATA>) is if not a topicalizer?? BTW, this *does* work correctly in Perl 6. --tom Summary of my perl5 (revision 5 version 12 subversion 3) configuration: Characteristics of this binary (from libperl): |
From @ikegamiOn Mon, May 9, 2011 at 9:50 AM, tchrist1 <perlbug-followup@perl.org> wrote:
So what would qualify? while ($_ = ...) { ... } Same for C<for(;;)>? |
The RT System itself - Status changed from 'new' to 'open' |
From tchrist@perl.com"Eric Brine via RT" <perlbug-followup@perl.org> wrote
In Perl6, when works wherever $_ is around to test against. --tom |
From @ikegami
$_ is always around in Perl5, even when there's nothing to next/break out |
From tchrist@perl.comEric Brine <ikegami@adaelis.com> wrote
Just let them try. :) I would be quite happy to have it in while (<>) { --tom |
From @ap* tchrist1 <perlbug-followup@perl.org> [2011-05-09 15:55]:
I think this is the consequence of `break` being added as And once you have `break` you have to come up with a special set Needless to say I don’t see the point since it’s possible to I think `when` shouldn’t just do an implicit `next` in all cases. In fact if `when` lost the implicit smart match and became Regards, |
From @ikegamiOn Tue, May 10, 2011 at 3:10 PM, Tom Christiansen <tchrist@perl.com> wrote:
That's what's happening. It's trying to C<break> and finds neither C<given> It could start looking for any loop. Is there any problems (compatibility |
From @ap* Aristotle Pagaltzis <pagaltzis@gmx.de> [2011-05-11 00:15]:
No, I don’t think that, I just ended up saying it because of too Regards, |
From tchrist@perl.com
Me, I was surprised it didn't. --tom |
From @cpansproutOn Mon May 09 06:50:09 2011, tom christiansen wrote:
It’s even stranger than you think: $ perl -E 'given(1) { for my $x (2) { break } } warn ok' |
From perl-diddler@tlinx.orgCreated by perl-diddler@tlinx.orgIt seems like perl is being a bit over zealous about it's policing A prime example would be 'when(<>){}', where you process lines like Sometimes an if/elsif/else/ construct is useful, but only if you Another example I ran into today: In a trivial prog, I had a foreach loop to parse args. for ($_=$ARGV[$n = 0]; $n<@ARGV; $_=$ARGV[$n]) { --- for ($_=each(@ARGV); $_<=lastmem(@ARGV); $_=next(@ARGV) ) { Can someone explain to me the rational for the interpreter Thanks! Perl Info
|
From @ikegamiOn Sun, Jan 22, 2012 at 12:21 AM, Linda Walsh <perlbug-followup@perl.org>wrote:
C<when> was primary written to compare to $_ (e.g. C<< when ("foo") >>), so |
The RT System itself - Status changed from 'new' to 'open' |
From @cpansproutOn Sat Jan 21 22:11:07 2012, ikegami@adaelis.com wrote:
Except even that doesn’t work properly. Since this is basically the -- Father Chrysostomos |
Migrated from rt.perl.org#90182 (status was 'open')
Searchable as RT90182$
The text was updated successfully, but these errors were encountered: