[29963] in Perl-Users-Digest

home help back first fref pref prev next nref lref last post

Perl-Users Digest, Issue: 1206 Volume: 11

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Thu Jan 17 03:10:46 2008

Date: Thu, 17 Jan 2008 00:09:05 -0800 (PST)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)

Perl-Users Digest           Thu, 17 Jan 2008     Volume: 11 Number: 1206

Today's topics:
    Re: incorrect errno/perror with IO::socket->new <uri@stemsystems.com>
    Re: incorrect errno/perror with IO::socket->new <brandon.mayfield@att.net>
    Re: incorrect errno/perror with IO::socket->new <uri@stemsystems.com>
    Re: incorrect errno/perror with IO::socket->new <brandon.mayfield@att.net>
    Re: incorrect errno/perror with IO::socket->new <uri@stemsystems.com>
    Re: incorrect errno/perror with IO::socket->new <nospam-abuse@ilyaz.org>
        new CPAN modules on Thu Jan 17 2008 (Randal Schwartz)
    Re: Wait for background processes to complete <ben@morrow.me.uk>
        Windows PerlTk/Sirius App <s1037989@gmail.com>
        Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)

----------------------------------------------------------------------

Date: Thu, 17 Jan 2008 05:27:45 GMT
From: Uri Guttman <uri@stemsystems.com>
Subject: Re: incorrect errno/perror with IO::socket->new
Message-Id: <x7bq7luilr.fsf@mail.sysarch.com>

>>>>> "b" == brandon  <brandon.mayfield@att.net> writes:

  b>  I really did get you the first time :-) I was thinking that perhaps
  b> the errno was NOT getting set in Socket->new() from it's system calls
  b> (I am kinda just assuming that $! returns the current value of errno
  b> or perror depending on the context), and I wanted to see if $! was
  b> different before and after the call.

but where did you get the totally misguided idea that $! has anything to
do with the results of the io::socket call? where in the docs is that?
what source led you to think that? $! is defined for system calls. you
don't care about individual system calls in a module as it may call MANY
system calls and even handle those errors. modules will not clear or
reset $! so you get bogus info. 

  b>  If it was not changed from before the call it might mean nothing set
  b> an error code during the call or it might mean there is a bug
  b> somewhere if Perl (read IO::Socket::INET) is saving errno off
  b> temporarily while it does some other system calls after the first
  b> failure (for instance maybe it needs to make other system calls to
  b> clean up).

