Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re^3: PDF::Template redesign - I want your ideas!

by eric256 (Parson)
on Dec 02, 2005 at 16:54 UTC ( [id://513646]=note: print w/replies, xml ) Need Help??


in reply to Re^2: PDF::Template redesign - I want your ideas!
in thread PDF::Template redesign - I want your ideas!

You missed my point.

Instead of having the template portion (control constructs etc) as part of the module, all the modules should use the same template. Then each module expects different data. So control flow and variable insertion remains the same, yet formating would be independent. So a PDF template might have header and footer tags, while xls has row and colum stuff, regardless they all still use the same loop, if, var code from the basic template. Code reuse 101 ;)


___________
Eric Hodges $_='y==QAe=e?y==QG@>@?iy==QVq?f?=a@iG?=QQ=Q?9'; s/(.)/ord($1)-50/eigs;tr/6123457/- \/|\\\_\n/;print;

Replies are listed 'Best First'.
Re^4: PDF::Template redesign - I want your ideas!
by dragonchild (Archbishop) on Dec 02, 2005 at 16:56 UTC
    That's why I was thinking about trying to use TT in some fashion. That way, you have the same constructs from TT, but you do still have a separate template file for each output format.

    My criteria for good software:
    1. Does it work?
    2. Can someone else come in, make a change, and be reasonably certain no bugs were introduced?

      If it comes down to it and you have a choice, leave it so the user can choose any template backend they like. Somethings are easier in HTML::Template while others need the power of TT, I've found TT harder in the general cases to work with and avoid it unless I need its features.


      ___________
      Eric Hodges $_='y==QAe=e?y==QG@>@?iy==QVq?f?=a@iG?=QQ=Q?9'; s/(.)/ord($1)-50/eigs;tr/6123457/- \/|\\\_\n/;print;

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://513646]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others avoiding work at the Monastery: (4)
As of 2024-03-29 09:37 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found