On Wed, 2004-09-01 at 14:53, Alex Brelsfoard wrote:
> I am most certainly NOT one who knows all the nooks and crannies.
> However this is a larger project that I am only picking up my part
> on. Changing things to use CGI.pm would require a LOT of re-coding.
> Plus these are things that I should know about. Understanding them
> better makes me a better coder. I would always rather learn that lean
> on an already created package.
Leaning on an already package doesn't preclude you from understanding
the underlying mechanism; that's part of what Open Source is about. In
fact you'll probably learn even MORE from poring over the CGI.pm source
than from trying to implement parameter parsing or header generation
from scratch. Lincoln Stein and others have already run into the corner
cases and tricky bits and dealt with them, so you don't have to learn
the hard way.
Anyway, you can use *just* CGI's header generation if you like. It's
very orthogonal like that. Here's an example of the header and cookie
functionality:
use CGI qw(header cookie);
my $cookie = cookie(-name => 'session_id',
-expires => '+1h',
-value => '1123');
print header(-content_type => 'text/html', -cookie => $cookie);
This prints:
Set-Cookie: session_id=1123; path=/; expires=Wed, 01-Sep-2004
20:28:57 GMT
Date: Wed, 01 Sep 2004 19:28:57 GMT
Content-Type: text/html; charset=ISO-8859-1
-- Jeremy
_______________________________________________
Boston-pm mailing list
[EMAIL PROTECTED]
http://mail.pm.org/mailman/listinfo/boston-pm