X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FClass%2FC3%2FXS.pm;h=1a57588897b52a0658b0d8e387cbae36299ab71b;hb=aaef7ce9db4806285212b0a5ce8341cf9b9be64a;hp=71a8aad5dc332f4eb8f9d4bcb27e7bc7388a9c52;hpb=6c88cc6a6051a67355d64366d2fd83bf65cb7070;p=gitmo%2FClass-C3-XS.git diff --git a/lib/Class/C3/XS.pm b/lib/Class/C3/XS.pm index 71a8aad..1a57588 100644 --- a/lib/Class/C3/XS.pm +++ b/lib/Class/C3/XS.pm @@ -1,6 +1,10 @@ package Class::C3::XS; -our $VERSION = '0.01_04'; +use 5.006_000; +use strict; +use warnings; + +our $VERSION = '0.12_02'; =pod @@ -15,10 +19,19 @@ Class::C3::XS - XS speedups for Class::C3 =head1 DESCRIPTION -This contains XS performance enhancers for L. -The main L package will use this package automatically -if it can find it. Do not use this package directly, use -L instead. +This contains XS performance enhancers for L version +0.16 and higher. The main L package will use this +package automatically if it can find it. Do not use this +package directly, use L instead. + +The test suite here is not complete, although it does verify +a few basic things. The best testing comes from running the +L test suite *after* this module is installed. + +This module won't do anything for you if you're running a +version of L older than 0.16. (It's not a +dependency because it would be circular with the optional +dep from that package to this one). =head1 AUTHOR @@ -34,4 +47,25 @@ it under the same terms as Perl itself. require XSLoader; XSLoader::load('Class::C3::XS', $VERSION); +$VERSION = eval $VERSION; + +package # hide me from PAUSE + next; + +sub can { Class::C3::XS::_nextcan($_[0], 0) } + +sub method { + my $method = Class::C3::XS::_nextcan($_[0], 1); + goto &$method; +} + +package # hide me from PAUSE + maybe::next; + +sub method { + my $method = Class::C3::XS::_nextcan($_[0], 0); + goto &$method if defined $method; + return; +} + 1;