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

[svn:parrot] r34635 - trunk/languages/pipp/src/pct

From:
bernhard
Date:
December 30, 2008 03:30
Subject:
[svn:parrot] r34635 - trunk/languages/pipp/src/pct
Message ID:
20081230113006.2031CCB9FA@x12.develooper.com
Author: bernhard
Date: Tue Dec 30 03:30:04 2008
New Revision: 34635

Modified:
   trunk/languages/pipp/src/pct/actions.pm

Log:
[Pipp] Use a list of strings for declarung the superglobals


Modified: trunk/languages/pipp/src/pct/actions.pm
==============================================================================
--- trunk/languages/pipp/src/pct/actions.pm	(original)
+++ trunk/languages/pipp/src/pct/actions.pm	Tue Dec 30 03:30:04 2008
@@ -31,15 +31,10 @@
         # set up scope 'package' for the superglobals
         # TODO: use a loop
         $block.symbol_defaults( :scope('lexical') );
-        $block.symbol( :scope('package'), '$_GET' );
-        $block.symbol( :scope('package'), '$_POST' );
-        $block.symbol( :scope('package'), '$_SERVER' );
-        $block.symbol( :scope('package'), '$_GLOBALS' );
-        $block.symbol( :scope('package'), '$_FILES' );
-        $block.symbol( :scope('package'), '$_COOKIE' );
-        $block.symbol( :scope('package'), '$_SESSION' );
-        $block.symbol( :scope('package'), '$_REQUEST' );
-        $block.symbol( :scope('package'), '$_ENV' );
+        for ( '$_GET', '$_POST', '$_SERVER', '$_GLOBALS',
+              '$_FILES', '$_COOKIE', '$_SESSION', '$_REQUEST', '$_ENV' ) {
+            $block.symbol( :scope('package'), $_ );
+        }
         @?BLOCK.unshift($block);
     }
     else {



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