in reply to Re^10: Here documents in blocks (why templates)
in thread Here documents in blocks
"I'm not sure debating one bit of sample HTML which was shared to demonstrate something completely different helps with the original question about heredocs or with the subsequent divergence into templates."
My reply was the first to suggest templating, and commented on this as a side note. Printing literally each line of HTML at a time, substituting values within blocks of code like that is arcane. If it works for you it isn't a problem obviously, as mentioned more than once now, however when posting clunky things on a forum to help people learn how to do things better, expect someone to flag it up. Which shouldn't be surprising given previous conversations about modern perl and what it can do. From experience of writing and maintaining clean interfaces in sane ways, the learning curve isn't too steep and each small thing you learn to do better makes life a lot easier. Booking.com may be doing this to satisfy some other problem, as LanX has mentioned certain JavaScript UI toolkits do weird things. 22 requests pulling in 2MB of JavaScript, I'm not going to bother delving into any of that bloat. JavaScript is sometimes a necessary evil best used sparingly but just all too often misused these days, hence the bloated interwebs.
|
|---|