Sponsored Content
Full Discussion: LWP module ?
Top Forums UNIX for Dummies Questions & Answers LWP module ? Post 3666 by mib on Monday 9th of July 2001 11:36:39 AM
Old 07-09-2001
#!/usr/bin/perl

use File::Find;

foreach $start (@INC) { find(\&modules, $start); }


sub modules {
if (-d && /^[a-z]/) { $File::Find:Smilierune = 1; return; }
return unless /\.pm$/;
my $filename = "$File::Find::dir/$_";
$filename =~ s!^$start/!!;
$filename =~ s!\.pm$!!;
$filename =~ s!/!::!g;
print "$filename\n";
}


 

10 More Discussions You Might Find Interesting

1. Solaris

decipher pstack with problem lwp

My company has a product that is running on JBoss on Solaris against Oracle 8.1.7. We are having an issue with the server process and high CPU utilization. During this time, and only during this time, we are experiencing database locks that will not let go. A 'ps -L' on the server process... (5 Replies)
Discussion started by: hosierdm
5 Replies

2. Shell Programming and Scripting

Help needed in Perl LWP module

Hi, I've a issue in writing a perl script that will automatically monitor the site availability. There are two different cookies are set in two consecutive flows to a URL and this second cookie has to be passed to the third step which actually gives permission to access based upon the cookie. ... (1 Reply)
Discussion started by: dayanandra
1 Replies

3. Linux

How to convert Linux Kernel built-in module into a loadable module

Hi all, I am working on USB data monitoring on Fedora Core 9. Kernel 2.6.25 has a built-in module (the one that isn't loadable, but compiles and links statically with the kernel during compilation) to snoop USB data. It is in <kernel_source_code>/drivers/usb/mon/. I need to know if I can... (0 Replies)
Discussion started by: anitemp
0 Replies

4. Shell Programming and Scripting

Login using perl LWP module

Hi, Could some one tell me how to login to any web site and get that page using perl LWP. I heard that we can login to the site using LWP. I dont want to use WWW:Mechanize as I dont have that module installed on the server. Appreciate your early response. Thanks... (8 Replies)
Discussion started by: Anjan1
8 Replies

5. Shell Programming and Scripting

authentication using LWP

Can some one tell me how to post the username and password using perl LWP. An example is sufficient.. (0 Replies)
Discussion started by: Anjan1
0 Replies

6. UNIX for Dummies Questions & Answers

LWP::Simple Problem !!

Hi All, I'm having a problem when I run the following code for example perl -e 'use LWP::Simple; getprint "http://google.com"' Can't locate LWP/Simple.pm in @INC (@INC contains: /System/Library/Perl/5.8.6/darwin-thread-multi-2level /System/Library/Perl/5.8.6... (7 Replies)
Discussion started by: pawannoel
7 Replies

7. Shell Programming and Scripting

Perl LWP user authentication

Hello all.. i am new to perl scripting.. i wanted to parse a text file, encode the parsed text and attach in url.. please point me to right resources if you know any..This is my major problem. Now i try to get a url running and save it in a text file using LWP module in perl, I used following... (0 Replies)
Discussion started by: empyrean
0 Replies

8. Shell Programming and Scripting

lwp-request examples

Hi; Can i have ne sample examples of of using " lwp-request" in shell script. Is it necessary to have perl installed already in linux box for using this; Thnks; (2 Replies)
Discussion started by: ajaypadvi
2 Replies

9. Shell Programming and Scripting

parsing a webpage - perl lwp

I am requesting for the text parsing section below. Any helps are highly appreciated. <tr valign="top"><td nowrap>Source name</td> <td style="text-align: justify">Sample Name<br></td> I want Sample Name from above. In the same file, I have to search for another pattern like this <td><a... (1 Reply)
Discussion started by: jacobs.smith
1 Replies

10. Web Development

Using LWP without hard coding password

Hi, I would like to read content from a https site. I have decided to use LWP module in perl. but it throwed 401 Authorization required error. i dont want to hard code the password in my perl code. Is there any way to achieve the authentication without hardcoding the password. Thanks,... (1 Reply)
Discussion started by: pandeesh
1 Replies
BP_BIOFETCH_GENBANK_PROXY(1p)				User Contributed Perl Documentation			     BP_BIOFETCH_GENBANK_PROXY(1p)

NAME
biofetch_genbank_proxy.pl - Caching BioFetch-compatible web proxy for GenBank SYNOPSIS
Install in cgi-bin directory of a Web server. Stand back. DESCRIPTION
This CGI script acts as the server side of the BioFetch protocol as described in http://obda.open-bio.org/Specs/. It provides two database access services, one for data source "genbank" (nucleotide entries) and the other for data source "genpep" (protein entries). This script works by forwarding its requests to NCBI's eutils script, which lives at http://www.ncbi.nlm.nih.gov/entrez/eutils/efetch.fcgi. It then reformats the output according to the BioFetch format so the sequences can be processed and returned by the Bio::DB::BioFetch module. Returned entries are temporarily cached on the Web server's file system, allowing frequently-accessed entries to be retrieved without another round trip to NCBI. INSTALLATION You must have the following installed in order to run this script: 1) perl 2) the perl modules LWP and Cache::FileCache 3) a web server (Apache recommended) To install this script, copy it into the web server's cgi-bin directory. You might want to shorten its name; "dbfetch" is recommended. There are several constants located at the top of the script that you may want to adjust. These are: CACHE_LOCATION This is the location on the filesystem where the cached files will be located. The default is /usr/tmp/dbfetch_cache. MAX_SIZE This is the maximum size that the cache can grow to. When the cache exceeds this size older entries will be deleted automatically. The default setting is 100,000,000 bytes (100 MB). EXPIRATION Entries that haven't been accessed in this length of time will be removed from the cache. The default is 1 week. PURGE This constant specifies how often the cache will be purged for older entries. The default is 1 hour. TESTING
To see if this script is performing as expected, you may test it with this script: use Bio::DB::BioFetch; my $db = Bio::DB::BioFetch->new(-baseaddress=>'http://localhost/cgi-bin/dbfetch', -format =>'genbank', -db =>'genbank'); my $seq = $db->get_Seq_by_id('DDU63596'); print $seq->seq," "; This should print out a DNA sequence. SEE ALSO
Bio::DB::BioFetch, Bio::DB::Registry AUTHOR
Lincoln Stein, <lstein-at-cshl.org> Copyright (c) 2003 Cold Spring Harbor Laboratory This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See DISCLAIMER.txt for disclaimers of warranty. perl v5.14.2 2012-03-02 BP_BIOFETCH_GENBANK_PROXY(1p)
All times are GMT -4. The time now is 09:30 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy