develooper Front page | perl.perl6.users | Postings from June 2018

Re: a `pe4rl6 -c` error to fix

Thread Previous | Thread Next
From:
JJ Merelo
Date:
June 21, 2018 08:03
Subject:
Re: a `pe4rl6 -c` error to fix
Message ID:
CAJoLtgfbrDj5XstYhDF1yL--Xi5AFAOiU=HxPbYZPq3hYVmfbg@mail.gmail.com
> > On Wed, Jun 20, 2018 at 9:59 PM, Todd Chester <ToddAndMargo@zoho.com
>
> What is a BEGIN block?


BEGIN is one of the "phasers" that are used in Perl 6
https://docs.perl6.org/language/phasers#index-entry-Phasers__BEGIN-BEGIN

It marks a block of code for running as soon as possible, and if possible
during compile time. It runs only once. It's in the first phase of the
interpretation of a script, so it runs before any execution (or any
execution phaser) takes place. Execution order is shown here:
https://docs.perl6.org/language/phasers#Execution_Order

Cheers

-- 
JJ

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