Sponsored Content
Full Discussion: Automating CPAN on FreeBSD
Top Forums Shell Programming and Scripting Automating CPAN on FreeBSD Post 302307483 by figaro on Wednesday 15th of April 2009 01:22:20 PM
Old 04-15-2009
Thank you for your response. The bit that I have added to the line will make a line look as follows:
Code:
PERL_MM_USE_DEFAULT=1 perl -MCPAN -e "install Term::ReadLine::Gnu"

Problematically, this will bring the script in an endless loop requesting the user to select a geographical location of the CPAN server, without the possibility for the user to provide any answer.
 

9 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

CYGWIN/CPAN install of Expect.pm

I am attempting to install a Perl Expect module via the CPAN . CPAN goes through the process but nothing happens, sample perl scripts can not find the Expect Module. CPAN was configured via the Default process " Are you ready for manual configuration? " answered "no". CPAN install seemed to find... (1 Reply)
Discussion started by: white222
1 Replies

2. Shell Programming and Scripting

CPAN: using only wget to d/l modules?

Is there a way to tell CPAN not to use Net::Ftp and the ftp binary? I want to only use wget to download perl modules. (2 Replies)
Discussion started by: dangral
2 Replies

3. Programming

Application crashes in FreeBSD 7.1 while working ok in FreeBSD 6.3

Hello there, My mulithreaded application (which is too large to represent the source code here) is crashing after installing FreeBSD 7.1-RELEASE/amd64. It worked properly on others machines (Dual Cores with 4GB of RAM - FreeBSD 6.2-RELEASE/i386). The current machine has 2x Core 2 Duo... (1 Reply)
Discussion started by: Seenquev
1 Replies

4. Shell Programming and Scripting

Error while trying to install from CPAN

Hi i was trying to install Text::CSV from cpan... it seemed to have downloaded everythign properly but was not able to run the make file... do u have any idea as to why this happened?? Install: ============================= If you install Text::CSV_XS v.0.70, it makes Text::CSV faster. ... (5 Replies)
Discussion started by: VGR
5 Replies

5. Shell Programming and Scripting

Building my own CPAN repository

Hi there , im not sure whether im in the right section, but because im talking about perl, i guess this is the right place :-) I have a whole host (thousands in fact) of Solaris machines that are running different versions of perl with different module sets etc. I wanted to know whether it... (6 Replies)
Discussion started by: rethink
6 Replies

6. UNIX for Dummies Questions & Answers

Problem to upgrade CPAN

Hi all, Since yesterday, I'm trying to upgrade CPAN on my Synology sevrer, because I have the next message in CPAN shell : cpan> install cpan CPAN: Storable loaded ok Going to read /root/.cpan/Metadata Going to read /root/.cpan/sources/authors/01mailrc.txt.gz CPAN: Compress::Zlib... (2 Replies)
Discussion started by: mikael2235
2 Replies

7. Shell Programming and Scripting

cpan installation

Hi All, I need to install perl module using cpan, so befor that i checked cpan is installed or not . i tried , and got below output.but it is not clear to me. can u plz explain me. I dont know what the exactly cpan is useful. and in below why it is trying to create directory. $ cpan... (2 Replies)
Discussion started by: aish11
2 Replies

8. Shell Programming and Scripting

Unable to install module using cpan

Hi, I am unable to install module using cpan. It says 407 Proxy Authentication Required I did setup proxy server and given username and password in .bashrc file and apt.conf file. export http_proxy=http://username:password@proxyserver:portno/ However, still unable to install... (1 Reply)
Discussion started by: Anjan1
1 Replies

9. UNIX for Dummies Questions & Answers

How to install CPAN without using yum on Linux?

Hi all, I am on Linux box where CPAN is not working for downloading any perl modules. When I try "perl -MCPAN -e shell" as root as well as a user, I get following error: Can't locate CPAN.pm in @INC (@INC contains: /usr/local/lib64/perl5 /usr/local/share/perl5 /usr/lib64/perl5/vendor_perl... (2 Replies)
Discussion started by: pat_pramod
2 Replies
Term::ReadLine(3pm)					 Perl Programmers Reference Guide				       Term::ReadLine(3pm)

