On Tue, May 15, 2012 at 05:25:11AM +0200, Aristotle Pagaltzis wrote:
> I tried to make this as plain and clear as possible and ended up with
> this:
>
> while(readdir DIR) {
> my $is_dir = -d "$podroot/$dir/$_";
> next if $is_dir and not $recurse;
> my $target = (
> $is_dir ? \@dirlist :
> s/\.pod$// ? \@podlist :
> s/\.pm$// ? \@pmlist :
> undef
> );
> push @$target, "$dir/$_" if $target;
> }
>
> if ($^O eq 'VMS') { s/\.dir$//i for @dirlist }
> Shall I send the patch series?
>
> It does not fix the "doesn't look for any other kind of file" issue but
> offers a much better starting point to anyone who wants to.
Yes please, for exactly that reason - no-one else needs to have their
eyes burnt by it.
> I debated whether to return `undef` as the default case and guard the
> `push`, or just `next` off the bottom of the table and leave the `push`
> unconditional. I used `next` at first but then switched to `undef` since
> I figure that this way it will be easier to add collection logic in the
> future that does not fit neatly into the table, should the need arise.
Yes, I don't know either. I think, stick with what you've got.
It might turn out that the location of the "other files" comes from
utils.lst rather than extending the scanning list, but no-one knows that
yet. [But I'm sure that the waterfall planning advocates insist that we
should :-)]
Nicholas Clark
Thread Previous
|
Thread Next