in reply to Strange given/when deparsing
Is this a bug of B::Deparse?
Yes, although it *might* have already been fixed in forthcoming 5.10.1.
You can see the difference with the more precise (but verbose) B::Concise:
g <2> smartmatch sK*/2 ->h d <0> padsv[$_:46,51] s ->e f <1> int[t4] sK/1 ->g e <0> padsv[$_:46,51] s ->f
f <2> smartmatch sK*/2 ->g d <0> padsv[$_:46,51] s ->e e <0> padsv[$_:46,51] s ->f
when(int) { say 'match' } # int($_) ~~ $x
You have the order backwards. It's $x ~~ int($_). (Well, $_ ~~ int($_) really.)
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: Strange given/when deparsing
by akho (Hermit) on Jun 09, 2009 at 16:03 UTC | |
by ikegami (Patriarch) on Jun 09, 2009 at 16:12 UTC | |
by akho (Hermit) on Jun 09, 2009 at 16:41 UTC | |
by ikegami (Patriarch) on Jun 09, 2009 at 16:46 UTC | |
by TimToady (Parson) on Jun 09, 2009 at 19:27 UTC |
In Section
Seekers of Perl Wisdom