Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

RE: Design vs. Code vs. Maintenance

by Anonymous Monk
on May 17, 2000 at 22:42 UTC ( [id://12211]=note: print w/replies, xml ) Need Help??


in reply to Design vs. Code vs. Maintenance

My solution has been CGI::FastTemplate. If the site has a consistent look and feel that you are trying to maintain, have your HTML guys create an html file that looks like it "should", and put a 1 element table in the center. Its contents will be '$TEMPLATE'. Using CGI::FastTemplate, the code can look like:
use CGI qw/:standard/; # for html shortcuts
use CGI::FastTemplate;
# code here
# creates an HTML string called $template, i.e.

 my $template =  table({-width => "641",
                 -border => "0",
                 -cellspacing => "10",
                 -cellpadding => "0",
                 -align => "center",
                 #-height => "734",
                 #border => 1
                },
                Tr(
                   td(
                      h1({-align => 'left'},
                         #img({ -src => "/anim_logo.gif",
                               #-width => "375", -height => "56"
                         #    }),
                         br,
                         font({-color => "#3399CC"},
                              "There were errors in the form input:")
                        ),
                      (map {h2("$_:"), h3(ul( map (li(i(mapfieldname($_))), @{$errors{$_}}) ))} keys %errors),

                      h3("Please click your ",
                         a({href => "javascript:history.go(-1);"}, 'BACK'),
                         " button and correct the pro

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others browsing the Monastery: (5)
As of 2024-04-25 14:08 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found