Subject: | page change error. patch |
I have found that if the current page is changed, by returning a different package name from the 'respond' method, the program dies with a "initialize_CGI not called" error.
The problem is caused, because the dummy CGI slot is added using $_mirror, but then the initialize_CGI method adds the real CGI slot to $self.
When control passes to $next_page, it inherit's CGI::Prototype's dummy CGI slot, but not the 'real' CGI slot.
The solution is to change CGI::Prototype's initialize_CGI method to add the slot to $_mirror instead of $self.
Patch attached.
Code that demostrates the problem was posted to the cgi-prototype-users mailing list:
http://sourceforge.net/mailarchive/forum.php?thread_id=7967954&forum_id=44638
I'm using CGI::Prototype 0.9053,
perl 5.8.7 (activestate),
Regards,
Carl
411c411
< $self->reflect->addSlot
---
> $_mirror->addSlot