This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
[perl #126633] check children of OA_DANGEROUS ops for common scalars
[perl5.git] / t / op / aassign.t
index 03cc84c..e1c687c 100644 (file)
@@ -382,6 +382,14 @@ SKIP: {
     my $orig;
     ($proxy[0], $orig) = (1, $set);
     is($orig, 0, 'previous value of $set');
+
+    # from cpan #110278
+    use List::Util qw(min);
+    my $x = 1;
+    my $y = 2;
+    ( $x, $y ) = ( min($y), min($x) );
+    is($x, 2, "check swap for \$x");
+    is($y, 1, "check swap for \$y");
 }
 
 done_testing();