develooper Front page | perl.perl6.users | Postings from July 2021

Re: use lib and locations in a variable

Thread Previous | Thread Next
From:
Elizabeth Mattijsen
Date:
July 13, 2021 17:11
Subject:
Re: use lib and locations in a variable
Message ID:
BD2BFEBB-A8CB-4433-9A3D-1AA2D5ED4449@dijkmat.nl
> On 13 Jul 2021, at 19:07, Joseph Brenner <doomvox@gmail.com> wrote:
> Bruce Gray points out "constant" works also:
> 
>     constant $lib_loc = $*PROGRAM.parent.add('../lib');

Yup.

    constant $foo = 42;

is basically short for:

    BEGIN my $foo := 42

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