It should just work if you call $session->clear() (without passing the $cgi object). As I already said, this would clear all parameters, though. In case you have other stuff stored in the session which you don't want to have cleared, you could do $session->clear([$cgi->param()]) instead, which would clear nothing but the parameters of the current CGI object.
BTW, save_param($cgi) does not store the CGI object itself. It calls the param() method on the object passed in. This method, when called without an argument, returns a list of all parameters, which are then stored in the session. (In theory, the API of CGI::Session could likewise accept clear($cgi), to then call param() on the CGI object, etc... — but that's not how it's implemented.) HTH.
In reply to Re^2: how to clear cgi object from session?
by almut
in thread how to clear cgi object from session?
by adrive
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |