Skip to Content.
Sympa Menu

devel - Re: [sympa-developpers] [sympa-commits] sympa[11053] trunk: [svn] Retrieving several modifications on i18n from sympa-6.2-branch.

Subject: Developers of Sympa

List archive

Chronological Thread  
  • From: IKEDA Soji <address@concealed>
  • To: address@concealed
  • Subject: Re: [sympa-developpers] [sympa-commits] sympa[11053] trunk: [svn] Retrieving several modifications on i18n from sympa-6.2-branch.
  • Date: Fri, 4 Jul 2014 15:33:18 +0900

Hi,

On Thu, 03 Jul 2014 19:57:01 +0200
Guillaume Rousse <address@concealed> wrote:

> Le 21/06/2014 16:10, address@concealed a écrit :
> > Revision
> > 11053
> > Author
> > sikeda
> > Date
> > 2014-06-21 16:10:49 +0200 (sam. 21 juin 2014)
> >
> >
> > Log Message
> >
> > [svn] Retrieving several modifications on i18n from sympa-6.2-branch.
> This commit introduces a dependency (Class::Singleton) without any prior
> discussion about its impact, or its opportunity. For someone so verbose
> about details such as the semantic difference between a comma and a dash
> in a copyright statement, or about the need of an executable bit for
> test argument, this is quite shocking.
>
> Moreovoer, I'm not even impressed by the technical relevance of this
> change, as I don't see much technical advantage of:
>
> package Sympa::Anything;
>
> my $language = Sympa::Language->instance();
>
> over
>
> package main;
>
> our $language = Sympa::Language->new(
> lang => $options{lang} || Sympa::Site->lang()
> );
>
> package Sympa::Anything;
>
> my $language = $main::language;
>
> The first version allows any part of the code to access a global
> language instance, even if the top-level didn't explicitely created it,
> but in this case, it won't be properly initialized from the configuration.
>
> The second version is simpler to read, stricter to use, but ensures than
> incorrect code will fails violently when trying to use a non-existing
> object.
>
> And given than it's the current model I'm trying to generalize in trunk,
> I'm less than happy to be imposed another one without discussion.

Use of singleton was suggested by David.
I'm planning to use same method on Site and Logger.

Especially on Site, I also consider your suggestion on
instantiation.

There seems no problem about initialization.

- Instance of Language initially have default setting ('en').

- Instance of Log (Logger) initially outputs all logs to STDERR.

- Instance of Site will load sympa.conf without database config
at first instantiation.


Regards,

--- Soji





> --
> Guillaume Rousse
> INRIA, Direction des systèmes d'information
> Domaine de Voluceau
> Rocquencourt - BP 105
> 78153 Le Chesnay
> Tel: 01 39 63 58 31
>


--
--
株式会社 コンバージョン セキュリティ&OSSソリューション部 池田荘児
〒231-0004 神奈川県横浜市中区元浜町3-21-2 ヘリオス関内ビル7F
e-mail address@concealed TEL 045-640-3550
http://www.conversion.co.jp/



Archive powered by MHonArc 2.6.19+.

Top of Page