[29128] in Perl-Users-Digest
Perl-Users Digest, Issue: 372 Volume: 11
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Mon Apr 23 03:10:03 2007
Date: Mon, 23 Apr 2007 00:09:11 -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 Mon, 23 Apr 2007 Volume: 11 Number: 372
Today's topics:
$ENV HOME on windows <catdogbeloved@yahoo.com>
Re: $ENV HOME on windows <rvtol+news@isolution.nl>
=?windows-1256?B?3e3h4yAiIMXIx83tICIg2uHsIN3Wx8btySDa0c <dr.desha@gmail.com>
=?windows-1256?B?4+bHzOXJIOPaIM3d7c8gzOPH4SDayM8gx+Hkx9 <dr.desha@gmail.com>
Re: ActiveState vs. "C:\Program Files\" and "C:\Progra~ <mnemotronic@gmail.com>
Re: adding a variable name to a hash to name is part of <joe@inwap.com>
Re: Download multiple email attachments in single file <tadmc@augustmail.com>
Re: help in development <uri@stemsystems.com>
How to get the variable name, not values? <lihao0129@gmail.com>
Re: How to get the variable name, not values? <jurgenex@hotmail.com>
Re: How to get the variable name, not values? <lihao0129@gmail.com>
Re: How to get the variable name, not values? <wahab-mail@gmx.de>
Re: How to get the variable name, not values? <lihao0129@gmail.com>
Re: How to get the variable name, not values? <bik.mido@tiscalinet.it>
Re: How to get the variable name, not values? <wahab-mail@gmx.de>
new CPAN modules on Mon Apr 23 2007 (Randal Schwartz)
Re: Share objects between processes - how? <zentara@highstream.net>
Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: 22 Apr 2007 09:19:35 -0700
From: Bob <catdogbeloved@yahoo.com>
Subject: $ENV HOME on windows
Message-Id: <1177258775.266702.127990@n59g2000hsh.googlegroups.com>
I apologise for the basic question, but I am using perl on windows for
the first time (after about 20 years using it on unix...) and the
problem does not make sense to me. Perl (active state) complaints that
the value is not initialized. Why in heaven?
#!/usr/bin/perl -w
use strict;
use diagnostics;
print $ENV{HOME};
------------------------------
Date: Sun, 22 Apr 2007 18:53:47 +0200
From: "Dr.Ruud" <rvtol+news@isolution.nl>
Subject: Re: $ENV HOME on windows
Message-Id: <f0gb3i.1do.1@news.isolution.nl>
Bob schreef:
> I apologise for the basic question, but I am using perl on windows for
> the first time (after about 20 years using it on unix...) and the
> problem does not make sense to me. Perl (active state) complaints that
> the value is not initialized. Why in heaven?
>
> #!/usr/bin/perl -w
> use strict;
> use diagnostics;
> print $ENV{HOME};
Do a `set` in a CMD shell console window, or use perl:
perl -wle "print qq{$_=$ENV{$_}} for sort keys %ENV"
(which will show the keys in allcaps)
and you'll see something like
HOMEDRIVE=C:
HOMEPATH=\Documents and Settings\Username
The concatenation can be used as HOME:
BEGIN {
if ( substr ( $^O, 0, 5 ) eq q{MSWin} ) {
if ( $ENV{HOME} ) {
# leave as is
}
elsif ( $ENV{USERPROFILE} ) {
$ENV{HOME} = $ENV{USERPROFILE};
}
elsif ( $ENV{HOMEDRIVE} and $ENV{HOMEPATH} ) {
$ENV{HOME} = $ENV{HOMEDRIVE} . $SENV{HOMEPATH};
}
else {
$ENV{HOME} = '.';
} } }
There are also modules on the cpan that do something alike.
--
Affijn, Ruud
"Gewoon is een tijger."
------------------------------
Date: 22 Apr 2007 17:29:36 -0700
From: desha <dr.desha@gmail.com>
Subject: =?windows-1256?B?3e3h4yAiIMXIx83tICIg2uHsIN3Wx8btySDa0cjtySD+KQ==?=
Message-Id: <1177288176.779878.241010@n59g2000hsh.googlegroups.com>
x83PyyDf5s8g4crU2+3hIMzj7dog4+Hdx8ogx+Hd7c/t5iAoIM3V0e3H8CApCmh0dHA6Ly93d3cu
bTcwbS5uZXQvdmIvc2hvd3RocmVhZC5waHA/dD03ODYzCgrHztjRIMjR5MfjzCDhyt7T7eMg5sre
2O3aIOPh3cfKIMfh3e3P7eYgyN/hINPl5uHlIObt09EKaHR0cDovL3d3dy5tNzBtLm5ldC92Yi9z
aG93dGhyZWFkLnBocD90PTc4NTAKCgrI0eTH48wgx+HfysfI5SDIx+HN0d/HyiDd7SDH4c/Rz9Tl
IObf0OHfIMrT0e3aIMfh38rHyOUKaHR0cDovL3d3dy5tNzBtLm5ldC92Yi9zaG93dGhyZWFkLnBo
cD90PTc4MjYKCgrDztjRIN3t0ebTIMPa4eTKINrk5SAo0+0gxeQgxeQgKQpodHRwOi8vd3d3Lm03
MG0ubmV0L3ZiL3Nob3d0aHJlYWQucGhwP3Q9NzIxMQoKCioqKiDP5O3HIMrE388gOiDV5tHtIMfh
2sfR7ckgzd7t3u3JICEhISAqKiog/gpodHRwOi8vd3d3Lm03MG0ubmV0L3ZiL2ZvcnVtZGlzcGxh
eS5waHA/Zj02OAoKCuPmx8zlySDj2iDN3e3PIMzjx+Eg2sjPIMfh5MfV0SDVx83IINTI38kg3uTm
x8ogq+Pt4ebP7bsgx+Hjy+3RySDh4czP4QrM49zH4SDj0ebH5Dogq+MKaHR0cDovL3d3dy5tNzBt
Lm5ldC92Yi9mb3J1bWRpc3BsYXkucGhwP2Y9NjcKCgrd7eHjICIgxcjHze0gIiDa4ewg3dbHxu3J
INrRyO3JIP4pCmh0dHA6Ly93d3cubTcwbS5uZXQvdmIvZm9ydW1kaXNwbGF5LnBocD9mPTUKCgrT
3ubYIN3TysfkIOPR5skg2uQgzNPj5ccg3e0gzd3hIObf1N0g2ubRyuXHIP4KaHR0cDovL3d3dy5t
NzBtLm5ldC92Yi9mb3J1bWRpc3BsYXkucGhwP2Y9NzUK
------------------------------
Date: 22 Apr 2007 17:22:30 -0700
From: desha <dr.desha@gmail.com>
Subject: =?windows-1256?B?4+bHzOXJIOPaIM3d7c8gzOPH4SDayM8gx+Hkx9XRINXHzcgg1MjfySDe5ObHyiCr4+3h5s/tuyDH4ePL7dHJIOHhzM/h?=
Message-Id: <1177287750.435045.36480@e65g2000hsc.googlegroups.com>
x83PyyDf5s8g4crU2+3hIMzj7dog4+Hdx8ogx+Hd7c/t5iAoIM3V0e3H8CApCmh0dHA6Ly93d3cu
bTcwbS5uZXQvdmIvc2hvd3RocmVhZC5waHA/dD03ODYzCgrHztjRIMjR5MfjzCDhyt7T7eMg5sre
2O3aIOPh3cfKIMfh3e3P7eYgyN/hINPl5uHlIObt09EKaHR0cDovL3d3dy5tNzBtLm5ldC92Yi9z
aG93dGhyZWFkLnBocD90PTc4NTAKCgrI0eTH48wgx+HfysfI5SDIx+HN0d/HyiDd7SDH4c/Rz9Tl
IObf0OHfIMrT0e3aIMfh38rHyOUKaHR0cDovL3d3dy5tNzBtLm5ldC92Yi9zaG93dGhyZWFkLnBo
cD90PTc4MjYKCgrDztjRIN3t0ebTIMPa4eTKINrk5SAo0+0gxeQgxeQgKQpodHRwOi8vd3d3Lm03
MG0ubmV0L3ZiL3Nob3d0aHJlYWQucGhwP3Q9NzIxMQoKCioqKiDP5O3HIMrE388gOiDV5tHtIMfh
2sfR7ckgzd7t3u3JICEhISAqKiog/gpodHRwOi8vd3d3Lm03MG0ubmV0L3ZiL2ZvcnVtZGlzcGxh
eS5waHA/Zj02OAoKCuPmx8zlySDj2iDN3e3PIMzjx+Eg2sjPIMfh5MfV0SDVx83IINTI38kg3uTm
x8ogq+Pt4ebP7bsgx+Hjy+3RySDh4czP4QrM49zH4SDj0ebH5Dogq+MKaHR0cDovL3d3dy5tNzBt
Lm5ldC92Yi9mb3J1bWRpc3BsYXkucGhwP2Y9NjcKCgrd7eHjICIgxcjHze0gIiDa4ewg3dbHxu3J
INrRyO3JIP4pCmh0dHA6Ly93d3cubTcwbS5uZXQvdmIvZm9ydW1kaXNwbGF5LnBocD9mPTUKCgrT
3ubYIN3TysfkIOPR5skg2uQgzNPj5ccg3e0gzd3hIObf1N0g2ubRyuXHIP4KaHR0cDovL3d3dy5t
NzBtLm5ldC92Yi9mb3J1bWRpc3BsYXkucGhwP2Y9NzUK
------------------------------
Date: 22 Apr 2007 22:36:54 -0700
From: pt <mnemotronic@gmail.com>
Subject: Re: ActiveState vs. "C:\Program Files\" and "C:\Progra~1\"
Message-Id: <1177306614.172612.322460@b58g2000hsg.googlegroups.com>
FYI:
Install_ActiveState_Perl.cmd:
----- cut here -----
@Echo off
:: Install ActiveState Perl to "C:\Progra~1\ActiveState.com\Perl"
SetLocal EnableDelayedExpansion EnableExtensions
:: /L*+ ::= Log everything and append to specified file
::/ForceRestart ::= Require reboot after installation.
:: Probably not required but it IS, after all, only DOS.
Set MsiOpts=/L*+ ActiveStatePerl_5.8.8.820_install_log.txt /
ForceRestart
:: Command : "/Package" or "/i" to install," /Uninstall" or "/x" to
uninstall
Set MsiAction=/Package
:: If user specified a file on the cmd line, use it instead of the one
defined here.
Set MsiPkg=ActivePerl-5.8.8.820-MSWin32-x86-274739.msi
If not /%1/==// (
If exist %1 set MsiPkg=%1
)
:: note: "Perl\" is automatically appended to the specified
TARGEDIR.
:: NO WHITESPACE CHARS ALLOWED IN THE INSTALL TARGET PATH!!!! REALLY!
:: Why "ActiveState.com" ?? See the Filesystem Hierarchy Standard:
:: http://www.pathname.com/fhs/2.2/
Set MsiParams=TargetDir="C:\PROGRA~1\ActiveState.com"
cd "%cd%"
echo msiexec %MsiOpts% %MsiAction% "%MsiPkg%" %MsiParams%
msiexec %MsiOpts% %MsiAction% "%MsiPkg%" %MsiParams%
----- cut here -----
------------------------------
Date: Sun, 22 Apr 2007 14:54:27 -0700
From: Joe Smith <joe@inwap.com>
Subject: Re: adding a variable name to a hash to name is part of the variable name
Message-Id: <a8adnTDQIq7KVrbbnZ2dnUVZ_sWdnZ2d@comcast.com>
Bobby Chamness wrote:
> I have a perl script that I wrote the loops through a list of servers in a
> file and I want to create a hash with the server name in it.
Sounds good. A master hash with server name as the top-level key.
> I want each server to have its own hash.
With a hash of hashes, each server has its own hash. The server's hash
just doesn't have a name; it is a member of the master hash.
> $server_$myserver_name{$some_key}
$servers{$myserver_name}{$some_key} = $value;
foreach my $server (sort keys %servers) {
print "Processing server $server\n";
foreach my $key (sort keys %{$servers{$server}}) {
print " $key = $servers{$server}{$key}\n";
}
}
-Joe
P.S. The newsgroup comp.lang.perl is defunct. Use comp.lang.perl.misc instead.
------------------------------
Date: Sun, 22 Apr 2007 15:49:45 -0500
From: Tad McClellan <tadmc@augustmail.com>
Subject: Re: Download multiple email attachments in single file
Message-Id: <slrnf2nij9.r25.tadmc@tadmc30.august.net>
lahoore@gmail.com <lahoore@gmail.com> wrote:
> I am using MDaemon mail server and for web client - World Client. I
> would like to download all the attachments as a single zip file from
> inbox instead of downloading each and every attachment. We would like
> to know whether it is possible or not?
I doubt it, though that depends on what protocols are supported
by your mail server.
There are many modules on CPAN for communicating with email servers.
Why the restriction of the attachments being gathered into a single
zip file?
If you back off on that, then you could write a program in Perl,
or nearly any other programming language, to simulate the client
and fetch the resources that are at the end of the attachment's links.
perldoc -q HTML
How do I fetch an HTML file?
> Following is the CGI code segment currently used:
>
><$FOREACH ATTACHMENT$>
><tr><td align="center" colspan="3"><$ATTACHIMAGE$></td></tr>
><tr>
> <td>[<$ATTACHNUM$>] [$File$]: <a href="<$AttachLink$>"
> target="_blank"><$ATTACHFILE$></a> <$ATTACHINLINE$></td>
> <td>[$Size$]: <$ATTACHSIZE$>k</u></td>
> <td>[$Content Type$]: <$ATTACHTYPE$></td>
></tr>
><$ENDEACH ATTACHMENT$>
If you think that providing that helps solve your problem somehow,
then you do not yet have an adequate understanding of the technologies
involved.
> Please help us to achieve this.
What part are you stuck on?
--
Tad McClellan SGML consulting
tadmc@augustmail.com Perl programming
Fort Worth, Texas
------------------------------
Date: Sun, 22 Apr 2007 18:19:39 -0400
From: Uri Guttman <uri@stemsystems.com>
Subject: Re: help in development
Message-Id: <x7irbojblw.fsf@mail.sysarch.com>
jobs.perl.org
uri
--
Uri Guttman ------ uri@stemsystems.com -------- http://www.stemsystems.com
--Perl Consulting, Stem Development, Systems Architecture, Design and Coding-
Search or Offer Perl Jobs ---------------------------- http://jobs.perl.org
------------------------------
Date: 22 Apr 2007 12:36:11 -0700
From: "lihao0129@gmail.com" <lihao0129@gmail.com>
Subject: How to get the variable name, not values?
Message-Id: <1177270571.731190.74150@y5g2000hsa.googlegroups.com>
Hi, folks:
Is there a way in Perl to return the variable name instead of it's
values, like in C, we can use the '#' token with macro:
#define print_int(var) printf( #var " is %d\n", var)
then each time I want to print out an interger, I issue:
print_int(number);
instead of
printf("number is %d \n", number);
The output string might be very long and used for various variables,
so I need to wrap it into a subroutine or something else available for
this purpose. Can I do this with Perl? Many thank for your hints..
Best regards,
Lihao
------------------------------
Date: Sun, 22 Apr 2007 19:50:02 GMT
From: "Jürgen Exner" <jurgenex@hotmail.com>
Subject: Re: How to get the variable name, not values?
Message-Id: <K%OWh.4383$0d2.4066@trndny02>
lihao0129@gmail.com wrote:
> Hi, folks:
>
> Is there a way in Perl to return the variable name instead of it's
> values, like in C, we can use the '#' token with macro:
>
> #define print_int(var) printf( #var " is %d\n", var)
This is not C, this is CPP.
Of course you could use CPP for Perl programs, too, if you insist.
jue
------------------------------
Date: 22 Apr 2007 13:02:35 -0700
From: "lihao0129@gmail.com" <lihao0129@gmail.com>
Subject: Re: How to get the variable name, not values?
Message-Id: <1177272155.728720.194340@l77g2000hsb.googlegroups.com>
On Apr 22, 3:50 pm, "J=FCrgen Exner" <jurge...@hotmail.com> wrote:
> lihao0...@gmail.com wrote:
> > Hi, folks:
>
> > Is there a way in Perl to return the variable name instead of it's
> > values, like in C, we can use the '#' token with macro:
>
> > #define print_int(var) printf( #var " is %d\n", var)
>
> This is not C, this is CPP.
> Of course you could use CPP for Perl programs, too, if you insist.
>
> jue
Hi, Jue:
This '#' token with macro definition is exactly in ISO C(not in
traditional C though.).
Best regards,
Lihao
------------------------------
Date: Sun, 22 Apr 2007 22:23:00 +0200
From: Mirco Wahab <wahab-mail@gmx.de>
Subject: Re: How to get the variable name, not values?
Message-Id: <f0gghr$3oe$1@mlucom4.urz.uni-halle.de>
lihao0129@gmail.com wrote:
> #define print_int(var) printf( #var " is %d\n", var)
>
> then each time I want to print out an interger, I issue:
>
> print_int(number);
>
> instead of
>
> printf("number is %d \n", number);
>
> The output string might be very long and used for various variables,
> so I need to wrap it into a subroutine or something else available for
> this purpose. Can I do this with Perl? Many thank for your hints..
Thats not a very good idea in Perl, the problem
here is to take a name and get its value via
'symbolic reference',like
...
sub print_int {
no strict 'refs';
printf "\$$_[0] is %d\n", ${$_[0]}
}
our $number = 42;
print_int('number');
...
These things are not recommended, better
work around possible problems by simply
"duplicating" the argument
...
sub print_all { local$"=' is '; print "@_\n" }
my $number = 42;
print_all('number', $number);
...
Regards
M.
------------------------------
Date: 22 Apr 2007 13:46:43 -0700
From: "lihao0129@gmail.com" <lihao0129@gmail.com>
Subject: Re: How to get the variable name, not values?
Message-Id: <1177274803.821374.196030@b58g2000hsg.googlegroups.com>
On Apr 22, 4:23 pm, Mirco Wahab <wahab-m...@gmx.de> wrote:
> lihao0...@gmail.com wrote:
> > #define print_int(var) printf( #var " is %d\n", var)
>
> > then each time I want to print out an interger, I issue:
>
> > print_int(number);
>
> > instead of
>
> > printf("number is %d \n", number);
>
> > The output string might be very long and used for various variables,
> > so I need to wrap it into a subroutine or something else available for
> > this purpose. Can I do this with Perl? Many thank for your hints..
>
> Thats not a very good idea in Perl, the problem
> here is to take a name and get its value via
> 'symbolic reference',like
>
> ...
>
> sub print_int {
> no strict 'refs';
> printf "\$$_[0] is %d\n", ${$_[0]}
> }
>
> our $number = 42;
> print_int('number');
>
> ...
>
> These things are not recommended, better
> work around possible problems by simply
> "duplicating" the argument
>
> ...
> sub print_all { local$"=' is '; print "@_\n" }
>
> my $number = 42;
> print_all('number', $number);
> ...
>
> Regards
>
> M.
Hi, Mirco:
Thank you for your suggestions. do you think I can use a variable
subroutine argument, like:
print_int($number);
instead of a constant argument
print_int('number');
to do such things? I am pretty sure that symbolic reference stuff is
not what I really needed. many thanks.. :-)
Regards,
Lihao
------------------------------
Date: Sun, 22 Apr 2007 23:13:04 +0200
From: Michele Dondi <bik.mido@tiscalinet.it>
Subject: Re: How to get the variable name, not values?
Message-Id: <john23l17itpnqo9mpsp4661i3q538a51n@4ax.com>
On 22 Apr 2007 13:02:35 -0700, "lihao0129@gmail.com"
<lihao0129@gmail.com> wrote:
>> This is not C, this is CPP.
>> Of course you could use CPP for Perl programs, too, if you insist.
[...]
>This '#' token with macro definition is exactly in ISO C(not in
>traditional C though.).
Well, that it is defined in the same standard as ISO C doesn't mean
that what Juergen wrote is incorrect, i.e. that it is still a feature
of the preprocessor rather than of the compiler. In Perl you generally
don't use a preprocessor because one doesn't feel the need for it as
much as with C. Now, the situation you have in mind may be one in
which it could actually be useful. However, I suppose that with some
intricate trickery it may actually be possible to do what you want in
current Perl. Not everyday's job anyway. And I don't know if dedicated
modules exist to do that. OTOH Perl 6 is supposed to support real
macros. Perhaps they will make it easier to do "this kinda things".
However you will have to wait for the real beast to come alive...
OTOH, you could adopt an intermediate work around by means of string
eval(). But since string eval() is Bad(TM), I recommend you do some
strict check on the input. If it bothers you to have to specify a
string, you may want to write a source filter. Since the task in this
sense is relatively easy, you could use Filter::Simple.
HTH,
Michele
--
{$_=pack'B8'x25,unpack'A8'x32,$a^=sub{pop^pop}->(map substr
(($a||=join'',map--$|x$_,(unpack'w',unpack'u','G^<R<Y]*YB='
.'KYU;*EVH[.FHF2W+#"\Z*5TI/ER<Z`S(G.DZZ9OX0Z')=~/./g)x2,$_,
256),7,249);s/[^\w,]/ /g;$ \=/^J/?$/:"\r";print,redo}#JAPH,
------------------------------
Date: Sun, 22 Apr 2007 23:28:31 +0200
From: Mirco Wahab <wahab-mail@gmx.de>
Subject: Re: How to get the variable name, not values?
Message-Id: <f0gkcm$5kq$1@mlucom4.urz.uni-halle.de>
lihao0129@gmail.com wrote:
> do you think I can use a variable
> subroutine argument, like:
>
> print_int($number);
>
> instead of a constant argument
>
> print_int('number');
>
> to do such things? I am pretty sure that symbolic reference stuff is
> not what I really needed. many thanks.. :-)
Not easily - as far as I know (I'm somehow intermediate).
Another problem here is 'my'-Variables, which don't have
any entry into the symbol table (names) of the program,
they use a so called 'local scratchpad'.
The closest thing I can come up with is something
with symbolic references - which may work but is
not encouraged:
...
sub print_all {
no strict 'refs';
print "$_[0] is ", ${substr($_[0],1)} if $_[0]=~/^\$/
}
our $number = 42;
print_all q($number);
...
Note the q(...) operator, which doesn't
evaluate the variable $number before
the function call.
As said, you can't use block scoped lexicals
(my) here, they won't be found in the programs
symbol table (we use package globals here ==> our).
Maybe the gurus can help out.
Regards
M.
------------------------------
Date: Mon, 23 Apr 2007 04:42:08 GMT
From: merlyn@stonehenge.com (Randal Schwartz)
Subject: new CPAN modules on Mon Apr 23 2007
Message-Id: <JGxp28.2K7@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.
Algorithm-HITS-Lite-0.04
http://search.cpan.org/~gugod/Algorithm-HITS-Lite-0.04/
HITS algorithm implementation not requiring PDL
----
CPAN-1.9101
http://search.cpan.org/~andk/CPAN-1.9101/
query, download and build perl modules from CPAN sites
----
CPANPLUS-0.79_01
http://search.cpan.org/~kane/CPANPLUS-0.79_01/
API & CLI access to the CPAN mirrors
----
Class-Accessor-Classy-v0.1.3
http://search.cpan.org/~ewilhelm/Class-Accessor-Classy-v0.1.3/
accessors with minimal inheritance
----
DateTime-TimeZone-0.6501
http://search.cpan.org/~drolsky/DateTime-TimeZone-0.6501/
Time zone object base class and factory
----
Encode-2.20
http://search.cpan.org/~dankogai/Encode-2.20/
character encodings
----
Exception-Base-0.02
http://search.cpan.org/~dexter/Exception-Base-0.02/
Lightweight exceptions
----
Exception-System-0.02
http://search.cpan.org/~dexter/Exception-System-0.02/
The exception class for system or library calls
----
JE-0.008
http://search.cpan.org/~sprout/JE-0.008/
Pure-Perl ECMAScript (JavaScript) Engine
----
Jifty-0.70422
http://search.cpan.org/~jesse/Jifty-0.70422/
an application framework
----
Kwiki-CachedDisplay-0.07
http://search.cpan.org/~gugod/Kwiki-CachedDisplay-0.07/
Speed-up Kwiki page display by caching
----
Mango-0.01000_03
http://search.cpan.org/~claco/Mango-0.01000_03/
An ecommerce solution using Catalyst, Handel and DBIx::Class
----
Net-Frame-Layer-GRE-1.03
http://search.cpan.org/~gomor/Net-Frame-Layer-GRE-1.03/
Generic Route Encapsulation layer object
----
Net-Gadu-1.8
http://search.cpan.org/~krzak/Net-Gadu-1.8/
Interfejs do biblioteki libgadu.so dla protoko?u Gadu-Gadu
----
Net-OmaDrm-0.10a
http://search.cpan.org/~mobileart/Net-OmaDrm-0.10a/
Perl Module to encapsulate OMA DRM format for a media type
----
Perl-RPM-1.49_01
http://search.cpan.org/~atourbin/Perl-RPM-1.49_01/
----
RRDTool-Creator-0.1
http://search.cpan.org/~jacquelin/RRDTool-Creator-0.1/
Creators for round robin databases (RRD)
----
RTF-Tokenizer-1.10
http://search.cpan.org/~sargie/RTF-Tokenizer-1.10/
Tokenize RTF
----
RTx-Calendar-0.03
http://search.cpan.org/~nchuche/RTx-Calendar-0.03/
Calendar for RT due tasks
----
SVK-Simple-0.03
http://search.cpan.org/~gugod/SVK-Simple-0.03/
Simple SVK object loader
----
Set-Groups-0.5
http://search.cpan.org/~jacquelin/Set-Groups-0.5/
A set of groups.
----
Set-Groups-0.6
http://search.cpan.org/~jacquelin/Set-Groups-0.6/
A set of groups.
----
Sub-Exporter-0.974
http://search.cpan.org/~rjbs/Sub-Exporter-0.974/
a sophisticated exporter for custom-built routines
----
Template-Filters-LazyLoader-0.02
http://search.cpan.org/~tomyhero/Template-Filters-LazyLoader-0.02/
Loading template filter modules by lazy way.
----
Template-Filters-LazyLoader-0.03
http://search.cpan.org/~tomyhero/Template-Filters-LazyLoader-0.03/
Loading template filter modules by lazy way.
----
Template-Filters-LazyLoader-0.04
http://search.cpan.org/~tomyhero/Template-Filters-LazyLoader-0.04/
Loading template filter modules by lazy way.
----
WWW-Dict-OKDaily-0.02
http://search.cpan.org/~gugod/WWW-Dict-OKDaily-0.02/
OKDaily Web Dictionary Interface
----
WWW-Mechanize-SpamCop-0.06
http://search.cpan.org/~adamowski/WWW-Mechanize-SpamCop-0.06/
SpamCop reporting automation.
----
WWW-Shorten-0rz-0.05
http://search.cpan.org/~gugod/WWW-Shorten-0rz-0.05/
Shorten URL using 0rz.tw
----
XML-Comma-1.98
http://search.cpan.org/~brianski/XML-Comma-1.98/
A framework for structured document manipulation
----
Youri-BTS-v0.1.1
http://search.cpan.org/~grousse/Youri-BTS-v0.1.1/
----
Youri-Media-v0.2.1
http://search.cpan.org/~grousse/Youri-Media-v0.2.1/
Abstract media class
----
Youri-Package-RPM-Updater-v0.1.0
http://search.cpan.org/~grousse/Youri-Package-RPM-Updater-v0.1.0/
Update RPM packages automatically
----
dotReader-v0.11.2
http://search.cpan.org/~ewilhelm/dotReader-v0.11.2/
----
wxPerl-Constructors-v0.0.4
http://search.cpan.org/~ewilhelm/wxPerl-Constructors-v0.0.4/
parameterized constructors
----
wxPerl-Styles-v0.0.1
http://search.cpan.org/~ewilhelm/wxPerl-Styles-v0.0.1/
shortcuts for wxFOO style constants
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: Sun, 22 Apr 2007 15:03:44 GMT
From: zentara <zentara@highstream.net>
Subject: Re: Share objects between processes - how?
Message-Id: <8usm23d1e5bqnafhjg0ntcsn8f2npu0e5b@4ax.com>
On 20 Apr 2007 01:13:40 -0700, patrik.xx.hoiem-flyckt@ericsson.com
wrote:
>I have a problem that you might help me with. I have a client app made
>in perl/tk that speaks with a server (RPC::PlServer, built on
>Net::Daemon). This server forks a process per product type (PT). You
>can run different perl scripts for each PT (to test the PT). Since
>RPC::PlClient makes synchronous calls, I want to either thread or fork
>a process while running scripts for the PTs, since the scripts can
>take several hours to run. Otherwise the client will get locked during
>this time. I have tried a threaded solution and a forked solution and
>they work fine as long as I don't have to share anything. But I have a
>session object, containing session variables that I have to get back
>from the child process after it's finished. I've tried threads::shared
>(I get: LogHandler not of correct type or something like that) with no
>success and IPC::Shareable in the forked solution with no success ( I
>get: Could not create semaphore set: No space left on device). Is
>there any good documentation about these different solutions out
>there? Can someone point me (to anything else than the CPAN info)?
>Well I've searched the net and haven't found anything that has shed
>light on this. Well I've read something about the semaphore fault...
Tk, threads, long thread processes.
I can give you some general guidance based on making many threaded
Tk apps.
The basic rule1 is to create all threads, before any Tk code is invoked.
That way, there will be no Tk code in the threads to wreak havoc.
The basic rule2 is to communicate with the threads, only through shared
variables (scalars, arrays, hashes, etc). Also remember, the main Tk
thread will not auto-detect a change in the shared var, you need a timer
to read them (update).
Also, many object-oriented modules are not thread-safe, you would have
to ask the author. But for instance, Tk is not thread-safe, but can be
made to work with appropriate precautions.
If the threads are running long processes, have then set shared
variables, according to some protocol, to signify their state.
Then in the main Tk thread, setup timers to periodically check the
shared variables, and do what is needed. You can have the timer
set to 10 or 100 milliseconds, and it dosn't waste much cpu.
The timer callback just keeps checking all the shared variables,
calling other subroutines as needed.
You are best to assume that the modules are not thread-safe, and
try to keep all specialized module code in the threads, included
their "use" statement. Possibly you can pass the session-ids to another
module, by storing it in a shared variable, and spawning a new thread
with the session-id.
Other than that, you need to post the actual code, or a chopped down
snippet that runs.
zentara
--
I'm not really a human, but I play one on earth.
http://zentara.net/japh.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 V11 Issue 372
**************************************