Michele Dondi writes:
> On Tue, 22 Jun 2004, Brent 'Dax' Royal-Gordon wrote:
> 
> > >   rename -v => 1, $orig, $new;
> > 
> > It's already being done:
> > 
> >      rename $orig, $new :verbose;
> > 
> >      sub rename($orig, $new, +$verbose) {
> >          say "Renaming `$orig' to `$new'" if $verbose;
> >          ...
> >      }
> 
> I'm not sure if I understand correctly: pardon me if I'm dumb, but it 
> seems to me that this has to do with user-defined subs. I was rather 
> thinking to reasonable (but modificable) defaults for builtin functions...

No, builtins can and will have named arguments.  And you can even add
your own to builtin functions:

    &*rename.wrap -> $orig, $new, *%opt {
        say "Renaming '$orig' to '$new'" if %opt{'verbose' | 'v'};
        call;
    }

Luke

Reply via email to