Skip Menu |

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the CGI CPAN distribution.

Report information
The Basics
Id: 65121
Status: rejected
Priority: 0/
Queue: CGI

People
Owner: Nobody in particular
Requestors: ambs [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: 3.52
Fixed in: (no value)



Subject: nosticky is sticky
The nosticky flag (use CGI qw/-nosticky/) doesn't do what it is supposed to do (or at least that is what I think). First test: #!/usr/bin/perl use CGI qw/:standard/; print header; print p($CGI::VERSION); print param("text") if param("text"); print start_html; print start_form; print textfield(-name=>"text", -value=>"value"); print submit; print end_form; print end_html; use "horse" in the text field, and notice it sticks. Then, try #!/usr/bin/perl use CGI qw/-nosticky :standard/; print header; print p($CGI::VERSION); print param("text") if param("text"); print start_html; print start_form; print textfield(-name=>"text", -value=>"value"); print submit; print end_form; print end_html; And check that it still sticks. Use the -override into the textfield to show what -nosticky should do (or what I think it should do) #!/usr/bin/perl use CGI qw/:standard/; print header; print p($CGI::VERSION); print param("text") if param("text"); print start_html; print start_form; print textfield(-override=>1, -name=>"text", -value=>"value"); print submit; print end_form; print end_html; Thanks :)
I confirmed that "nosticky" is not enabled when the "-nosticky" pragma is in the import list with the ":standard" tag. Here's some reduced test cases. You can use the following script and comment in the various "use" lines: ### use lib './lib'; #use CGI; #use CGI '-nosticky'; use CGI ':standard -nosticky'; use feature 'say'; say "this: $CGI::NOSTICKY"; ### A patch would be welcome, but otherwise the HTML-related features of CGI.pm are not being actively maintained. My first recommendation is to avoid using CGI.pm for HTML form generation, in favor of a templating engine. If you do wish to continue to using, I recommend using the OO interface, avoiding the need for the ':standard' import tag. That would avoid the bug you've run into. Otherwise, please submit a patch. Thanks, Mark
This issue has been copied to: https://github.com/leejo/CGI.pm/issues/79 please take all future correspondence there. This ticket will remain open but please do not reply here. This ticket will be closed when the github issue is dealt with.
Rejecting. I'm not accepting any feature requests, patches, or updates to the HTML generating functions of CGI.pm unless they are of a critical nature (i.e. fixing fundamentally broken HTML output).