Dear Audrey,

Consider:
my $x = 'test';
 {
     use v5;
     $x .= 'ing';
  };
say $x;

pugs yields 'test'
and not 'testing' - as expected.

Moreover, the following hangs pugs:

my $x = 'test';
my $y = 'case';
 {
     use v5;
     $x .= 'ing';
      {
         use v6-alpha;
         $y ~= 'book';
      };
  };
say $x;
say $y;

I have committed a test to t/perl5, viz., modify_inside_p5.t (which runs but fails)
and I attach another. viz., modify_inside_p5_p6.t , which hangs pugs.

Regards,
Richard
use v6-alpha;
use Test;
plan(2);

my $x = 'test';
my $y = 'case';
{
  use v5;
  $x .= 'ing';

  #the following code crashes pugs.
 {
    use v6;
    $y ~= 'book';
  };
};

is $x, 'testing', "scalar modified inside perl5 block";
is $y, 'casebook', "scalar modified inside perl6 block inside perl5 block";

Reply via email to