Thanks. That's certainly one way ... I am more curious if I can access the helper name from within the helper as my application has hundreds of helpers and I am trying to see if I can lookup the name from within the helper itself. If there is no other way, I will fall back to your suggestion.
On Monday, July 3, 2017 at 4:52:25 PM UTC-4, Stefan Adams wrote: > > > On Mon, Jul 3, 2017 at 7:01 AM, Beginner <[email protected] <javascript:>> > wrote: >> >> *my $helper = 'dummy';* > > helper *$helper* => sub { >> my $self = shift; >> my $log = shift; >> *#**my $helper = "";* # XXX - how to determine the name dynamically? >> >> my $time_start = $self->get_start_time(); >> >> $log->info({msg => "started helper $helper"}); >> # .. Do something .. >> $elapsed = $self->get_elapsed_time($get_start_time); >> $log->info({msg => "completed helper $helper", took => $elapsed}); >> }; > > > > -- You received this message because you are subscribed to the Google Groups "Mojolicious" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/mojolicious. For more options, visit https://groups.google.com/d/optout.
