Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

template::namespace::constants(3) [suse man page]

Template::Namespace::Constants(3)			User Contributed Perl Documentation			 Template::Namespace::Constants(3)

NAME
Template::Namespace::Constants - Compile time constant folding SYNOPSIS
# easy way to define constants use Template; my $tt = Template->new({ CONSTANTS => { pi => 3.14, e => 2.718, }, }); # nitty-gritty, hands-dirty way use Template::Namespace::Constants; my $tt = Template->new({ NAMESPACE => { constants => Template::Namespace::Constants->new({ pi => 3.14, e => 2.718, }, }, }); DESCRIPTION
The "Template::Namespace::Constants" module implements a namespace handler which is plugged into the "Template::Directive" compiler module. This then performs compile time constant folding of variables in a particular namespace. METHODS
new(\%constants) The new() constructor method creates and returns a reference to a new Template::Namespace::Constants object. This creates an internal stash to store the constant variable definitions passed as arguments. my $handler = Template::Namespace::Constants->new({ pi => 3.14, e => 2.718, }); ident(@ident) Method called to resolve a variable identifier into a compiled form. In this case, the method fetches the corresponding constant value from its internal stash and returns it. AUTHOR
Andy Wardley <abw@wardley.org> <http://wardley.org/> COPYRIGHT
Copyright (C) 1996-2007 Andy Wardley. All Rights Reserved. This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself. SEE ALSO
Template::Directive perl v5.12.1 2008-11-13 Template::Namespace::Constants(3)

Check Out this Related Man Page

Template::Namespace::Constants(3pm)			User Contributed Perl Documentation		       Template::Namespace::Constants(3pm)

NAME
Template::Namespace::Constants - Compile time constant folding SYNOPSIS
# easy way to define constants use Template; my $tt = Template->new({ CONSTANTS => { pi => 3.14, e => 2.718, }, }); # nitty-gritty, hands-dirty way use Template::Namespace::Constants; my $tt = Template->new({ NAMESPACE => { constants => Template::Namespace::Constants->new({ pi => 3.14, e => 2.718, }, }, }); DESCRIPTION
The "Template::Namespace::Constants" module implements a namespace handler which is plugged into the "Template::Directive" compiler module. This then performs compile time constant folding of variables in a particular namespace. METHODS
new(\%constants) The new() constructor method creates and returns a reference to a new Template::Namespace::Constants object. This creates an internal stash to store the constant variable definitions passed as arguments. my $handler = Template::Namespace::Constants->new({ pi => 3.14, e => 2.718, }); ident(@ident) Method called to resolve a variable identifier into a compiled form. In this case, the method fetches the corresponding constant value from its internal stash and returns it. AUTHOR
Andy Wardley <abw@wardley.org> <http://wardley.org/> COPYRIGHT
Copyright (C) 1996-2007 Andy Wardley. All Rights Reserved. This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself. SEE ALSO
Template::Directive perl v5.14.2 2011-12-20 Template::Namespace::Constants(3pm)
Man Page

4 More Discussions You Might Find Interesting

1. AIX

Problem with namespaces

Hello all, I am having a problem with the following program on AIX:- // Namespace.cxx #include <iostream> using namespace std; #include <iostream.h> int main() { // cout<<"Hello world"; return 0; } On compilation:- $ xlC Namespace.cxx... (0 Replies)
Discussion started by: gupta_ca
0 Replies

2. Shell Programming and Scripting

How to replace a word with a series of words in a file

Hi, I have a Template file 'TL.body' which says as follows: "There are no <FILENAME> files on the server. " The missing file names are identified and stored in a variable. For Eg: MISSFILE="abc.txt def.txt xyz.txt" I want the values of MISSFILE variable to be replaced against... (2 Replies)
Discussion started by: brap45
2 Replies

3. UNIX for Dummies Questions & Answers

Operation with real variables and constants

Hello there, I'd like to define a variable b equal to 0.5/a where a=0.001, so I wrote something like that: a=0.001; let 'b=0.5/$a'; but it doesn't work... maybe because the variable a has a real value??? Any help will be appreciated!!!:D (1 Reply)
Discussion started by: Giordano Bruno
1 Replies

4. Programming

how to link without using ld -rpath

Hello, I'm tryign to compile a sample code which uses OTL(Oracle, Odbc and DB2-CLI Template Library Programmer's Guide). I get this error while compiling the source file: $ g++ foo.cpp -o foo -I /tmp/ -I$ORACLE_HOME/rdbms/demo -I$ORACLE_HOME/rdbms/public -L$ORACLE_HOME/lib/ -lclntsh... (0 Replies)
Discussion started by: xyzt
0 Replies