Re: the MAIN questions

2021-12-29 Thread Timo Paulssen
Hey marc, since the default value for a "Bool" is an undefined Bool, you can just boolify whatever happens to be in :$diff, which will be False for "no flag passed" or True for "flag passed and was True". Hope that helps   - Timo On 29/12/2021 13:00, Marc Chantreux wrote: hello rakoons, I

Re: the MAIN questions

2021-12-29 Thread Marc Chantreux
hello Daniel, > > Did i just dreamed about it ? > You sort of dreamed it. damn! thanks for the red pill. > my $argfiles = IO::ArgFiles.new(@files || '-'); my perl history works against me there: i see @files.elems || '-' here :) thank you. > The other change I'd suggest for additional

Re: the MAIN questions

2021-12-29 Thread Daniel Sockwell
> * I'm pretty sure i saw something like :!$test to express Bool :$test = False. > Did i just dreamed about it ? You sort of dreamed it. :!test passes test => False as a Pair, which means $test = False. But that's syntax for calling the fn, not declaring it. You could do Bool() :$test=0, but

the MAIN questions

2021-12-29 Thread Marc Chantreux
hello rakoons, I have a script named fixlines which is basically sub fixline (Str $line) { ... } say fixline $_ for lines; This is far enough for personal usage but i would like to release it so i need a decent -h to be implemented and basically should look like Usage: fixlines [--test]