[28342] in Perl-Users-Digest
Perl-Users Digest, Issue: 9706 Volume: 10
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Sat Sep 9 06:05:55 2006
Date: Sat, 9 Sep 2006 03:05: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, 9 Sep 2006 Volume: 10 Number: 9706
Today's topics:
Re: converting vba to perl without win32::ole <1usa@llenroc.ude.invalid>
Re: Decode data of different charsets into UTF8 (Perl i <hjp-usenet2@hjp.at>
Re: Decode data of different charsets into UTF8 (Perl i <hjp-usenet2@hjp.at>
Re: Decode data of different charsets into UTF8 (Perl i <bik.mido@tiscalinet.it>
Re: Integrate Compress::Zlib seamlessly w/no compressio <1usa@llenroc.ude.invalid>
Re: Integrate Compress::Zlib seamlessly w/no compressio <nobull67@gmail.com>
Re: Maximum number of sockets <1usa@llenroc.ude.invalid>
Re: Maximum number of sockets <uri@stemsystems.com>
Re: Maximum number of sockets <1usa@llenroc.ude.invalid>
Re: Maximum number of sockets <nobull67@gmail.com>
new CPAN modules on Sat Sep 9 2006 (Randal Schwartz)
Re: Non-uniform split anno4000@radom.zrz.tu-berlin.de
Re: Pattern Matching and skipping <hjp-usenet2@hjp.at>
Re: Perl Code Coverage <mgarrish@gmail.com>
Re: Perl Code Coverage <mgarrish@gmail.com>
Re: Perl Code Coverage (Randal L. Schwartz)
Re: perl script for apache mod_rewrite <nobull67@gmail.com>
Re: User authentication for a website <sujay.tukai@gmail.com>
Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Sat, 09 Sep 2006 04:31:01 GMT
From: "A. Sinan Unur" <1usa@llenroc.ude.invalid>
Subject: Re: converting vba to perl without win32::ole
Message-Id: <Xns98395451A0ADasu1cornelledu@127.0.0.1>
"matt" <darthmullet67@hotmail.com> wrote in
news:1157722462.930896.258990@h48g2000cwc.googlegroups.com:
> I am currently trying to convert a vba macro to perl. The vba macros
> are basically find and replaces on txt files.
So, the VBA stuff seems to be a red herring here. You are just doing
search and replace on text files.
> The problem is that there are roughly 25000 find and replaces and they
Do you mean there are 25,000 patterns you need to translate? Do you mean
somehow there is a process set up where you are supposed to carry out
25,000 find-replaces on each text file you receive.
It sounds like there is a serious organizational problem here.
> sequential order, meaning that they search for a string and if the
> string is found then it will find and replace from that point on until
> EOF. Once it reaches the EOF it will then reset to the start of the
> txt file and continues on to the next find and replace.
Are you just asking about
perldoc -f seek
> VBA code:
>
> Set variable = New variable_Class
> If variable.FindText("<R [,;)]") = True Then
> Selection.Collapse wdCollapseEnd
> If variable.FindText("<R [,;)]") = True Then
> Selection.Collapse wdCollapseEnd
> If variable.FindText("<R [,;)]") = True Then
> Selection.Collapse wdCollapseEnd
> If variable.FindText("[0-9]{1,} [0-9]{1,} [0-9]") =
> True Then
> Selection.HomeKey wdStory
> variable.FindandReplace "(^13+pg,[0-9]{1,}^13)(+l)
> ", " \2\1"
> Call Subroutine
> End If
> End If
> End If
> End I
Instead of trying to translate VBA word-for-word into Perl, ask yourself
what the code is supposed to be doing. The snippet you posted looked
like it was written by a six year old who is just not too sure what he
is doing. I do not know what Selection.Collapse does why does it need to
be done three times?
Ask yourself what the code needs to to do and write Perl code to do it.
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: Sat, 9 Sep 2006 09:33:32 +0200
From: "Peter J. Holzer" <hjp-usenet2@hjp.at>
Subject: Re: Decode data of different charsets into UTF8 (Perl internal format)
Message-Id: <slrneg4rih.5td.hjp-usenet2@yoyo.hjp.at>
On 2006-09-08 12:36, ska <skg@mail.inf.fh-brs.de> wrote:
> The text may be in CP437, Latin1, UTF8 or Unicode16 (latter except for
> the files). There is no way for me to get the charset from the
> "context".
Are you sure Windows-1252 isn't in the mix, too?
> I found this thread:
> http://groups.google.de/group/comp.lang.perl.misc/browse_thread/thread/6aac916312c57af0/d0f53402e2a91b08?lnk=gst&q=detect+charset&rnum=4#d0f53402e2a91b08
> "character encodings" from 2003-11-30.
>
> The solution was there
>
>> 1. open the file in :raw mode.
>> 2. read a largeish chunk into a $scalar.
>> 3. turn the utf8 flag on with Encode::_utf8_on($scalar);.
>> 4. check if the data is valid with Encode::is_utf8($scalar, 1);.
That seems to be a rather kludgy way of checking. I'd use Encode::decode
(probably with Encode::FB_QUIET). That also has the advantage of working
for other multibyte-encodings than UTF-8.
>> 5. If it is, reopen the file with :utf8. If it ain't, assume latin2
>> and reopen with :encoding(latin2).
>
> OK, for files that does its job, I guess; however, I wonder if I can
> omit to re-open the file in case the script runs as filter? I haven't
> found no "ungetc" except FileHandle::Unget.
How large are the "files" you have to process? Can you read them
completely into memory, like you do in your example code? Then the
easiest thing is to just slurp them completely and try to decode them
with various charsets. No need to "unread" anything.
If they are too large, you have to read them in blocks: Read the first
block, determine the charset, decode it and process it. then, in a loop,
read the next block, append it to the remainder of the previous block,
decode it and process it.
> if(Encode::is_utf8($line, 1)) {
> $charset = 'utf8';
If is_utf8 is true, the data is already in perl's internal utf8 format,
and must not be decoded again.
> } elsif($line =~ s/^(?:\xfe\xff)?(\0[^\0])/$1/) {
Why the substitution? Why not simply
} elsif($line =~ /^(?:\xfe\xff)?\0[^\0]/) {
Also, I think checking for the first character to be in range U+0001 to
U+00FF may be a bit too strict. What if the file starts with a Euro
sign?
> } else {
> my $remainder = $line;
> if($remainder =~ /[^\x01-\x7f]/
> && (my $s = Encode::decode('utf8', $remainder, Encode::FB_QUIET))
> && !$remainder) {
> $charset = 'utf8-decode';
You get here only if the file starts with an ASCII character. If it
starts with an umlaut, the file will not be recognized as UTF-8.
hp
--
_ | Peter J. Holzer | > Wieso sollte man etwas erfinden was nicht
|_|_) | Sysadmin WSR | > ist?
| | | hjp@hjp.at | Was sonst wäre der Sinn des Erfindens?
__/ | http://www.hjp.at/ | -- P. Einstein u. V. Gringmuth in desd
------------------------------
Date: Sat, 9 Sep 2006 09:34:22 +0200
From: "Peter J. Holzer" <hjp-usenet2@hjp.at>
Subject: Re: Decode data of different charsets into UTF8 (Perl internal format)
Message-Id: <slrneg4rk3.5td.hjp-usenet2@yoyo.hjp.at>
On 2006-09-08 13:10, Michele Dondi <bik.mido@tiscalinet.it> wrote:
> On 8 Sep 2006 05:36:19 -0700, "ska" <skg@mail.inf.fh-brs.de> wrote:
>>OK, for files that does its job, I guess; however, I wonder if I can
>>omit to re-open the file in case the script runs as filter? I haven't
>>found no "ungetc" except FileHandle::Unget.
>
> You may try to do a seek() followed by a binmode() call. Not really
> sure how reliable that would be.
seek doesn't work on pipes.
hp
--
_ | Peter J. Holzer | > Wieso sollte man etwas erfinden was nicht
|_|_) | Sysadmin WSR | > ist?
| | | hjp@hjp.at | Was sonst wäre der Sinn des Erfindens?
__/ | http://www.hjp.at/ | -- P. Einstein u. V. Gringmuth in desd
------------------------------
Date: 9 Sep 2006 11:56:32 +0200
From: Michele Dondi <bik.mido@tiscalinet.it>
Subject: Re: Decode data of different charsets into UTF8 (Perl internal format)
Message-Id: <ts35g29ku1he6g2emv3e23mbmf6q4ko7cd@4ax.com>
On Sat, 9 Sep 2006 09:34:22 +0200, "Peter J. Holzer"
<hjp-usenet2@hjp.at> wrote:
>>>omit to re-open the file in case the script runs as filter? I haven't
^^^^^^^^^
^^^^^^^^^
>> You may try to do a seek() followed by a binmode() call. Not really
>> sure how reliable that would be.
>
>seek doesn't work on pipes.
D'Oh! Hadn't seen *that*.
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: Sat, 09 Sep 2006 04:03:44 GMT
From: "A. Sinan Unur" <1usa@llenroc.ude.invalid>
Subject: Re: Integrate Compress::Zlib seamlessly w/no compression?
Message-Id: <Xns9839A52641Easu1cornelledu@127.0.0.1>
peter.j.torelli@gmail.com wrote in news:1157745641.539097.116200
@d34g2000cwd.googlegroups.com:
> Since the read/write/close methods for the object are not the same as
> an uncompressed filehandle, I can't just use a different open method
> for the same variable. Instead I end up having to use open() and a
> pipe to gzip if compression is desired so that the same filehandle can
> be used without a ton of conditionals in the code.
>
> So the simple question is: how do I turn off all compression and
> headers when I use gzopen() and just write a plain text file?
But, that is the wrong question to ask. You can just write two dispatcher
class that have the identical interface, and hide the different
implementations of read/write/close methods behind these objects'
interfaces.
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: 9 Sep 2006 01:11:19 -0700
From: "Brian McCauley" <nobull67@gmail.com>
Subject: Re: Integrate Compress::Zlib seamlessly w/no compression?
Message-Id: <1157789479.609784.198630@i3g2000cwc.googlegroups.com>
A. Sinan Unur wrote:
> peter.j.torelli@gmail.com wrote in news:1157745641.539097.116200
> @d34g2000cwd.googlegroups.com:
>
> > Since the read/write/close methods for the object are not the same as
> > an uncompressed filehandle, I can't just use a different open method
> > for the same variable. Instead I end up having to use open() and a
> > pipe to gzip if compression is desired so that the same filehandle can
> > be used without a ton of conditionals in the code.
> >
> > So the simple question is: how do I turn off all compression and
> > headers when I use gzopen() and just write a plain text file?
>
> But, that is the wrong question to ask. You can just write two dispatcher
> class that have the identical interface, and hide the different
> implementations of read/write/close methods behind these objects'
> interfaces.
Or write a very thin shim that presents an interface like
Compress::Zlib's read/write/close but just passes them strait through
and use one of these objects instead.
Of course you could just us IO::Zib which gives Compress::Zlib a more
filehandle-like interface.
There's also PerlIO::gzip but I don't know if this uses zlib or an
external gzip process.
------------------------------
Date: Sat, 09 Sep 2006 04:09:19 GMT
From: "A. Sinan Unur" <1usa@llenroc.ude.invalid>
Subject: Re: Maximum number of sockets
Message-Id: <Xns98391973FCB7asu1cornelledu@127.0.0.1>
"A Ma" <angusma@attglobal.net> wrote in news:4501aead$1@kcnews01:
> I am using ActiveState Perl under Windows. The default maximum number of
> sockets that I can open is 64. I found the parameter PERL_FD_SETSIZE in
> c:\perl\lib\core\sys\socket.h. I changed that number but it did not take
> effect. Is there something else I need to change? Do I need to recompile
> anything?
That parameter is a reflection of the value obtained from the system, not
the determinant of the system's behavior. Changing that value is the same
thing as spray painting a highway speed limit sign: It is not going to
change the rules.
So, you can search Google for the information specific to your operating
system. I cannot, however, help but wonder why you would want to open more
than 64 sockets at a time by a single application.
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: Sat, 09 Sep 2006 00:31:56 -0400
From: Uri Guttman <uri@stemsystems.com>
Subject: Re: Maximum number of sockets
Message-Id: <x764fxu0cj.fsf@mail.sysarch.com>
>>>>> "ASU" == A Sinan Unur <1usa@llenroc.ude.invalid> writes:
ASU> "A Ma" <angusma@attglobal.net> wrote in news:4501aead$1@kcnews01:
>> I am using ActiveState Perl under Windows. The default maximum number of
>> sockets that I can open is 64. I found the parameter PERL_FD_SETSIZE in
>> c:\perl\lib\core\sys\socket.h. I changed that number but it did not take
>> effect. Is there something else I need to change? Do I need to recompile
>> anything?
ASU> That parameter is a reflection of the value obtained from the
ASU> system, not the determinant of the system's behavior. Changing
ASU> that value is the same thing as spray painting a highway speed
ASU> limit sign: It is not going to change the rules.
ASU> So, you can search Google for the information specific to your
ASU> operating system. I cannot, however, help but wonder why you
ASU> would want to open more than 64 sockets at a time by a single
ASU> application.
64 is a small number of sockets to have in a process. i wrote a large
scale crawler (in c) and it did over 2000 parallel fetches driven by an
event loop in a single process. but as you said any issues with the
maximum number of sockets is with the OS and the build of perl and not
with the language itself.
and your spray painting analogy is missing a point. i think he changed
the number in the socket.h file but i highly doubt he rebuilt perl with
it (given that it is an activestoat perl). so i would say it was more
like spraying graffiti in the air and expecting the speed limit to
change. :)
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: Sat, 09 Sep 2006 06:11:24 GMT
From: "A. Sinan Unur" <1usa@llenroc.ude.invalid>
Subject: Re: Maximum number of sockets
Message-Id: <Xns98391649EA767asu1cornelledu@127.0.0.1>
Uri Guttman <uri@stemsystems.com> wrote in
news:x764fxu0cj.fsf@mail.sysarch.com:
>>>>>> "ASU" == A Sinan Unur <1usa@llenroc.ude.invalid> writes:
>
> ASU> "A Ma" <angusma@attglobal.net> wrote in
> news:4501aead$1@kcnews01:
> >> I am using ActiveState Perl under Windows. The default maximum
> >> number of sockets that I can open is 64. I found the parameter
> >> PERL_FD_SETSIZE in c:\perl\lib\core\sys\socket.h. I changed that
> >> number but it did not take effect. Is there something else I need
> >> to change? Do I need to recompile anything?
>
> ASU> That parameter is a reflection of the value obtained from the
> ASU> system, not the determinant of the system's behavior. Changing
> ASU> that value is the same thing as spray painting a highway speed
> ASU> limit sign: It is not going to change the rules.
>
> ASU> So, you can search Google for the information specific to your
> ASU> operating system. I cannot, however, help but wonder why you
> ASU> would want to open more than 64 sockets at a time by a single
> ASU> application.
>
> 64 is a small number of sockets to have in a process. i wrote a large
> scale crawler (in c) and it did over 2000 parallel fetches driven by
> an event loop in a single process.
When you do it, I am sure you won't launch a (intentional or not) DOS
attack against a single web site ;-)
> and your spray painting analogy is missing a point. i think he changed
> the number in the socket.h file but i highly doubt he rebuilt perl
> with it
That was the implicit assumption behind my analogy.
> so i would say it was more like spraying graffiti in the air and
> expecting the speed limit to change. :)
:-) indeed
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: 9 Sep 2006 00:47:22 -0700
From: "Brian McCauley" <nobull67@gmail.com>
Subject: Re: Maximum number of sockets
Message-Id: <1157788042.580214.9880@d34g2000cwd.googlegroups.com>
A. Sinan Unur wrote:
> "A Ma" <angusma@attglobal.net> wrote in news:4501aead$1@kcnews01:
>
> > I am using ActiveState Perl under Windows. The default maximum number of
> > sockets that I can open is 64. I found the parameter PERL_FD_SETSIZE in
> > c:\perl\lib\core\sys\socket.h. I changed that number but it did not take
> > effect. Is there something else I need to change? Do I need to recompile
> > anything?
>
> That parameter is a reflection of the value obtained from the system, not
> the determinant of the system's behavior.
You'd think so wouldn't you. But (in C) that's not the case with
FD_SETSIZE. The underlying select() is capable of coping with arbitrary
sized fdsets, the macro FD_SETSIZE just determines how such space is
allocated when you create an fdset.
You can just change FD_SETSIZE, recompile your program and it will can
have more sockets (I have actually done this in C on Windows).
> Changing that value is the same
> thing as spray painting a highway speed limit sign: It is not going to
> change the rules.
Not quite. In this case I suspect it does change the rules, but you
need to make sure that everyone who needs to know the new rule has read
the sign. So I'm gussing you need to rebuild perl.
------------------------------
Date: Sat, 9 Sep 2006 04:42:09 GMT
From: merlyn@stonehenge.com (Randal Schwartz)
Subject: new CPAN modules on Sat Sep 9 2006
Message-Id: <J5B6E9.1zL3@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.
Acme-Buffy-1.4
http://search.cpan.org/~lbrocard/Acme-Buffy-1.4/
An encoding scheme for Buffy the Vampire Slayer fans
----
Acme-Colour-1.03
http://search.cpan.org/~lbrocard/Acme-Colour-1.03/
additive and subtractive human-readable colours
----
Apache-No404Proxy-Mogile-0.1
http://search.cpan.org/~sock/Apache-No404Proxy-Mogile-0.1/
Implementation of Apache::No404Proxy
----
Apache-SWIT-0.15
http://search.cpan.org/~bosu/Apache-SWIT-0.15/
mod_perl based application server with integrated testing.
----
Archive-Any-0.093
http://search.cpan.org/~cmoore/Archive-Any-0.093/
Single interface to deal with file archives.
----
Astro-SpaceTrack-0.023
http://search.cpan.org/~wyant/Astro-SpaceTrack-0.023/
Retrieve orbital data from www.space-track.org.
----
CGI-Application-Plugin-PageBuilder-0.96
http://search.cpan.org/~cmoore/CGI-Application-Plugin-PageBuilder-0.96/
Simplifies building pages with multiple templates.
----
CGI-FormBuilder-3.0401
http://search.cpan.org/~nwiger/CGI-FormBuilder-3.0401/
Easily generate and process stateful forms
----
CPAN-Reporter-0.16
http://search.cpan.org/~dagolden/CPAN-Reporter-0.16/
Provides Test::Reporter support for CPAN.pm
----
CPANPLUS-0.074
http://search.cpan.org/~kane/CPANPLUS-0.074/
API & CLI access to the CPAN mirrors
----
CPANPLUS-Dist-PAR-0.01
http://search.cpan.org/~kane/CPANPLUS-Dist-PAR-0.01/
CPANPLUS distribution class to create PAR archives
----
Config-Properties-0.65
http://search.cpan.org/~salva/Config-Properties-0.65/
Read and write property files
----
CtCmd-1.06
http://search.cpan.org/~ratl/CtCmd-1.06/
Perl extension for Rational ClearCase
----
DBD-SQLite-1.13
http://search.cpan.org/~msergeant/DBD-SQLite-1.13/
Self Contained RDBMS in a DBI Driver
----
DBD-mysql-3.0007
http://search.cpan.org/~capttofu/DBD-mysql-3.0007/
MySQL driver for the Perl5 Database Interface (DBI)
----
DBD-mysql-3.0007_1
http://search.cpan.org/~capttofu/DBD-mysql-3.0007_1/
MySQL driver for the Perl5 Database Interface (DBI)
----
DBIx-Class-Loader-ADO-0.03
http://search.cpan.org/~bricas/DBIx-Class-Loader-ADO-0.03/
DBIx::Class::Loader ADO Implementation.
----
Getopt-GUI-Long-0.7
http://search.cpan.org/~hardaker/Getopt-GUI-Long-0.7/
----
Google-Adwords-v0.1.0
http://search.cpan.org/~rohan/Google-Adwords-v0.1.0/
an interface which abstracts the Google Adwords SOAP API
----
Linux-Bootloader-1.2
http://search.cpan.org/~bryce/Linux-Bootloader-1.2/
Base class interacting with Linux bootloaders
----
Linux-NBD-0.91
http://search.cpan.org/~mlehmann/Linux-NBD-0.91/
----
Locale-Maketext-Simple-0.18
http://search.cpan.org/~audreyt/Locale-Maketext-Simple-0.18/
Simple interface to Locale::Maketext::Lexicon
----
MDV-Distribconf-3.06
http://search.cpan.org/~nanardon/MDV-Distribconf-3.06/
Read and write config of a Mandriva Linux distribution tree
----
Module-Build-0.2805_01
http://search.cpan.org/~kwilliams/Module-Build-0.2805_01/
Build and install Perl modules
----
POE-0.37
http://search.cpan.org/~rcaputo/POE-0.37/
portable multitasking and networking framework for Perl
----
POE-Component-AI-MegaHAL-1.02
http://search.cpan.org/~bingos/POE-Component-AI-MegaHAL-1.02/
A non-blocking wrapper around AI::MegaHAL.
----
POE-Component-Client-NNTP-1.02
http://search.cpan.org/~bingos/POE-Component-Client-NNTP-1.02/
A component that provides access to NNTP.
----
POE-Component-IRC-5.02
http://search.cpan.org/~bingos/POE-Component-IRC-5.02/
a fully event-driven IRC client module.
----
POE-Component-WWW-Shorten-1.02
http://search.cpan.org/~bingos/POE-Component-WWW-Shorten-1.02/
A non-blocking wrapper around WWW::Shorten.
----
Perlbal-1.50
http://search.cpan.org/~bradfitz/Perlbal-1.50/
Reverse-proxy load balancer and webserver
----
QWizard-3.04
http://search.cpan.org/~hardaker/QWizard-3.04/
Display a series of questions, get the answers, and act on the answers.
----
SAP-Rfc-1.49
http://search.cpan.org/~piers/SAP-Rfc-1.49/
SAP RFC - RFC Function calls against an SAP R/3 System
----
SNMP-5.0301002
http://search.cpan.org/~hardaker/SNMP-5.0301002/
The Perl5 'SNMP' Extension Module for the Net-SNMP SNMP package.
----
Socialtext-Resting-0.02
http://search.cpan.org/~synedra/Socialtext-Resting-0.02/
module for accessing Socialtext REST APIs
----
TAPx-Parser-0.21
http://search.cpan.org/~ovid/TAPx-Parser-0.21/
Parse TAP output
----
Test-Parser-1.4
http://search.cpan.org/~bryce/Test-Parser-1.4/
Base class for parsing log files from test runs, and displays in an XML syntax.
----
Text-Template-Simple-0.42
http://search.cpan.org/~burak/Text-Template-Simple-0.42/
Simple text template engine
----
Text-Template-Simple-0.43
http://search.cpan.org/~burak/Text-Template-Simple-0.43/
Simple text template engine
----
Time-Piece-1.11
http://search.cpan.org/~msergeant/Time-Piece-1.11/
Object Oriented time objects
----
UML-Sequence-0.07
http://search.cpan.org/~philcrow/UML-Sequence-0.07/
Render UML sequence diagrams, often by running the code.
----
WWW-Myspace-0.55
http://search.cpan.org/~grantg/WWW-Myspace-0.55/
Access MySpace.com profile information from Perl
----
XML-Grammar-ProductsSyndication-0.01
http://search.cpan.org/~shlomif/XML-Grammar-ProductsSyndication-0.01/
an XML Grammar for ProductsSyndication.
----
as-0.05
http://search.cpan.org/~elizabeth/as-0.05/
load OO module under another name
----
threads-1.41
http://search.cpan.org/~jdhedden/threads-1.41/
Perl interpreter-based threads
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: 9 Sep 2006 08:19:03 GMT
From: anno4000@radom.zrz.tu-berlin.de
Subject: Re: Non-uniform split
Message-Id: <4mfbnnF5j1nkU1@news.dfncis.de>
Brian McCauley <nobull67@gmail.com> wrote in comp.lang.perl.misc:
>
> anno4000@radom.zrz.tu-berlin.de wrote:
>
> > if ( my @cols = /$re/ ) {
> > push @data, { map { $_ => shift @cols } qw( a b c d e) };
> > }
>
> TMTOWTDI, when optomising for clarity I prefer a slice over using map.
> Unfortunately this which means one can't avoid naming the hash without
> the code getting real ugly:
>
> if ( my @cols = /$re/ ) {
> push @data, \my %record;
> @record{ qw( a b c d e) } = @cols;
> }
Yes, building the hash anonymously is a bit obscure. I was coming from
@{ $data[ @data] }{ qw( a b c d e)} = @cols;
which is probably what you mean with "real ugly".
Anno
------------------------------
Date: Sat, 9 Sep 2006 09:53:29 +0200
From: "Peter J. Holzer" <hjp-usenet2@hjp.at>
Subject: Re: Pattern Matching and skipping
Message-Id: <slrneg4snu.5td.hjp-usenet2@yoyo.hjp.at>
On 2006-09-08 17:31, Eric Schwartz <emschwar@pobox.com> wrote:
> "MattJ83" <mattjones@hotmail.co.uk> writes:
[lots of nested loops]
>> }}}}}}}}}}}}}
>
> Ugh. This is butt-ugly. You can't tell by looking at this line which
> brace corresponds to which if or while statement.
Yup. The only time I've seen somebody seriously proposing closing
multiple blocks on the same line, he also proposed that the closing
braces match vertically with the start of the statement, like this:
if (...) {
while (...) {
for (...) {
if (...) {
if (...) {
...
} } } } }
(or maybe he put the opening braces on a line by their own, I don't
remember)
That way it is easy to see that each closing brace corresponds to the
start of a statement. However, they don't correspond to the statements
they seem to correspond to, which is probably confusing, too (I guess
there's a reason that very few people use this style :-)).
hp
--
_ | Peter J. Holzer | > Wieso sollte man etwas erfinden was nicht
|_|_) | Sysadmin WSR | > ist?
| | | hjp@hjp.at | Was sonst wäre der Sinn des Erfindens?
__/ | http://www.hjp.at/ | -- P. Einstein u. V. Gringmuth in desd
------------------------------
Date: 8 Sep 2006 18:22:25 -0700
From: "Matt Garrish" <mgarrish@gmail.com>
Subject: Re: Perl Code Coverage
Message-Id: <1157764945.883224.37070@i3g2000cwc.googlegroups.com>
Larry_A_Starr@yahoo.com wrote:
> Hello Everyone,
> I am trying to run code coverage on some of my perl code.
> I have been able to get a .cvp file from running "perl -d:Coverage
> test1.pl"
> but I am unable to locate information on 'coverperl', or find the
> coverperl program on my machine.
> Does anyone know where to find information on coverperl?
> Does anyone know the defualt install location of coverperl?
I only know in XP it goes into \perl\bin, but you might try looking in
the directory where you installed Devel::Coverage. It should be with
the module.
In terms of more info, the following might be some help:
http://www.ddj.com/184404661
As the docs say, though, it's alpha software so there may not exist
much else.
Matt
------------------------------
Date: 8 Sep 2006 18:22:26 -0700
From: "Matt Garrish" <mgarrish@gmail.com>
Subject: Re: Perl Code Coverage
Message-Id: <1157764945.951259.221420@m79g2000cwm.googlegroups.com>
Larry_A_Starr@yahoo.com wrote:
> Hello Everyone,
> I am trying to run code coverage on some of my perl code.
> I have been able to get a .cvp file from running "perl -d:Coverage
> test1.pl"
> but I am unable to locate information on 'coverperl', or find the
> coverperl program on my machine.
> Does anyone know where to find information on coverperl?
> Does anyone know the defualt install location of coverperl?
I only know in XP it goes into \perl\bin, but you might try looking in
the directory where you installed Devel::Coverage. It should be with
the module.
In terms of more info, the following might be some help:
http://www.ddj.com/184404661
As the docs say, though, it's alpha software so there may not exist
much else.
Matt
------------------------------
Date: 09 Sep 2006 02:49:06 -0700
From: merlyn@stonehenge.com (Randal L. Schwartz)
Subject: Re: Perl Code Coverage
Message-Id: <86r6ylgyjx.fsf@blue.stonehenge.com>
>>>>> "Matt" == Matt Garrish <mgarrish@gmail.com> writes:
Matt> In terms of more info, the following might be some help:
Matt> http://www.ddj.com/184404661
Matt> As the docs say, though, it's alpha software so there may not exist
Matt> much else.
In 2001 (the date of the article), Devel::Cover was alpha software, yes. It's
pretty mature now... and very useful.
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!
--
Posted via a free Usenet account from http://www.teranews.com
------------------------------
Date: 9 Sep 2006 00:31:44 -0700
From: "Brian McCauley" <nobull67@gmail.com>
Subject: Re: perl script for apache mod_rewrite
Message-Id: <1157787104.668603.165920@h48g2000cwc.googlegroups.com>
Aaron Haspel wrote:
> Copied directly, here it is:
>
> #!/usr/bin/perl
> $|=1; # Turn off buffering
> while (<STDIN>)
> {
> local $postid = $_;
> ++$postid;
> print "/?p=$postid\n";
> }
Thanks. Unfortunately there's nothing there to account for why there
appears to be an extra newline emitted at the start.
But just too be totally sure...
echo 123 | myscript | od -c
------------------------------
Date: 8 Sep 2006 21:22:53 -0700
From: "sujay.tukai@gmail.com" <sujay.tukai@gmail.com>
Subject: Re: User authentication for a website
Message-Id: <1157775773.846025.116700@b28g2000cwb.googlegroups.com>
Mumia W. wrote:
> On 09/08/2006 07:27 AM, sujay.tukai@gmail.com wrote:
> > I have an account in a website. Whenever i need to read my inbox from
> > that website. I have to login with my name and password.
> >
> > I need a solution for this i.e.,
> > i need a perl program which
> >
> > (1)uses the password and username to login
> > (2) read the inbox
> > [...]
>
> Someone may have already written a module for that. Search
> CPAN for "webmail."
ya i know about the webmail thing. But the site is not mail based but
is a forum. so there is no specific module for that...
------------------------------
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 9706
***************************************