Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot

Re^2: Template Modules in Core

by pileofrogs (Priest)
on May 13, 2011 at 17:58 UTC ( #904704=note: print w/replies, xml ) Need Help??

in reply to Re: Template Modules in Core
in thread Template Modules in Core

Big ups m4! (m4 is the C-preprocessor) Update: or is it...? D'oh! no it's not! It's a macro language that, I think, originally came with sendmail... I suck!

I use m4 all the time for random stuff. I find it's best for jobs that require you to type the same or similar stuff over.. and over.. and over.. but not so good for stuff that requires calculating something. EG my nagios configs are really repetitive, so m4=good. Making a dynamic web page: m4=not-so-good. A good mix would be a perl script that generates an m4 file full of definitions which m4 places in the result files. Aaannd of course you'd have a Makefile to make that easy to use. Aaaand you'd use m4 to make the Makefile less of a hastle... Aaaand you'd use perl to make the m4 less dumb....


Yeah, usually around this point I realise I should have stayed away from m4...

Did I mention that I suck...?

Replies are listed 'Best First'.
Re^3: Template Modules in Core
by SimonClinch (Deacon) on May 16, 2011 at 11:44 UTC
    m4 has indeed become more popular even on non-linux platforms. Although it isn't the cpp, it is certainly descended from it. It can be awkard with Perl templating because Perl has a much too flexible syntax. But for that reason Perl needs it the least. However, I can't see any problem using m4 or the cpp with say HTML templating - no conflict of syntax for example.

    One world, one people

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://904704]
[james28909]: politicians making jobs for themselves? that is absurd! we all know how hard those politicians have it, having to take millions from lobbiest while screwing over their citizens. have a little sympathy why dont ya!

How do I use this? | Other CB clients
Other Users?
Others imbibing at the Monastery: (6)
As of 2017-12-15 18:30 GMT
Find Nodes?
    Voting Booth?
    What programming language do you hate the most?

    Results (442 votes). Check out past polls.