Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re: Module::Compile::TT

by Arunbear (Parson)
on Jun 17, 2006 at 23:21 UTC ( #556035=note: print w/replies, xml ) Need Help??


in reply to Module::Compile::TT

When I read through your example, Class::Accessor immediately came to mind, so I'm not sure what benefit a source filtering approach brings to this problem. There doesn't seem to be much documentation for Module::Compile::TT, so how else can be used e.g. can you use it to simulate macros?

Replies are listed 'Best First'.
Re^2: Module::Compile::TT
by nothingmuch (Priest) on Jun 17, 2006 at 23:27 UTC
    Accessors are just a clear example.

    Nowadays I use Moose for them, or if I can't then Class::Accessor.

    I needed tt for a set of methods that operate on two different classes in almost the same way. It's still just boilerplate code (the object that needed this code gen was a factory object with some convenience routines).

    As for macros - C preprocessor style ones, that is - you can use TT macros. See Template::Manual::Directives.

    -nuffin
    zz zZ Z Z #!perl

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://556035]
help
Chatterbox?
[Discipulus]: ahi ahi ahi!!
[Lady_Aleena]: paco is a little over 2 years before my time.
[Discipulus]: you can try tachyon's iterative approach Re: Win32 Recursive Directory Listing
[Lady_Aleena]: I'm on Linux/
[beech]: isn't 2 year about standard recovery time for that kind of surgery?
[Discipulus]: if you hate FIle::Find
[Lady_Aleena]: I don't hate it, it just drives me crazy.
[Discipulus]: LA the solution is portable to whatever

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (10)
As of 2017-04-23 20:44 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    I'm a fool:











    Results (432 votes). Check out past polls.