in reply to CGI.pm nosticky option does not work

It's poorly documented, but the goal of sticky is to preserve fields from past requests. It allows things like multi page forms. It has nothing to do with whether CGI gets the value of fields from param or not. That's controlled by override.

If you want to override everything in one go, you could use

$cgi->delete_all();

Just be sure grab what you need from param first.

Update: While trying to construct an example, I realized I was wrong.

nosticky is just plain buggy. It's behaviour is completely different than the one documented. After studying the source, I've come to the conclusion that nosticky's *only* goal is to prevent the hidden field .cgifields from being created. That field is used to help make check boxes, check box groups, radio buttons and select lists sticky. CGI never intends nosticky to prevent anything from being sticky, so it will try to make those fields sticky even if .cgifields isn't present. Anything else if sticky regardless of nosticky.

Replies are listed 'Best First'.
Re^2: CGI.pm nosticky option does not work
by Anonymous Monk on Jun 01, 2008 at 11:17 UTC

      It's documented to prevent the state-preserving behaviour of interrogating param() to see if similarly-named parameters are present in the query.

      That's actually what it *should* do as far as I'm concerned, so the documentation is correct from that point of view.

      The problem is that it doesn't do that. At all.

      If it is deemed useful to have a flag to disable .cgifields from being created while preserving as much stickyness as required, that's fine, but it shouldn't be called nosticky.