W3C home > Mailing lists > Public > public-qa-dev@w3.org > June 2005

Re: [check] strange usage of $File->{Version}

From: Olivier Thereaux <ot@w3.org>
Date: Fri, 3 Jun 2005 16:20:52 +0900
To: Terje Bless <link@pobox.com>
Cc: public-qa-dev@w3.org
Message-ID: <20050603072052.GA8096@w3.mag.keio.ac.jp>

Hi Terje,

Thanks for your quick reply.

On Fri, Jun 03, 2005, Terje Bless wrote:
> Olivier Thereaux <ot@w3.org> wrote:
> >I'd appreciate if we could figure out what, in check, $File->{Version}
> >actually is. In most cases, it's used as "the best name we have for
> >the document type".
> «The best info we currently have for what kind of document this is.»

Yes, better characterization.
> This is a legacy thing, but it’s trying to use the @version to guess in case we
> won’t get better information from a DOCTYPE declaration. Basically it’s an
> attempt to work around the fact that OpenSP doesn’t report the effective FPI in
> its output.

I see. Do you have examples of how we (are, should be, could be) using

> The variable is overloaded, yes. More granularity would probably be a good idea
> here, but mind we don’t add too many more (essentially global vars) entries in
> the $File hash.
> The entirety of $File is as a faux “object”; IOW it allows us to not pass a
> gazillion variables back and forth between subs, but at the price of essentially
> defating Perl’s type and scope checking, and introucing a glkobal variable.
> The intent is that it will become an actual object — where object variables are
> actual individual variables, local to the object, and with get/set accessor
> methods — during M12N.
> That said, we might bear to have separate variables for each possible source of
> document type info, plus one further var where we keep the aggregate value which
> will be displayed to the user.

Thanks for the explanation. It makes more sens, now. I do think it would
be a good idea to use at least one more variable to store that
information, and avoid overloading $File->{Version}. I do understand
that it is not a best practice in terms of perl usage, but keeping in
mind that we are heading toward m12n where these variables will be
translated to object methods, I think it's important to disambiguate
Received on Friday, 3 June 2005 07:20:50 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 16:54:49 UTC