who cares if it was changed? it has no relationship to the io::socket
call. why do you keep checking it?

  b>  Or if was changed from before the call then at least I know something
  b> in the call really did change it and it was not just that value to
  b> begin with. This is the case I had, it was I guess 'undef' before the
  b> call and something else after, turns out it may be valid (though if it
  b> is it doesn't seem consistent across platforms) after all.

no, it could be random noise from a cosmic ray changing it. there is no
informational value in $! after an io::socket call. stop even thinking
the name of $!.

  b>  That wasn't really what I was having trouble with, it was the $!
  b> after the Socket->new(). Based on your next post I did find out some
  b> more, so thanks very much for all your comments.

i tell you to not look at $! and you keep saying you have trouble with
it. i give up.

uri

-- 
Uri Guttman  ------  uri@stemsystems.com  --------  http://www.sysarch.com --
-----  Perl Architecture, Development, Training, Support, Code Review  ------
-----------  Search or Offer Perl Jobs  ----- http://jobs.perl.org  ---------
---------  Gourmet Hot Cocoa Mix  ----  http://bestfriendscocoa.com ---------


------------------------------

Date: Wed, 16 Jan 2008 21:28:56 -0800 (PST)
From: brandon <brandon.mayfield@att.net>
Subject: Re: incorrect errno/perror with IO::socket->new
Message-Id: <4cee2b0b-8e66-4384-bc9f-fbfc9e758f60@21g2000hsj.googlegroups.com>

On Jan 16, 9:53=A0pm, Uri Guttman <u...@stemsystems.com> wrote:
> >>>>> "b" =3D=3D brandon =A0<brandon.mayfi...@att.net> writes:
>
> =A0 b> On Jan 16, 7:53=A0pm, Uri Guttman <u...@stemsystems.com> wrote:
> =A0 >>
> =A0 >> perl -MIO::Socket -e '$s =3D IO::Socket::INET->new( "127.0.0.1:1234=
"); print "$@\n" unless $s'
> =A0 >> IO::Socket::INET: connect: Connection refused
> =A0 >>
> =A0 >> =A0perl -MIO::Socket -e '$s =3D IO::Socket::INET->new( "172.16.18.9=
6:1234"); print "$@\n" unless $s'
> =A0 >> IO::Socket::INET: connect: Connection timed out
>
> =A0 b> =A0Does that mean that Timeout is not valid for AIX and HP or only =
works
> =A0 b> properly under certain conditions? It seems to me extremely strange=

> =A0 b> because if I try to open a port on a server that does not respond
> =A0 b> (packets being dropped without any response from the network) then =
it
> =A0 b> does seem to wait for "Timeout" seconds before returning a "timed o=
ut"
> =A0 b> perror.
>
> the timeout i got was a real failure of the connect and reported as
> such.

 Right, there is no timout value in :

perl -MIO::Socket -e '$s =3D IO::Socket::INET->new( "127.0.0.1:1234");
print "$@\n" unless $s'

 only an IP address and a port.

> the timeout in io::socket timeout arg is NOT a part of any system
> call and is controlled by some perl time thing like an alrm signal
> breaking out of an eval block. you may be seeing the error from that
> which is not important
>

 yes you might be right. strange it does not behave this way on sun
and linux.

> =A0 b> =A0And also the fact that the same script does return the expected
> =A0 b> perror on Sun and Linux whether I use Timeout or not.
>
> the perror IS USELESS. i keep telling you that. there is so much code
> executing in io::socket that you can't tell what error was generated by
> what call. why do you keep caring about $!?????

 I guess I would expect that the Socket code would save the first
meaningful errno (that would be from the first failed system call) so
that the caller could tell exactly why the call failed. There is no
other mechanisim to determine why the call failed otherwise. It
appears that they are and that my use of Timeout is related to what
error is set.

>
> =A0 b> =A0I guess I get to hack a little more tomorrow, and you've helped =
me a
> =A0 b> bunch but it still seems like something is inconsistent here.
>
> no, your brane is inconsistant. $! has nothing to do with io::socket. do
> you see any docs that say otherwise?? only check $@ if you get an error
> and not a socket. ignore $!. period. that is all. you are wasting your
> and our time with this. it is so simple and you think it is
> complex. change your brane as the perl modules won't change for you.
>

 Please don't get testy - why shouldn't I think something is
inconsistant if the same code produces different results on 4 differnt
OS's? I am currently printing out both $@ and $! and they are always
the same - I have not seen a difference yet under any of the test
conditions I have set up, on 6 different versions of perl.

 And yes, I do see documentation about how $! is supposed to work,
perlvar indicates I should be able to use $! to return the errno /
perror from the last failed system call, which should be exactly what
I want, given that the writer(s) of Socket were careful enough to save
the one from the first failed system call to restore for me before
returning if other system calls have to be made in the iterim. $@ is
supposed to return the last failure from an eval, which I am not using
so I am not sure why you think that is more applicable.

> uri
>
> --
> Uri Guttman =A0------ =A0u...@stemsystems.com =A0-------- =A0http://www.sy=
sarch.com--
> ----- =A0Perl Architecture, Development, Training, Support, Code Review =
=A0------
> ----------- =A0Search or Offer Perl Jobs =A0-----http://jobs.perl.org=A0--=
-------
> --------- =A0Gourmet Hot Cocoa Mix =A0---- =A0http://bestfriendscocoa.com-=
--------


------------------------------

Date: Thu, 17 Jan 2008 05:36:16 GMT
From: Uri Guttman <uri@stemsystems.com>
Subject: Re: incorrect errno/perror with IO::socket->new
Message-Id: <x77ii9ui7k.fsf@mail.sysarch.com>

>>>>> "b" == brandon  <brandon.mayfield@att.net> writes:

  b> On Jan 16, 9:53 pm, Uri Guttman <u...@stemsystems.com> wrote:
  >> >>>>> "b" == brandon  <brandon.mayfi...@att.net> writes:
  b>  Right, there is no timout value in :

  b> perl -MIO::Socket -e '$s = IO::Socket::INET->new( "127.0.0.1:1234");
  b> print "$@\n" unless $s'

  b>  only an IP address and a port.

how observant of you.

  >> the timeout in io::socket timeout arg is NOT a part of any system
  >> call and is controlled by some perl time thing like an alrm signal
  >> breaking out of an eval block. you may be seeing the error from that
  >> which is not important
  >> 

  b>  yes you might be right. strange it does not behave this way on sun
  b> and linux.

hmm. maybe i AM right? i have done way more complex socket stuff than
io::socket for decades in perl and c. not an exaggeration.

  >>   b>  And also the fact that the same script does return the expected
  >>   b> perror on Sun and Linux whether I use Timeout or not.
  >> 
  >> the perror IS USELESS. i keep telling you that. there is so much code
  >> executing in io::socket that you can't tell what error was generated by
  >> what call. why do you keep caring about $!?????

  b>  I guess I would expect that the Socket code would save the first
  b> meaningful errno (that would be from the first failed system call) so
  b> that the caller could tell exactly why the call failed. There is no
  b> other mechanisim to determine why the call failed otherwise. It
  b> appears that they are and that my use of Timeout is related to what
  b> error is set.

why do you assume stupid ideas like that? do you know how many modules
there are on cpan? how many system calls most of them make? tracking
each one and reporting each possible error is insane. why don't you
check the fucking source code instead of living your fantasy of how you
think system call errors should be handled? 

  >> no, your brane is inconsistant. $! has nothing to do with io::socket. do
  >> you see any docs that say otherwise?? only check $@ if you get an error
  >> and not a socket. ignore $!. period. that is all. you are wasting your
  >> and our time with this. it is so simple and you think it is
  >> complex. change your brane as the perl modules won't change for you.

  b>  Please don't get testy - why shouldn't I think something is
  b> inconsistant if the same code produces different results on 4 differnt
  b> OS's? I am currently printing out both $@ and $! and they are always
  b> the same - I have not seen a difference yet under any of the test
  b> conditions I have set up, on 6 different versions of perl.

if the value of $! is not related to the module's error, why do you
think it will be the same on different systems? that makes absolutely no
sense.

  b>  And yes, I do see documentation about how $! is supposed to work,
  b> perlvar indicates I should be able to use $! to return the errno /
  b> perror from the last failed system call, which should be exactly what
  b> I want, given that the writer(s) of Socket were careful enough to save
  b> the one from the first failed system call to restore for me before
  b> returning if other system calls have to be made in the iterim. $@ is
  b> supposed to return the last failure from an eval, which I am not using
  b> so I am not sure why you think that is more applicable.

i give up. you won't listen. read the code. send in large patches. you
are blocked in your brane and won't ever get over this obsession with $!
when it is meaningless here. 

uri

-- 
Uri Guttman  ------  uri@stemsystems.com  --------  http://www.sysarch.com --
-----  Perl Architecture, Development, Training, Support, Code Review  ------
-----------  Search or Offer Perl Jobs  ----- http://jobs.perl.org  ---------
---------  Gourmet Hot Cocoa Mix  ----  http://bestfriendscocoa.com ---------


------------------------------

Date: Wed, 16 Jan 2008 21:36:17 -0800 (PST)
From: brandon <brandon.mayfield@att.net>
Subject: Re: incorrect errno/perror with IO::socket->new
Message-Id: <ba4a526f-0ad2-498a-af68-a9f2a9fab94d@i12g2000prf.googlegroups.com>

On Jan 16, 10:27=A0pm, Uri Guttman <u...@stemsystems.com> wrote:
> >>>>> "b" =3D=3D brandon =A0<brandon.mayfi...@att.net> writes:
>
> =A0 b> =A0I really did get you the first time :-) I was thinking that perh=
aps
> =A0 b> the errno was NOT getting set in Socket->new() from it's system cal=
ls
> =A0 b> (I am kinda just assuming that $! returns the current value of errn=
o
> =A0 b> or perror depending on the context), and I wanted to see if $! was
> =A0 b> different before and after the call.
>
> but where did you get the totally misguided idea that $! has anything to
> do with the results of the io::socket call? where in the docs is that?
> what source led you to think that? $! is defined for system calls. you
> don't care about individual system calls in a module as it may call MANY
> system calls and even handle those errors. modules will not clear or
> reset $! so you get bogus info.
>

 No I am expecting that Socket->new() is making system calls and if
