Hi All
The piece of code below always render "Test" indicating to me that the $mytest variable is never touched in the anonymous sub in the then or the catch. I cant understand what i do wrong ?
sub search {
my $self = shift;
my $mytest = 'Test';
$self->stockitems->search_p('*')->then(sub {
my $results = shift;
$mytest = 'Test Test Test';
})->catch (sub {
my $err = shift;
$mytest = 'ERROR';
})->wait;;
$self->render(template => 'stockitems/search', mytest => $mytest);
}
Any feedback or ideas are much apreciated
Thank you in advance !
Best Regards
Jan
--
Titles mean nothing. The one with a servant's heart is the leader.
Please consider the environment before you print this email.
All incoming and outgoing emails and any attachments are subjected to a virus scanner and are believed to be free of any virus, or any other defect which might affect any computer or IT system into which they are received and opened. Therefore, it is the responsibility of the recipient to ensure that they are virus free and no responsibility is accepted by Jan Eskilsson for any loss or damage arising in any way from receipt or use thereof.