in reply to Re: Re: Re: Re: Re: Re: Problem creating a function
in thread Problem creating a function
Now compare:
To my taste first version is much cleaner.# using OUT parameters run_test(params => \%params, filename => 't/foo/bar', cleanup => sub { $_[0] =~ s/foo/bar/ }); # not using OUT parameters run_test(params => \%params, filename => 't/foo/bar', cleanup => sub { my $var = shift; $var =~ s/foo/bar/; $var }) +;
As for my sarcasm. Probably it was wasted and I'd better to reword it to express myself better. The thing is that for any dynamical language like Perl runtime errors is a norm so I simply cannot accept argument that feature which might cause runtime error is a bad.
--
Ilya Martynov, ilya@iponweb.net
CTO IPonWEB (UK) Ltd
Quality Perl Programming and Unix Support
UK managed @ offshore prices - http://www.iponweb.net
Personal website - http://martynov.org
|
|---|