On Thu, May 20, 2010 at 12:34:09PM -0700, Jan Dubois wrote:
> On Thu, 20 May 2010, David Golden wrote:
> > I plan to modify Module::Build and EU::CB (at a minimum) to use this
> > new module (which would mean it would come into core). It would then
> > be available for other modules (both distributed with Perl and on
> > CPAN) to likewise refactor their OS mapping to use it. This will
> > reduce duplicated code and improve ease of maintenance over time.
> Personally I'm not convinced that it makes maintenance any easier
It means that Module::Build, EU::CB etc use the same mappings so will
never get out of sync, will never disagree with each other about, eg,
whether to treat Cygwin as Unix-like, ...
And it also reduces the maintenance burden for anyone maintaining a
module which currently needs to know about the relationships between
OSes.
> But even then I will still have to remember (or look up) that e.g.
> Cygwin is part of the "Unix" type but "MicrosoftWindows" family, and
> check the correct one with the correct name (e.g. "Windows" for type,
> but "MicrosoftWindows" for family). This seems to create many more
> possibilities for screwup than simply testing $^O explicitly
Indeed. It's not clear what's the difference between types and
families.
> I also find it pretty questionable to throw OS390 and OS400 into a single
> OS type just because they use the same non-ASCII character set. They
> really are totally distinct OS types in virtually every other aspect.
>
> So shouldn't EBCDIC rather be a family than a type? But what if you want
> to add a family "IBM", similar to the "DEC" and "Apple" families. Then
> you would have to add AIX into the family as well, which means either
> getting rid of the EBCDIC family again, or allowing one OS to be in
> multiple families.
FWIW, in Devel::CheckOS, an OS can be in many families. eg, QNX is in
the Realtime, Unix, and OSFeatures::POSIXShellRedirection families.
> VMS for example would also belong into the "HP"
> family, if you would add that someday. Do you remove it from "DEC"
> at that point?
That would depend on the version of VMS :-)
--
David Cantrell | Official London Perl Mongers Bad Influence
Erudite is when you make a classical allusion to a
feather. Kinky is when you use the whole chicken.
Thread Previous
|
Thread Next