[18410] in Perl-Users-Digest
Perl-Users Digest, Issue: 578 Volume: 10
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Wed Mar 28 14:07:33 2001
Date: Wed, 28 Mar 2001 11:06:17 -0800 (PST)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Message-Id: <985806376-v10-i578@ruby.oce.orst.edu>
Content-Type: text
Perl-Users Digest Wed, 28 Mar 2001 Volume: 10 Number: 578
Today's topics:
Re: a funny question (Philip Lees)
Re: acceccing files on localhost ? <kellyboy@nospanner>
Re: acceccing files on localhost ? <bart.lateur@skynet.be>
Re: Better way to Flushing STDOUT? (Anno Siegel)
Re: Better way to Flushing STDOUT? nobull@mail.com
Re: Better way to Flushing STDOUT? <iltzu@sci.invalid>
Bijeenkomst Amsterdam Perl Mongers, Dinsdag 3 april 200 (Johan Vromans)
broken pipe error on server <markus.pinkert@ens-office.de>
Calling an external console application <gianluca.fracasso@csp.it>
Re: can @ENV be reset in the script? <cpryce@pryce.net>
Capturing POD output <steve_woolet@us.ibm.com>
Re: CGI Newsreader? (Murray Peterson)
Re: CGI Newsreader? (Randal L. Schwartz)
CGI::Fast - raw access to POST data <koehrer@arcormail.de>
Re: Check if process is running under cron <gtoomey@usa.net>
Checkbox disabled <carllindsay1978@nospam.hotmail.com>
Re: Checkbox disabled (Rafael Garcia-Suarez)
Re: Checking for two end line symbols with regex <ronald.fischer.gp@icn.siemens.de>
CPAN problem <tedfitz@mindspring.com>
Createing a program distribution CD-Rom? obscuremu@riftsmux.dhs.org
date handling? (e)
Re: date handling? <ddunham@redwood.taos.com>
Re: E euro sign how to (Villy Kruse)
Re: E euro sign how to <bart.lateur@skynet.be>
Re: E euro sign how to <pne-news-20010328@newton.digitalspace.net>
Re: editing function output before assignment to a vari <kirsch@kodak.com>
Digest Administrivia (Last modified: 16 Sep 99) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Wed, 28 Mar 2001 09:22:06 GMT
From: pjlees@ics.forthcomingevents.gr (Philip Lees)
Subject: Re: a funny question
Message-Id: <3ac1ac25.72014641@news.grnet.gr>
On Tue, 27 Mar 2001 11:21:30 +0200, "CutMaster"
<cutmaster@fearlesss.com> wrote:
>I'm not a good developer in Perl, but I'm working with a guy that says he's
>the best ;))
>I want you to help me to give him a challenge : decrypt a big line.
This sounds like cruel and unusual punishment, but ...
$_='Java sucks but';for(map{[split//]}split){for(@$_){print}
print' ';print'perl is good!'if$#$_<3}
Will this do?
Phil
--
@x=split//,'Just another Perl decoder,';split//,'*'x@x;%i=split/=/,
'AA=a=aa= =1=,';for$i(0..$#x){$_[$i]=chr($=+5);while($_[$i]ne$x[$i])
{$_[$i]=$i{$_[$i]}if$i{++$_[$i]};print@_,"\r";while(rand!=rand){}}}
Ignore coming events if you wish to send me e-mail
------------------------------
Date: Tue, 27 Mar 2001 21:26:10 -0600
From: "kellyboy" <kellyboy@nospanner>
Subject: Re: acceccing files on localhost ?
Message-Id: <tc2m9fq4om33df@corp.supernews.com>
> >thats is the question...can I access file on the machine in spite of what
> >directory are configured in the 'Alias' directive of 'httpd.conf'
>
> I don't fully understand your problem. Note that a browser works using
> URL's, so if you want to emit a HTML page using a CGI script containing
> a link to an image, that link must be a valid URL for the file. But you
> won't be able to stop people from accessing a file through other means.
>
> But if you want a CGI script that locally reads an image file and sends
> it to the browser, then your script must use the filesystem conventions
> for identifying the file, and your script (or rather, the user it is
> running under) must have read access to that directory and that file.
> The file needn't be accessible through an URL. But basically, this one
> script can't do much else than just sending this one file.
The latter is what I intended to do.
I've now come to the understanding that apache server *think* in term of
'url' like http:/kelly/<various pathname as defined in httpd.conf>, not in
term of filesystem (on my linux box) like /usr/local/bin,/home/user, /bin,
etc.
So when I request file...web server act as a user with 'nobody' permission
fetch the docs, but if file requested is script in /cgi-bin/ then they
execute it as 'nobody'.
now, is that why I'm having difficulty? The script need to perform action
that goes outside of url's path into filesystem, trying to retrieve files
that 'nobody' has no permission to .
Is this the reason why Im having difficulty?
I wanted to browse the filesystem on linuxbox, (displaying image if that
directory has it) from win98. and Im the only person using this home network
and Im firewalled so security is not an issue for me.
But Im going to give myself time, learn more, and maybe by then I will have
a perfect solution to it. I seem need to learn more about apache permission
thing.
kellyboy
.
------------------------------
Date: Wed, 28 Mar 2001 03:43:15 GMT
From: Bart Lateur <bart.lateur@skynet.be>
Subject: Re: acceccing files on localhost ?
Message-Id: <can2ctk80vef1lbio09q7thpqkiitf0omq@4ax.com>
kellyboy wrote:
>The script need to perform action
>that goes outside of url's path into filesystem, trying to retrieve files
>that 'nobody' has no permission to .
>
>Is this the reason why Im having difficulty?
Yes. You'd even have that difficulty if the directory still was
accessible through the web (i.e. with a valid URL that points to it).
That is not relevant at all (so why do I bring it up? ;-). It's just a
matter of file permissions. Make the directory and the files readable by
"everybody", and it can work.
Or, you need a setuid script, but that is a security problem. The system
may even refuse cooperation.
--
Bart.
------------------------------
Date: 28 Mar 2001 09:18:09 GMT
From: anno4000@lublin.zrz.tu-berlin.de (Anno Siegel)
Subject: Re: Better way to Flushing STDOUT?
Message-Id: <99sa8h$edv$1@mamenchi.zrz.TU-Berlin.DE>
According to Hon-Chi Ng <donotreply@interbulletin.bogus>:
> Hi
>
> I would like to flush any buffered output in STDOUT at a given point in my
> Perl script, is
>
> $old_autoflush = $|; $| = 1; print ""; $| = $old_autoflush;
>
> the only way?
More or less, yes. See below.
> What about
>
> close STDOUT;
>
> ? Will it flush STDOUT? What happens when I send output to STDOUT after it?
It will flush alright, but of course you can't write to STDOUT until
you open it again (in append mode, presumably). But closing and
re-opening file just to flush buffers is wasteful.
> As explained in "perldoc perlvar", Perl will typically line buffer STDOUT if
> output is to the terminal. But, I would also like to be able redirect
> output to STDOUT to file in command-line using Unix redirection for logging
> purpose, and use "tail -f" to check the output.
>
> I prefer not to turn $| on permanently, since it is unnecessary, and I'm not
> using STDOUT directly.
Why don't you want to leave it on? When you aren't using STDOUT (much)
it won't hurt (much). The only reason to switch it off would be if
you produce mass output on STDOUT in relatively small portions. Then
a lot of extra flushing would occur. Otherwise just switch it on once
(localize $| it if you aren't doing this in the main program), and
that's it.
[...]
Anno
------------------------------
Date: 28 Mar 2001 17:51:36 +0100
From: nobull@mail.com
Subject: Re: Better way to Flushing STDOUT?
Message-Id: <u9oful6dlz.fsf@wcl-l.bham.ac.uk>
Hon-Chi Ng <donotreply@interbulletin.bogus> writes:
> I would like to flush any buffered output in STDOUT at a given point in my
> Perl script, is
>
> $old_autoflush = $|; $| = 1; print ""; $| = $old_autoflush;
>
> the only way?
Yes.
You can, of course, define your own subroutine do that.
You are not the first person to need this so it is no supprise that
you can also find this subroutine in the standard Perl IO::* modules.
use IO::Handle;
flush STDOUT; # or STDOUT->flush;
> What about
>
> close STDOUT;
>
> ? Will it flush STDOUT?#
Yes.
> What happens when I send output to STDOUT after it?
Nothing, the output is discarded. If you bother to check the return
value from print() you'll find it failed but most people don't bother
to check the return value from print.
> To clarify my objective, here is the portion of my Perl script.
>
> if ( $output_file ) {
> open OUT_FH, ">$output_file"
> or die "Can't open output file '$output_file': $!!";
> $out_fh = \*OUT_FH;
> }
BTW, in Perl 5.6 this is more simply written as:
if ( $output_file ) {
open $out_fh, ">$output_file"
or die "Can't open output file '$output_file': $!!";
}
--
\\ ( )
. _\\__[oo
.__/ \\ /\@
. l___\\
# ll l\\
###LL LL\\
------------------------------
Date: 28 Mar 2001 18:43:01 GMT
From: Ilmari Karonen <iltzu@sci.invalid>
Subject: Re: Better way to Flushing STDOUT?
Message-Id: <985804832.15344@itz.pp.sci.fi>
In article <3AC0F6FC.48D60A15@interbulletin.com>, Hon-Chi Ng wrote:
>
>I would like to flush any buffered output in STDOUT at a given point in my
>Perl script, is
>
> $old_autoflush = $|; $| = 1; print ""; $| = $old_autoflush;
{local $| = 1}
--
Ilmari Karonen - http://www.sci.fi/~iltzu/
Please ignore Godzilla / Kira -- do not feed the troll.
------------------------------
Date: 27 Mar 2001 17:48:02 +0200
From: JVromans@Squirrel.nl (Johan Vromans)
Subject: Bijeenkomst Amsterdam Perl Mongers, Dinsdag 3 april 2001
Message-Id: <m2d7b31adp.fsf@phoenix.squirrel.nl>
[English version follows the dutch text]
Amsterdam.pm staat voor de "Amsterdamse Perl Mongers", een groep van
gebruikers van Perl. In tegenstelling tot wat de naam suggereert is
Amsterdam.pm niet beperkt tot alleen Amsterdam, maar functioneert, tot
er meer gebruikersgroepen in Nederland zijn, als Nederlandse
gebruikersgroep.
Amsterdam.pm organiseert informele bijeenkomsten waar Perl gebruikers
kunnen samenkomen en informatie en gebruikservaringen met betrekking
tot Perl kunnen uitwisselen. Deze bijeenkomsten vinden normaliter
plaats op elke eerste dinsdag van de maand. De voertaal binnen
Amsterdam.pm is in pricipe Nederlands, maar indien nodig zal Engels
worden gebruikt, b.v. om te communiceren met niet-Nederlandssprekende
aanwezigen.
De eerstvolgende bijeenkomst vindt plaats op dinsdag 3 april 2001 van
20:00 tot 22:00 uur op het kantoor van RIPE NCC, Singel 258, 1016 AB
Amsterdam. Deze bijeenkomst onder meer:
- voortgang werkgroepen
- een presentatie met en over Portable Presenter
- en een heleboel Perl gezelligheid
Voor meer details, waaronder een routebeschrijving, zie
http://www.amsterdam.pm.org/Meetings/next_meeting.html
Liefhebbers van een etentje vooraf kunnen tussen 17:45 en 18:15
verzamelen bij Café/Restaurant "Meneer Pannenkoek", Raadhuisstraat 6hs
(tegenover het kantoor van RIPE, op de hoek Singel en Raadhuisstraat,
vlak bij de Magna Plaza). Om 18:15 (écht om 18:15!) zoeken we een
restaurantje in de buurt om een hapje te eten.
Bezoek onze Web site http://www.Amsterdam.pm.org voor meer details.
[English version]
Amsterdam.pm stands for the Amsterdam Perl Mongers. We're basically a
Perl user group. Despite its name, it is not local to the Amsterdam
environment, but it welcomes Perl mongers from all over the
Netherlands.
Amsterdam.pm organises informal meetings where Perl users can meet,
and exchange information and experiences with regard to using Perl.
The meetings are normally held every first Tuesday of the month.
Although the preferred language for communication is Dutch, English
will be spoken if necessary.
Our next meeting is Tuesday April 3rd, from 20:00 till 22:00 at the
the office of RIPE NCC, Singel 258, 1016 AB Amsterdam. This meeting
will have:
- progress working groups
- a lecture about and with Portable Presenter
- and lots of Perl fun
See http://www.amsterdam.pm.org/Meetings/next_meeting.html for
more detail and the directions to get there.
Should you want to join some of us for dinner, please gather between
17:45 and 18:15 at Café/Restaurant "Meneer Pannenkoek", Raadhuisstraat
6hs (straight across RIPE, on the corner Singel and Raadhuisstraat,
near Magna Plaza). At 18:15 sharp we'll leave for a restaurant
somewhere nearby for dinner.
See http://www.Amsterdam.pm.org for more details.
------------------------------
Date: Wed, 28 Mar 2001 00:48:40 -0700
From: "Marcus Linorit" <markus.pinkert@ens-office.de>
Subject: broken pipe error on server
Message-Id: <99s503$2ipm8$1@ID-49639.news.dfncis.de>
Hi,
Do you know these complete perl scripts, which some HTML-editors offer to
put them into your webpresentation. There is such a script called
mailmanager.pl. It has worked for a long time but now it only works in 1 of
ca. 15 cases. In the other cases it gives back an "Broken Pipe" -error. I
have testet it on the server, an Unix-system, where this error is shown. At
my computer, an Windows98 system, the Compiler didn't show any errors.
Take a look at the script, what do you think. Has anyone of you ever seen
such error, or is there some knowlege how to get this error away?
Maybe the server has Problems with this line:
open (MAIL, "|$mail_prog $Mail") || print "Fehler beim Zugriff auf
$mail_prog!\n";
But how can I fix the bug, because without this line, there are much more
other errors and the script dosn't work anymore.
Greetings, Marcus.
------------------------------
Date: Wed, 28 Mar 2001 14:11:54 +0200
From: "Gian Luca Fracasso" <gianluca.fracasso@csp.it>
Subject: Calling an external console application
Message-Id: <99sk9v$8pn$1@menelao.polito.it>
This is my scenario:
Just a browser window on the screen. The browser lunches a perl executable
program via a local and dedicated proxy server.
The perl executable calls an external console application passing to it some
parameters, then process its standard output.
The problem is that when the external application is called, the black
console
window flashes on the screen.
Does someone know how to avoid it?
Thanks for your help.
--
Gian Luca Fracasso
------------------------------
Date: Wed, 28 Mar 2001 09:02:40 -0600
From: Chris <cpryce@pryce.net>
Subject: Re: can @ENV be reset in the script?
Message-Id: <B6E75930.1E42%cpryce@pryce.net>
in article slrn9bvvlt.22r.efflandt@efflandt.xnet.com, David Efflandt at
efflandt@xnet.com wrote on 03/26/2001 8:45 PM:
> On Mon, 26 Mar 2001 15:06:31 -0600, Bing Du <bing-du@tamu.edu> wrote:
>> If I set LD_LIBRARY_PATH=/public/lib from the command line and export it
>> (I use zsh), the following script works fine.
>>
>> #!/public/bin/perl
>> use SOAP::Lite;
>> print "success";
>>
>> But if I set $ENV{'LD_LIBRARY_PATH'}="/public/lib" in the above script,
>> I got the error:
>>
<snip error messages>
>>
>> How should I get 'LD_LIBRARY_PATH' set in the script?
>
> 'use' statements are executed during precompile before regular statements.
> So anything you need for 'use' would need to be placed before that in a
> BEGIN block, or I wonder if 'use lib' would work (which unshifts to the
> @INC search list during precompile):
>
> use lib "/public/lib";
> use SOAP::Lite;
If your Web server is Apache, you can also set environment variables with a
SetEnv directive. You can set ENV variables for the server, or for virtual
hosts:
SetEnv LD_LIBRARY_PATH /public/lib
Sets the ENV LD_LIBRARAY_PATH for the Web server.
See http://httpd.apache.org/docs/env.html for a complete description.
cp
------------------------------
Date: Wed, 28 Mar 2001 08:31:56 -0500
From: "Steven P. Woolet" <steve_woolet@us.ibm.com>
Subject: Capturing POD output
Message-Id: <3AC1E7CC.AF01658C@us.ibm.com>
This is probably a very simple question...Using Pod::Text, how do I
capture the POD output in a variable instead of sending it to STDOUT (or
a file)? Actually, what I would really like is to capture the pod2usage
output, but be able to set the line width. It appears to me that I must
use Pod::Text and set the width and then do my own SELECT for usage.
Thanks.
------------------------------
Date: Wed, 28 Mar 2001 05:49:44 GMT
From: mwp@home.com.invalid (Murray Peterson)
Subject: Re: CGI Newsreader?
Message-Id: <Xns9071E7F8F5633farkle@24.64.2.57>
bbauer@h14me.yi.org (Blaine Bauer) wrote in
<Az5w6.107853$W05.20730743@news1.rdc1.mi.home.com>:
> Does anyone know of a CGI-based newsreader? I'd like to get able to get
> something through a proxy.
Well, there are web-based news services available, so you could subscribe
to one of them. Just having a program which reads news and acts as a cgi
interface won't get you through your proxy, unless the web server is on the
other side of it. Or am I misunderstanding your request?
--
Murray Peterson
Email: murray_peterson@home.com (remove underscore)
URL: http://www.members.home.net/murraypeterson
------------------------------
Date: 28 Mar 2001 06:08:22 -0800
From: merlyn@stonehenge.com (Randal L. Schwartz)
Subject: Re: CGI Newsreader?
Message-Id: <m1n1a6f0kp.fsf@halfdome.holdit.com>
>>>>> "Blaine" == Blaine Bauer <bbauer@h14me.yi.org> writes:
Blaine> Does anyone know of a CGI-based newsreader? I'd like to get able to get
Blaine> something through a proxy.
My June 2001 WebTechniques column that I just turned in does exactly
that.
It's important to cache the NNTP connection though, because NNTP
startup time is expensive. My column shows the use of a mini-HTTPD
(using HTTP::Daemon) that caches and shares an NNTP connection amongst
multiple hits and multiple users. I don't think I could recommend any
other way. :)
I can't put it online until it's been published, but in about a month
you should be able to find it at
http://www.stonehenge.com/merlyn/WebTechniques/
print "Just another Perl hacker,"
--
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<merlyn@stonehenge.com> <URL:http://www.stonehenge.com/merlyn/>
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!
------------------------------
Date: Wed, 28 Mar 2001 17:08:39 +0200
From: Mathias Koehrer <koehrer@arcormail.de>
Subject: CGI::Fast - raw access to POST data
Message-Id: <npus99.4a.ln@sam.x.y>
Hi!
I try to access the raw POST data using the CGI::Fast module
in a CGI script (using FastCGI).
The data (XML string) is not in the typical xx=value format,
thus I can not use the offered methods of CGI::Fast.
With "standard" CGI, I simply can read from STDIN, but not
in CGI::Fast.
Any ideas?
Thanks for all help!
Mathias
--
Mathias Koehrer
koehrer@arcormail.de
------------------------------
Date: Wed, 28 Mar 2001 12:57:19 +1000
From: "Gregory Toomey" <gtoomey@usa.net>
Subject: Re: Check if process is running under cron
Message-Id: <Ldcw6.4690$45.24176@newsfeeds.bigpond.com>
I use the following to test if a job is running. The substr sets ths pid,
and grep gets the job name.
It's worthwhile to call 'daemonize', which I obtained from a FAQ, at the
start.
----------
sub running {
return map {substr($_, 9, 5)} grep(/ipo.*perl.*sleeper/,
`/bin/ps -ef`);
}
-----------
use POSIX 'setsid';
sub daemonize {
chdir '/' or die "Can't chdir to /: $!";
open STDIN, '/dev/null' or die "Can't read /dev/null: $!";
open STDOUT, '>/dev/null'
or die "Can't write to /dev/null: $!";
defined(my $pid = fork) or die "Can't fork: $!";
exit if $pid;
setsid or die "Can't start a new session: $!";
open STDERR, '>&STDOUT' or die "Can't dup stdout: $!";
}
-----------
gtoomey
------------
"Brian" <dersgniw@fuse.net> wrote in message
news:tc2c54c1lj6qc2@corp.supernews.com...
> I'm going to write a perl daemon process that will sleep for 60 seconds
> (maybe a little more), check to see if some servers (programs) are up and
> running, and then write some stats to a file.
>
> I want to make sure that this is running so I was thinking about having a
> CRON job that runs every hour or so to check if the perl process is
running.
> I'm doing this as a daemon instead of running the CRON job every 60
seconds
> because in CRON, the job would have to login a separate box, then run the
> script... I don't know which would be more process intensive.. probably
> doesn't really matter.
>
> Anyways, I was thinking that I would have the main perl script write the
> perl job's process ID to a file, then have the cron job (also perl) read
> that file to get the PID and then check to see if the job is running. If
> it's not running, then it would kick off the process again.
>
> I know there's probably a better way.. I did some searching and didn't
> really find anything.
>
> Any ideas?
>
>
------------------------------
Date: Wed, 28 Mar 2001 11:00:02 +0100
From: Carl Lindsay <carllindsay1978@nospam.hotmail.com>
Subject: Checkbox disabled
Message-Id: <3AC1B622.443611D9@nospam.hotmail.com>
Hi,
I hopping someone will be able to help me with this. Okay I am trying
to disable checkboxes dynamically, so if a user checks a checkbox some
where on the form this will automatically grey out (disable) some other
input fields on the form. The following code works in ie5 but not
netscape. Is there a way in javascript to grey out or make inputs
disappear on a form that will work in both ie5 and netscape.
help will be very much appreciated, thank you
<TR><TD> Flags: </TD><TD>
<INPUT NAME=flags0 TYPE=checkbox VALUE="1" DISABLED>Full</INPUT>
<INPUT NAME=flags1 TYPE=checkbox VALUE="2" DISABLED> Empty </INPUT>
<INPUT NAME=flags2 TYPE=checkbox VALUE="4" DISABLED > Acknowledged Full
</INPUT>
<INPUT NAME=flags3 TYPE=checkbox VALUE="8" DISABLED> Acknowledged Empty
</INPUT>
<INPUT NAME=flags TYPE=hidden VALUE="0" DISABLED></INPUT>
</TD></TR>
------------------------------
Date: Wed, 28 Mar 2001 10:07:18 GMT
From: rgarciasuarez@free.fr (Rafael Garcia-Suarez)
Subject: Re: Checkbox disabled
Message-Id: <slrn9c3dv4.age.rgarciasuarez@rafael.kazibao.net>
Carl Lindsay wrote in comp.lang.perl.misc:
>
> I hopping someone will be able to help me with this. Okay I am trying
> to disable checkboxes dynamically, so if a user checks a checkbox some
> where on the form this will automatically grey out (disable) some other
> input fields on the form. The following code works in ie5 but not
> netscape. Is there a way in javascript to grey out or make inputs
> disappear on a form that will work in both ie5 and netscape.
You posted to the wrong newsgroup. This is a newgroup about the Perl
programming language; we do not discuss javascript, HTML or browser
issues. You may want to try a newsgroup with 'html' or 'cgi' in its
name (such as comp.infosystems.www.authoring.html).
--
Rafael Garcia-Suarez / http://rgarciasuarez.free.fr/
------------------------------
Date: Wed, 28 Mar 2001 07:51:07 +0200
From: Ronald Fischer <ronald.fischer.gp@icn.siemens.de>
Subject: Re: Checking for two end line symbols with regex
Message-Id: <3AC17BCB.D82B2A0A@icn.siemens.de>
Andrej Kartashov wrote:
> Please help me, how I check that $category should not contain more than three end line
> symbols
if(($category=~y/\n/\n/)==3){...}
--
Ronald Otto Valentin Fischer <rovf@earthling.net>
[now at: Siemens ICM N MR UR DE 6, phone: +49(Germany)+89-722-23368]
http://profiles.yahoo.com/ronny_fischer/
http://fusshuhn.ourfamily.com/cppincomp.html
------------------------------
Date: Tue, 27 Mar 2001 21:03:56 -0800
From: <tedfitz@mindspring.com>
Subject: CPAN problem
Message-Id: <99rr6m$efq$1@nntp9.atl.mindspring.net>
Hello,
I recently developed a problem with a previously working version of
CPAN...
Environment:
perl, v5.6.0 built for i386-freebsd
freebsd 4.2 stable
PAN::Config options from /usr/local/lib/perl5/5.6.0/CPAN/Config.pm:
commit Commit changes to disk
defaults Reload defaults from disk
init Interactive setting of all options
build_cache 40
build_dir /root/.cpan/build
cache_metadata 1
cpan_home /root/.cpan
dontload_hash
ftp /usr/bin/ftp
ftp_proxy
getcwd cwd
gzip /usr/bin/gzip
http_proxy
inactivity_timeout 0
index_expire 1
inhibit_startup_message 0
keep_source_where /root/.cpan/sources
lynx /usr/local/bin/lynx
make /usr/bin/make
make_arg
make_install_arg
makepl_arg
ncftpget /usr/local/bin/ncftpget
no_proxy
pager more
prerequisites_policy follow
scan_cache atstart
shell /bin/csh
tar /usr/bin/tar
term_is_latin 1
unzip /usr/local/gunzip
urllist
ftp://carroll.cac.psu.edu/pub/CPAN/
ftp://cpan.in-span.net/
ftp://cpan.llarian.net/pub/CPAN/
ftp://cpan.nas.nasa.gov/pub/perl/CPAN/
ftp://cpan.nitco.com/pub/CPAN/
ftp://csociety-ftp.ecn.purdue.edu/pub/CPAN
ftp://ftp-mirror.internap.com/pub/CPAN/
ftp://ftp.ccs.neu.edu/net/mirrors/ftp.funet.fi/pub/languages/perl/CPAN/
ftp://ftp.cise.ufl.edu/pub/perl/CPAN/
ftp://ftp.cpan.org/CPAN/
ftp://ftp.cpanel.net/pub/CPAN/
ftp://ftp.cs.colorado.edu/pub/perl/CPAN/
ftp://ftp.deao.net/pub/CPAN/
ftp://ftp.digital.com/pub/plan/perl/CPAN/
ftp://ftp.duke.edu/pub/perl/
ftp://ftp.epix.net/pub/languages/perl/
wait_list
wait://ls6.informatik.uni-dortmund.de:1404
wget
____________________________________________________________
Example:
perl -MCPAN -e shell
cpan> install Bundle::LWP
URI is up to date.
Net::FTP is up to date.
MIME::Base64 is up to date.
Digest::MD5 is up to date.
HTML::Tagset is up to date.
Running install for module HTML::Parser
Running make for G/GA/GAAS/HTML-Parser-3.19.tar.gz
Fetching with Net::FTP:
ftp://carroll.cac.psu.edu/pub/CPAN/authors/id/G/GA/GAAS/HTML-Parser3.19.tar.
gz
Scanning cache /root/.cpan/build for sizes
CPAN: MD5 loaded ok
Checksum for
/root/.cpan/sources/authors/id/G/GA/GAAS/HTML-Parser-3.19.tar.gz ok
HTML-Parser-3.19/
.......
blah blah blah
.....
Manifying blib/man1/lwp-download.1
/usr/bin/perl -e 'use Config; chdir q{blib/script}; foreach (qw(GET HEAD
POST)) {' -e 'unlink "$_";' -e 'system("$Config{\"lns\"} lwp-request $_")
&& die; }'
/usr/bin/make -- OK
Running make test
/usr/bin/perl -e 'use Config; chdir q{blib/script}; foreach (qw(GET HEAD
POST)) {' -e 'unlink "$_";' -e 'system("$Config{\"lns\"} lwp-request $_")
&& die; }'
/usr/bin/perl t/TEST 0
base/common-req.....ok
base/cookies........ok
base/date...........ok
..... blah blah blah ...
base/status.........ok
base/ua.............ok
html/form...........ok
robot/rules-dbm.....ok
robot/rules.........ok
robot/rules.........ok
robot/ua............HTTP Server terminated <-- where the fun begins
robot/ua............NOK 1
robot/ua............NOK 7FAILED tests 1-3, 5, 7
Failed 5/7 tests, 28.57% okay
local/autoload......ok
local/get...........ok
local/http..........HTTP Server terminated
local/http..........NOK 8Can't call method "is_redirect" on an undefined
value at local/http.t line 188, <DAEMON> line 1.
local/http..........dubious
Test returned status 22 (wstat 5632, 0x1600)
DIED. FAILED tests 1-18
Failed 18/18 tests, 0.00% okay
local/protosub......ok
Failed Test Status Wstat Total Fail Failed List of failed
----------------------------------------------------------------------------
---
local/http.t 22 5632 18 18 100.00% 1-18
robot/ua.t 7 5 71.43% 1-3, 5, 7
Failed 2/22 test scripts, 90.91% okay. 23/286 subtests failed, 91.96% okay.
*** Error code 2
Stop in /root/.cpan/build/libwww-perl-5.51.
/usr/bin/make test -- NOT OK
Running make install
make test had returned bad status, won't install without force
Bundle summary: The following items in bundle Bundle::LWP had installation
problems:
LWP
Clues?
------------------------------
Date: Wed, 28 Mar 2001 09:41:08 GMT
From: obscuremu@riftsmux.dhs.org
Subject: Createing a program distribution CD-Rom?
Message-Id: <3ac1afd1.89124327@news.inreach.com>
I have a question, of course. Having some programs that I've written in perl, I
was wondering how to make a CD-rom that will allow someone, even without perl
installed to utilise the Perl Program on it as well as things as Perl::Tk.
While I have a pretty firm grasp in writing usable programs in perl, I don't
know how to do this task. The reason being, unfortunatly, not every computer
comes with Perl installed, and not every computer has access to the internet to
Download the multi-megabyte files for the Perl Package Management to install
them.
I personally run both Win-98 and Redhat-Linux on my box and would like help in
either or both distribution platforms. If someone could even point me to a page
showing me the info, that might help a lot.
Thank you,
Shain Edge
( one who doesn't go for the goofy 'I am a Perl hacker' messages. ) ;p
------------------------------
Date: 28 Mar 2001 17:21:21 GMT
From: sendthis@yahoo.delthisandasdf.com (e)
Subject: date handling?
Message-Id: <5F3C3FE6C2ACC5B0.BC4F8160A742BF7D.FD8B12620B9010A4@lp.airnews.net>
Is there an easy way to compare dates using perl? Right now, I'm separating it
by tabs and writing a lot of if statements
i.e. (pseudo code)
if year < input year
if month < input_month
if day < input _day
<it is this>
that's just a pain...
Eric
------------------------------
Date: Wed, 28 Mar 2001 18:29:28 GMT
From: Darren Dunham <ddunham@redwood.taos.com>
Subject: Re: date handling?
Message-Id: <c4qw6.1477$E71.34442@news.pacbell.net>
e <sendthis@yahoo.delthisandasdf.com> wrote:
> Is there an easy way to compare dates using perl? Right now, I'm separating it
> by tabs and writing a lot of if statements
> i.e. (pseudo code)
> if year < input year
> if month < input_month
> if day < input _day
> <it is this>
> that's just a pain...
Date comparisons are often done by taking a symbolic date and converting
it into a numeric representation (see Time::Local). From there,
comparisons become < and > operations.
You can also quantify differences between dates easily by this method.
--
Darren Dunham ddunham@taos.com
Unix System Administrator Taos - The SysAdmin Company
Got some Dr Pepper? San Francisco, CA bay area
< How are you gentlemen!! Take off every '.SIG'!! >
------------------------------
Date: 28 Mar 2001 07:16:06 GMT
From: vek@pharmnl.ohout.pharmapartners.nl (Villy Kruse)
Subject: Re: E euro sign how to
Message-Id: <slrn9c33tm.o6i.vek@pharmnl.ohout.pharmapartners.nl>
On Tue, 27 Mar 2001 23:06:23 +0200,
sjaak nabuurs <sjaaknabuurs@hetnet.nl> wrote:
>
>
>How to program the E euro (money sign)
>
Depends on your character set. The most portable way is the
string "EUR".
Villy
------------------------------
Date: Wed, 28 Mar 2001 07:59:33 GMT
From: Bart Lateur <bart.lateur@skynet.be>
Subject: Re: E euro sign how to
Message-Id: <c263cto70i9t92icekjvl3n6hl5sr6av8l@4ax.com>
sjaak nabuurs wrote:
>How to program the E euro (money sign)
For what?
In the Windows character set, the character code is 128. But not in
ISO-Latin-1. In Unicode, of which ISO-Latin-1 is a subset, the character
code is 0x20AC or 8364 in decimal.
If you want to make it visible in a web browser, you can try "€" or
"#8364;", or even "€" for some browsers. All three work in
Netscape 4.76 and MSIE5.5 on Win32.
--
Bart.
------------------------------
Date: Wed, 28 Mar 2001 14:57:06 +0200
From: Philip Newton <pne-news-20010328@newton.digitalspace.net>
Subject: Re: E euro sign how to
Message-Id: <eqn3ct0glp6jod30tahhqkogt0ci5o483j@4ax.com>
On Wed, 28 Mar 2001 07:59:33 GMT, Bart Lateur <bart.lateur@skynet.be>
wrote:
> In the Windows character set, the character code is 128.
Which Windows character set? CP-1252 (Western), yes. I believe
Win-Cyrillic is an exception, however, placing the Euro not at 0x80
but at 0x88 (or something like that). So it isn't even consistent
between Windows code pages.
None of this is Perl-related any more, so follow-ups -> poster.
Cheers,
Philip
--
Philip Newton <nospam.newton@gmx.li>
Yes, that really is my address; no need to remove anything to reply.
If you're not part of the solution, you're part of the precipitate.
------------------------------
Date: Wed, 28 Mar 2001 10:49:47 -0500
From: Mathew Kirsch <kirsch@kodak.com>
Subject: Re: editing function output before assignment to a variable
Message-Id: <3AC2081B.12955184@kodak.com>
Ren Maddox wrote:
> I see that Greg has already answered your question, but I thought I'd
> just point out that strftime has %e which uses leading spaces instead
> of leading zeroes. It doesn't give you exactly what you appear to
> want, since a space will be on the front, but depending on your exact
> need, I thought it might be useful.
Actually, it's exactly what I want. I'm looking through log files, which
format the single-digit dates with leading spaces.
Example: Mar 6 #desired result
Versus: Mar 6 #WRONG!
Or: Mar 06 #WRONG ON SO MANY LEVELS!
I told you the answer was right in front of my face. I bet I looked at the
Time::CTime man page a dozen times to see if there was another format for "day
of month," and all I could come up with was %d.
Thanks, this solution eliminated three lines of code in my script.
------------------------------
Date: 16 Sep 99 21:33:47 GMT (Last modified)
From: Perl-Users-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin)
Subject: Digest Administrivia (Last modified: 16 Sep 99)
Message-Id: <null>
Administrivia:
The Perl-Users Digest is a retransmission of the USENET newsgroup
comp.lang.perl.misc. For subscription or unsubscription requests, send
the single line:
subscribe perl-users
or:
unsubscribe perl-users
to almanac@ruby.oce.orst.edu.
| NOTE: The mail to news gateway, and thus the ability to submit articles
| through this service to the newsgroup, has been removed. I do not have
| time to individually vet each article to make sure that someone isn't
| abusing the service, and I no longer have any desire to waste my time
| dealing with the campus admins when some fool complains to them about an
| article that has come through the gateway instead of complaining
| to the source.
To submit articles to comp.lang.perl.announce, send your article to
clpa@perl.com.
To request back copies (available for a week or so), send your request
to almanac@ruby.oce.orst.edu with the command "send perl-users x.y",
where x is the volume number and y is the issue number.
For other requests pertaining to the digest, send mail to
perl-users-request@ruby.oce.orst.edu. Do not waste your time or mine
sending perl questions to the -request address, I don't have time to
answer them even if I did know the answer.
------------------------------
End of Perl-Users Digest V10 Issue 578
**************************************