Rob Richardson wrote:
> --- Kristofer Hoch <[EMAIL PROTECTED]> wrote:
> > Rob,
> >   Have you considered useing the object oriented
> > method?  It is a little bit more complicated, BUT it
> > will work.
> >
> > use strict;
> > use warnings
> > use CGI;
> > my $CgiObject = new CGI;
> >
> > my $STRING = "There are not any trains running on thi
> > day.<br>Use the date dropdowns above to select
> > adifferent day.";
> >
> > my $htmlString =
> >   $CgiObject->p
> >   (
> >     $CgiObject->center
> >     (
> >       $CgiObject-strong($STRING)
> >     )
> >   );
> >
> Kris,
>
> Thanks for the suggestion, but I'm not sure what the benefit is.  I
> like objects.  The goal of my current effort is to objectify an
> unbelievably ugly mass of spaghetti code.  I am a C++ programmer by
> trade.  But I don't see what the use of a CGI object gets me here.

The main point of using CGI objects is that they also hold the
contents of the query as it last arrived from the client. You can
save this information and restore it across client requests as long
as you arrange for a session ID to be returned. In general though,
I'd agree that making the calls through an object is similar to having
to prefix them all with the package name.

Rob




-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to