File: 0007-Comment-that-cgi_param-is-context-sensitive-just-lik.patch

package info (click to toggle)
libcgi-formbuilder-perl 3.09-2
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 1,504 kB
  • ctags: 450
  • sloc: perl: 7,224; makefile: 12
file content (19 lines) | stat: -rw-r--r-- 524 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
From: Simon McVittie <smcv@debian.org>
Date: Thu, 16 Oct 2014 10:40:29 +0100
Subject: Comment that cgi_param is context-sensitive just like param

---
 lib/CGI/FormBuilder.pm | 2 ++
 1 file changed, 2 insertions(+)

--- a/lib/CGI/FormBuilder.pm
+++ b/lib/CGI/FormBuilder.pm
@@ -1186,6 +1186,8 @@
 
 sub cgi_param {
     my $self = shift;
+    # This returns a scalar or a list, depending on context, like CGI.pm.
+    # For best results, don't call it with a parameter in list context.
     $self->{params}->param(@_);
 }