NAME
Term::ReadLine - Perl interface to various "readline" packages. If no real package is found, substitutes stubs instead of basic functions. SYNOPSIS
use Term::ReadLine; my $term = Term::ReadLine->new('Simple Perl calc'); my $prompt = "Enter your arithmetic expression: "; my $OUT = $term->OUT || *STDOUT; while ( defined ($_ = $term->readline($prompt)) ) { my $res = eval($_); warn $@ if $@; print $OUT $res, " " unless $@; $term->addhistory($_) if /S/; } DESCRIPTION
This package is just a front end to some other packages. It's a stub to set up a common interface to the various ReadLine implementations found on CPAN (under the "Term::ReadLine::*" namespace). Minimal set of supported functions All the supported functions should be called as methods, i.e., either as $term = Term::ReadLine->new('name'); or as $term->addhistory('row'); where $term is a return value of Term::ReadLine->new(). "ReadLine" returns the actual package that executes the commands. Among possible values are "Term::ReadLine::Gnu", "Term::ReadLine::Perl", "Term::ReadLine::Stub". "new" returns the handle for subsequent calls to following functions. Argument is the name of the application. Optionally can be followed by two arguments for "IN" and "OUT" filehandles. These arguments should be globs. "readline" gets an input line, possibly with actual "readline" support. Trailing newline is removed. Returns "undef" on "EOF". "addhistory" adds the line to the history of input, from where it can be used if the actual "readline" is present. "IN", "OUT" return the filehandles for input and output or "undef" if "readline" input and output cannot be used for Perl. "MinLine" If argument is specified, it is an advice on minimal size of line to be included into history. "undef" means do not include anything into history. Returns the old value. "findConsole" returns an array with two strings that give most appropriate names for files for input and output using conventions "<$in", ">out". Attribs returns a reference to a hash which describes internal configuration of the package. Names of keys in this hash conform to standard conventions with the leading "rl_" stripped. "Features" Returns a reference to a hash with keys being features present in current implementation. Several optional features are used in the minimal interface: "appname" should be present if the first argument to "new" is recognized, and "minline" should be present if "MinLine" method is not dummy. "autohistory" should be present if lines are put into history automatically (maybe subject to "MinLine"), and "addhistory" if "addhistory" method is not dummy. If "Features" method reports a feature "attribs" as present, the method "Attribs" is not dummy. Additional supported functions Actually "Term::ReadLine" can use some other package, that will support a richer set of commands. All these commands are callable via method interface and have names which conform to standard conventions with the leading "rl_" stripped. The stub package included with the perl distribution allows some additional methods: "tkRunning" makes Tk event loop run when waiting for user input (i.e., during "readline" method). "event_loop" Registers call-backs to wait for user input (i.e., during "readline" method). This supersedes tkRunning. The first call-back registered is the call back for waiting. It is expected that the callback will call the current event loop until there is something waiting to get on the input filehandle. The parameter passed in is the return value of the second call back. The second call-back registered is the call back for registration. The input filehandle (often STDIN, but not necessarily) will be passed in. For example, with AnyEvent: $term->event_loop(sub { my $data = shift; $data->[1] = AE::cv(); $data->[1]->recv(); }, sub { my $fh = shift; my $data = []; $data->[0] = AE::io($fh, 0, sub { $data->[1]->send() }); $data; }); The second call-back is optional if the call back is registered prior to the call to $term->readline. Deregistration is done in this case by calling event_loop with "undef" as its parameter: $term->event_loop(undef); This will cause the data array ref to be removed, allowing normal garbage collection to clean it up. With AnyEvent, that will cause $data->[0] to be cleaned up, and AnyEvent will automatically cancel the watcher at that time. If another loop requires more than that to clean up a file watcher, that will be up to the caller to handle. "ornaments" makes the command line stand out by using termcap data. The argument to "ornaments" should be 0, 1, or a string of a form "aa,bb,cc,dd". Four components of this string should be names of terminal capacities, first two will be issued to make the prompt standout, last two to make the input line standout. "newTTY" takes two arguments which are input filehandle and output filehandle. Switches to use these filehandles. One can check whether the currently loaded ReadLine package supports these methods by checking for corresponding "Features". EXPORTS
None ENVIRONMENT
The environment variable "PERL_RL" governs which ReadLine clone is loaded. If the value is false, a dummy interface is used. If the value is true, it should be tail of the name of the package to use, such as "Perl" or "Gnu". As a special case, if the value of this variable is space-separated, the tail might be used to disable the ornaments by setting the tail to be "o=0" or "ornaments=0". The head should be as described above, say If the variable is not set, or if the head of space-separated list is empty, the best available package is loaded. export "PERL_RL=Perl o=0" # Use Perl ReadLine sans ornaments export "PERL_RL= o=0" # Use best available ReadLine sans ornaments (Note that processing of "PERL_RL" for ornaments is in the discretion of the particular used "Term::ReadLine::*" package). perl v5.18.2 2014-01-06 Term::ReadLine(3pm)
All times are GMT -4. The time now is 04:24 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy