Sponsored Content
Operating Systems HP-UX Where are SAM user templates stored? Post 302128221 by paqman on Monday 23rd of July 2007 12:31:06 PM
Old 07-23-2007
Ok, new question...

Alright, I've just learned that this little file is actually a perl script that contains a subroutine for each template, setting the parameters for the template in each subroutine.

So how do I call this file, and access the variables in these subroutines in my shell script?
 

8 More Discussions You Might Find Interesting

1. Programming

site templates?

Are there any web site templates on CGI that allow like this forum software user registration and profiles. I dont need forum software i just need to register and keep profiles of my users on my site. Any suggestions? :confused: Thank you all. (1 Reply)
Discussion started by: solvman
1 Replies

2. Post Here to Contact Site Administrators and Moderators

Templates

Hello, Anybody in here has any idea where I can get a template like this one for vBulletin. I have actually got my board but it just doesn't look good in the template that I have! Thanks anyway! him (2 Replies)
Discussion started by: him
2 Replies

3. HP-UX

Adding user to a group without SAM

How can I add a user to a specific group without using SAM? I know I can user modprpw -G, but that will overwrite any groups the user is in with the ones I specify. I need to assume that I do not know what groups the user is already in, so I can't put them in the modprpw command. I just need... (2 Replies)
Discussion started by: paqman
2 Replies

4. HP-UX

How to reactivate user with command(no SAM)

How to reactivate any users (root or non root) by command(no SAM) HP-UX 11.11 (7 Replies)
Discussion started by: arm_naja
7 Replies

5. Shell Programming and Scripting

Reading from Templates

I am trying to write a script that would retrieve specific information from a template. I have been trying to no avail for the longest. This is what I wrote and it's not working. cat filename | while read F5 F6 do if ] then echo $F5 $F6 fi done Here is the template (filename) CN ... (7 Replies)
Discussion started by: Ernst
7 Replies

6. Shell Programming and Scripting

Home of user that is stored in var

I have a user name that is stored in variable $i and i want to use that user's home dirctor in case command something like this find ~"$i" |while read p do case "$p" in ( ~"$i"/myDir ) echo "$p" ;; (*) esac done but it doesn't work some help please (7 Replies)
Discussion started by: testman84
7 Replies

7. Programming

C++ templates

I have the following template codes but some normal functions too and want to group them together. I usually put the implementation of templates in an .ipp file. What would be a good scheme for the normal functions. Put their implementations in a .cpp file, or leave them in the .ipp file? ... (3 Replies)
Discussion started by: kristinu
3 Replies

8. HP-UX

Display SAM user list at the command line

Hello, I've been doing Linux and AIX administration for years, but I'm very new to HPUX. We have an old audit process which involves someone manually using sam to generate user lists. I'd like to kill that old process with fire... But... After working a bit in the morning to try and pull... (3 Replies)
Discussion started by: Celt1977
3 Replies
Template::Document(3)					User Contributed Perl Documentation				     Template::Document(3)

NAME
Template::Document - Compiled template document object SYNOPSIS
use Template::Document; $doc = Template::Document->new({ BLOCK => sub { # some perl code; return $some_text }, DEFBLOCKS => { header => sub { # more perl code; return $some_text }, footer => sub { # blah blah blah; return $some_text }, }, METADATA => { author => 'Andy Wardley', version => 3.14, } }) || die $Template::Document::ERROR; print $doc->process($context); DESCRIPTION
This module defines an object class whose instances represent compiled template documents. The Template::Parser module creates a "Template::Document" instance to encapsulate a template as it is compiled into Perl code. The constructor method, new(), expects a reference to a hash array containing the "BLOCK", "DEFBLOCKS" and "METADATA" items. The "BLOCK" item should contain a reference to a Perl subroutine or a textual representation of Perl code, as generated by the Template::Parser module. This is then evaluated into a subroutine reference using "eval()". The "DEFLOCKS" item should reference a hash array containing further named "BLOCK"s which may be defined in the template. The keys represent "BLOCK" names and the values should be subroutine references or text strings of Perl code as per the main "BLOCK" item. The "METADATA" item should reference a hash array of metadata items relevant to the document. The process() method can then be called on the instantiated "Template::Document" object, passing a reference to a Template::Context object as the first parameter. This will install any locally defined blocks ("DEFBLOCKS") in the "BLOCKS" cache in the context (via a call to visit()) so that they may be subsequently resolved by the context. The main "BLOCK" subroutine is then executed, passing the context reference on as a parameter. The text returned from the template subroutine is then returned by the process() method, after calling the context leave() method to permit cleanup and de-registration of named "BLOCKS" previously installed. An "AUTOLOAD" method provides access to the "METADATA" items for the document. The Template::Service module installs a reference to the main "Template::Document" object in the stash as the "template" variable. This allows metadata items to be accessed from within templates, including "PRE_PROCESS" templates. header: <html> <head> <title>[% template.title %] </head> ... "Template::Document" objects are usually created by the Template::Parser but can be manually instantiated or sub-classed to provide custom template components. METHODS
new(\%config) Constructor method which accept a reference to a hash array containing the structure as shown in this example: $doc = Template::Document->new({ BLOCK => sub { # some perl code; return $some_text }, DEFBLOCKS => { header => sub { # more perl code; return $some_text }, footer => sub { # blah blah blah; return $some_text }, }, METADATA => { author => 'Andy Wardley', version => 3.14, } }) || die $Template::Document::ERROR; "BLOCK" and "DEFBLOCKS" items may be expressed as references to Perl subroutines or as text strings containing Perl subroutine definitions, as is generated by the Template::Parser module. These are evaluated into subroutine references using "eval()". Returns a new "Template::Document" object or "undef" on error. The error() class method can be called, or the $ERROR package variable inspected to retrieve the relevant error message. process($context) Main processing routine for the compiled template document. A reference to a Template::Context object should be passed as the first parameter. The method installs any locally defined blocks via a call to the context visit() method, processes its own template, (passing the context reference as a parameter) and then calls leave() in the context to allow cleanup. print $doc->process($context); Returns a text string representing the generated output for the template. Errors are thrown via "die()". block() Returns a reference to the main "BLOCK" subroutine. blocks() Returns a reference to the hash array of named "DEFBLOCKS" subroutines. AUTOLOAD An autoload method returns "METADATA" items. print $doc->author(); PACKAGE SUB-ROUTINES write_perl_file(\%config) This package subroutine is provided to effect persistence of compiled templates. If the "COMPILE_EXT" option (to indicate a file extension for saving compiled templates) then the Template::Parser module calls this subroutine before calling the new() constructor. At this stage, the parser has a representation of the template as text strings containing Perl code. We can write that to a file, enclosed in a small wrapper which will allow us to susequently "require()" the file and have Perl parse and compile it into a "Template::Document". Thus we have persistence of compiled templates. 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, Template::Parser perl v5.12.1 2009-06-17 Template::Document(3)
All times are GMT -4. The time now is 04:20 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy