in reply to Parameters for object callback
Perl supports this easily by having your sub construe the argument list as "hash-like". That is, instead of my @args = @_; you could say my %args = @_; Then the caller could do something like
With this scheme, it is easy to have any arguments be optional, rather than having to rank their "optionalness" as in the scheme I suggested above.func( value => $obj_value, object => $obj, top => $top_node, affected_objects => { .... }, );
|
|---|