Message-ID: <
20080108185647.GD11813@perldition.org>
p4raw-id: //depot/perl@32909
sub pp_smartmatch {
my ($self, $op, $cx) = @_;
if ($op->flags & OPf_SPECIAL) {
- return $self->deparse($op->first, $cx);
+ return $self->deparse($op->last, $cx);
}
else {
binop(@_, "~~", 14);
require feature;
feature->import(':5.10');
}
-use Test::More tests => 58;
+use Test::More tests => 59;
use B::Deparse;
my $deparse = B::Deparse->new();
my $b = \{};
my $c = [];
my $d = \[];
+####
+# SKIP ?$] < 5.010 && "smartmatch and given/when not implemented on this Perl version"
+# 51 implicit smartmatch in given/when
+given ('foo') {
+ when ('bar') { continue; }
+ when ($_ ~~ 'quux') { continue; }
+ default { 0; }
+}