
package MooseX::Exporter;
use Moose;

use Sub::Exporter;

sub import {
    shift;
    return unless @_;
    
    my $pkg   = caller;
    my $sugar = (shift)->meta;

    $pkg->meta->alias_method(import => Sub::Exporter::build_exporter(
        {
            exports => {
                map {
                    $_ => $sugar->get_method($_)->body
                } $sugar->get_method_list
            },
            groups  => { default => [':all'] }
        }
    ));
}

1;

__END__