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

Re: Muse - Personal Interlinked Encyclopedia Builder

by thraxil (Prior)
on Apr 04, 2002 at 16:04 UTC ( #156694=note: print w/ replies, xml ) Need Help??


in reply to Muse - Personal Interlinked Encyclopedia Builder

i'd really recommend using HTML::Template or some other templating mechanism. seeing all that html mixed in with the perl makes me cringe.

anders pearson


Comment on Re: Muse - Personal Interlinked Encyclopedia Builder
Re: Re: Muse - Personal Interlinked Encyclopedia Builder
by Pedro Picasso (Sexton) on Apr 05, 2002 at 04:04 UTC

    I agree that the mixing of code can get ugly, and this is an hour's hack and not the way I'd generally do it, but I prefer to avoid the templating way of doing it. Calling templates and passing them values can be just as ugly as bare HTML and it removes you one step from what you're actually trying to do (which is communicate through web pages).

    My preferred approach is object oriented. I create a "Display" object with subs for form generation, etc. that are specific to my current problem. If I can design the interfaces to these objects well enough, I can rewrite them later for Tk or whatever other kind of user display I'm using and not have to re-write the rest of the app. This provides cleanliness in the functional code and separation from the display code but still allows you to see the HTML directly when you want to.

    So far I don't know anyone else who does it this way, but I prefer it.

    -the Pedro Picasso
    (sourceCode == freeSpeech)

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others examining the Monastery: (13)
As of 2014-07-30 18:18 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (239 votes), past polls