in reply to Re^2: Seeking your opinions on proposed patch to File::Util
in thread Seeking your opinions on proposed patch to File::Util
Having evaluated all the options on the table now for several hours, I am leaning toward the more 'simple' approach you mentioned. My rationale is that I don't want to complicate things, and martel I believe you are right that the proposed new switches would make things confusing given the already existent --dirs-only and --files-only switches. With any extra switches, it's anyone's guess what the expected behavior would be from end users.
So for now I am going to plan on throwing a warning out when list_dir() is used with the --pattern switch, for at least one release (ver 3.29), expressing to the user what new behavior to expect with the following release (ver 3.30+). I don't see too much harm in this, given that if users out there are already grepping through the results returned from list_dir() against a pattern they already provided to the --pattern switch, it's not going to upset the output they are currently getting. The end-result output would be the same.
If I did go with the other option (to add more switches), then browserUK's suggestion would be the correct approach. For the present however, I'm not leaning in that direction so much as I once was, given that I feel more confident I can start enforcing the originally intended behavior without disrupting the downstream results in current user code (in what I believe will be the majority of cases).
Thoughts?
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^4: Seeking your opinions on proposed patch to File::Util
by martell (Hermit) on Oct 01, 2012 at 19:47 UTC | |
by Tommy (Chaplain) on Oct 02, 2012 at 20:35 UTC |