http://qs321.pair.com?node_id=506607


in reply to Your named arguments

By the standard we use where I work, it would look like this:
sub convert { my ($args) = @_; AssertRequiredFields($args, [qw( from to thing )]); AssertValidFields( $args, [qw( from to thing )]); ... }
where AssertRequiredFields and AssertValidFields are fairly obvious core utility functions (which confess if the assertion is invalid), and $args is a hashref.

Yes, I know that it looks a little outdated... However, even though the codebase is under active development, some of it is still very old. Since nobody really feels like going back and retrofitting a million lines of code, we continue with the old (but still pretty good) standard.

------------ :Wq Not an editor command: Wq