From: | "Johan Lodin" <lodin [...] gfs.gu.se> |
To: | <kasei [...] tmtm.com> |
Subject: | Spreadsheet::ParseExcel::Simple interface suggestion |
Date: | Tue, 12 Oct 2004 01:04:41 +0200 |
Hi.
I just installed Spreadsheet::ParseExcel::Simple and thought about adding a
behaviour to &next_row. As it is now, the documentation doesn't specify any
behaviour for scalar context, so I figured it could return the equivalent of
"$sheet->has_data ? [ $sheet->next_row ] : undef" in scalar context. The
benefit of this would be that
while ($sheet->has_data) {
my @data = $sheet->next_row;
...
}
can be written
while (my $data = $sheet->next_row) {
...
}
and thus making a useful abstraction.
What do you think of this?
Regards,
Johan Lodin