# mro.pm
#
# Copyright (c) 2007 Brandon L Black
# Copyright (c) 2008 Larry Wall and others
#
# You may distribute under the terms of either the GNU General Public
# License or the Artistic License, as specified in the README file.
#
package mro;
use strict;
use warnings;
# mro.pm versions < 1.00 reserved for MRO::Compat
# for partial back-compat to 5.[68].x
our $VERSION = '1.01';
sub import {
mro::set_mro(scalar(caller), $_[1]) if $_[1];
}
package # hide me from PAUSE
next;
sub can { mro::_nextcan($_[0], 0) }
sub method {
my $method = mro::_nextcan($_[0], 1);
goto &$method;
}
package # hide me from PAUSE
maybe::next;
sub method {
my $method = mro::_nextcan($_[0], 0);
goto &$method if defined $method;
return;
}
require XSLoader;
XSLoader::load('mro', $VERSION);
1;
__END__
=head1 NAME
mro - Method Resolution Order
=head1 SYNOPSIS
use mro; # enables next::method and friends globally
use mro 'dfs'; # enable DFS MRO for this class (Perl default)
use mro 'c3'; # enable C3 MRO for this class
=head1 DESCRIPTION
The "mro" namespace provides several utilities for dealing
with method resolution order and method caching in general.
These interfaces are only available in Perl 5.9.5 and higher.
See L on CPAN for a mostly forwards compatible
implementation for older Perls.
=head1 OVERVIEW
It's possible to change the MRO of a given class either by using C