Well, that's the important part with regards to having one perl script put out output for numerous output formats. If the "output generation" is sufficient separated from the perl code, the perl code and logic is much clean, and all that is left to do is to write, for each output type you want to support
, a template to fill in the blanks. If you set up the arguments that you pass to Template correctly, for example, you don't need to change the data that you pass to the Template processor, and in the various files, you write what you want to include. For example, if I was writing a on line bookstore, the HTML front end might have not only the ISBN, price, publisher, etc, but the short synapsis, reviews, etc etc. on every page. On the other hand, I might only want the ISBN, and short details for a WAP output. But I only need to write one database call to do both.
Dr. Michael K. Neylon - firstname.lastname@example.org
"You've left the lens cap of your mind on again, Pinky" - The Brain
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.
| & || & |
| < || < |
| > || > |
| [ || [ |
| ] || ] ||