Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re: Embed a template in perl file

by luis.roca (Deacon)
on Jan 06, 2012 at 21:14 UTC ( #946667=note: print w/replies, xml ) Need Help??


in reply to Embed a template in perl file

Well, one of the main reasons to have templates is to create a separation of concerns. Mashing everything together seems counter to that (if I'm understanding you correctly). Other than Eliya's suggestion I can only think of something like Text::Template (There's also Template::Toolkit but that's definitely going to be more than one file) having the ability to mix and embed in that way but you will still have two files. Sorry I can't be more help. Maybe with a little more clarity a few other monks can assist you.

"...the adversities born of well-placed thoughts should be considered mercies rather than misfortunes." Don Quixote

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://946667]
help
Chatterbox?
[atcroft]: Lady_Aleena: I found the L<name|section> syntax, which describes linking to a perl manual page, and L<text|url> to link to a web page. The reason I asked was because I was on search.cpan.org looking at a module,
[atcroft]: and it referred to several other modules, but the links went to metacpan.org. I found that a bit of a surprise, and it got me wondering if there was a "standard" way to link to other modules in the documentation on CPAN.
[Lady_Aleena]: atcroft. maybe look at raw PODs. There is also L<foo|http://foo. com> and some might be linking directly to meta::cpan.
[Lady_Aleena]: Oops, didn't read the L<text|url> right.

How do I use this? | Other CB clients
Other Users?
Others lurking in the Monastery: (5)
As of 2017-05-27 03:51 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?