When I try your code (with minor modifications so it'll compile) I get an exception from Moose: "Trigger must be a CODE ref on attribute".
The reason is that trigger => \&_get_future_events('existing_events'), first calls sub _get_future_events with the single argument 'existing_events' (which is the Dumper output you're seeing), and then takes a reference to its return value, and assigns that to trigger.
So you either need to write trigger => \&_get_future_events, to assign a reference to sub _get_future_events to trigger, or, if you really need to pass an extra argument to _get_future_events, you could do something like trigger => sub { _get_future_events(@_,'existing_events') },.
In reply to Re: Moose not passing object to triggered method
by Anonymous Monk
in thread Moose not passing object to triggered method
by nysus
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |