I boiled the problem down to this code

warn $]; #> 5.024001 $null = 1; warn 'never' until $null = 666; warn $null; #> 666 $one = 1; warn 'never' until my $one = 666; # my ! warn $one; #> Warning: something's wrong +at ...

B::Deparse didn't show anything suspicious

D:\tmp>perl -MO=Deparse tst_scope.pl warn $]; $null = 1; warn 'never' until $null = 666; warn $null; $one = 1; warn 'never' until my $one = 666; warn $one; tst_scope.pl syntax OK

I also looked at B::Concise , but couldn't spot a difference in op-code flow.

D:\tmp>perl -MO=Concise,-src tst_scope.pl 18 <@> leave[1 ref] vKP/REFC ->(end) 1 <0> enter ->2 # 1: warn $]; # 5.024001 2 <;> nextstate(main 1 tst_scope.pl:1) v:{ ->3 5 <@> warn[t2] vK/1 ->6 3 <0> pushmark s ->4 - <1> ex-rv2sv sK/1 ->5 4 <#> gvsv[*]] s ->5 # 3: $null = 1; 6 <;> nextstate(main 1 tst_scope.pl:3) v:{ ->7 9 <2> sassign vKS/2 ->a 7 <$> const[IV 1] s ->8 - <1> ex-rv2sv sKRM*/1 ->9 8 <#> gvsv[*null] s ->9 # 4: warn 'never' until $null = 666; a <;> nextstate(main 1 tst_scope.pl:4) v:{ ->b k <@> leave vK* ->l b <0> enter v ->c - <1> null vKP/1 ->k f <|> or(other->g) vK/1 ->k - <1> ex-not sK*/1 ->f e <2> sassign sKS/2 ->f c <$> const[IV 666] s ->d - <1> ex-rv2sv sKRM*/1 ->e d <#> gvsv[*null] s ->e - <@> lineseq vK ->- i <@> warn[t4] vK/1 ->j g <0> pushmark s ->h h <$> const[PV "never"] s ->i j <0> unstack v ->c # 5: warn $null; #> 666 ... l <;> nextstate(main 1 tst_scope.pl:5) v:{ ->m o <@> warn[t7] vK/1 ->p m <0> pushmark s ->n - <1> ex-rv2sv sK/1 ->o n <#> gvsv[*null] s ->o # 7: $one = 1; p <;> nextstate(main 1 tst_scope.pl:7) v:{ ->q s <2> sassign vKS/2 ->t q <$> const[IV 1] s ->r - <1> ex-rv2sv sKRM*/1 ->s r <#> gvsv[*one] s ->s # 8: warn 'never' until my $one = 666; # my ! t <;> nextstate(main 1 tst_scope.pl:8) v:{ ->u 13 <@> leave vK* ->14 u <0> enter v ->v - <1> null vKP/1 ->13 y <|> or(other->z) vK/1 ->13 - <1> ex-not sK*/1 ->y x <2> sassign sKS/2 ->y v <$> const[IV 666] s ->w w <0> padsv[$one:1,2] sRM*/LVINTRO ->x - <@> lineseq vK ->- 11 <@> warn[t9] vK/1 ->12 z <0> pushmark s ->10 10 <$> const[PV "never"] s ->11 12 <0> unstack v ->v # 9: warn $one; #> Warning: something's w +rong at ... 14 <;> nextstate(main 2 tst_scope.pl:9) v:{ ->15 17 <@> warn[t11] vK/1 ->18 15 <0> pushmark s ->16 16 <0> padsv[$one:1,2] s ->17 tst_scope.pl syntax OK D:\tmp>

My guess is still that until has an inconsistency in scope between compile-time and run-time and is erroneously resetting the lexical variable.

Cheers Rolf
(addicted to the Perl Programming Language :)
Wikisyntax for the Monastery FootballPerl is like chess, only without the dice

update

PS: I have problem to imagine practical code, where this bug is posing a problem.


In reply to Re: Missing error under strict (Perlbug: postfix 'until' has inconsistent scope) by LanX
in thread Missing error under strict by Pascal666

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.