Re: Naming of Perl module
Bill Ward writes: File::RegexMatch? I think having ::Find:: in there would be better, so that it's immediately obvious that this module performs a similar task to the other modules already named like that. File::Find::Regexp, perhaps? (Note that 'Regexp' with a 'p' appears to be the canonical Perl way of spelling it: % perl -E say ref qr// It's also a superset of the spelling 'Regex', so searching for 'Regex' should still find it, whereas searching for 'Regexp' wouldn't match 'Regex'. On the downside, 'Regexp' is considerably harder to say than 'Regex'.) Smylers
Re: Naming of Perl module
On Wed, Dec 14, 2011 at 3:46 AM, Smylers smyl...@stripey.com wrote: Bill Ward writes: File::RegexMatch? I think having ::Find:: in there would be better, so that it's immediately obvious that this module performs a similar task to the other modules already named like that. File::Find::Regexp, perhaps? I like that, but that implies that its interface is similar to File::Find. Is it? (Note that 'Regexp' with a 'p' appears to be the canonical Perl way of spelling it: % perl -E say ref qr// It's also a superset of the spelling 'Regex', so searching for 'Regex' should still find it, whereas searching for 'Regexp' wouldn't match 'Regex'. On the downside, 'Regexp' is considerably harder to say than 'Regex'.) You're right, but I'm much more accustomed to Regex for some reason, despite the fact that Emacs too uses regexp -- Check out my LEGO blog at http://www.brickpile.com Follow/friend me: facebook.com/billward • flickr.com/photos/billward • twitter.com/williamward
Re: Naming of Perl module
Bill Ward writes: On Wed, Dec 14, 2011 at 3:46 AM, Smylers smyl...@stripey.com wrote: Bill Ward writes: File::RegexMatch? I think having ::Find:: in there would be better, so that it's immediately obvious that this module performs a similar task to the other modules already named like that. File::Find::Regexp, perhaps? I like that, but that implies that its interface is similar to File::Find. Not really. File::Find::Rule doesn't have a similar interface to File::Find, for instance. Smylers
Re: Naming of Perl module
On Wed, Dec 14, 2011 at 7:24 AM, Smylers smyl...@stripey.com wrote: Bill Ward writes: On Wed, Dec 14, 2011 at 3:46 AM, Smylers smyl...@stripey.com wrote: Bill Ward writes: File::RegexMatch? I think having ::Find:: in there would be better, so that it's immediately obvious that this module performs a similar task to the other modules already named like that. File::Find::Regexp, perhaps? I like that, but that implies that its interface is similar to File::Find. Not really. File::Find::Rule doesn't have a similar interface to File::Find, for instance. Maybe so, but I think that will be a potential user's first assumption. -- Check out my LEGO blog at http://www.brickpile.com Follow/friend me: facebook.com/billward • flickr.com/photos/billward • twitter.com/williamward
Naming of Perl module
Hi there, I'm close to completing a module, but I'm pretty clueless on what to call it. The purpose of the module is to find files which match a regular expression. The module currently only has one subroutine which takes two parameters, base_directory and expression. The subroutine traverses all subdirectories of the base directory and returns a hash when it's completed. Each key of the returned hash is the absolute path of the directory, and the value(s) associated with the key are the files which were found matching the regular expression within that directory, the hash only returns a directory if there are files which matched the given regex found within that directory. I've had a couple of ideas such as File::Snap (based on a card game I used to play as a child), but I'm not sure if it's very suitable. Any guidance would be appreciated. Many thanks, Lloyd.
Re: Naming of Perl module
File::RegexMatch? On Tue, Dec 13, 2011 at 8:21 AM, ll...@singletasker.co.uk wrote: Hi there, I'm close to completing a module, but I'm pretty clueless on what to call it. The purpose of the module is to find files which match a regular expression. The module currently only has one subroutine which takes two parameters, base_directory and expression. The subroutine traverses all subdirectories of the base directory and returns a hash when it's completed. Each key of the returned hash is the absolute path of the directory, and the value(s) associated with the key are the files which were found matching the regular expression within that directory, the hash only returns a directory if there are files which matched the given regex found within that directory. I've had a couple of ideas such as File::Snap (based on a card game I used to play as a child), but I'm not sure if it's very suitable. Any guidance would be appreciated. Many thanks, Lloyd. -- Check out my LEGO blog at http://www.brickpile.com Follow/friend me: facebook.com/billward • flickr.com/photos/billward • twitter.com/williamward
Re: Naming of Perl module
On Tue, 13 Dec 2011, ll...@singletasker.co.uk wrote: The purpose of the module is to find files which match a regular expression. The module currently only has one subroutine which takes two parameters, base_directory and expression. The subroutine traverses all subdirectories of the base directory and returns a hash when it's completed. Is there any reason you're not using one of File::Find, File::Find::Rule, or a variety of other CPAN modules which can already do this? -dave /* http://VegGuide.org http://blog.urth.org Your guide to all that's veg House Absolute(ly Pointless) */
Re: Naming of Perl module
variety of other CPAN modules which can already do this Feature comparison: http://p3rl.org/Path::Class::Rule#SEE-ALSO signature.asc Description: PGP signature