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

Re^5: Here documents in blocks

by Bod (Chaplain)
on Dec 19, 2020 at 21:56 UTC ( #11125473=note: print w/replies, xml ) Need Help??


in reply to Re^4: Here documents in blocks
in thread Here documents in blocks

Personally I put the HERE-IS block at the left hand edge, and skip the whole "indent" thing. (A what (indent) you see, is what you get.)

me too, mostly at the end of a sub.

I think that LanX and tybalt89 have answered much of my question...is there an accepted best practice?
Sounds like it's to just ignore the whole indent problem.

Replies are listed 'Best First'.
Re^6: Here documents in blocks
by LanX (Cardinal) on Dec 20, 2020 at 02:03 UTC
    > is there an accepted best practice?

    yes, but you won't like it. :)

    It's use one of the many template systems, especially for HTML.

    You can role your own, but at the end you will reinvent the wheel.

    Personally I'm stuck with a system at $work where I have to roll my own :/

    Another best practice is MVC ... well separation of code and templates at least.

    Cheers Rolf
    (addicted to the Perl Programming Language :)
    Wikisyntax for the Monastery

      yes, but you won't like it. :)

      You know me too well - LoL
      Seriously - It's not so much a question of not liking it...I have tried creating a template and found it more difficult to maintain than not doing so. Although as explained in Re^4: Here documents in blocks I know how to improve it thanks to the Monastery and that alone may be sufficient to revisit this. Add an existing templating system and this option is becoming more attractive.

      Part of the problem is that I don't usually have the luxury of time to learn a new way to do things. We have a business need and I have to find a solution. Speed is often more important than elegance. Incremental learning I can do but finding the time to learn a whole new methodology or framework is mostly just not possible.

        > I don't usually have the luxury of time to learn a new way to do things.

        well, yeah.

        But you have enough time to ask how to improve the old ways you do things? ;-)

        shrug! :)

        Cheers Rolf
        (addicted to the Perl Programming Language :)
        Wikisyntax for the Monastery

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others pondering the Monastery: (4)
As of 2021-04-13 22:42 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?