in reply to Re: Re: Code Critique?
in thread Code Critique?

Well, it's not that this doesn't work. As with most of perl, TIMTOWTDI. But I was more advocating mixing here-docs with CGI's functions, (as opposed to mixing CGI.pm with here-docs)

I've lately becoming less enthralled with here-docs due to how they ususally mess up the formating (both of what you put in and what your editor puts in) of a perl script. Plus, this appears to be one of the few points in perl where extra whitespace can screw you up. I've had several bad experiences with here-docs as to avoid using them myself and to try to get others to do so as well.

It's probably better to use either CGI.pm functions completely, or at least get the header and other page information out with CGI and then jump to a template solution for the rest of the HTML body. Both methods will produce much nicer and easier-to-read code than using here-docs.


Dr. Michael K. Neylon - mneylon-pm@masemware.com || "You've left the lens cap of your mind on again, Pinky" - The Brain

Replies are listed 'Best First'.
Re: Re: Re: Re: Code Critique?
by sierrathedog04 (Hermit) on Jun 15, 2001 at 21:40 UTC
    We are basically on the same (web) page. A lot of us have legacy HTML pages that we are integrating into new projects, and it is better to reuse them than to redo them as templates or using CGI.pm's HTML functions.

    I prefer to include the legacy HTML pages as here documents rather than as separate files. That way everything is one one file. In my office we are still working the kinks out of our version control system and anything that avoids adding to the number of files in a project is a plus.