develooper Front page | perl.perl5.porters | Postings from June 2017

Re: lib/_charnames.pm puts references in %^H

Thread Previous | Thread Next
From:
Zefram
Date:
June 15, 2017 19:54
Subject:
Re: lib/_charnames.pm puts references in %^H
Message ID:
20170615195421.GG13676@fysh.org
demerphq wrote:
>+This variable is part of the lexical state of the compilation process
>+and contains compile-time hints for the Perl interpreter. At the end of
>+compilation of a block the value of this variable is restored to the value
>+when the interpreter started to compile the block.  This behavior provides

Good.

>+Similar to $^H this variable is part of the lexical state of the compilation
>+process, and changes made to it at compile time are not visible later on
>+at a run time. Instead you can access those values by accessing the 10th
>+slot of the return of caller:

Not quite right, because what's available through caller is the flattened
version.  The actual values from %^H are just not available at runtime.

>+as code references, however once compilation is completed these structures
>+will be flattened

Not correct about the timing (in the same way that LeoNerd got it wrong),
and not correct about the timing being the thing that matters.

-zefram

Thread Previous | Thread Next


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