Hi, 
 
I wondered if it would be useful/good/nice if the syntax for 
specifying role parameters would be the same as the standard 
subroutine signature syntax (minus the colon, which 
separates the parameters which do account to the long name 
of the role from the ones which don't). 
E.g.: 
 
  role MyRole[ 
    Str  $required_param, 
    Bool ?$optional_param_defaulting_to_undef, 
    :  # beginning of the parameters which don't account to the 
       # long name of the role 
    Num  ?$opt_param_defaulting_to_42 = 42, 
    Any  ?$evil_var = $CALLER::_, 
  ] {...} 
 
  $x does MyRole["abc", 1]; 
  # or 
  $x does MyRole[required_param => "bar", evil_var => 23]; 
  # etc. 
 
--Ingo 
 
--  
Linux, the choice of a GNU | The computer revolution is over. 
generation on a dual AMD   | The computers won. 
Athlon!                    | -- Eduard Bloch 

Reply via email to