You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We discussed this briefly at the PDX Hackathon. How our methods take options is a bit higgly piggly. The argument for using a normal hash is quite simple, its easier to type and remember. It also happens to jive with how named parameters work in Method::Signatures if we wind up using that.
IIRC I'd originally intended to have methods take a hash ref for two reasons. 1) Its a bit more memory efficient and 2) its easier to distinguish the options from other arguments.
1 doesn't matter for the overwhelming majority of option passing, and if we do need to pass in something large as an option the individual option can be passed in as a scalar.
2 doesn't matter for us because, with autoboxing, we pass in the data as the object. Any auxiliary stuff can come in either as an option or, if its required, as a positional in front of the options. $thing->method( $more_data, option1 => value2, option2 => value2 ); If we need to pass in more data later it must be optional, so it goes with the options.
rather then the current goal for v2
The text was updated successfully, but these errors were encountered: