use strict;
use warnings;
-our $VERSION = '1.19';
-our $XS_VERSION = $VERSION;
-$VERSION = eval $VERSION;
-our $AUTHORITY = 'cpan:STEVAN';
+use XSLoader;
+
+BEGIN {
+ XSLoader::load(
+ 'Moose',
+ $Moose::Exporter::{VERSION} ? ${ $Moose::Exporter::{VERSION} } : ()
+ );
+}
use Class::MOP;
use List::MoreUtils qw( first_index uniq );
use Sub::Exporter 0.980;
use Sub::Name qw(subname);
-use XSLoader;
-
-XSLoader::load( 'Moose', $XS_VERSION );
-
my %EXPORT_SPEC;
sub setup_import_methods {
my ( $class, %args ) = @_;
- my $exporting_package = $args{exporting_package} ||= caller();
+ $args{exporting_package} ||= caller();
$class->build_import_methods(
%args,
local %$seen = ( $exporting_package => 1 );
- return uniq( _follow_also_real($exporting_package) );
+ return reverse uniq( _follow_also_real($exporting_package) );
}
sub _follow_also_real {
my $class = shift;
my $packages = shift;
my $export_recorder = shift;
- my $is_reexport = shift;
+ my $is_reexport = shift;
my %exports;
my $exporting_package = shift;
my $exporter = shift;
my $exports_from = shift;
- my $is_reexport = shift;
+ my $is_reexport = shift;
return sub {
my $exporting_package = shift;
my $exports = shift;
my $export_recorder = shift;
- my $is_reexport = shift;
+ my $is_reexport = shift;
return sub {
my $caller = scalar caller();
my $package = shift;
my $keywords = shift;
my $recorded_exports = shift;
- my $is_reexport = shift;
+ my $is_reexport = shift;
no strict 'refs';
1;
-__END__
-
-=head1 NAME
+# ABSTRACT: make an import() and unimport() just like Moose.pm
-Moose::Exporter - make an import() and unimport() just like Moose.pm
+__END__
=head1 SYNOPSIS
See L<Moose/BUGS> for details on reporting bugs.
-=head1 AUTHOR
-
-Dave Rolsky E<lt>autarch@urth.orgE<gt>
-
-This is largely a reworking of code in Moose.pm originally written by
-Stevan Little and others.
-
-=head1 COPYRIGHT AND LICENSE
-
-Copyright 2009 by Infinity Interactive, Inc.
-
-L<http://www.iinteractive.com>
-
-This library is free software; you can redistribute it and/or modify
-it under the same terms as Perl itself.
-
=cut