Skip Menu |

This queue is for tickets about the Lingua-Conjunction CPAN distribution.

Report information
The Basics
Id: 39774
Status: open
Priority: 0/
Queue: Lingua-Conjunction

People
Owner: Nobody in particular
Requestors: MARKSTOS [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Wishlist
Broken in: (no value)
Fixed in: 2.00



Subject: wish: allow changing defaults at object-level or call-level, and not just package-level.
It's my understanding that a call like this makes a package level change: Lingua::Conjunction->connector_type("or"); And therefore, if I used different connector types in a busy mod_perl application, unexpected things could happen, as an essentially global change is being made, which could cause an unexpected result in another part of the code. This can be minimized by returning settings to their default as soon as possible, reducing the scope of the issue to a race condition. Providing a traditional OO interface would address this. Mark
I suppose another workaround might be to create a base class with the new settings: package Lingua::Conjunction::OR; use base 'Lingua::Conjunction'; Lingua::Conjunction::OR->connector_type("or"); 1; Then, you could use the special "OR" class without worry about interfering with the default settings in play in the parent class.
Here's another workaround possibility for the persistent-environment bug: { local $Linqua::Conjunction::list_type = 'and'; $clans_and = lc conjunction(@plural_clans); }
Here's another workaround possibility for the persistent-environment bug: { local $Linqua::Conjunction::list_type = 'and'; $string = conjunction(@array); } The issue and workaround could at least be documented.