package MooseX::Method::Signature::Auto;

use Moose::Role;

our $HAS_COMPILED_SIGNATURES;

eval { Class::MOP::load_class ('MooseX::Method::Signature::Compiled') };

$HAS_COMPILED_SIGNATURES = 1 unless $@;

sub BEFORE_PLUGIN {
  my ($self) = @_;

  $self->load_plugin ('Signature');

  $self->load_plugin ('Signature::Compiled')
    if $HAS_COMPILED_SIGNATURES;

  return 1;
}

1;

