No, there's no else. This if is for using modules with different names. If you want to use modules in different paths, it's probably not a good idea to call them by the same name. You can call them different names (and do a use lib on all paths), or use other mechanisms to differentiate them, such as the :api module metadata Check everything about that here: https://docs.raku.org/language/typesystem#Versioning,_authorship,_and_API_version .
El dom., 7 jun. 2020 a las 10:21, ToddAndMargo via perl6-users (< perl6-us...@perl.org>) escribió: > On 2020-06-07 00:55, ToddAndMargo via perl6-users wrote: > >>> El dom., 7 jun. 2020 a las 9:29, ToddAndMargo via perl6-users > >>> (<perl6-us...@perl.org <mailto:perl6-us...@perl.org>>) escribió: > >>> > >>> Hi All, > >>> > >>> Is there a way to do an "if" on "use lib", so > >>> I do not have to keep commenting these back and forth? > >>> > >>> # use lib 'C:/NtUtil', '.'; > >>> use lib 'C:/NtUtil', '.', 'K:/NtUtil'; > >>> > >>> Many thanks, > >>> -T > > > > On 2020-06-07 00:41, JJ Merelo wrote: > >> Unsurprisingly, there is "if": https://github.com/FROGGS/p6-if > >> Install it with zef install if > >> > >> And then... > >> > >> > >> use if;# activate the :if adverb on use statements > >> > >> use My::Linux::Backend:if($*KERNEL.name eq 'linux'); > >> use My::Fallback::Backend:if($*KERNEL.name ne 'linux'); > > > > Hi JJ, > > > > Thank you! > > > > Would show me an example of how to use it > > with "use lib"? > > > > -T > > Also, is there an "else" that goes with that? > -- JJ