they fail I can retrieve the error with $!. If not, then there is not
a way for me to tell exactly why the call failed.
I am left only with an undef $socket.

 The writers of Socket should be (and apparently are) either returning
immediately on a filed system call, or if others need to be made to
clean up then saving it and restoring it after all clean up system
calls are finished. That does seem to be what they are doing an it is
not unreasonable to expect.

> =A0 b> =A0If it was not changed from before the call it might mean nothing=
 set
> =A0 b> an error code during the call or it might mean there is a bug
> =A0 b> somewhere if Perl (read IO::Socket::INET) is saving errno off
> =A0 b> temporarily while it does some other system calls after the first
> =A0 b> failure (for instance maybe it needs to make other system calls to
> =A0 b> clean up).
>
> who cares if it was changed? it has no relationship to the io::socket
> call. why do you keep checking it?

 I have to disagree with that. It is set, and correctly apparently.

>
> =A0 b> =A0Or if was changed from before the call then at least I know some=
thing
> =A0 b> in the call really did change it and it was not just that value to
> =A0 b> begin with. This is the case I had, it was I guess 'undef' before t=
he
> =A0 b> call and something else after, turns out it may be valid (though if=
 it
> =A0 b> is it doesn't seem consistent across platforms) after all.
>
> no, it could be random noise from a cosmic ray changing it. there is no
> informational value in $! after an io::socket call. stop even thinking
> the name of $!.
>
> =A0 b> =A0That wasn't really what I was having trouble with, it was the $!=

> =A0 b> after the Socket->new(). Based on your next post I did find out som=
e
> =A0 b> more, so thanks very much for all your comments.
>
> i tell you to not look at $! and you keep saying you have trouble with
> it. i give up.
>
> uri
>
> --
> Uri Guttman =A0------ =A0u...@stemsystems.com =A0-------- =A0http://www.sy=
sarch.com--
> ----- =A0Perl Architecture, Development, Training, Support, Code Review =
=A0------
> ----------- =A0Search or Offer Perl Jobs =A0-----http://jobs.perl.org=A0--=
-------
> --------- =A0Gourmet Hot Cocoa Mix =A0---- =A0http://bestfriendscocoa.com-=
--------



------------------------------

Date: Thu, 17 Jan 2008 06:01:45 GMT
From: Uri Guttman <uri@stemsystems.com>
Subject: Re: incorrect errno/perror with IO::socket->new
Message-Id: <x7y7apt2gn.fsf@mail.sysarch.com>

>>>>> "b" == brandon  <brandon.mayfield@att.net> writes:

  b> On Jan 16, 10:27 pm, Uri Guttman <u...@stemsystems.com> wrote:
  >> >>>>> "b" == brandon  <brandon.mayfi...@att.net> writes:
  >> 
  >>   b>  I really did get you the first time :-) I was thinking that perhaps
  >>   b> the errno was NOT getting set in Socket->new() from it's system calls
  >>   b> (I am kinda just assuming that $! returns the current value of errno
  >>   b> or perror depending on the context), and I wanted to see if $! was
  >>   b> different before and after the call.
  >> 
  >> but where did you get the totally misguided idea that $! has anything to
  >> do with the results of the io::socket call? where in the docs is that?
  >> what source led you to think that? $! is defined for system calls. you
  >> don't care about individual system calls in a module as it may call MANY
  >> system calls and even handle those errors. modules will not clear or
  >> reset $! so you get bogus info.
  >> 

  b>  No I am expecting that Socket->new() is making system calls and if
  b> they fail I can retrieve the error with $!. If not, then there is not
  b> a way for me to tell exactly why the call failed.
  b> I am left only with an undef $socket.

  b>  The writers of Socket should be (and apparently are) either returning
  b> immediately on a filed system call, or if others need to be made to
  b> clean up then saving it and restoring it after all clean up system
  b> calls are finished. That does seem to be what they are doing an it is
  b> not unreasonable to expect.

then write your own module. i did. otherwise expect nothing more than
what the docs offer. your expectations are wrong, useless and leading
you into a brick wall. enjoy.

  >>   b>  If it was not changed from before the call it might mean nothing set
  >>   b> an error code during the call or it might mean there is a bug
  >>   b> somewhere if Perl (read IO::Socket::INET) is saving errno off
  >>   b> temporarily while it does some other system calls after the first
  >>   b> failure (for instance maybe it needs to make other system calls to
  >>   b> clean up).
  >> 
  >> who cares if it was changed? it has no relationship to the io::socket
  >> call. why do you keep checking it?

  b>  I have to disagree with that. It is set, and correctly apparently.

