Re: Help with %?RESOURCES variable

2023-04-20 Thread Will Coleda
On Mon, Apr 17, 2023 at 12:01 David Santiago wrote: > > I'm trying to use the variable %?RESOURCES without success. It doesn't > work even when i install it locally with zef > > I have the following: > > demanuel@archlinux test> cat resources/text.txt > This is my test file > demanuel@archlinux t

Re: Help with %?RESOURCES variable

2023-04-20 Thread Marcel Timmerman
On 17-04-2023 18:01, David Santiago wrote: sub MAIN(){ say %?RESOURCES{"text.txt"}.slurp(:close); } If you really want to use it from a MAIN you could make a lookup method in a module which can do the work for you (If  you are building modules anyway). use AModule; sub MAIN(){ say AModule.