[Edinburgh-pm] Parameter passing, seeking an answer....

Ian Stuart Ian.Stuart at ed.ac.uk
Thu Sep 6 01:58:32 PDT 2007

Ben Soares wrote:
> When using a "named" parameters method I like to do
> sub myFunc {
> 	my ($self, %params) = @_;
> 	if ($params{"-filename"}) {
> 		&etc();
> 	}
> }
For multi-parameter passes, my ($a, $b, $c) = @_ has lots of advantages.

Like Ben, I'm definitely moving towards the idea of passing in "named" 
parameters as it means that parameters can be passed in any order, and 
any number of parameters can be optional

> PS You could have asked me over the partition ;)
I could, except there is a particularly large partition today: you're 
tele-working :chuckle:


Ian Stuart.
Bibliographics and Multimedia Service Delivery team,
The University of Edinburgh.


More information about the Edinburgh-pm mailing list