NAME
Devel::MRO - Provides mro functions for XS modules
VERSION
This document describes Devel::MRO version 0.05.
SYNOPSIS
# In your XS distribution
# Add the following to your Makefile.PL
use inc::Module::Install;
use ExtUtils::Depends;
# ...
requires 'MRO::Compat' if $] < 5.010_000;
include 'ExtUtils::Depends';
my $pkg = ExtUtils::Depends->new('Your::Module', 'Devel::MRO');
# ...
WriteMakefile(
$pkg->get_makefile_vars,
# ...
);
/* Then put the "include" directive in your Module.xs */
/* ... */
#include "ppport.h"
#define NEED_mro_get_linear_isa /* or NEED_mro_get_linear_isa_GLOBAL */
#include "mro_compat.h"
/* Now you can use several mro functions in your Module.xs:
mro_get_linear_isa()
mro_get_pkg_gen()
mro_method_changed_in()
*/
DESCRIPTION
Devel::MRO
provides several mro functions for XS modules.
This module provides only a header file, mro_compat.h, so you need not load it in your modules.
XS interface
AV* mro_get_linear_isa(HV* stash)
The same as mro::get_linear_isa()
in Perl.
In 5.10 or later, it is just a public Perl API.
In pre-5.10 it calls mro::get_linear_isa
provided by MRO::Compat
. It has a cache mechanism as Perl 5.10 does, so it is much faster than the direct call of MRO::Compat
's mro::get_linear_isa
.
void mro_method_changed_in(HV* stash)
The same as mro::method_changed_in()
in Perl.
U32 mro_get_pkg_gen(HV* stash)
The same as mro::get_pkg_gen()
in Perl. This is not a Perl API.
This may evaluate stash more than once.
DEPENDENCIES
Perl 5.8.1 or later.
ExtUtils::Depends.
MRO::Compat if Perl version < 5.10.0.
BUGS
No bugs have been reported.
Please report any bugs or feature requests to the author.
AUTHOR
Goro Fuji(gfx) <gfuji(at)cpan.org>.
SEE ALSO
mro.
LICENSE AND COPYRIGHT
Copyright (c) 2008-2009, Goro Fuji (gfx). Some rights reserved.
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.