in reply to Re (tilly) 1: Pondering Regex::English
in thread Pondering Regex::English

You're right about the namespace thing. "Regexp" is abominable, but it's the current namespace.

Regexp::English has very little in common with Regexp::Common, however. One is a library of common regexes. The other is a wrapper around qr with a few handy features.

I like the idea about providing other languages, though. It would be useful to abstract out the common features and use glob aliasing to build the appropriate sub and method names for various other languages. Supporting locales could be tricky, though.

Supposing this did become the parent to all sort of language-specific long regex modules, what would it be called? Regexp::Easy? Regexp::Language? Regexp::Long? Regexp::Language::Base?

  • Comment on Re: Re (tilly) 1: Pondering Regex::English

Replies are listed 'Best First'.
Re (tilly) 3: Pondering Regex::English
by tilly (Archbishop) on Aug 24, 2001 at 05:45 UTC
    I agree with disliking the name. (Besides which, Perl's regular expressions aren't even that regular.)

    But I still think that you should think carefully whether you are best done as a wrapper around Regexp::Common. The point is not that you are doing something similar, but rather that users of your module will likely want to do the same tasks that Regexp::Common makes easy, and it would be nice for your module to be able to give you all of its snippets.

    This is particularly true considering how long it will be with your module to describe the common REs that Damian supports...

    As for the language hierarchy, I hate thinking up names. You could, though, just call it Regexp::English, and have all of the other ones depend on Regexp::English. A bit of a hack, but your internals are your business, users should not have hidden expectations...