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 elegance (at least imo) is to put
> the help text for each flag/option on the same line, either by putting it 
> after
> with #= or by using an embedded comment.  Here's the script with those 
> changes:

well ... i'm visually impaired so i really try my code to fit in 72
cols.

sub MAIN
        ( #| don't fix for real, just show the diff
        Bool :$diff=False
        , #| input files (stdin by default or with explicit '-')]
        *@files
        ) {

would be my way of writing

>    sub MAIN (
>    #|[don't fix for real, just show the diff]              Bool :$diff=False,
>    #|[input files (stdin by default or with explicit '-')] *@files ) {
>        .&fixline.say for IO::ArgFiles.new(@files || '-').lines;
>    }

> Hope that helps!

definitely. always good to share ideas.

regards
marc

Reply via email to