If you define them in the top level of your module then all your subs have
access :
constant FOO = 2;
sub inc-by-foo( $a ) {
$a+FOO;
}
On Fri, 6 Dec 2019 at 09:05, ToddAndMargo via perl6-users <
[email protected]> wrote:
> On 2019-12-06 00:01, Tom Blackwood wrote:
> > Todd,
> >
> > AFAIK Perl’s culture is not to use so many constants in actual
> > programming. :)
> >
> > Tom
> >
>
> Is there a way to make constants universal inside a module, or
> do I have to declare them inside every sub?
>
--
Simon Proctor
Cognoscite aliquid novum cotidie
http://www.khanate.co.uk/