Sponsored Content
Full Discussion: Installing EXPECT on unix
Top Forums Programming Installing EXPECT on unix Post 302326212 by fpmurphy on Wednesday 17th of June 2009 10:29:01 AM
Old 06-17-2009
What sort of errors is make throwing? Can you provide some examples?
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

installing Unix

Hi all, I just joined this forum and I have tons and tons of questions! Lets start with first one, how to install unix (on laptop)? I bought this book (Unix System Administrator's Bible) and got a CD (Full distribution copy of FreeBSD 2.2.5); and it is all compressed (I got that... (4 Replies)
Discussion started by: nchauhan
4 Replies

2. Shell Programming and Scripting

Installing expect

Hi, I have solaris 8 installed in my intel machine.(pentium 4).I'am planning to learn expect.Can somebody help me in giving relevant sites for that.I beleive we have to install TCL also for expect.Can somebody throw light on installations of both TCL & expect? thanx in advance, raj. (1 Reply)
Discussion started by: sounder123
1 Replies

3. UNIX for Dummies Questions & Answers

Installing unix.

Hi, I want to go and learn unix, I order to achieve this task I need to install unix on my machine. I am currently using a Dell Inspiron 6000, which is about a year and a half old. Currently I have 20GB of free space. It has been recommended to me that I simply partition my hard drive... (9 Replies)
Discussion started by: Mike55
9 Replies

4. UNIX for Dummies Questions & Answers

installing unix

hey, i downloaded a version of unix just recently in three files about a gig a piece in size. the website told me to merge the three files into one iso file...i did that using the xtra wizard on alchohol 120%. i tried to boot it from the virtual drive, but all it does is open a window that shows... (2 Replies)
Discussion started by: retrop_ffilc
2 Replies

5. UNIX for Dummies Questions & Answers

Installing Unix

Hello, I am a compete beginner to Unix, I have a very old HP 9000 class D server and i am trying to install HP-UX 11i on it, when i insert the cd into the cd drive on the Server and boot it up it does not automatically boot into the install of Unix. I have tried letting the Server boot... (1 Reply)
Discussion started by: eoghanlee
1 Replies

6. UNIX for Dummies Questions & Answers

Need help Installing UNIX

I have a dual boot - XP and Solaris 10 on my Intel Box. Since quite sometime now, I have been trying to get a driver for the Network card on my box so that I can connect to the Web through Solaris; but Solaris does not have a generic driver for my Gigabit Ethernet 10.100.1000 T-base card. As a... (1 Reply)
Discussion started by: tubbyrana
1 Replies

7. Shell Programming and Scripting

problems installing expect utilty

Hi all, I am trying to install expect utility on RHEL 5. It is showing that we also need to install tcl also in order to run it. I have downloaded expect from Tucows Tucows Download - Download Expect 5.32.1 and tcl from SourceForge.net: Downloading ... Can someone please tell me... (5 Replies)
Discussion started by: vikas027
5 Replies

8. Red Hat

How to install expect after installing tcl on Redhat Linux

Hi, I have install tcl and then expect but I am getting below ouput while trying which expect which expect /usr/bin/which: no expect in (/usr/kerberos/sbin:/usr/kerberos/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/X11R6/bin:/root/bin) I have copied both in... (6 Replies)
Discussion started by: manish_1678
6 Replies

9. Shell Programming and Scripting

How to use expect and send command in UNIX/Linux?

Hello Everyone, I am executing a unix script which logs into 50+ servers (netapp servers) and runs some commands and captures output locally. Below is the code snippet. file1.txt has names of all the remote servers where I am logging in. #!/bin/ksh #!/usr/bin/expect touch... (1 Reply)
Discussion started by: rahul2662
1 Replies

10. Red Hat

Issue in installing expect and Tcl

Hi I need to install expect in redhat. through net I came to know that I must install tcl too in order to make expect work. I have downloaded both packages but not able to install # ls -lrt total 3720 18:33 tcl8.4.20-src.tar.gz 18:33 expect5.45.3.tar.gz 18:40 expect5.45.3... (7 Replies)
Discussion started by: scriptor
7 Replies
Pod::POM::Node(3)					User Contributed Perl Documentation					 Pod::POM::Node(3)

NAME
Pod::POM::Node - base class for a POM node SYNOPSIS
package Pod::POM::Node::Over; use base qw( Pod::POM::Node ); use vars qw( %ATTRIBS @ACCEPT $EXPECT $ERROR ); %ATTRIBS = ( indent => 4 ); @ACCEPT = qw( over item begin for text verbatim ); $EXPECT = q( back ); package main; my $list = Pod::POM::Node::Over->new(8); $list->add('item', 'First Item'); $list->add('item', 'Second Item'); ... DESCRIPTION
This documentation describes the inner workings of the Pod::POM::Node module and gives a brief overview of the relationship between it and its derived classes. It is intended more as a guide to the internals for interested hackers than as general user documentation. See Pod::POM for information on using the modules. This module implements a base class node which is subclassed to represent different elements within a Pod Object Model. package Pod::POM::Node::Over; use base qw( Pod::POM::Node ); The base class implements the new() constructor method to instantiate new node objects. my $list = Pod::POM::Node::Over->new(); The characteristics of a node can be specified by defining certain variables in the derived class package. The %ATTRIBS hash can be used to denote attributes that the node should accept. In the case of an "=over" node, for example, an "indent" attribute can be specified which otherwise defaults to 4. package Pod::POM::Node::Over; use base qw( Pod::POM::Node ); use vars qw( %ATTRIBS $ERROR ); %ATTRIBS = ( indent => 4 ); The new() method will now expect an argument to set the indent value, or will use 4 as the default if no argument is provided. my $list = Pod::POM::Node::Over->new(8); # indent: 8 my $list = Pod::POM::Node::Over->new( ); # indent: 4 If the default value is undefined then the argument is mandatory. package Pod::POM::Node::Head1; use base qw( Pod::POM::Node ); use vars qw( %ATTRIBS $ERROR ); %ATTRIBS = ( title => undef ); package main; my $head = Pod::POM::Node::Head1->new('My Title'); If a mandatory argument isn't provided then the constructor will return undef to indicate failure. The $ERROR variable in the derived class package is set to contain a string of the form "$type expected a $attribute". # dies with error: "head1 expected a title" my $head = Pod::POM::Node::Head1->new() || die $Pod::POM::Node::Head1::ERROR; For convenience, the error() subroutine can be called as a class method to retrieve this value. my $type = 'Pod::POM::Node::Head1'; my $head = $type->new() || die $type->error(); The @ACCEPT package variable can be used to indicate the node types that are permitted as children of a node. package Pod::POM::Node::Head1; use base qw( Pod::POM::Node ); use vars qw( %ATTRIBS @ACCEPT $ERROR ); %ATTRIBS = ( title => undef ); @ACCEPT = qw( head2 over begin for text verbatim ); The add() method can then be called against a node to add a new child node as part of its content. $head->add('over', 8); The first argument indicates the node type. The @ACCEPT list is examined to ensure that the child node type is acceptable for the parent node. If valid, the constructor for the relevant child node class is called passing any remaining arguments as attributes. The new node is then returned. my $list = $head->add('over', 8); The error() method can be called against the parent node to retrieve any constructor error generated by the child node. my $list = $head->add('over', 8); die $head->error() unless defined $list; If the child node is not acceptable to the parent then the add() method returns one of the constants IGNORE, REDUCE or REJECT, as defined in Pod::POM::Constants. These return values are used by the Pod::POM parser module to implement a simple shift/reduce parser. In the most common case, IGNORE is returned to indicate that the parent node doesn't know anything about the new child node. The parser uses this as an indication that it should back up through the parse stack until it finds a node which will accept this child node. Through this mechanism, the parser is able to implicitly terminate certain POD blocks. For example, a list item initiated by a "=item" tag will not accept another "=item" tag, but will instead return IGNORE. The parser will back out until it finds the enclosing "=over" node which will accept it. Thus, a new "=item" implicitly terminates any previous "=item". The $EXPECT package variable can be used to indicate a node type which a parent expects to terminate itself. An "=over" node, for example, should always be terminated by a matching "=back". When such a match is made, the add() method returns REDUCE to indicate successful termination. package Pod::POM::Node::Over; use base qw( Pod::POM::Node ); use vars qw( %ATTRIBS @ACCEPT $EXPECT $ERROR ); %ATTRIBS = ( indent => 4 ); @ACCEPT = qw( over item begin for text verbatim ); $EXPECT = q( back ); package main; my $list = Pod::POM::Node::Over->new(); my $item = $list->add('item'); $list->add('back'); # returns REDUCE If a child node isn't specified in the @ACCEPT list or doesn't match any $EXPECT specified then REJECT is returned. The parent node sets an internal error of the form "$type expected a terminating $expect". The parser uses this to detect missing POD tags. In nearly all cases the parser is smart enough to fix the incorrect structure and downgrades any errors to warnings. # dies with error 'over expected terminating back' ref $list->add('head1', 'My Title') # returns REJECT || die $list->error(); Each node contains a 'type' field which contains a simple string indicating the node type, e.g. 'head1', 'over', etc. The $NODES and $NAMES package variables (in the base class) reference hash arrays which map these names to and from package names (e.g. head1 <=> Pod::POM::Node::Head1). print $list->{ type }; # 'over' An AUTOLOAD method is provided to access to such internal items for those who don't like violating an object's encapsulation. print $list->type(); Nodes also contain a 'content' list, blessed into the Pod::POM::Node::Content class, which contains the content (child elements) for the node. The AUTOLOAD method returns this as a list reference or as a list of items depending on the context in which it is called. my $items = $list->content(); my @items = $list->content(); Each node also contains a content list for each individual child node type that it may accept. my @items = $list->item(); my @text = $list->text(); my @vtext = $list->verbatim(); The present() method is used to present a node through a particular view. This simply maps the node type to a method which is then called against the view object. This is known as 'double dispatch'. my $view = 'Pod::POM::View::HTML'; print $list->present($view); The method name is constructed from the node type prefixed by 'view_'. Thus the following are roughly equivalent. $list->present($view); $view->view_list($list); The benefit of the former over the latter is, of course, that the caller doesn't need to know or determine the type of the node. The node itself is in the best position to determine what type it is. AUTHOR
Andy Wardley <abw@kfs.org> COPYRIGHT
Copyright (C) 2000, 2001 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
Consult Pod::POM for a general overview and examples of use. perl v5.12.1 2009-03-20 Pod::POM::Node(3)
All times are GMT -4. The time now is 09:08 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy