Forms.

2000-05-29 Thread Jason C. Leach

hi,

I am interested in knowing the best way to generate forms w/ mod_perl.  At
the moment I use CGI.pm in combination w/ mod_perl.  But I am not sure I
am using it correctly or if it's the best way.

Perhaps I should just use a HTML::Template?

Here is a bit of the output code from my prg:
$r->content_type("text/html");
$r->send_http_header;

print start_form();

$r->print ("What is the domain name: ", textfield("domain"), "\n");
$r->print ("");
$r->print ("What would you like done?:\n");

$r->print ("");
$r->print (checkbox(-name=>'email',
-checked=>'checked',
-value=>'ON',
-label=>'Virtual Mail/Exim'));
$r->print ("");
$r->print (checkbox(-name=>'bind',
-checked=>'checked',
-value=>'ON',
-label=>'DNS/Bind'));
$r->print ("");
$r->print (checkbox(-name=>'apache',
-checked=>'checked',
-value=>'ON',
-label=>'Virtual Web/Apache'));

$r->print ("");
print submit(-NAME => ".State", -VALUE => "Next");

print print end_form(), hr();
print end_html();

Thanks.
J.




Re: Most nonesense I've ever read about mod_perl

2000-05-06 Thread Jason C. Leach

hi,


There be truth to the reply.  You can write all the C or ASM you like, but
your algorithm is where it will count.  Anyone who knows how to do BIG-O
will know this.

A good perl programmer will code a bad C programmer under the table with
speed and eficiency.

j.

--
Method Digital Logic Company
http://www.methodlogic.net
Solutions for:
 -Web Design-Database Programming
 -Office Networking -Custom Applications


On Sat, 6 May 2000, Matt Sergeant wrote:

> http://slashdot.org/comments.pl?sid=00/05/05/0137201&cid=250
> 
> There's a real good reply below, but terribly formatted (all italics).
> 
> -- 
> 
> 
> Fastnet Software Ltd. High Performance Web Specialists
> Providing mod_perl, XML, Sybase and Oracle solutions
> Email for training and consultancy availability.
> http://sergeant.org http://xml.sergeant.org
> 
> 




mod_perl of FreeBSD 4

2000-05-04 Thread Jason C. Leach

hi,

I have freebsd 4, and am going to install mod_perl on it.  If I go to
/usr/ports/www/mod_perl and do a make, I get v1.21.  But if I go to the
ftp site it has up to v1.23.  Can I change the ports, or update them to
get the latest files?

j.

--
Method Digital Logic Company
http://www.methodlogic.net
Solutions for:
 -Web Design-Database Programming
 -Office Networking -Custom Applications





Templates.

2000-05-03 Thread Jason C. Leach

hi,

I'm looking for some good ideas on developing web sites w/ mod_perl.  One
think we were looking at was to write template HTML pages, and run them
through a perl prg to replace home made tags w/ data.

Another was to write an apache mod that will contain/load the HTML on the
first hit and cach all the pages and gfx (not too much).

Can anyone comment on some good techniques to develope mod_perl sites?  We
will need mod_perl to be fast, interact w/ a DB, and run of FreeBSD or
Linux.

Thanks,
J.

--
Method Digital Logic Company
http://www.methodlogic.net
Solutions for:
 -Web Design-Database Programming
 -Office Networking -Custom Applications





Re: Cookies

2000-02-14 Thread Jason C. Leach

hi,

Using CGI.pm you can:
print header(-COOKIE => $cookie);

Remember cookies must go out with the header and BEFORE anything else
is printed, even white space.



On Mon, Feb 14, 2000 at 11:31:28AM +0100, Francesco Marsoni wrote:
> Hello.
> I'm trying to write an access handler for Apache - mod_perl
> Inside the handler sub I would like to send a cookie if the access is forbidden. But 
>the following lines doesn't work:
> 
>  $r->err_headers_out->add('Set-Cookie' => $cookie);
>  return FORBIDDEN;
> 
> when FORBIDDEN is returned no cookie is sent. I found this way to send cookies with 
>mod_perl somewhere in the web.
> Does anyone know where's the problem? Or is there another way to send it?
> Thx
> Francesco



mod_perl vs. PHP.

2000-02-13 Thread Jason C. Leach

hi,

I'm looking for some info on the pros and cons of PHP and mod_perl.  Can
anyone direct me to some.

I'm mostly concerned with what is faster or all around better to program in,
especially for something like an eComerce site and of coarse doing DB work.



Thanks,
J.