in reply to Re^2: 5.10 smart match behaviour
in thread 5.10 smart match behaviour

ikegami++, thanks for pointing out very clearly what the problem was, in terms of contexts.
But as almut++ also pointed out, i'm still thinking it's more a matter of non-DWIM behaviour.
You'd say, well, we've got warnings for that. :)

One of the problems is, if these are equivalent (because of the context imposed on X):
perl -Mstrict -wE'use constant X => qw(a b c); say "ok" if "a" ~~ X'
and
perl -Mstrict -wE'use constant X => qw(a b c); say "ok" if "a" == X'
that smart match breaks the warning:
Argument "a" isn't numeric in numeric eq (==) at -e line 1.

We could at least work towards a fix for this, maybe ?

-- 
perl -MLWP::Simple -e'print$_[rand(split(q|%%\n|, get(q=http://cpan.org/misc/japh=)))]'