ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> perl5-porters
perl5-porters
[PATCH] API for the internals
by Gerard Goossen other posts by this author
Nov 4 2009 8:43AM messages near this date
Thank you | Re: [PATCH] API for the internals
As access to some part of the internals of core is desired (as for
example shown by the existance of Data-Alias). But we don't want this
to lock the whole core because some module is doing some stuff very
deep in the internals.

To solve this I would like to make a major version specific API.

Attached patch adds the requirement of having "PERL_CORE_5_<version> "
defined when PERL_CORE is defined.

The idea is that modules are allowed to use the internals of the perl
core (at their own risk of course) by defining PERL_CORE and
PERL_CORE_5_<version>  (multiple versions can be supported by a module
by having multiple PERL_CORE_<version>  definitions)

This means we can allow modules to do all kinds of interesting stuff, 
because we have an interface for that, but that this interface is
version specific, allowing the core to be further developed.

You could say that we have an API exposing the internals, following
the tradition of being defined by the implementation.

With this change, normal release goes like this:
- First release candicate/beta is made.
- Modules doing ugly stuff like Abra::Cadabra, break with a compile error.
- Author of Abra::Cadabra makes changes to the module for changes
  internal to perl, and adds the "#define PERL_CORE_5_<version> ",
  makes release. (Changes are the changes to the module were already
  made as to work with bleadperl and only adding the define would be
  enough).

A quick grep through CPAN showed that there are current 6 modules
having PERL_CORE defined (autobox, Goto-Cached, PersistentPerl,
Data-Alias, Faster, CGI-SpeedyCGI)

Of course the idea is not to break these modules, but just to enforce
that the author checks that nothing of the internals have changed in
such a way as to break the module. It might be that nothing used by
the module has changed and that just adding "#define
PERL_CORE_5_<version> " is enough, or some superficial changes in the
use of the interface might be required, or it might be that there
where significant changes and the core and that significant changes
are required.

Summarizing:
- The core developers promise to keep the core the same within each
  major version.
- Module authors defining PERL_CORE promise to make adjustment with
  each major perl release.
- Together we live happily ever after.

Gerard
Thread:
Gerard Goossen
Andy Dougherty
Gerard Goossen
Nicholas Clark
Demerphq
Zefram
Nicholas Clark
Zefram
Nicholas Clark
Gerard Goossen
Nicholas Clark
Nicholas Clark

Privacy Policy | Email Opt-out | Feedback | Syndication
© ActiveState Software Inc. All rights reserved