title: Defining a MX::Declare method as a attribute trigger
body: <p>The following code works as I'd expect. The cached lazy attribute gets cleared and rebuilt when the foo attribute it depends on is changed.</p>
  
  <pre><code>use MooseX::Declare;
  use 5.010;
  
  class Test {
    has foo =&gt; ( isa =&gt; 'Str', is =&gt; 'rw', trigger =&gt; sub {my $self = shift; $self-&gt;clearer}, default =&gt; '' );
  
    has lazy =&gt; ( isa =&gt; 'Str', is =&gt; 'ro', lazy =&gt; 1, clearer =&gt; 'clearer',
                  default =&gt; method { say 'building lazy'; return "foo is '".$self-&gt;foo."'"; },
                );
  
    method say ( ) {
      say $self-&gt;lazy;
    }
  }
  
  my $inst = Test-&gt;new( foo =&gt; 'baz' );
  $inst-&gt;say;
  $inst-&gt;say;
  say $inst-&gt;foo();
  $inst-&gt;foo('bar'); 
  $inst-&gt;say;
  </code></pre>
  
  <p>output:</p>
  
  <pre><code>building lazy
  foo is 'baz'
  foo is 'baz'
  baz
  building lazy
  foo is 'bar'
  </code></pre>
  
  <p>How do I, however, use the MX::Declare sugar for the trigger subroutine? Defining foo as:</p>
  
  <pre><code>has foo =&gt; ( isa =&gt; 'Str', is =&gt; 'rw', trigger =&gt; method {$self-&gt;clearer}, default =&gt; '' );
  </code></pre>
  
  <p>Results in the class dying on compilation (below). Am I doing something wrong with my anonymous method declaration?</p>
  
  <blockquote>
    <p>Trigger must be a CODE ref on attribute (foo) at
    C:/Strawberry/perl/site/lib/Moose/Meta/Attribute.pm line 423
            Moose::Meta::Attribute::_process_trigger_option('Moose::Meta::Attribute',
    'foo', 'HASH(0x2a5d14c)') called at C:
    /Strawberry/perl/site/lib/Moose/Meta/Attribute.pm line 299
            Moose::Meta::Attribute::_process_options('Moose::Meta::Attribute',
    'foo', 'HASH(0x2a5d14c)') called at C:/Strawb
    erry/perl/site/lib/Moose/Meta/Attribute.pm line 88
            Moose::Meta::Attribute::new('Moose::Meta::Attribute', 'foo', 'trigger', 'MooseX::Method::Signatures::Meta::Metho
    d=HASH(0x39a421c)', 'isa', 'Str', 'definition_context',
    'HASH(0x3452184)', 'default', '', 'is', 'rw') called at C:/Straw
    berry/perl/site/lib/Moose/Meta/Attribute.pm line 114
            Moose::Meta::Attribute::interpolate_class_and_new('Moose::Meta::Attribute',
    'foo', 'trigger', 'MooseX::Method::S
    ignatures::Meta::Method=HASH(0x39a421c)', 'isa', 'Str', 'default', '',
    'definition_context', 'HASH(0x3452184)', 'is', 'r w') called at
    C:/Strawberry/perl/site/lib/Moose/Meta/Class.pm line 704
            Moose::Meta::Class::_process_new_attribute('Moose::Meta::Class=HASH(0x38c79d4)',
    'foo', 'trigger', 'MooseX::Meth
    od::Signatures::Meta::Method=HASH(0x39a421c)', 'isa', 'Str',
    'default', '', 'definition_context', 'HASH(0x3452184)', 'is ', 'rw')
    called at C:/Strawberry/perl/site/lib/Moose/Meta/Class.pm line 697
            Moose::Meta::Class::_process_attribute('Moose::Meta::Class=HASH(0x38c79d4)',
    'foo', 'trigger', 'MooseX::Method::
    Signatures::Meta::Method=HASH(0x39a421c)', 'isa', 'Str', 'default',
    '', 'definition_context', 'HASH(0x3452184)', 'is', ' rw') called at
    C:/Strawberry/perl/site/lib/Moose/Meta/Class.pm line 566
            Moose::Meta::Class::add_attribute('Moose::Meta::Class=HASH(0x38c79d4)',
    'foo', 'trigger', 'MooseX::Method::Signa
    tures::Meta::Method=HASH(0x39a421c)', 'isa', 'Str', 'default', '',
    'definition_context', 'HASH(0x3452184)', 'is', 'rw') called at
    C:/Strawberry/perl/site/lib/Moose.pm line 77
            Moose::has('Moose::Meta::Class=HASH(0x38c79d4)', 'foo', 'isa', 'Str', 'is', 'rw', 'trigger', 'MooseX::Method::Si
    gnatures::Meta::Method=HASH(0x39a421c)', 'default', '') called at
    C:/Strawberry/perl/site/lib/Moose/Exporter.pm line 356</p>
  
  <pre><code>    Moose::has('foo', 'isa', 'Str', 'is', 'rw', 'trigger', 'MooseX::Method::Signatures::Meta::Method=HASH(0x39a421c) ',
  </code></pre>
    
    <p>'default', '') called at mx_declare.pl line 5
            main::<strong>ANON</strong>() called at C:/Strawberry/perl/site/lib/MooseX/Declare/Syntax/MooseSetup.pm line
    81
            MooseX::Declare::Syntax::MooseSetup::<strong>ANON</strong>('CODE(0x38c3a94)')
    called at mx_declare.pl line 13</p>
  </blockquote>