difforig perl-5.10.0/ext/B/B/Deparse.pm perl-5.10.0/ext/B/t/deparse.t

2008-02-08  Reini Urban <rurban@x-ray.at>

diff -ub perl-5.10.0/ext/B/B/Deparse.pm.orig perl-5.10.0/ext/B/B/Deparse.pm
--- perl-5.10.0/ext/B/B/Deparse.pm.orig	2007-12-18 10:47:07.000000000 +0000
+++ perl-5.10.0/ext/B/B/Deparse.pm	2008-02-08 16:44:51.275267000 +0000
@@ -2114,7 +2114,7 @@
 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);
diff -ub perl-5.10.0/ext/B/t/deparse.t.orig perl-5.10.0/ext/B/t/deparse.t
--- perl-5.10.0/ext/B/t/deparse.t.orig	2007-12-18 10:47:07.000000000 +0000
+++ perl-5.10.0/ext/B/t/deparse.t	2008-02-08 16:48:02.322142000 +0000
@@ -27,7 +27,7 @@
     require feature;
     feature->import(':5.10');
 }
-use Test::More tests => 54;
+use Test::More tests => 55;
 
 use B::Deparse;
 my $deparse = B::Deparse->new();
@@ -383,4 +383,10 @@
     state $x;
     return $x++;
 }
-;
+####
+# SKIP ?$] < 5.010 && "smartmatch and given/when not implemented on this Perl version"
+# 51 implicit smartmatch in given/when
+given ('foo') {
+    when ('bar') { continue; }
+    default { 0; }
+}