but who cares?? your connection failed. $@ tells you why. why the hell
check $!??? it could be anything inside the module and it could be
something that does not matter. yet you give it credence. this is on
your head and not the module. bang your head away. enjoy.

uri

-- 
Uri Guttman  ------  uri@stemsystems.com  --------  http://www.sysarch.com --
-----  Perl Architecture, Development, Training, Support, Code Review  ------
-----------  Search or Offer Perl Jobs  ----- http://jobs.perl.org  ---------
---------  Gourmet Hot Cocoa Mix  ----  http://bestfriendscocoa.com ---------


------------------------------

Date: Thu, 17 Jan 2008 07:38:58 +0000 (UTC)
From:  Ilya Zakharevich <nospam-abuse@ilyaz.org>
Subject: Re: incorrect errno/perror with IO::socket->new
Message-Id: <fmn0mi$2qdu$1@agate.berkeley.edu>

[A complimentary Cc of this posting was sent to
Uri Guttman 
<uri@stemsystems.com>], who wrote in article <x7d4s1w4v1.fsf@mail.sysarch.com>:
> do you understand me now??

a) there is no reason to yell;

b) your arguments are, IMO, wrong.

In a perfect world, your argument that `$@ should contain all the
information one needs' would be right.  In a perfect world, presetting
these variables to FALSE would not be needed.  In a perfect world,
one would not need to check $!.

However, as the OP had shown, the world he lives in is not perfect.
Somethign fishy is happening.  So it is very logical, very polite, and
very helpful (*) that he is setting $!, $@ to FALSE, and is the value
of reporting $! to us.

   (*) Well, not helpful enough for me to solve his problem (sorry!),
       but helpful in avoiding unneeded assumptions and questions.

Hope this helps,
Ilya


------------------------------

Date: Thu, 17 Jan 2008 05:42:17 GMT
From: merlyn@stonehenge.com (Randal Schwartz)
Subject: new CPAN modules on Thu Jan 17 2008
Message-Id: <Jurx6H.1yDG@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.

AI-NeuralNet-SOM-0.05
http://search.cpan.org/~drrho/AI-NeuralNet-SOM-0.05/
Perl extension for Kohonen Maps 
----
Algorithm-LBFGS-0.02
http://search.cpan.org/~laye/Algorithm-LBFGS-0.02/
Perl extension for L-BFGS 
----
App-Music-PlayTab-2.017
http://search.cpan.org/~jv/App-Music-PlayTab-2.017/
----
Audio-Play-MPlayer-0.02
http://search.cpan.org/~mbarbon/Audio-Play-MPlayer-0.02/
a frontend to play audio files using MPlayer 
----
CVS-Metrics-0.17
http://search.cpan.org/~perrad/CVS-Metrics-0.17/
Utilities for process cvs log 
----
Cache-Memcached-LibMemcached-0.00005
http://search.cpan.org/~dmaki/Cache-Memcached-LibMemcached-0.00005/
Perl Interface to libmemcached 
----
Catalyst-Controller-SOAP-0.2.0
http://search.cpan.org/~druoso/Catalyst-Controller-SOAP-0.2.0/
Catalyst SOAP Controller 
----
Catalyst-Model-SOAP-0.0.4
http://search.cpan.org/~druoso/Catalyst-Model-SOAP-0.0.4/
Map a WSDL to a catalyst model class. 
----
Catalyst-Plugin-Session-Store-FastMmap-0.05
http://search.cpan.org/~karman/Catalyst-Plugin-Session-Store-FastMmap-0.05/
FastMmap session storage backend. 
----
Catalyst-Plugin-Session-Store-File-0.13
http://search.cpan.org/~karman/Catalyst-Plugin-Session-Store-File-0.13/
File storage backend for session data. 
----
CatalystX-CRUD-Model-DBIC-0.02
http://search.cpan.org/~karman/CatalystX-CRUD-Model-DBIC-0.02/
DBIx::Class CRUD 
----
Class-DBI-Pg-More-0.03
http://search.cpan.org/~bosu/Class-DBI-Pg-More-0.03/
Enhances Class::DBI::Pg with more goodies. 
----
Data-Constraint-1.12
http://search.cpan.org/~bdfoy/Data-Constraint-1.12/
prototypical value checking 
----
Data-Constraint-1.16
http://search.cpan.org/~bdfoy/Data-Constraint-1.16/
prototypical value checking 
----
Devel-System-Trace-0.0.2
http://search.cpan.org/~sukria/Devel-System-Trace-0.0.2/
----
Encode-JP-Mobile-0.16
http://search.cpan.org/~miyagawa/Encode-JP-Mobile-0.16/
Shift_JIS (CP932) variants of Japanese cellphone pictograms 
----
Encode-JP-Mobile-0.17
http://search.cpan.org/~miyagawa/Encode-JP-Mobile-0.17/
Shift_JIS (CP932) variants of Japanese cellphone pictograms 
----
Geo-Coordinates-Converter-0.04
http://search.cpan.org/~yappo/Geo-Coordinates-Converter-0.04/
simple converter of geo coordinates 
----
Gungho-0.09006
http://search.cpan.org/~dmaki/Gungho-0.09006/
Yet Another High Performance Web Crawler Framework 
----
GunghoX-DeepCrawler-0.00001_01
http://search.cpan.org/~dmaki/GunghoX-DeepCrawler-0.00001_01/
Crawls Within The Same Host 
----
GunghoX-FollowLinks-0.00005
http://search.cpan.org/~dmaki/GunghoX-FollowLinks-0.00005/
Automatically Follow Links Within Responses 
----
HTML-Copy-1.23
http://search.cpan.org/~tkurita/HTML-Copy-1.23/
copy a HTML file without breaking links. 
----
HTML-MobileJp-0.01
http://search.cpan.org/~tokuhirom/HTML-MobileJp-0.01/
generate mobile-jp html tags 
----
HTML-MobileJp-0.02
http://search.cpan.org/~tokuhirom/HTML-MobileJp-0.02/
generate mobile-jp html tags 
----
Language-Befunge-Vector-XS-0.1.3
http://search.cpan.org/~jquelin/Language-Befunge-Vector-XS-0.1.3/
an opaque, N-dimensional vector class. 
----
Language-Befunge-Vector-XS-0.2.0
http://search.cpan.org/~jquelin/Language-Befunge-Vector-XS-0.2.0/
Language::Befunge::Vector rewritten for speed 
----
Mac-OSVersion-0.12
http://search.cpan.org/~bdfoy/Mac-OSVersion-0.12/
Get the Mac OS X system version 
----
Mac-Path-Util-0.25
http://search.cpan.org/~bdfoy/Mac-Path-Util-0.25/
convert between darwin and Mac paths 
----
Mac-PropertyList-1.31
http://search.cpan.org/~bdfoy/Mac-PropertyList-1.31/
work with Mac plists at a low level 
----
Math-Complex-1.46
http://search.cpan.org/~jhi/Math-Complex-1.46/
complex numbers and associated mathematical functions 
----
Math-Complex-1.47
http://search.cpan.org/~jhi/Math-Complex-1.47/
complex numbers and associated mathematical functions 
----
Memcached-libmemcached-0.1304
http://search.cpan.org/~timb/Memcached-libmemcached-0.1304/
Thin fast full interface to the libmemcached client API 
----
MooseX-Async-0.01
http://search.cpan.org/~perigrin/MooseX-Async-0.01/
The Orphanange of Asynchronous Love Children 
----
MooseX-Async-0.02
http://search.cpan.org/~perigrin/MooseX-Async-0.02/
The Orphanange of Asynchronous Love Children 
----
MooseX-POE-0.03
http://search.cpan.org/~perigrin/MooseX-POE-0.03/
The Illicit Love Child of Moose and POE 
----
Net-Amazon-ATS-0.01
http://search.cpan.org/~shevek/Net-Amazon-ATS-0.01/
Use the Amazon Alexa Top Sites Service 
----
Net-Amazon-AWIS-0.33
http://search.cpan.org/~lbrocard/Net-Amazon-AWIS-0.33/
Use the Amazon Alexa Web Information Service 
----
OAuth-Lite-1.03
http://search.cpan.org/~lyokato/OAuth-Lite-1.03/
OAuth framework 
----
OAuth-Lite-1.04
http://search.cpan.org/~lyokato/OAuth-Lite-1.04/
OAuth framework 
----
OAuth-Lite-1.05
http://search.cpan.org/~lyokato/OAuth-Lite-1.05/
OAuth framework 
----
PDL-Fit-Levmar-0.0086
http://search.cpan.org/~jlapeyre/PDL-Fit-Levmar-0.0086/
Levenberg-Marquardt fit/optimization routines 
----
POE-Component-Client-Whois-1.12
http://search.cpan.org/~bingos/POE-Component-Client-Whois-1.12/
A one shot non-blocking RFC 812 WHOIS query. 
----
POE-Component-IKC-0.2001
http://search.cpan.org/~gwyn/POE-Component-IKC-0.2001/
POE Inter-Kernel Communication 
----
POEIKCdaemon-0.00_02
http://search.cpan.org/~suzuki/POEIKCdaemon-0.00_02/
POE IKC daemon 
----
Palm-Magellan-NavCompanion-0.53
http://search.cpan.org/~bdfoy/Palm-Magellan-NavCompanion-0.53/
access the Magellan GPS Companion waypoints file 
----
Panotools-Script-0.12
http://search.cpan.org/~bpostle/Panotools-Script-0.12/
Panorama Tools scripting 
----
Parse-Eyapp-1.105
http://search.cpan.org/~casiano/Parse-Eyapp-1.105/
Extensions for Parse::Yapp 
----
Parse-Marpa-0.200_000
http://search.cpan.org/~jkegl/Parse-Marpa-0.200_000/
(pre-Alpha) Earley's parsing with LR(0) precomputation 
----
PathTools-3.27
http://search.cpan.org/~kwilliams/PathTools-3.27/
----
SelfLoader-1.14
http://search.cpan.org/~smueller/SelfLoader-1.14/
load functions only on demand 
----
Sledge-SessionManager-Auto-0.01
http://search.cpan.org/~mikihoshi/Sledge-SessionManager-Auto-0.01/
----
Swarmage-0.01003
http://search.cpan.org/~dmaki/Swarmage-0.01003/
A Distributed Job Queue 
----
Sys-Statistics-Linux-0.26
http://search.cpan.org/~bloonix/Sys-Statistics-Linux-0.26/
Front-end module to collect system statistics 
----
Template-Plugin-HTMLMobileJp-0.01
http://search.cpan.org/~tokuhirom/Template-Plugin-HTMLMobileJp-0.01/
HTML::MobileJp plugin for Template-Toolkit 
----
Text-Phonetic-1.02
http://search.cpan.org/~maros/Text-Phonetic-1.02/
A module implementing various phonetic algorithms 
----
Tie-RefHash-1.38
http://search.cpan.org/~nuffin/Tie-RefHash-1.38/
use references as hash keys 
----
Tie-ToObject-0.03
http://search.cpan.org/~nuffin/Tie-ToObject-0.03/
Tie to an existing object. 
----
Tk-Wizard-2.132
http://search.cpan.org/~lgoddard/Tk-Wizard-2.132/
GUI for step-by-step interactive logical process 
----
URI-Template-0.10
http://search.cpan.org/~bricas/URI-Template-0.10/
Object for handling URI templates 
----
Unicode-Japanese-0.44_02
http://search.cpan.org/~hio/Unicode-Japanese-0.44_02/
Convert encoding of japanese text 1 
----
XML-APML-0.03
http://search.cpan.org/~lyokato/XML-APML-0.03/
APML parser/builder 
----
XML-APML-0.04
http://search.cpan.org/~lyokato/XML-APML-0.04/
APML parser/builder 
----
XML-Compile-0.65
http://search.cpan.org/~markov/XML-Compile-0.65/
Compilation based XML processing 
----
Yahoo-Lifestyle-0.1.1
http://search.cpan.org/~hcchien/Yahoo-Lifestyle-0.1.1/
is a simple interface for Yahoo! Taiwan Lifestyle open APIs. And you will need the Yahoo::BBAuth for some authentication APIs. Before you use that, you have to register a appid and secret for APIs req
----
Yahoo-Marketing-3.02
http://search.cpan.org/~jlavallee/Yahoo-Marketing-3.02/
an interface for Yahoo! Search Marketing's Web Services. 
----
perfSONAR_PS-Base-0.01
http://search.cpan.org/~perfsonar/perfSONAR_PS-Base-0.01/
----
perfSONAR_PS-Base-0.02
http://search.cpan.org/~perfsonar/perfSONAR_PS-Base-0.02/
----
perfSONAR_PS-Client-Echo-0.01
http://search.cpan.org/~perfsonar/perfSONAR_PS-Client-Echo-0.01/
A module that provides methods for interacting with perfSONAR Echo services. 
----
perfSONAR_PS-Client-Echo-0.02
http://search.cpan.org/~perfsonar/perfSONAR_PS-Client-Echo-0.02/
A module that provides methods for interacting with perfSONAR Echo services. 
----
perfSONAR_PS-Client-LS-Remote-0.01
http://search.cpan.org/~perfsonar/perfSONAR_PS-Client-LS-Remote-0.01/
A module that provides a client API for an LS 
----
perfSONAR_PS-Client-LS-Remote-0.02
http://search.cpan.org/~perfsonar/perfSONAR_PS-Client-LS-Remote-0.02/
A module that provides a client API for an LS 
----
perfSONAR_PS-Client-Status-MA-0.01
http://search.cpan.org/~perfsonar/perfSONAR_PS-Client-Status-MA-0.01/
A module that provides methods for interacting with Status MA servers. 
----
perfSONAR_PS-Client-Status-MA-0.02
http://search.cpan.org/~perfsonar/perfSONAR_PS-Client-Status-MA-0.02/
A module that provides methods for interacting with Status MA servers. 
----
perfSONAR_PS-Client-Status-SQL-0.01
http://search.cpan.org/~perfsonar/perfSONAR_PS-Client-Status-SQL-0.01/
A module that provides methods for interacting with a Status MA database directly. 
----
perfSONAR_PS-Client-Status-SQL-0.02
http://search.cpan.org/~perfsonar/perfSONAR_PS-Client-Status-SQL-0.02/
A module that provides methods for interacting with a Status MA database directly. 
----
perfSONAR_PS-Client-Topology-MA-0.01
http://search.cpan.org/~perfsonar/perfSONAR_PS-Client-Topology-MA-0.01/
A module that provides methods for interacting with Topology MA servers. 
----
perfSONAR_PS-Client-Topology-MA-0.02
http://search.cpan.org/~perfsonar/perfSONAR_PS-Client-Topology-MA-0.02/
A module that provides methods for interacting with Topology MA servers. 
----
perfSONAR_PS-Client-Topology-XMLDB-0.01
http://search.cpan.org/~perfsonar/perfSONAR_PS-Client-Topology-XMLDB-0.01/
A module that provides methods for interacting with a Topology MA database directly. 
----
perfSONAR_PS-Client-Topology-XMLDB-0.02
http://search.cpan.org/~perfsonar/perfSONAR_PS-Client-Topology-XMLDB-0.02/
A module that provides methods for interacting with a Topology MA database directly. 
----
perfSONAR_PS-Collectors-Daemon-0.01
http://search.cpan.org/~perfsonar/perfSONAR_PS-Collectors-Daemon-0.01/
----
perfSONAR_PS-Collectors-Daemon-0.02
http://search.cpan.org/~perfsonar/perfSONAR_PS-Collectors-Daemon-0.02/
----
perfSONAR_PS-Collectors-LinkStatus-0.01
http://search.cpan.org/~perfsonar/perfSONAR_PS-Collectors-LinkStatus-0.01/
A module that will collect link status information and store the results into a Link Status MA. 
----
perfSONAR_PS-Collectors-LinkStatus-0.02
http://search.cpan.org/~perfsonar/perfSONAR_PS-Collectors-LinkStatus-0.02/
A module that will collect link status information and store the results into a Link Status MA. 
----
perfSONAR_PS-DB-File-0.01
http://search.cpan.org/~perfsonar/perfSONAR_PS-DB-File-0.01/
A module that provides methods for adding 'database like' functions to files that contain XML markup. 
----
perfSONAR_PS-DB-File-0.02
http://search.cpan.org/~perfsonar/perfSONAR_PS-DB-File-0.02/
A module that provides methods for adding 'database like' functions to files that contain XML markup. 
----
perfSONAR_PS-DB-RRD-0.01
http://search.cpan.org/~perfsonar/perfSONAR_PS-DB-RRD-0.01/
A module that provides methods for dealing with rrd files through the RRDp perl module. 
----
perfSONAR_PS-DB-RRD-0.02
http://search.cpan.org/~perfsonar/perfSONAR_PS-DB-RRD-0.02/
A module that provides methods for dealing with rrd files through the RRDp perl module. 
----
perfSONAR_PS-DB-SQL-0.01
http://search.cpan.org/~perfsonar/perfSONAR_PS-DB-SQL-0.01/
A module that provides methods for dealing with common SQL databases. 
----
perfSONAR_PS-DB-SQL-0.02
http://search.cpan.org/~perfsonar/perfSONAR_PS-DB-SQL-0.02/
A module that provides methods for dealing with common SQL databases. 
----
perfSONAR_PS-DB-XMLDB-0.01
http://search.cpan.org/~perfsonar/perfSONAR_PS-DB-XMLDB-0.01/
A module that provides methods for dealing with the Sleepycat [Oracle] XML database. 
----
perfSONAR_PS-DB-XMLDB-0.02
http://search.cpan.org/~perfsonar/perfSONAR_PS-DB-XMLDB-0.02/
A module that provides methods for dealing with the Sleepycat [Oracle] XML database. 
----
perfSONAR_PS-Services-Daemon-0.01
http://search.cpan.org/~perfsonar/perfSONAR_PS-Services-Daemon-0.01/
----
perfSONAR_PS-Services-Daemon-0.02
http://search.cpan.org/~perfsonar/perfSONAR_PS-Services-Daemon-0.02/
----
perfSONAR_PS-Services-LS-0.01
http://search.cpan.org/~perfsonar/perfSONAR_PS-Services-LS-0.01/
----
perfSONAR_PS-Services-LS-0.02
http://search.cpan.org/~perfsonar/perfSONAR_PS-Services-LS-0.02/
----
perfSONAR_PS-Services-MA-Base-0.01
http://search.cpan.org/~perfsonar/perfSONAR_PS-Services-MA-Base-0.01/
----
perfSONAR_PS-Services-MA-Base-0.02
http://search.cpan.org/~perfsonar/perfSONAR_PS-Services-MA-Base-0.02/
----
perfSONAR_PS-Services-MA-SNMP-0.01
http://search.cpan.org/~perfsonar/perfSONAR_PS-Services-MA-SNMP-0.01/
----
perfSONAR_PS-Services-MA-SNMP-0.02
http://search.cpan.org/~perfsonar/perfSONAR_PS-Services-MA-SNMP-0.02/
----
perfSONAR_PS-Services-MA-Status-0.01
http://search.cpan.org/~perfsonar/perfSONAR_PS-Services-MA-Status-0.01/
A module that provides methods for the Status MA. 
----
perfSONAR_PS-Services-MA-Status-0.02
http://search.cpan.org/~perfsonar/perfSONAR_PS-Services-MA-Status-0.02/
A module that provides methods for the Status MA. 
----
perfSONAR_PS-Services-MA-Topology-0.01
http://search.cpan.org/~perfsonar/perfSONAR_PS-Services-MA-Topology-0.01/
A module that provides methods for the Topology MA. 
----
perfSONAR_PS-Services-MA-Topology-0.02
http://search.cpan.org/~perfsonar/perfSONAR_PS-Services-MA-Topology-0.02/
A module that provides methods for the Topology MA. 
----
perfSONAR_PS-Status-Common-0.01
http://search.cpan.org/~perfsonar/perfSONAR_PS-Status-Common-0.01/
A module that provides common methods for Link Status clients and services within the perfSONAR-PS framework. 
----
perfSONAR_PS-Status-Common-0.02
http://search.cpan.org/~perfsonar/perfSONAR_PS-Status-Common-0.02/
A module that provides common methods for Link Status clients and services within the perfSONAR-PS framework. 
----
perfSONAR_PS-Topology-Common-0.01
http://search.cpan.org/~perfsonar/perfSONAR_PS-Topology-Common-0.01/
A module that provides various utility functions for Topology structures. 
----
perfSONAR_PS-Topology-Common-0.02
http://search.cpan.org/~perfsonar/perfSONAR_PS-Topology-Common-0.02/
A module that provides various utility functions for Topology structures. 


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: Thu, 17 Jan 2008 05:37:10 +0000
From: Ben Morrow <ben@morrow.me.uk>
Subject: Re: Wait for background processes to complete
Message-Id: <656365-342.ln1@osiris.mauzo.dyndns.org>


Quoth grocery_stocker <cdalten@gmail.com>:
> On Jan 13, 10:09 pm, Ben Morrow <b...@morrow.me.uk> wrote:
> >
<snip>
> >         $SIG{CHLD} = sub {
> >             my ($pid, @died);
> >             push @died, $pid while $pid = waitpid -1, WNOHANG;
> >             delete @kids{@died};
> >         };
<snip>
> >             if ($pid) {
> >                 $kids{$pid} = 1;
> >                 return;
> >             }
<snip>
> >         sub finish {
> >             waitpid $_, 0 for keys %kids;
> >             %kids = ();
> >         }
> 
> I really don't grasp the significance of having $kids{$pid} equal 1.
> Can some enlighten me o this?

It's one of the standard idioms for using a hash as a set. Every time we
create a child, we add an entry to the hash; every time one dies on its
own, we delete its entry. Then at the end we can use keys %pids to
retrieve the list of pids we still need to wait for. The only thing that
matters about %kids are its keys: we never use the values, so they can
be set to anything. I prefer using 1 since then the values are all true;
you can get slightly better memory use with

    $kids{$pid} = ();

which inserts the key but doesn't create a value for it at all, but then
you have to test with exists, which I find annoying. Since in this case
I don't test for existance of keys at all, this doesn't matter: using 1 is
just a habit.

Ben



------------------------------

Date: Wed, 16 Jan 2008 22:08:54 -0800 (PST)
From: Stefan <s1037989@gmail.com>
Subject: Windows PerlTk/Sirius App
Message-Id: <2fb6b836-ebd0-4a19-af62-dd0a0fa5456a@n20g2000hsh.googlegroups.com>

I wrote a Perl/Tk app using Audio::Radio::Sirius for interfacing with
a Sirius Receiver via Serial.  It's lame, but it works well...  Any
suggestions?

My question is this -- if the serial loses connection to the Sirius
Receiver, the program becomes unresponsive and has to be killed via C-
A-D.  Does anyone have any suggestions on how to make the program
continue to function so that it can be exited gracefully?  Or even
better so that it can regain connection with the Sirius Receiver via
the Serial line?

Thanks!
Stefan

#! /usr/bin/perl

use Tk;
use Tk::DialogBox;
use Tk::NoteBook;
use Tk::LabEntry;
use Audio::Radio::Sirius;
use Win32::SerialPort;
use strict;
$^W++;

my %tuner = (
  power => 0,
  channel => 1,
  mute => 0,
  monitor => 0,
  presets => {
    row1 => {
      1 => "Top 40",
      8 => "80\'s",
      9 => "90\'s",
      12 => "SIRIUS\nSuper Mix",
      21 => "Alternative\nRock",
      60 => "Today\'s\nCountry",
      103 => "Blue Collar\nComedy",
      104 => "Comedy\nUncensored",
      105 => "Family\nComedy",
    },
    row2 => {
      119 => "DSC",
      129 => "CNBC",
      130 => "Bloomberg\nRadio",
      132 => "CNN",
      134 => "NPR Now",
      135 => "NPR Talk",
      141 => "BBC",
      146 => "Sirius Left",
      151 => "StL Traffic &\nWeather",
    },
  },
);

my $serial = new Win32::SerialPort('com9');
my $tuner = new Audio::Radio::Sirius;
$tuner->connect($serial);
$tuner->verbosity(1);

my $mw = MainWindow->new();
$mw->title('Sirius');
$mw->minsize(250,50);

my @frame;
$frame[0] = $mw->Frame->pack(-side=>'top',-fill=>'x');
my $exit = $frame[0]->Button(
        -text => 'Exit',
        -command => sub { power($tuner{power}=0); exit; },
        -height => 3, -width => 15,
    )->pack(-side=>'left', -padx=>6, -pady=>6);
my $power = $frame[0]->Button(
        -text => $tuner{power} ? 'Off' : 'On',
        -command => sub { power($tuner{power}=$tuner{power}?0:1); },
        -height => 3, -width => 15,
    )->pack(-side=>'left', -padx=>6, -pady=>6);
my $mute = $frame[0]->Button(
        -text => $tuner{mute} ? 'Unmute' : 'Mute',
        -command => sub { mute($tuner{mute}=$tuner{mute}?0:1); },
        -height => 3, -width => 15,
    )->pack(-side=>'left', -padx=>6, -pady=>6);
$frame[1] = $mw->Frame->pack(-side=>'top',-fill=>'x');
my $channel = $frame[1]->Entry(
        -textvariable => \$tuner{channel},
        -width => 4,
    )->pack(-side=>'left', -padx=>6, -pady=>6);
my $set = $frame[1]->Button(
        -text => 'Set',
        -command => sub { channel($tuner{channel}); },
        -height => 3, -width => 15,
    )->pack(-side=>'left', -padx=>6, -pady=>6);
my $clock = $frame[1]->Label(
        -text => '',
        -width => 25,
    )->pack(-side=>'left', -padx=>6, -pady=>6);
my $c = 2;
foreach my $cat ( keys %{$tuner{presets}} ) {
  $frame[$c] = $mw->Frame->pack(-side=>'top',-fill=>'x');
  foreach my $chan ( sort {$a<=>$b} keys %{$tuner{presets}{$cat}} ) {
    $_ = $tuner{presets}{$cat}{$chan};
    $frame[$c]->Button(
          -text => $_,
          -command => sub { channel($chan); },
          -height => 3, -width => 10,
      )->pack(-side=>'left', -padx=>6, -pady=>6);
  }
}

refresh();

while (1) {
  eval MainLoop();
}

sub power {
  $tuner->power($_[0]);
  $power->configure(-text => $_[0] ? 'Off' : 'On');
  channel($tuner{channel});
}

sub mute {
  $tuner->mute($_[0]);
  $mute->configure(-text => $_[0] ? 'Unmute' : 'Mute');
}

sub channel {
  return unless $tuner{power};
  $tuner->channel($_[0]);
}

sub refresh {
  if ( ! ($tuner{monitor}%5) && $tuner{power} ) {
    $tuner->monitor();
    $tuner->set_callback('channel_update', \&channelupdate);
    $tuner{monitor} = 0;
  }
  $tuner{monitor} += 1;
  my $tpiece = localtime();
  $tpiece =~ s/(\S+:\S+)//;
  my $hpiece = $1;
  $tpiece =~ s/\s+/ /g;
  $clock->configure(-text => "$tpiece / $hpiece");
  $clock->after($tuner{monitor}%5?1000:1, \&refresh);
}

sub channelupdate {
  my ($channel, $pid, $artist, $title, $composer) = @_;
  no warnings;
  my @info = ();
  push @info, $artist if $artist;
  push @info, $title if $title;
  my $info = join ' - ', @info;
  $mw->title($channel ? "$channel: $info" : 'Powered off');
}


------------------------------

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 1206
***************************************


home help back first fref pref prev next nref lref last post