Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

text::microtemplate::file(3pm) [debian man page]

Text::MicroTemplate::File(3pm)				User Contributed Perl Documentation			    Text::MicroTemplate::File(3pm)

NAME
Text::MicroTemplate::File - a file-based template manager SYNOPSIS
use Text::MicroTemplate::File; our $mtf = Text::MicroTemplate::File->new( include_path => [ $path1, $path2, ... ], use_cache => 1, ); # render $mtf->render_file('template.file', $arg1, $arg2, ...); DESCRIPTION
Text::MicroTemplate::File is a file-based template manager for Text::MicroTemplate. PROPERTIES
Text::MicroTemplate provides OO-style interface with following properties. include_path include path (default: ['.']) This accessor is readonly. use_cache cache mode (0: no cache (default), 1: cache with update check, 2: cache but do not check updates) open_layer layer passed to open (default: ":utf8") package_name package under where template files are compiled (default: "main") METHODS
build_file($file) Returns a subref that renders given template file. render_file($file, @args) Renders the template file with given arguments. wrapper_file($file, @args)->(sub { template lines }) Wraps given template with wrapper file. Internally the processed template is passed as $_[0] to the wrapper template. SEE ALSO
Text::MicroTemplate AUTHOR
Kazuho Oku <kazuhooku gmail.com> LICENSE
This program is free software, you can redistribute it and/or modify it under the same terms as Perl 5.10. perl v5.10.1 2010-09-06 Text::MicroTemplate::File(3pm)

Check Out this Related Man Page

MicroMason::QuickTemplate(3pm)				User Contributed Perl Documentation			    MicroMason::QuickTemplate(3pm)

NAME
Text::MicroMason::QuickTemplate - Alternate Syntax like Text::QuickTemplate SYNOPSIS
Instead of using this class directly, pass its name to be mixed in: use Text::MicroMason; my $mason = Text::MicroMason::Base->new( -QuickTemplate ); Use the standard compile and execute methods to parse and evalute templates: print $mason->compile( text=>$template )->( @%args ); print $mason->execute( text=>$template, @args ); Or use Text::QuickTemplate's calling conventions: $template = Text::MicroMason->new( -HTMLTemplate, text=>'simple.tmpl' ); print $template->fill( %arguments ); Text::QuickTemplate provides a syntax to embed values into a text template: Good {{timeofday}}, {{name}}! DESCRIPTION
This mixin class overrides several methods to allow MicroMason to emulate the template syntax and some of the other features of Text::QuickTemplate. This class automatically includes the following other mixins: TemplateDir, HasParams, and StoreOne. Compatibility with Text::QuickTemplate This is not a drop-in replacement for Text::QuickTemplate, as the implementation is quite different, but it should be able to process most existing templates without major changes. The following features of EmbPerl syntax are supported: o Curly bracketed tags with parameter names. o Array of parameters hashes. o Special $DONTSET variable. SEE ALSO
The interface being emulated is described in Text::QuickTemplate. For an overview of this templating framework, see Text::MicroMason. This is a mixin class intended for use with Text::MicroMason::Base. For distribution, installation, support, copyright and license information, see Text::MicroMason::Docs::ReadMe. perl v5.10.1 2007-01-29 MicroMason::QuickTemplate(3pm)
Man Page

15 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Align Text from a file.

I need to align text from a file that has columns seperated by spaces and commas. Any ideas? Text is similar to this. File Name is Test. 05/14/06 13:46:56.575 ,TEST,5,123,1234,123,12345,12,12.2,2.1,4.5,5.23 05/14/06 13:49:58.009 ,TEST,6,456,456.7,45,4.56,453,34,54.3,3.2,6.456 (9 Replies)
Discussion started by: earlepps
9 Replies

2. Shell Programming and Scripting

Using awk with variable name

Hi, I have 2 files File-template NAME 1 CITY 2 AMOUNT 3 BAL 4 File - data Anderson,,100,3000 File data always will have single record. I the above case, if I want to extract value of AMOUNT from file data. First I'll have to find position of AMOUNT in template and extract... (5 Replies)
Discussion started by: ronald_brayan
5 Replies

