[29549] in Perl-Users-Digest
Perl-Users Digest, Issue: 793 Volume: 11
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Sat Aug 25 06:09:37 2007
Date: Sat, 25 Aug 2007 03:09:04 -0700 (PDT)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Perl-Users Digest Sat, 25 Aug 2007 Volume: 11 Number: 793
Today's topics:
Re: How to install WIN32::CGI on ActiveState Perl insta <tristan@vvv.xls>
new CPAN modules on Sat Aug 25 2007 (Randal Schwartz)
Re: perhaps you forgot to load "URI"? <john1949@yahoo.com>
Re: Script does not want to run in background ?!? <dummy@example.com>
Re: Starting with SOAP (aka ? the Platypus)
Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Sat, 25 Aug 2007 09:52:42 +0200
From: "Bond" <tristan@vvv.xls>
Subject: Re: How to install WIN32::CGI on ActiveState Perl instaled on Windows XP?
Message-Id: <faon4j$jgd$1@ss408.t-com.hr>
Not from PPM, but on web address:
http://search.cpan.org/~jdb/libwin32-0.27/OLE/lib/Win32/OLE.pm
"Sisyphus" <sisyphus1@nomail.afraid.org> wrote in message
news:46cf2be9$0$13999$afc38c87@news.optusnet.com.au...
>
> "Bond" <Bond@james.bond> wrote in message
> news:fam25p$no8$1@ss408.t-com.hr...
>> How to install WIN32::CGI on ActiveState Perl instaled on Windows XP?
>
> Does such a module exist ? I couldn't find it anywhere.
>
> Cheers,
> Rob
------------------------------
Date: Sat, 25 Aug 2007 04:42:21 GMT
From: merlyn@stonehenge.com (Randal Schwartz)
Subject: new CPAN modules on Sat Aug 25 2007
Message-Id: <JnBBqL.r5z@zorch.sf-bay.org>
The following modules have recently been added to or updated in the
Comprehensive Perl Archive Network (CPAN). You can install them using the
instructions in the 'perlmodinstall' page included with your Perl
distribution.
Apache2-BalanceLogic-0.0.1
http://search.cpan.org/~miki/Apache2-BalanceLogic-0.0.1/
Perl extension for mod_proxy_balancer
----
Catalyst-Manual-5.701001
http://search.cpan.org/~jrockway/Catalyst-Manual-5.701001/
The Catalyst developer's manual
----
Catalyst-Plugin-ConfigLoader-0.17
http://search.cpan.org/~bricas/Catalyst-Plugin-ConfigLoader-0.17/
Load config files of various types
----
DBI-1.59
http://search.cpan.org/~timb/DBI-1.59/
Database independent interface for Perl
----
Data-GUID-URLSafe-0.002
http://search.cpan.org/~rjbs/Data-GUID-URLSafe-0.002/
url-safe base64-encoded GUIDs
----
Jifty-0.70824
http://search.cpan.org/~jesse/Jifty-0.70824/
an application framework
----
Jifty-DBI-0.43
http://search.cpan.org/~jesse/Jifty-DBI-0.43/
An object-relational persistence framework
----
List-Tuples-0.03
http://search.cpan.org/~nkh/List-Tuples-0.03/
Makes tuples from lists
----
Mac-PropertyList-SAX-0.62
http://search.cpan.org/~kulp/Mac-PropertyList-SAX-0.62/
work with Mac plists at a low level, fast
----
Mac-PropertyList-SAX-0.63
http://search.cpan.org/~kulp/Mac-PropertyList-SAX-0.63/
work with Mac plists at a low level, fast
----
Metaweb-0.01
http://search.cpan.org/~skud/Metaweb-0.01/
Perl interface to the Metaweb/Freebase API
----
Metaweb-0.02
http://search.cpan.org/~skud/Metaweb-0.02/
Perl interface to the Metaweb/Freebase API
----
Nagios-Object-0.20
http://search.cpan.org/~tobeya/Nagios-Object-0.20/
----
OpenThought-1.99.16
http://search.cpan.org/~eric/OpenThought-1.99.16/
An AJAX transport and helper library, making AJAX-based page updates trivial
----
POE-Component-Server-SimpleContent-1.09
http://search.cpan.org/~bingos/POE-Component-Server-SimpleContent-1.09/
The easy way to serve web content with POE::Component::Server::SimpleHTTP.
----
Perl-Critic-1.071
http://search.cpan.org/~elliotjs/Perl-Critic-1.071/
Critique Perl source code for best-practices
----
PowerTools-Data-0.01
http://search.cpan.org/~gbshouse/PowerTools-Data-0.01/
Additional Perl tool for Apache::ASP - MySQL database connection
----
PowerTools-Upload-Blob-0.01
http://search.cpan.org/~gbshouse/PowerTools-Upload-Blob-0.01/
----
PowerTools-Upload-File-0.01
http://search.cpan.org/~gbshouse/PowerTools-Upload-File-0.01/
Additional Perl tool for Apache::ASP data uploading
----
RTx-Shredder-0.07
http://search.cpan.org/~ruz/RTx-Shredder-0.07/
Cleanup RT database
----
ScatterPlot-0_1
http://search.cpan.org/~inventor/ScatterPlot-0_1/
Perl extension for blah blah blah
----
Speech-eSpeak-0.13
http://search.cpan.org/~hgneng/Speech-eSpeak-0.13/
Perl extension for eSpeak text to speech
----
String-Mutate-0.03
http://search.cpan.org/~tbone/String-Mutate-0.03/
extensible chaining of string modifiers
----
TeX-Encode-1.0
http://search.cpan.org/~timbrody/TeX-Encode-1.0/
Encode/decode Perl utf-8 strings into TeX
----
Template-Declare-0.26
http://search.cpan.org/~jesse/Template-Declare-0.26/
Perlish declarative templates
----
Test-MinimumVersion-0.006
http://search.cpan.org/~rjbs/Test-MinimumVersion-0.006/
does your code require newer perl than you think?
----
Tie-Hash-Indexed-0.05
http://search.cpan.org/~mhx/Tie-Hash-Indexed-0.05/
Ordered hashes for Perl
----
Tripletail-0.30
http://search.cpan.org/~hio/Tripletail-0.30/
Tripletail, Framework for Japanese Web Application
----
WWW-Metaweb-0.01
http://search.cpan.org/~hds/WWW-Metaweb-0.01/
An interface to the Metaweb database via MQL
----
WebService-Windows-LiveID-Auth-0.01
http://search.cpan.org/~zigorou/WebService-Windows-LiveID-Auth-0.01/
Perl implementation of Windows Live ID Web Authentication 1.0
----
ack-1.66
http://search.cpan.org/~petdance/ack-1.66/
grep-like text finder
----
basis-0.04
http://search.cpan.org/~sknpp/basis-0.04/
use base with import call
----
dockhand
http://search.cpan.org/~delon/dockhand/
----
eGuideDog-Festival-0.11
http://search.cpan.org/~hgneng/eGuideDog-Festival-0.11/
Wrapper of common functions of Festival TTS.
If you're an author of one of these modules, please submit a detailed
announcement to comp.lang.perl.announce, and we'll pass it along.
This message was generated by a Perl program described in my Linux
Magazine column, which can be found on-line (along with more than
200 other freely available past column articles) at
http://www.stonehenge.com/merlyn/LinuxMag/col82.html
print "Just another Perl hacker," # the original
--
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: Sat, 25 Aug 2007 07:25:56 +0100
From: "John" <john1949@yahoo.com>
Subject: Re: perhaps you forgot to load "URI"?
Message-Id: <M-WdnZM8PJnuVlLbRVnyjgA@eclipse.net.uk>
"Jorge Reyes" <jorg_reyes@hotmail.com> wrote in message
news:1187998541.095137.12540@z24g2000prh.googlegroups.com...
> hi, so now this is weird, first of all i want to say that this script
> runs ok in windows xp, linux ubuntu 7.04 and the problem is when i put
> this into a unix machine this is the code:
>
> use SOAP::Lite qw (debug trace);
>
> $log_folder = "logwsremedyclient";
> $fechaActual = &fechaHoraFormatoDb(time);
> $log_name = substr($fechaActual,0,10);
> $log_name =~ tr/-//d;
> $log_name = $log_name.".log";
> #print $log_folder.$log_name."\n";
>
> if (! -d $log_folder ) {
> #no existe
> mkdir($log_folder) || die "ERROR AL INTENTAR CREAR EL
> DIRECTORIO: $log_folder";
> }
>
> $numArgs = $#ARGV + 1;
> if($numArgs < 6) {
> $header = "INICIO.- $fechaActual\n";
> $content = "ERROR: SE RECIBIERON $numArgs COMMAND-LINE
> ARGUMENTS, IMPOSIBLE CONTINUAR SE NECESITAN 6\n";
> $footer = "FINAL.- $fechaActual\n\n";
> open(WSLOG,">> $log_folder/$log_name") || die "ERROR AL
> INTENTAR ABRIR EL LOG: $log_folder/$log_name";
> print WSLOG $header.$content.$footer;
> close(WSLOG);
> exit(1);
> }
>
> my $estado = $ARGV[0];
> my $remedyid = $ARGV[1];
> my $usumod = $ARGV[2];
> my $historial = $ARGV[3];
> my $telcontacto = $ARGV[4];
> my $usua_afec = $ARGV[5];
>
> #my $estado = 'CERRADO';
> #my $remedyid = 263;
> #my $usumod = 'JORGE REYES';
> #my $historial = 'PRUEBA 2 DESDE PERL HACIA WS EN JAVA';
> #my $telcontacto = '5530304857';
> #my $usua_afec = 8;
>
> my $soap = SOAP::Lite
> -> uri('http://serviciosweb.remedyweb.iusacell.com')
> -> proxy('http://10.199.11.69:9080/remedyWeb/services/
> ActualizaStatus')
> -> on_action( sub { join '', @_} );
> my $s = $soap->paramRemedy(
> SOAP::Data->name('estado')->type(string => $estado),
> SOAP::Data->name('remedyid')->type(long => $remedyid),
> SOAP::Data->name('usumod')->type(string => $usumod),
> SOAP::Data->name('historial')->type(string => $historial),
> SOAP::Data->name('telcontacto')->type(string => $telcontacto),
> SOAP::Data->name('usua_afec')->type(int => $usua_afec));
> unless ($s->fault) {
> #print $s->result();
> $header = "INICIO.- $fechaActual\n";
> $content = "estado: $ARGV[0]\nremedyid: $ARGV[1]\nusumod:
> $ARGV[2]\nhistorial: $ARGV[3]\ntelcontacto: $ARGV[4]\nusua_afec:
> $ARGV[5]\nRESPUESTA: ".$s->result()."\n";
> $footer = "FINAL.- $fechaActual\n\n";
> open(WSLOG,">> $log_folder/$log_name") || die "ERROR AL
> INTENTAR ABRIR EL LOG: $log_folder/$log_name";
> print WSLOG $header.$content.$footer;
> close(WSLOG);
>
> }
> else {
> #print "\n\nError\n";
> #print join ', ',
> #$s->faultcode,
> #$s->faultstring,
> #$s->faultdetail,"\n\n";
> $header = "INICIO.- $fechaActual\n";
> $content = "ERROR: ".join ', ',$s->faultcode, $s->faultstring,
> $s->faultdetail, "\n";
> $footer = "FINAL.- $fechaActual\n\n";
> open(WSLOG,">> $log_folder/$log_name") || die "ERROR AL
> INTENTAR ABRIR EL LOG: $log_folder/$log_name";
> print WSLOG $header.$content.$footer;
> close(WSLOG);
> }
>
>
> sub fechaHoraFormatoDb {
> # $_[0] = Unix time, or POSIX time
> # NOTA: Al llamar a esta subrutina no poner comillas el
> parametro de $_[0]
> # Ej: &fechaHoraFormatoDb(time) o &fechaHoraFormatoDb($valor)
> my ($segundo,$minuto,$hora,$dia,$mes,$anio,$diaSemana) =
> (localtime($_[0]))[0,1,2,3,4,5,6];
> my @mesesNum =
> ('01','02','03','04','05','06','07','08','09','10','11','12');
> my $tiempo = sprintf("%02d:%02d:%02d",$hora,$minuto,$segundo);
> $anio = $anio + 1900;
> if($dia < 10) {
> $dia="0$dia";
> }
> $tiempoObtenido="$anio-$mesesNum[$mes]-$dia $tiempo";
> return $tiempoObtenido;
> }
>
> and then when i executed it the answer is:
>
> SOAP::Lite::call: ()
> SOAP::Serializer::envelope: ()
> Can't locate object method "new" via package "URI" (perhaps you forgot
> to load "URI"?) at /usr/perl5/5.6.1/lib/HTTP/Request.pm line 82.
>
> so any idea suggestions or something useful, sorry but i am desperate
> jeje... thanks for advanced
>
Hi
I had a similar problem when we moved to a new server.
Can't locate object method "new" via package "SOAP::Packager::MIME"
(perhaps you forgot to load "SOAP::Packager::MIME"?) at
/usr/lib/perl5/site_perl/5.8.6/SOAP/Lite.pm line 3241.
At first, we thought that the package MIME was missing but once we
re-installed
SOAP Lite (force installation) it was OK.
It might be that package URI is missing, but, my guess a fresh installation
odf SOAP::Lite will fix it.
Regards
John
------------------------------
Date: Sat, 25 Aug 2007 10:04:48 GMT
From: "John W. Krahn" <dummy@example.com>
Subject: Re: Script does not want to run in background ?!?
Message-Id: <49Tzi.1952$bO6.918@edtnps89>
Benoit Lefebvre wrote:
> I made a little script that ssh to many servers (IBM HMCs) to get a
> list of all logical partitions on some pSeries servers managed by the
> HMCs
>
> Here is the complete script: (It's called getlpars.pl)
> -----------------------------------------------------------------------------------------------------------
> #!/usr/bin/perl
use warnings;
use strict;
> chomp(@hmclist = `cat ~/scripts/conf/hmc.list`);
>
> foreach (@hmclist) {
Why fork a shell to cat a file when you can just open it in perl?
open HMCLIST, '<', "$ENV{HOME}/scripts/conf/hmc.list"
or die "Cannot open '$ENV{HOME}/scripts/conf/hmc.list' $!";
while ( <HMCLIST> ) {
chomp;
> my($hmc,$hmctype) = split(":",$_);
>
> if ($hmctype eq "p4") {
>
> chomp(@list = `ssh -q hscroot\@$hmc 'lssyscfg -r sys --all'`);
>
> @managedsystems = ();
my @managedsystems;
> for ($i = 1; $i <= scalar @list -1; $i++) {
"scalar @list -1" is the long way of saying "$#list".
> $system = substr($list[$i],0,16);
> $system =~ s/\s*$//g;
You are using the /g option for a pattern that will only match once (it is
anchored to the end of the string and a string has only one end.) You are
using the * modifier which means that even strings with no whitespace at the
end will be modified. You should use the + modifier instead. Instead of
doing substr() and then substitution you can do both operations with unpack()
(see below.)
> push(@managedsystems, $system);
> }
for ( @list ) {
push @managedsystems, unpack 'A16', $_;
}
Or doing the declaration and assignment together:
my @managedsystems = map unpack( 'A*', $_ ), @list;
> foreach (@managedsystems) {
> $system = $_;
> $system = "\"".$system."\"";
$system = qq["$_"];
> chomp(@list = `ssh -q hscroot\@$hmc 'lssyscfg -m $system -r lpar
> --all'`);
>
> for ($i = 2; $i <= scalar @list -1; $i++) {
See above.
> $lpar = substr($list[$i],0,20);
> $lpar =~ s/\s*$//g;
See above.
> print $hmc .":". $system .":". $lpar . "\n";
> }
for ( @list ) {
$lpar = unpack 'A20', $_;
print "$hmc:$system:$lpar\n";
}
> }
> } elsif ($hmctype eq "p5") {
> @list = `ssh -q hscroot\@$hmc 'lssyscfg -r sys'`;
>
> @managedsystems = ();
>
> foreach (@list) {
> @ln = split(",", $_);
> push(@managedsystems, substr($ln[0],5,length($ln[0])));
"substr($ln[0],5,length($ln[0]))" is a long way of saying "substr($ln[0],5))".
push @managedsystems, substr( ( split /,/ )[0], 5 );
> }
>
> foreach (@managedsystems) {
> $system = $_;
> $system =~ s/\s/\\ /g;
> @list2 = `ssh -q hscroot\@$hmc 'lssyscfg -r lpar -m $system -F --
> header`;
> foreach (@list2) {
> @ln2 = split(",", $_);
> print $hmc .":". $system .":". $ln2[0] . "\n";
> }
> }
> }
> }
John
--
Perl isn't a toolbox, but a small machine shop where you
can special-order certain sorts of tools at low cost and
in short order. -- Larry Wall
------------------------------
Date: Sat, 25 Aug 2007 05:39:50 GMT
From: "David Formosa (aka ? the Platypus)" <dformosa@usyd.edu.au>
Subject: Re: Starting with SOAP
Message-Id: <slrnfcvh4f.26q.dformosa@localhost.localdomain>
On Thu, 23 Aug 2007 10:45:44 -0400, Amer Neely <perl4hire@softouch.on.ca> wrote:
[...]
> You have it pretty much right. I built a form for a client, who now
> wants to take that data and pass it to another server so it can be used
> to update a page there. I don't own the receiving code (the SOAP
> server?) but the owner suggested SOAP as a means to do this. Hence my
> immersion into SOAP.
If you have a choice here I would strongly recomend against using
SOAP. Almost every implementation of SOAP uses a mutually
imcompatable subset of the soap standard. Cross platform soap support
is a pain.
------------------------------
Date: 6 Apr 2001 21:33:47 GMT (Last modified)
From: Perl-Users-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin)
Subject: Digest Administrivia (Last modified: 6 Apr 01)
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: due to the current flood of worm email banging on ruby, the smtp
server on ruby has been shut off until further notice.
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 V11 Issue 793
**************************************