All,
the CGI.pm routine has some nifty functions, one of which is the internally
used "escape" - no more pack(). If you're always using the routing as
$q=new CGI;, you don't have the problem, but I like to export all the
functions, since I'm a lazy typer.
However - there's a "semi-bug" (could be design, allthough the reasons
escape me, pardon the pun) in CGI.pm shipped with 5.6 (and prolly earlier)
distributions, which doesn't make "escape" available even though you export
"all" functions.
The cause is the following lines in CGI.pm:
%EXPORT_TAGS = (
.....
':all' => [qw/:html2 :html3 :netscape :form :cgi :internal/]
);
Problem is -> there is no 'internal' label.
There are 2 solutions:
1) use CGI qw/:all rearrange make_attributes unescape escape expires/;
which exports the internal functions used in CGI::Util
or
2) Edit CGI.pm:
$ diff -c CGI.old CGI.pm
*** CGI.old Wed May 2 01:29:16 2001
--- CGI.pm Mon Oct 15 19:51:58 2001
***************
*** 202,207 ****
--- 202,208 ----
':html' => [qw/:html2 :html3 :netscape/],
':standard' => [qw/:html2 :html3 :form :cgi/],
':push' => [qw/multipart_init multipart_start
multipart_end multipart_final/],
+ ':internal' => [qw/rearrange make_attributes unescape
escape expires/],
':all' => [qw/:html2 :html3 :netscape :form :cgi :internal/]
);
For those not farmiliar with context diffs:
-- it describes line 202 till 207 in the old file and line 202 till 208 in
the new file.
-- The line with the '+' should be added.
Testcode:
#!/perl/bin/perl -w
use CGI qw/:all/;
use strict;
$|++;
print header, start_html('test'), p(escape('bla@com')), end_html;
HTH,
____________________________________________________
</MELVYN>
void wakeup()
{
for(long int cuppajava;drink();cuppajava++);
}
--------------------------------------------------------------------------------
For unsubscription of this list send an email to [EMAIL PROTECTED] with email
data containing unsubscribe emailadd sambar