[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Bug-gnupod] mktunes.pl creates corrupt iTunesDB ?
From: |
H. Langos |
Subject: |
Re: [Bug-gnupod] mktunes.pl creates corrupt iTunesDB ? |
Date: |
Wed, 1 Jul 2009 17:53:27 +0200 |
User-agent: |
Mutt/1.5.18 (2008-05-17) |
G'day J,
On Thu, Jul 02, 2009 at 12:13:25AM +1000, Jacinta Richardson wrote:
> H. Langos wrote:
> FWIW,
> resetxml();
> or
> resetxml(@_); # if necessary
>
> are both many, many times preferable to:
>
> &resetxml;
>
> and the latter is generally shunned by experienced, community-minded
> Perl folk.
Speaking of readability and code style. Is there a consensus among the
experienced and community-minded folks in regard to the passing of
parameters to subs? Especially when writing subs in modules?
I nowadays prefer to pass parameters as one hashref
subname({foo => "x", bar => "y"});
instead of as a naked list:
subname("x", "y");
or (heaven help)
subname(foo => "x", bar => "y");
which looks like a hash but is only a list.
I took a look at perlstyle(1) and perlsub(1) but I didn't see any hints in
regard to this.
I would like to cleanup the gnupod code and change it to one style in order
to make it easier to maintain and less error prone.
As this is not the total fun kind of work I'd like to get it more or less
right the first time. :-) Any pointers apart from perlstyle(1) ?
cheers
-henrik