2009/4/14 Moritz Onken <on...@houseofdesign.de>: > Hi Carl, > > > there is still this failing test t/01basic-token.t which fails. > In t/lib/MyApp/Controller/TokenExpire.pm I set a negative expiration time > but it get's lost somewhere while the plugin tries to set this expiration > time on Element::RequestToken. > > I made accessors for all those config options in Element::RequestToken and > Plugin::RequestToken should set those on the element, but this does not > happen.
Sorry, I'd forgotten about this! I think I've narrowed it down a bit. When adding an element with $form->element({ type => 'Foo', arg => 'foo' }) internally, that extra 'arg' is set after $element->new() is called. In Element::RequestToken->new, it calls $self->default( $self->get_token ) which uses expiration_time() before your custom value is set. I've tried getting around this, by moving the default(get_token) into a pre_process() method, but that just makes things worse ;) I'm still figuring out how the RequestToken works, so I'll need to have another look at this tomorrow. Carl _______________________________________________ HTML-FormFu mailing list HTML-FormFu@lists.scsys.co.uk http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/html-formfu