Add prototype behaviour to MOP.xs to silence warnings during XS build time.
[gitmo/Class-MOP.git] / lib / Class / MOP.pm
index 56f55fe..9d0c16e 100644 (file)
@@ -13,8 +13,18 @@ use Class::MOP::Method;
 
 use Class::MOP::Immutable;
 
-our $VERSION   = '0.49';
-our $AUTHORITY = 'cpan:STEVAN';
+BEGIN {
+    our $VERSION   = '0.50';
+    our $AUTHORITY = 'cpan:STEVAN';    
+    
+    use XSLoader;
+    XSLoader::load( 'Class::MOP', $VERSION );    
+    
+    unless ($] < 5.009_005) {
+        no warnings 'redefine', 'prototype';
+        *check_package_cache_flag = \&mro::get_pkg_gen;
+    }
+}
 
 {
     # Metaclasses are singletons, so we cache them here.
@@ -732,6 +742,10 @@ NOTE: This does a basic check of the symbol table to try and
 determine as best it can if the C<$class_name> is loaded, it
 is probably correct about 99% of the time.
 
+=item B<check_package_cache_flag ($pkg)>
+
+=item B<get_code_info ($code)>
+
 =back
 
 =head2 Metaclass cache functions
@@ -881,6 +895,8 @@ Rob (robkinyon) Kinyon
 
 Yuval (nothingmuch) Kogman
 
+Scott (konobi) McWhirter
+
 =head1 COPYRIGHT AND LICENSE
 
 Copyright 2006, 2007 by Infinity Interactive, Inc.