Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

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

by eric256 (Parson)
on Dec 02, 2005 at 16:54 UTC ( #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;
  • Comment on Re^3: PDF::Template redesign - I want your ideas!

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? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (6)
As of 2021-10-28 16:54 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My first memorable Perl project was:







    Results (96 votes). Check out past polls.

    Notices?