Later when I saw this section again, I forgot why I split it...
There's an easy fix to that. Now that you've seen from AnomalousMonk's and ikegami's replies why
was required rather than having repos defined in the same anonymous-hash, all you have to do is change that touse constant { zed=>0, one=>1, two=>2, }; use constant repos=>(qw(oss non-oss debug));
(though feel free to use your own commenting style)use constant { zed=>0, one=>1, two=>2, }; use constant repos=>(qw(oss non-oss debug)); # NOTE to future self: ca +nnot be in the `use constant { ... }`: # because an array cannot be the value for a key in an anonymous h +ash; # to create a constant array, it has to be in a separate `use cons +tant` line; # do not try to optimize this back into the `use constant {...}` b +ecause it won't work! # Really, I mean it!
In reply to Re: use constant; RHE of solo confusing in list
by pryrt
in thread use constant; RHE of solo confusing in list
by perl-diddler
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |