use strict; use warnings; package Foo; use Moose; has 'attrib' => ( is => 'rw', trigger => \&attrib_changed ); has 'workaround' => ( is => 'rw', trigger => \&workaround_changed ); sub attrib_changed { print " in attrib_changed\n"; # called } after 'attrib_changed' => sub { print " in 'after' attrib_changed\n"; # not called }; sub workaround_changed { my ( $self ) = @_; print " in workaround_changed\n"; # called $self->not_a_trigger; } after 'workaround_changed' => sub { print " in 'after' workaround_changed\n"; # not called }; sub not_a_trigger { print " in not_a_trigger\n"; # called } after 'not_a_trigger' => sub { print " in 'after' not_a_trigger\n"; # called }; my $foo = Foo->new; print "Calling attrib( 1 ):\n"; $foo->attrib( 1 ); print "Calling workaround( 1 ):\n"; $foo->workaround( 1 );