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

Re: lib/ puts references in %^H

Thread Previous | Thread Next
June 15, 2017 01:03
Re: lib/ puts references in %^H
Message ID:
On 15 June 2017 at 03:00, Zefram <> wrote:
> demerphq wrote:
>>              Would it be fair to say that it is as though the sub
>>being called by "\N{TEST}" was wrapped in a BEGIN?
> Kinda.  \N{} and BEGIN are two ways of running code at compile time.
> There are others, such as "use" (which calls an import method at compile
> time).  No one of these mechanisms is more fundamental than the rest.

Sure, but use is formally defined in terms of BEGIN in the docs,
wheras it is not so clear that \N{...} is.

Anyway, thanks for the explanation. I have used %^H before, but I
either never noticed some of the subtleties, or forgot about them long


perl -Mre=debug -e "/just|another|perl|hacker/"

Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About