[27866] in Perl-Users-Digest
Perl-Users Digest, Issue: 9230 Volume: 10
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Tue May 16 03:06:03 2006
Date: Tue, 16 May 2006 00:05:03 -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 Tue, 16 May 2006 Volume: 10 Number: 9230
Today's topics:
[Net::Jabber] problem with logging <lucioj@skasujpoczta.onet.pl>
Re: Autovivification within deep nested hash <baxter.brad@gmail.com>
new CPAN modules at Tue May 16 2006 (Randal Schwartz)
Redirection whatever be the forked life <ynleder@nspark.org>
Re: Redirection whatever be the forked life <David.Squire@no.spam.from.here.au>
Re: Redirection whatever be the forked life <David.Squire@no.spam.from.here.au>
Re: Redirection whatever be the forked life <1usa@llenroc.ude.invalid>
Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Mon, 15 May 2006 15:39:56 +0200
From: =?iso-8859-2?B?o3VjaW8=?= <lucioj@skasujpoczta.onet.pl>
Subject: [Net::Jabber] problem with logging
Message-Id: <op.s9lhku0rkkdob5@master-blaster.mshome.net>
I'd like to send a message with Net::Jabber using a gadu-gadu (a polish
communicator) gateway. I have a working fine jabber account with gadu-gadu
gateway transport activated (it works fine from a regular jabber client),
but when i use a perl script to send a message to
gadu-gadu_id@gg.aster.pl, I get an error "Not logged in":
.
.
.
XMPP::Conn: AuthIQAuth: we authed!
XMPP::Conn: Connected: (1)
XMPP::Conn: SendXML: sent(<message to='gadu-gadu_idg@gg.aster.pl'><body>To
jest test.</body><subject>test</subject></message>
)
XML::Stream: Send: (<message to='gadu-gadu_id@gg.aster.pl'><body>To jest
test.</body><subject>test</subject></message>
)
XMPP::Conn: Process: timeout(1)
XML::Stream: Read: buff(<message from='gadu-gadu_id@gg.aster.pl'
to='jid@jabber.aster
.pl/SimpleSend' type='error' code='407'><error>Not logged
in</error><body>This is my test.</body></message>)
XMPP::Conn: CallBack: sid(44678BD7) received(<message code='407'
from='gadu-gadu_id@g
g.aster.pl' to='jid@jabber.aster.pl/SimpleSend' type='error'><error>Not
logged i
n</error><body>This is my test.</body></message>)
XMPP::Conn: CallBack: tag(message)
XMPP::Conn: CallBack: we either want it or were waiting for it.
XMPP::Conn: CallBack: check directxpath
XMPP::Conn: CallBack: check
directxpath(/[@xmlns="urn:ietf:params:xml:ns:xmpp-sa
sl"])
XMPP::Conn: CallBack: check
directxpath(/[@xmlns="urn:ietf:params:xml:ns:xmpp-tl
s"])
XMPP::Conn: BuildObject: tag(message) package(Net::Jabber::Message)
XMPP::Conn: CheckID: tag(message) id()
XMPP::Conn: CallBack: no registry entry
XMPP::Conn: CallBack: goto user function(CODE(0x184ed3c))
XML::Stream: Send: (</stream:stream>)
XML::Stream: SetCallBacks: tag(node) func(CODE(0x184f6a8))
XMPP::Conn: Disconnect: bye bye
And here's my code:
use Net::Jabber;
my $c = new Net::Jabber::Client();
die("Could not connect to Jabber server") unless $c->Connect( 'hostname'
=> 'jabber.aster.pl', 'port' => 5222 );
$c->AuthSend( 'username' => 'jid', 'password' => 'password', 'resource' =>
'resource');
die "Authentication failed" unless ($c->Connected());
$c->Disconnect();
Do I need some kind of special method to log into this gateway?
Waiting for any help!
--
pozdrawiam,
Łucio
------------------------------
Date: 15 May 2006 06:44:27 -0700
From: "Brad Baxter" <baxter.brad@gmail.com>
Subject: Re: Autovivification within deep nested hash
Message-Id: <1147700666.954774.23960@i39g2000cwa.googlegroups.com>
Uri Guttman wrote:
>
> OP: read my autovivification tutorial:
>
> http://sysarch.com/Perl/autoviv.txt
s/thay/they/;
s/refered/referred/;
:-)
--
Brad
------------------------------
Date: Tue, 16 May 2006 04:42:05 GMT
From: merlyn@stonehenge.com (Randal Schwartz)
Subject: new CPAN modules at Tue May 16 2006
Message-Id: <IzCD25.1J03@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.
WWW-YouTube-2006.0515
http://search.cpan.org/~ermeyers/WWW-YouTube-2006.0515/
YouTube Developer Interface
----
TeX-Encode-0.5
http://search.cpan.org/~timbrody/TeX-Encode-0.5/
Encode/decode Perl utf-8 strings into TeX
----
SUPER-1.14
http://search.cpan.org/~chromatic/SUPER-1.14/
control superclass method dispatch
----
Boost-Graph-1.1
http://search.cpan.org/~dburdick/Boost-Graph-1.1/
Perl interface to the Boost-Graph C++ libraries.
----
HTML-Breadcrumbs-0.06
http://search.cpan.org/~gavinc/HTML-Breadcrumbs-0.06/
module to produce HTML 'breadcrumb trails'.
----
DBD-Multiplex-1.99-1
http://search.cpan.org/~tkishel/DBD-Multiplex-1.99-1/
A multiplexing driver for the DBI.
----
DBD-Multiplex-1.99
http://search.cpan.org/~tkishel/DBD-Multiplex-1.99/
A multiplexing driver for the DBI.
----
Kwiki-QuickWAFL-0.01
http://search.cpan.org/~cordata/Kwiki-QuickWAFL-0.01/
Causes configured WALF methods to have their contents processed by the normal Kwiki formatting engine.
----
Kwiki-Theme-BlueOcean-0.01
http://search.cpan.org/~cordata/Kwiki-Theme-BlueOcean-0.01/
Blue Kwiki Theme
----
Kwiki-TableOfContents-Print-0.01
http://search.cpan.org/~cordata/Kwiki-TableOfContents-Print-0.01/
Provides ability to print entire sections of the kwiki website based on the table of contents information.
----
Kwiki-TableOfContents-0.01
http://search.cpan.org/~cordata/Kwiki-TableOfContents-0.01/
Provides a Table of Contents feature that a template can use to make a wiki work as a manual.
----
Kwiki-Scriptaculous-0.01
http://search.cpan.org/~cordata/Kwiki-Scriptaculous-0.01/
Will add the Script.aculo.us javascript library to a Kwiki installation. It serves no purpose but to allow other modules (mainly Web 2.0 modules) access to this javascript library without having to in
----
Kwiki-JSON-0.01
http://search.cpan.org/~cordata/Kwiki-JSON-0.01/
Provides the JSON javascript library for Kwiki
----
Kwiki-Edit-BackgroundSave-0.02
http://search.cpan.org/~cordata/Kwiki-Edit-BackgroundSave-0.02/
Will allow a user to save the current page they are editing while contining to edit the page.
----
Kwiki-JSLog-0.01
http://search.cpan.org/~cordata/Kwiki-JSLog-0.01/
Provides JSLog library for Kwiki
----
Kwiki-Formatter-Note-0.01
http://search.cpan.org/~cordata/Kwiki-Formatter-Note-0.01/
Allows you to put "Notes" in your wiki.
----
Kwiki-Formatter-Emphasis-0.01
http://search.cpan.org/~cordata/Kwiki-Formatter-Emphasis-0.01/
Will add new syntax for emphasizing text and fix a bug in the Kwiki core that will make the built-in italic syntax actually italicize the text.
----
Kwiki-Formatter-CaptionedImage-0.01
http://search.cpan.org/~cordata/Kwiki-Formatter-CaptionedImage-0.01/
Will display an image to the screen with a caption below it.
----
Kwiki-Edit-ContentionManagement-0.01
http://search.cpan.org/~cordata/Kwiki-Edit-ContentionManagement-0.01/
Allows the user to do something when contention occurs besides starting over!
----
Kwiki-Edit-BackgroundSave-0.01
http://search.cpan.org/~cordata/Kwiki-Edit-BackgroundSave-0.01/
Will allow a user to save the current page they are editing while contining to edit the page.
----
Kwiki-Prototype-0.01
http://search.cpan.org/~cordata/Kwiki-Prototype-0.01/
Will add the Prototype javascript library to a Kwiki installation. It serves no purpose but to allow other modules (mainly Web 2.0 modules) access to this javascript library without having to include
----
Kwiki-Edit-AdvisoryLock-0.01
http://search.cpan.org/~cordata/Kwiki-Edit-AdvisoryLock-0.01/
Will warn the user if someone else might be editing this page.
----
Xmldoom-0.0.9
http://search.cpan.org/~dsnopek/Xmldoom-0.0.9/
----
Roma-0.0.9
http://search.cpan.org/~dsnopek/Roma-0.0.9/
----
WWW-Google-Calculator-0.02
http://search.cpan.org/~typester/WWW-Google-Calculator-0.02/
Perl interface for Google calculator
----
Lingua-AR-Db-2.11
http://search.cpan.org/~benazzo/Lingua-AR-Db-2.11/
Perl extension for translating Arabic words into another language
----
Lingua-AR-Word-1.5.5
http://search.cpan.org/~benazzo/Lingua-AR-Word-1.5.5/
Perl extension to get the stem and ArabTeX encoding of Arabic words
----
Audio-MadJACK-0.04
http://search.cpan.org/~njh/Audio-MadJACK-0.04/
Talk to MadJACK server using Object Oriented Perl
----
Class-CodeStyler-0.07
http://search.cpan.org/~gaffie/Class-CodeStyler-0.07/
Perl extension for code generation program formatting and execution.
----
Class-STL-Containers-0.26
http://search.cpan.org/~gaffie/Class-STL-Containers-0.26/
Perl extension for STL-like object management
----
WWW-Google-Calculator-0.01
http://search.cpan.org/~typester/WWW-Google-Calculator-0.01/
Perl interface for Google calculator
----
Catalyst-Plugin-Dojo-0.01_1
http://search.cpan.org/~cfranks/Catalyst-Plugin-Dojo-0.01_1/
Catalyst plugin to work with the Dojo JavaScript / AJAX library.
----
HTML-Dojo-0.0300
http://search.cpan.org/~cfranks/HTML-Dojo-0.0300/
Provides the Dojo AJAX distribution 0.3.0 files.
----
XML-TreePP-0.14
http://search.cpan.org/~kawasaki/XML-TreePP-0.14/
Pure Perl implementation for parsing/writing xml files
----
Digest-SHA-PurePerl-5.37
http://search.cpan.org/~mshelor/Digest-SHA-PurePerl-5.37/
Perl implementation of SHA-1/224/256/384/512
----
Digest-SHA-5.37
http://search.cpan.org/~mshelor/Digest-SHA-5.37/
Perl extension for SHA-1/224/256/384/512
----
Data-FormValidator-Constraints-Japanese-0.01
http://search.cpan.org/~dmaki/Data-FormValidator-Constraints-Japanese-0.01/
----
XML-DT-0.44
http://search.cpan.org/~ambs/XML-DT-0.44/
a package for down translation of XML files
----
XML-DT-0.43
http://search.cpan.org/~ambs/XML-DT-0.43/
a package for down translation of XML files
----
Test-C2FIT-0.06
http://search.cpan.org/~tjbyrne/Test-C2FIT-0.06/
A direct Perl port of Ward Cunningham's FIT acceptance test framework for Java.
----
Unicode-Char-0.02
http://search.cpan.org/~dankogai/Unicode-Char-0.02/
OO interface to charnames and others
----
UNIVERSAL-which-0.03
http://search.cpan.org/~dankogai/UNIVERSAL-which-0.03/
tells fully qualified name of the method
----
HTML-TreeBuilder-XPath-0.04
http://search.cpan.org/~mirod/HTML-TreeBuilder-XPath-0.04/
add XPath support to HTML::TreeBuilder
----
Filesys-Df-0.90
http://search.cpan.org/~iguthrie/Filesys-Df-0.90/
Perl extension for filesystem space.
----
Acme-MetaSyntactic-0.74
http://search.cpan.org/~book/Acme-MetaSyntactic-0.74/
Themed metasyntactic variables names
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.
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: Mon, 15 May 2006 15:33:13 +0200
From: Yohan N. Leder <ynleder@nspark.org>
Subject: Redirection whatever be the forked life
Message-Id: <MPG.1ed2a18274b38662989845@news.tiscali.fr>
Hi,
Newbie in Perl and don't know how to do with this piece of script. I
would like it redirects to mainboard.cgi without waiting for long forked
process to be completed. Is it possible ? Knowing that in the real
script the storit sub does a GET to a remote counter script which
generates a log file.
#!/usr/bin/perl -w
use strict;
# normally use CGI, but just a quick test script here
print "CONTENT-TYPE: text/html; Charset=UTF-8\n\n";
# ... here, some *quick* treatments (less than 10 seconds)...
defined(my $pid = fork) or die "cannot fork : $!";
unless ($pid) {
# storit being a *long* process (say 1 or 2mn) without any print
storit();
exit 0;
}
# ... here, some checking about previous treatment
print "Successfull treatment ! Redirection in 4 secondes...";
print "<META HTTP-EQUIV=\"Refresh\" CONTENT=\"4; URL=mainboard.cgi\">";
exit 0;
sub storit {
# simulate a long process (until 3mn in reality)
for (my $idx=1;$idx<10;$idx++) {
sleep 1;
}
}
And with this mainboard.cgi :
#!/usr/bin/perl -wT
use strict;
print "CONTENT-TYPE: text/html; Charset=UTF-8\n\n";
print "... main board ...";
exit 0;
Yohan N. Leder
------------------------------
Date: Mon, 15 May 2006 14:49:45 +0100
From: David Squire <David.Squire@no.spam.from.here.au>
Subject: Re: Redirection whatever be the forked life
Message-Id: <e4a0tp$36f$1@news.ox.ac.uk>
Yohan N. Leder wrote:
> Hi,
>
> Newbie in Perl and don't know how to do with this piece of script. I
> would like it redirects to mainboard.cgi without waiting for long forked
> process to be completed. Is it possible ? Knowing that in the real
> script the storit sub does a GET to a remote counter script which
> generates a log file.
>
Yes. You need to make the parent process (which gets a TRUE value for
pid) be the one that redirects to somewhere else (easily done using the
CGI module). This seems to be what you are doing, since you call
storit() unless $pid.
What is going wrong for you? You do not report any errors or unwanted
behaviour.
DS
------------------------------
Date: Mon, 15 May 2006 14:59:20 +0100
From: David Squire <David.Squire@no.spam.from.here.au>
Subject: Re: Redirection whatever be the forked life
Message-Id: <e4a1fo$3d8$1@news.ox.ac.uk>
David Squire wrote:
> Yohan N. Leder wrote:
>> Hi,
>>
>> Newbie in Perl and don't know how to do with this piece of script. I
>> would like it redirects to mainboard.cgi without waiting for long
>> forked process to be completed. Is it possible ? Knowing that in the
>> real script the storit sub does a GET to a remote counter script which
>> generates a log file.
>>
>
> Yes. You need to make the parent process (which gets a TRUE value for
> pid) be the one that redirects to somewhere else (easily done using the
> CGI module). This seems to be what you are doing, since you call
> storit() unless $pid.
Premature posting, sorry. It's not as simple as that. See perdoc -f fork
for issues such as zombie creation (if the parent does not wait for the
child, which is what would happen in the scenario above), and connection
of file system descriptors such as STDIN and STDOUT.
Hmmm. Perhaps you could make the child be the one that redirects (since
it should finish ASAP and can be waited for by the other), inheriting
the socket connected IO, and reopen those in the parent. Just
speculating though...
DS
------------------------------
Date: Mon, 15 May 2006 14:05:30 GMT
From: "A. Sinan Unur" <1usa@llenroc.ude.invalid>
Subject: Re: Redirection whatever be the forked life
Message-Id: <Xns97C466AF9155asu1cornelledu@127.0.0.1>
Yohan N. Leder <ynleder@nspark.org> wrote in
news:MPG.1ed2a18274b38662989845@news.tiscali.fr:
> Newbie in Perl and don't know how to do with this piece of script. I
> would like it redirects to mainboard.cgi without waiting for long
> forked process to be completed. Is it possible ?
Yes.
http://www.stonehenge.com/merlyn/LinuxMag/col39.html
Sinan
--
A. Sinan Unur <1usa@llenroc.ude.invalid>
(remove .invalid and reverse each component for email address)
comp.lang.perl.misc guidelines on the WWW:
http://augustmail.com/~tadmc/clpmisc/clpmisc_guidelines.html
------------------------------
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 V10 Issue 9230
***************************************