From yraber at mailup.net Tue May 20 10:43:28 2008 From: yraber at mailup.net (Yves =?ISO-8859-1?Q?R=E4ber?=) Date: Tue May 20 10:43:33 2008 Subject: [Html-widget] Set error message in callback Message-ID: <1211276609.9024.40.camel@localhost> Hello, I need to set the error message within a callback function. Something like this (using Catalyst framework) : $w->constraint('Callback', 'phone')->callback( sub { my $number = shift; my $res = $c->forward('/get_prefix',[$number]); # I'd like to set the error message here $error_msg = $c->stahs->{prefix_info}; return ($number) ? $res : 1; } ); I've no idea how I can set the message within the callback function. Does anyone has a working example ? I've searched everywhere : forums, mailing list and google of course. Yves.