| To: | kenj@xxxxxxxxxxxxxxxx |
|---|---|
| Subject: | Re: [pcp] PCP question ... leading to pmimport discussion |
| From: | nathans@xxxxxxxxxx |
| Date: | Sat, 17 Jul 2010 06:14:46 +1000 (EST) |
| Cc: | pmatousu@xxxxxxxxxxxxx, Greg Banks <gnb@xxxxxxxxxxx>, pcp@xxxxxxxxxxx |
| In-reply-to: | <179040745.988051279306871423.JavaMail.root@xxxxxxxxxxxxxxxxxx> |
| Sender: | nscott@xxxxxxxxxx |
----- "Ken McDonell" <kenj@xxxxxxxxxxxxxxxx> wrote:
> > I'm still keen for feedback on the Perl code ...
Looks OK to me. One minor thing...
>
> sub dodate($)
> {
> # convert datetime format DD/MM/YYYY HH:MM:SS ... from OpenOffice
> # Spreadsheet CSV into the format DD-Mmm-YYYY HH:MM:SS that
> # Date::Parse seems to be able to parse correctly
> #
> ($_) = @_;
I'd use a meaningfully named local variable rather than
overloading $_ so maybe "my ($datetime) = @_;" here.
> sub init($)
> {
> my ($ncol) = @_;
>
> $_ = pmiStart($archive, 0);
And maybe $sts here (and throughout rest). Should make
it look a bit more like "normal" PCP code too. ;-)
Oh, I've also never come across that sub xxx($) syntax before
either... ? (usually I've just seen "sub xxx { ... }" but my
perl-fu may well not be uptodate there)
cheers.
--
Nathan
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | Re: [pcp] PCP question ... leading to pmimport discussion, Greg Banks |
|---|---|
| Next by Date: | Re: [pcp] PCP question ... leading to pmimport discussion, Greg Banks |
| Previous by Thread: | Re: [pcp] PCP question ... leading to pmimport discussion, Greg Banks |
| Next by Thread: | Re: [pcp] PCP question ... leading to pmimport discussion, Greg Banks |
| Indexes: | [Date] [Thread] [Top] [All Lists] |