3. Shell Programming and Scripting

Text User Interface

Any experts here have any idea how can i begin with programming a TUI with shell ? any advice or recommended website for me to refer? (9 Replies)
Discussion started by: filthymonk
9 Replies

4. Shell Programming and Scripting

Numbering a Text File

Running into a little problem with blank lines. My file is of this format: To number each line of the file i would use: n=1 echo "$FILE" | while read line do echo "$n) $line" n=`expr $n + 1` But really, i dont want to number the blank lines. What i've tried is to use sed... (13 Replies)
Discussion started by: omgsomuchppl
13 Replies

5. Shell Programming and Scripting

Extracting Text

Hi, I have a file like that No seq Text 269091 123443124 how are slkslks, serial no is 042890000 and pincode is 090001223433454 269091 123443124 how are slkslks, Sr/no is 0428901 and 14 digits are is ... (3 Replies)
Discussion started by: krabu
3 Replies

6. Homework & Coursework Questions

changing permissions of a file whos name was passed to 755

Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted! 1. The problem statement, all variables and given/known data: Write a shell script that gives a passed file the "755" access permissions. The shell script should: Change... (5 Replies)
Discussion started by: anix007
5 Replies

7. UNIX for Dummies Questions & Answers

Modify Text File

Hi, I would like to remove any lines from a text file that begin with #, or that are blank. How can I do that with BASH? Mike (3 Replies)
Discussion started by: msb65
3 Replies

8. Homework & Coursework Questions

File Looping - Looking for executable files - Need help

Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted! Hello all, I have posted here before and really was blown away by the amount of assistance I received. I was able to finish my homework without a problem! But, yet again, our... (6 Replies)
Discussion started by: Bob07
6 Replies

9. Shell Programming and Scripting

Help with File processing

I have a file with 3 columns, ID1, ID2, Text: ID1; ID2; Text 1; X; aa 1; X; bb 1; Y; cc 1; Y; dd 2; X; ee 2; X; ff 2; Y; gg 2; Y; hh 2; Z; ii 2; Z; jj Need o/p as: ID; X; Y; Z 1; aa, bb; cc, dd; 2; ee, ff; gg, hh; ii, jj (7 Replies)
Discussion started by: karumudi7
7 Replies

10. Homework & Coursework Questions

Using the Make command

Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted! 1. The problem statement, all variables and given/known data: File hello.h #include <stdio.h> File main.c #include "hello.h" main() { printhello(); ... (4 Replies)
Discussion started by: lilbo4231
4 Replies

11. Shell Programming and Scripting

automate editing of a template

Given two files: File1 - source data abc def ghi File 2 - a template to be edited with data from File 1 This is a line with a @tag@ of some item A This is a line with a @tag@ of some item B This is a line with a @tag@ of some item C What I want to do is substitute @tag@ with a value... (3 Replies)
Discussion started by: edstevens
3 Replies

12. Homework & Coursework Questions

Looking to check disk space

Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted! 1. The problem statement, all variables and given/known data: Need to check the disk space and if any portion disk space usage high then write to one file, later will... (5 Replies)
Discussion started by: Jasminshakoor
5 Replies

13. UNIX for Advanced & Expert Users

File command return wrong filetype while file holds group separator char.

hi, I am trying to get the FileType using the File command. I have one file, which holds Group separator along with ASCII character. It's a Text file. But when I ran the File command the FileType is coming as "data". It should be "ASCII, Text file". Is the latest version of File... (6 Replies)
Discussion started by: Arpitak29
6 Replies

14. UNIX for Dummies Questions & Answers

Text Manipulation Help

(4 Replies)
Discussion started by: galford
4 Replies

15. Shell Programming and Scripting

Multiple Replacement in a Text File in one operation (sed/awk) ?

Hi all, Saying we have two files: 1. A "Reference File" whose content is "Variable Name": "Variable Value" 2. A "Model File" whose content is a model program in which I want to substitute "VariableName" with their respective value to produce a third file "Program File" which would be a... (4 Replies)
Discussion started by: dae
4 Replies