develooper Front page | perl.cvs.parrot | Postings from December 2008

[svn:parrot] r34546 - branches/rvar/languages/perl6/src/parser

From:
pmichaud
Date:
December 28, 2008 21:04
Subject:
[svn:parrot] r34546 - branches/rvar/languages/perl6/src/parser
Message ID:
20081229050446.E7512CB9FA@x12.develooper.com
Author: pmichaud
Date: Sun Dec 28 21:04:46 2008
New Revision: 34546

Modified:
   branches/rvar/languages/perl6/src/parser/actions.pm

Log:
[rakudo]:  Clean up package variable vivification.


Modified: branches/rvar/languages/perl6/src/parser/actions.pm
==============================================================================
--- branches/rvar/languages/perl6/src/parser/actions.pm	(original)
+++ branches/rvar/languages/perl6/src/parser/actions.pm	Sun Dec 28 21:04:46 2008
@@ -1727,7 +1727,11 @@
     my $sym  := ~$<sym>;
     my $past := $( $<scoped> );
     if $past.isa(PAST::Var) {
-        my $scope := $sym eq 'my' ?? 'lexical' !! 'package';
+        my $scope := 'lexical';
+        if $sym eq 'our' {
+            $scope := 'package';
+            $past.lvalue(1);
+        }
         our $?BLOCK;
         my $symbol := $?BLOCK.symbol( $past.name() );
         $symbol<scope> := $scope;



nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About