Changeset 8705 for src/Pugs/Run.hs

Show
Ignore:
Timestamp:
01/16/06 18:57:28 (3 years ago)
Author:
audreyt
Message:

* Support for $+var as shorthand for $CALLER::var.
* CALLER now only sees lexical variables in the outer dynamic

scope declared with the "env" scope specifier.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • src/Pugs/Run.hs

    r8207 r8705  
    158158        , genSym "$*AUTOLOAD" $ MkRef autoSV 
    159159        ] ++ classes 
     160    -- defSVcell <- (genSym "$_" . MkRef) =<< newScalar undef 
     161    let env' = env 
     162    {- 
     163            { envLexical  = defSVcell (envLexical env) 
     164            , envImplicit = Map.singleton "$_" () 
     165            } 
     166    -} 
    160167    unless safeMode $ do 
    161         initPerl5 "" (Just . VControl $ ControlEnv env{ envDebug = Nothing }) 
     168        initPerl5 "" (Just . VControl $ ControlEnv env'{ envDebug = Nothing }) 
    162169        return () 
    163     initPreludePC env              -- null in first pass 
     170    initPreludePC env'             -- null in first pass 
    164171    where 
    165172    hideInSafemode x = if safeMode then MkRef $ constScalar undef else x