develooper Front page | perl.perl5.porters | Postings from July 2010

Re: [perl #76402] [PATCH] Locale::Maketext One Sided Lexicons

Thread Previous | Thread Next
Adriano Ferreira
July 23, 2010 07:47
Re: [perl #76402] [PATCH] Locale::Maketext One Sided Lexicons
Message ID:
On Thu, Jul 22, 2010 at 3:31 PM, Todd Rinaldo <> wrote:
> The only way to subclass it is a monolithic copy/paste. I don't see that it being added hurts anything existing. Even if it is feature creep, what's the down side of that? Honestly I see it as a part of L:M or something else that has to re-implement or duplicate the whole method. That would be a code fork, which I'm trying to avoid here.

The down side is to slow down Locale::Maketext in the common usage
that applications do with it on the wild.

There are HTML sites that perform thousands of L::M lookups per page
and any light change can compromise performance in such applications.
And such compromise comes with no benefits for these applications.

Notice that new conditionals like

      if (exists $self->{external_lexicon}) {
      else {
            # previous code

are the kind of thing that concerns me.

>> And for that matter, why not add an option that works like _AUTO rather
>> than all the duplicated entries?
> The goal was to avoid polluting the lexicon namespace with another special variable. Since each lexicon is it's own package, it made more sense to put it outside the lexicon. If that's really what's causing you to hesitate, I have no issues providing an amended patch which uses the lexicon instead to look for the _ONE_SIDED flag.
> Todd

Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About