[30981] in Perl-Users-Digest
Perl-Users Digest, Issue: 2226 Volume: 11
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Sat Feb 21 11:09:46 2009
Date: Sat, 21 Feb 2009 08:09:11 -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 Sat, 21 Feb 2009 Volume: 11 Number: 2226
Today's topics:
Re: Chomp sln@netherlands.com
Re: FAQ 7.16 How do I create a static variable? sln@netherlands.com
Re: FAQ 7.16 How do I create a static variable? sln@netherlands.com
Re: good email parser ?? <jack_posemsky@yahoo.com>
Re: good email parser ?? <jack_posemsky@yahoo.com>
Re: Kill processes after web page closes <stoupa@practisoft.cz>
Re: Net::SSH2 scp_put not working! <zentara@highstream.net>
new CPAN modules on Sat Feb 21 2009 (Randal Schwartz)
processing XML posts through a web server <jack_posemsky@yahoo.com>
Re: Sorting based on existence of keys sln@netherlands.com
Re: using WWW::Mechanize on activestate <placebo@dontbesilly.com>
Re: using WWW::Mechanize on activestate <larry@example.invalid>
Re: using WWW::Mechanize on activestate <placebo@dontbesilly.com>
Re: using WWW::Mechanize on activestate <Peter@PSDT.com>
Re: using WWW::Mechanize on activestate <perl@marc-s.de>
Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Sat, 21 Feb 2009 05:27:25 GMT
From: sln@netherlands.com
Subject: Re: Chomp
Message-Id: <a14vp4hltu28efgq1923uejead0a4a6394@4ax.com>
On Fri, 20 Feb 2009 10:43:53 -0800 (PST), "zoomcart.com" <screwmeblome@gmail.com> wrote:
[snip]
I started off with good intentions to read this code,
but stopped after gazing down at it.
Maybe I will read it if its cleaned up with big indentation,
and uncommented with each line of code as a comment.
-sln
------------------------------
Date: Sat, 21 Feb 2009 08:15:24 GMT
From: sln@netherlands.com
Subject: Re: FAQ 7.16 How do I create a static variable?
Message-Id: <rmdvp41edrs6n71c0aqo72bjbuogcega99@4ax.com>
On Sat, 21 Feb 2009 00:03:02 -0800, PerlFAQ Server <brian@stonehenge.com> wrote:
>This is an excerpt from the latest version perlfaq7.pod, which
>comes with the standard Perl distribution. These postings aim to
>reduce the number of repeated questions as well as allow the community
>to review and update the answers. The latest version of the complete
>perlfaq is at http://faq.perl.org .
>
>--------------------------------------------------------------------
>
>7.16: How do I create a static variable?
>
> (contributed by brian d foy)
>
> In Perl 5.10,
[snip]
Why don't you go live in another dimension, call it the new shit!
Otherwise you can't, even if its just an acronym.
Why waste peoples' time with bullshit?
Faq workers suck as usual, determined via trial and error !
Anybody says there is ONE Faq worker is full of shit !!
If one, he/she sucks beyond compare and if many, they suck exponetially !!
-sln
------------------------------
Date: Sat, 21 Feb 2009 08:19:20 GMT
From: sln@netherlands.com
Subject: Re: FAQ 7.16 How do I create a static variable?
Message-Id: <14evp41u7mbb3u1ndufhvpbserrsl71l77@4ax.com>
On Sat, 21 Feb 2009 08:15:24 GMT, sln@netherlands.com wrote:
>On Sat, 21 Feb 2009 00:03:02 -0800, PerlFAQ Server <brian@stonehenge.com> wrote:
>
>>This is an excerpt from the latest version perlfaq7.pod, which
>>comes with the standard Perl distribution. These postings aim to
>>reduce the number of repeated questions as well as allow the community
>>to review and update the answers. The latest version of the complete
>>perlfaq is at http://faq.perl.org .
>>
>>--------------------------------------------------------------------
>>
>>7.16: How do I create a static variable?
>>
>> (contributed by brian d foy)
>>
>> In Perl 5.10,
>[snip]
>Why don't you go live in another dimension, call it the new shit!
>Otherwise you can't, even if its just an acronym.
>
>Why waste peoples' time with bullshit?
>
>Faq workers suck as usual, determined via trial and error !
>Anybody says there is ONE Faq worker is full of shit !!
>If one, he/she sucks beyond compare and if many, they suck exponetially !!
>
>-sln
So much bullshit, I need a wiper blade change on my car every week.
The artist, STILL, MOTHER OF GOD HELP US, TRYING TO BE LIKE 'C'.
JESUS FUCKING CHRIST KILL THESE MOTHERFUCKERS IN THIER SLEEP !!!
-sln
------------------------------
Date: Sat, 21 Feb 2009 06:29:05 -0800 (PST)
From: Jack <jack_posemsky@yahoo.com>
Subject: Re: good email parser ??
Message-Id: <aa7176a9-c568-4659-8a12-96e4315ba5a2@r10g2000prf.googlegroups.com>
On Feb 10, 2:38=A0pm, Hans Mulder <han...@xs4all.nl> wrote:
> Jack wrote:
> > On Feb 8, 12:08 pm, "Peter J. Holzer" <hjp-usen...@hjp.at> wrote:
> >> On 2009-02-07 23:59, Jack <jack_posem...@yahoo.com> wrote:
>
> >>> Hi I havent had any luck with the CPAN email modules, I just want to
> >>> parse multipart andmimeand base64, with all the varieties of email
> >>> files out there, these modules just dont work...
> >>MIME::Parser works for me. It is a bit slow and tends to use ridiculuou=
s
> >> amounts of memory if you want to avoid temporary files, but I have yet
> >> to find a (syntactically correct) email which can't parse.
>
> >> =A0 =A0 =A0 =A0 hp
>
> > Thanks Peter for the posting.. can you provide some guidance then.. I
> > tried the below code and figured the skeleton would report the base64
> > image attachments in aMIMEmessage, but isnt picking it up.
>
> The parse() method takes a file handle argument. =A0So you'll have to
> open the file yourself and pass the resulting handle to parse():
>
> use warnings;
> use strict;
>
> useMIME::Parser;
>
> my $dir =3D "e:\\tmp";
>
> if (not -d $dir) {
> =A0 =A0 =A0mkdir $dir or die "Can't create directory $dir: $!\n";
>
> }
>
> my $filename1 =3D $ARGV[0] || "no input filename";
>
> ### Create a new parser object:
> my $parser =3D newMIME::Parser;
>
> ### Tell it where to put things:
> $parser->output_under($dir);
>
> ### Open the file:
> open my $fh, '<', $filename1 or die "Can't read $filename1: $!\n";
>
> ### Parse an input filehandle:
> my $entity =3D $parser->parse($fh);
>
> ### Congratulations: you now have a (possibly multipart)MIMEentity!
> $entity->dump_skeleton;
> __END__
>
> This prints:
>
> Content-type: multipart/mixed
> Effective-type: multipart/mixed
> Body-file: NONE
> Subject: car for sale two images
> Num-parts: 2
> --
> =A0 =A0 =A0Content-type: multipart/alternative
> =A0 =A0 =A0Effective-type: multipart/alternative
> =A0 =A0 =A0Body-file: NONE
> =A0 =A0 =A0Num-parts: 2
> =A0 =A0 =A0--
> =A0 =A0 =A0 =A0 =A0Content-type: text/plain
> =A0 =A0 =A0 =A0 =A0Effective-type: text/plain
> =A0 =A0 =A0 =A0 =A0Body-file: e:\tmp/msg-1234304022-16083-0/msg-16083-1.t=
xt
> =A0 =A0 =A0 =A0 =A0--
> =A0 =A0 =A0 =A0 =A0Content-type: text/html
> =A0 =A0 =A0 =A0 =A0Effective-type: text/html
> =A0 =A0 =A0 =A0 =A0Body-file: e:\tmp/msg-1234304022-16083-0/msg-16083-2.h=
tml
> =A0 =A0 =A0 =A0 =A0--
> =A0 =A0 =A0Content-type: image/jpeg
> =A0 =A0 =A0Effective-type: image/jpeg
> =A0 =A0 =A0Body-file: e:\tmp/msg-1234304022-16083-0/masertione.jpg
> =A0 =A0 =A0Recommended-filename: masertione.jpg
> =A0 =A0 =A0--
>
> > I need
> > to be able to deal with text body, base64 body, and image attachments,
> > and want to parse them out correctly. =A0I can do the base64 decoding,
> > etc. -
>
> MIME::Parser will do the base64 decoding for you.
>
> > how do I accomplish this withMIME::Parser ??
>
> Read the documentation carefully:
>
> parse INSTREAM
> =A0 =A0 Instance method. =A0Takes aMIME-stream and splits it into its com=
po-
> =A0 =A0 nent entities.
>
> =A0 =A0 The INSTREAM can be given as a readable FileHandle, an IO::File, =
a
> =A0 =A0 globref filehandle (like "\*STDIN"), or as any blessed object con=
-
> =A0 =A0 forming to the IO:: interface (which minimally implements getline=
()
> =A0 =A0 and read()).
>
> It does not mention the possibility of passing a filename and parse()
> opening it on your behalf. =A0This suggest that this feature does not
> exist in this version ofMIME::Parser.
>
> Hope this helps,
>
> -- HansM
Thanks Hans... can you tell me if MIME:Parser will handle / process
RFC (non mime) emails ?
------------------------------
Date: Sat, 21 Feb 2009 07:02:16 -0800 (PST)
From: Jack <jack_posemsky@yahoo.com>
Subject: Re: good email parser ??
Message-Id: <c231a573-58bf-4bdf-8c6a-7f8cfced4e6a@i18g2000prf.googlegroups.com>
On Feb 10, 2:38=A0pm, Hans Mulder <han...@xs4all.nl> wrote:
> Jack wrote:
> > On Feb 8, 12:08 pm, "Peter J. Holzer" <hjp-usen...@hjp.at> wrote:
> >> On 2009-02-07 23:59, Jack <jack_posem...@yahoo.com> wrote:
>
> >>> Hi I havent had any luck with the CPAN email modules, I just want to
> >>> parse multipart andmimeand base64, with all the varieties of email
> >>> files out there, these modules just dont work...
> >>MIME::Parser works for me. It is a bit slow and tends to use ridiculuou=
s
> >> amounts of memory if you want to avoid temporary files, but I have yet
> >> to find a (syntactically correct) email which can't parse.
>
> >> =A0 =A0 =A0 =A0 hp
>
> > Thanks Peter for the posting.. can you provide some guidance then.. I
> > tried the below code and figured the skeleton would report the base64
> > image attachments in aMIMEmessage, but isnt picking it up.
>
> The parse() method takes a file handle argument. =A0So you'll have to
> open the file yourself and pass the resulting handle to parse():
>
> use warnings;
> use strict;
>
> useMIME::Parser;
>
> my $dir =3D "e:\\tmp";
>
> if (not -d $dir) {
> =A0 =A0 =A0mkdir $dir or die "Can't create directory $dir: $!\n";
>
> }
>
> my $filename1 =3D $ARGV[0] || "no input filename";
>
> ### Create a new parser object:
> my $parser =3D newMIME::Parser;
>
> ### Tell it where to put things:
> $parser->output_under($dir);
>
> ### Open the file:
> open my $fh, '<', $filename1 or die "Can't read $filename1: $!\n";
>
> ### Parse an input filehandle:
> my $entity =3D $parser->parse($fh);
>
> ### Congratulations: you now have a (possibly multipart)MIMEentity!
> $entity->dump_skeleton;
> __END__
>
> This prints:
>
> Content-type: multipart/mixed
> Effective-type: multipart/mixed
> Body-file: NONE
> Subject: car for sale two images
> Num-parts: 2
> --
> =A0 =A0 =A0Content-type: multipart/alternative
> =A0 =A0 =A0Effective-type: multipart/alternative
> =A0 =A0 =A0Body-file: NONE
> =A0 =A0 =A0Num-parts: 2
> =A0 =A0 =A0--
> =A0 =A0 =A0 =A0 =A0Content-type: text/plain
> =A0 =A0 =A0 =A0 =A0Effective-type: text/plain
> =A0 =A0 =A0 =A0 =A0Body-file: e:\tmp/msg-1234304022-16083-0/msg-16083-1.t=
xt
> =A0 =A0 =A0 =A0 =A0--
> =A0 =A0 =A0 =A0 =A0Content-type: text/html
> =A0 =A0 =A0 =A0 =A0Effective-type: text/html
> =A0 =A0 =A0 =A0 =A0Body-file: e:\tmp/msg-1234304022-16083-0/msg-16083-2.h=
tml
> =A0 =A0 =A0 =A0 =A0--
> =A0 =A0 =A0Content-type: image/jpeg
> =A0 =A0 =A0Effective-type: image/jpeg
> =A0 =A0 =A0Body-file: e:\tmp/msg-1234304022-16083-0/masertione.jpg
> =A0 =A0 =A0Recommended-filename: masertione.jpg
> =A0 =A0 =A0--
>
> > I need
> > to be able to deal with text body, base64 body, and image attachments,
> > and want to parse them out correctly. =A0I can do the base64 decoding,
> > etc. -
>
> MIME::Parser will do the base64 decoding for you.
>
> > how do I accomplish this withMIME::Parser ??
>
> Read the documentation carefully:
>
> parse INSTREAM
> =A0 =A0 Instance method. =A0Takes aMIME-stream and splits it into its com=
po-
> =A0 =A0 nent entities.
>
> =A0 =A0 The INSTREAM can be given as a readable FileHandle, an IO::File, =
a
> =A0 =A0 globref filehandle (like "\*STDIN"), or as any blessed object con=
-
> =A0 =A0 forming to the IO:: interface (which minimally implements getline=
()
> =A0 =A0 and read()).
>
> It does not mention the possibility of passing a filename and parse()
> opening it on your behalf. =A0This suggest that this feature does not
> exist in this version ofMIME::Parser.
>
> Hope this helps,
>
> -- HansM
Also how does one capture the directory name its creating on the fly
into a variable ??
------------------------------
Date: Sat, 21 Feb 2009 12:52:24 +0100
From: "Petr Vileta \"fidokomik\"" <stoupa@practisoft.cz>
Subject: Re: Kill processes after web page closes
Message-Id: <gnopvq$2ksq$1@ns.felk.cvut.cz>
Tim Greer wrote:
> Petr Vileta "fidokomik" wrote:
>
>> You can set some $SIG{} perl variables to you own routine. I'm not
>> sure if this is exact but possible when user click back button then
>> Appache server (or other web server service) send TERM or QUIT signal
>> to your perl proccess. When you have $SIG{} variable redirected to
>> your routine then you can do something you need.
>>
>> #!/usr/bin/perl
>> use strict;
>> # .....
>> $SIG{'QUIT'}=sub {errexit("SIG-QUIT")};
>> $SIG{'TERM'}=sub {errexit("SIG-TERM")};
>> # .....
>>
>> sub errexit
>> {
>> my $signal = shift;
>> # you can write $signal to the log file if you need
>>
>> # you can unlink some files;
>>
>> exit 0;
>> }
>>
>>
>
> Those (signals) aren't sent or captured from the browser. Do you
> meant to suggest some alarm for the run time or something?
Yes. I did some with these alarms for my upload.cgi script. When user send file
from browser then my script create a temporary file (for some purpose) and
receive data from stream. But when user cancel an operation (press stop button
in browser, go to other page) then I need to delete my temporary file. I found
that in this case Apache send SIG-TERM or SIG-QUIT signal to perl proccess. I
don't know which version of Apache (1.x or 2.x) is sending SIG-TERM and which is
sending SIG-QUIT but I found that on different hostings both signals are used.
By redirecting these two signals you are able to do something short (in time)
before your script terminate. This is usable for long time running cron jobs too
to secure end a job (e.g. clean something e.t.c.).
--
Petr Vileta, Czech republic
(My server rejects all messages from Yahoo and Hotmail.
Send me your mail from another non-spammer site please.)
Please reply to <petr AT practisoft DOT cz>
------------------------------
Date: Sat, 21 Feb 2009 07:08:34 -0500
From: zentara <zentara@highstream.net>
Subject: Re: Net::SSH2 scp_put not working!
Message-Id: <8jrvp41oel1bda3luepbo092e1qkrs0qip@4ax.com>
On Thu, 19 Feb 2009 10:50:47 -0800 (PST), Krishna Chaitanya
<schaitan@gmail.com> wrote:
>Hi Tim,
>
>SSH/SCP work very smoothly at least in my test bed (don't have access
>yet to the customer's network). At least, they work smoothly when I
>type the commands at the prompt. But they don't when I use synchronous
>I/O as discussed above.
>
>SSH key exchange is not permitted by the customer in his network. I am
>expected to host my program on a Linux box and execute it to copy a
>set of files (about 300 MB in total) from there to each machine (list
>of IP addresses and their passwords is provided up front). After
>copying those files, I will have to execute certain programs on each
>machine and log the output to a central directory. With Net::SSH2,
>since it is smart enough (?) to expect and react to SSH challenges, I
>had a feeling I wouldn't really need SSH key exchange.
Have you seen http://perlmonks.org?node_id=635521
zentara
--
I'm not really a human, but I play one on earth.
http://www.zentara.net/~zentaran/My_Petition_to_the_Great_Cosmic_Conciousness.html
------------------------------
Date: Sat, 21 Feb 2009 05:42:26 GMT
From: merlyn@stonehenge.com (Randal Schwartz)
Subject: new CPAN modules on Sat Feb 21 2009
Message-Id: <KFEIIq.FDF@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.
App-Sequence-0.03_04
http://search.cpan.org/~kimoto/App-Sequence-0.03_04/
pluggable subroutine engine.
----
App-ZofCMS-Plugin-RandomPasswordGenerator-0.0101
http://search.cpan.org/~zoffix/App-ZofCMS-Plugin-RandomPasswordGenerator-0.0101/
easily generate random passwords with an option to use md5_hex from Digest::MD5 on them
----
B-Hooks-EndOfScope-0.07
http://search.cpan.org/~flora/B-Hooks-EndOfScope-0.07/
Execute code after a scope finished compilation
----
Capture-Tiny-0.03
http://search.cpan.org/~dagolden/Capture-Tiny-0.03/
Capture STDOUT and STDERR from Perl, XS or external programs
----
Catalyst-Controller-ActionRole-0.01
http://search.cpan.org/~flora/Catalyst-Controller-ActionRole-0.01/
Apply roles to action instances
----
Catalyst-Controller-ActionRole-0.02
http://search.cpan.org/~flora/Catalyst-Controller-ActionRole-0.02/
Apply roles to action instances
----
Catalyst-Example-InstantCRUD-0.0.28
http://search.cpan.org/~zby/Catalyst-Example-InstantCRUD-0.0.28/
A CRUD scaffolding for Catalyst.
----
Catalyst-Model-Data-Localize-0.00001
http://search.cpan.org/~dmaki/Catalyst-Model-Data-Localize-0.00001/
Catalyst Model Over Data::Localize
----
Catalyst-Model-Data-Localize-0.00001_01
http://search.cpan.org/~dmaki/Catalyst-Model-Data-Localize-0.00001_01/
Catalyst Model Over Data::Localize
----
Catalyst-Model-MenuGrinder-0.01_02
http://search.cpan.org/~hbslabs/Catalyst-Model-MenuGrinder-0.01_02/
Catalyst Model base class for WWW::MenuGrinder
----
Catalyst-Plugin-Params-Demoronize-1.1
http://search.cpan.org/~diz/Catalyst-Plugin-Params-Demoronize-1.1/
convert common UTF-8 and Windows-1252 characters to their ASCII equivalents
----
Catalyst-View-TT-0.29
http://search.cpan.org/~mramberg/Catalyst-View-TT-0.29/
Template View Class
----
Class-Attribute-0.024
http://search.cpan.org/~deepfryed/Class-Attribute-0.024/
A fast and light weight alternative for defining class attributes.
----
Class-DBI-Plugin-DateTime-0.05
http://search.cpan.org/~dmaki/Class-DBI-Plugin-DateTime-0.05/
Use DateTime Objects As Columns
----
Data-Localize-0.00001
http://search.cpan.org/~dmaki/Data-Localize-0.00001/
Alternate Data Localization API
----
Data-Localize-0.00001_02
http://search.cpan.org/~dmaki/Data-Localize-0.00001_02/
Alternate Data Localization API
----
Dia-SQL-0.01
http://search.cpan.org/~aff/Dia-SQL-0.01/
Convert Dia class diagrams into SQL.
----
Gtk2-WebKit-Mechanize-0.01
http://search.cpan.org/~bosu/Gtk2-WebKit-Mechanize-0.01/
WWW::Mechanize done with HTML WebKit engine.
----
HTTP-Engine-0.1.4
http://search.cpan.org/~yappo/HTTP-Engine-0.1.4/
Web Server Gateway Interface and HTTP Server Engine Drivers (Yet Another Catalyst::Engine)
----
HTTP-Engine-Middleware-0.08
http://search.cpan.org/~yappo/HTTP-Engine-Middleware-0.08/
middlewares distribution
----
HTTP-Headers-Fast-0.09
http://search.cpan.org/~tokuhirom/HTTP-Headers-Fast-0.09/
faster implementation of HTTP::Headers
----
IPC-Lite-0.1.27
http://search.cpan.org/~earonesty/IPC-Lite-0.1.27/
Share variables between processes
----
Mail-Builder-Simple-0.04
http://search.cpan.org/~teddy/Mail-Builder-Simple-0.04/
Send UTF-8 HTML and text email with attachments and inline images, eventually using templates
----
Method-Lexical-0.10
http://search.cpan.org/~chocolate/Method-Lexical-0.10/
private methods and lexical method overrides
----
Method-Lexical-0.11
http://search.cpan.org/~chocolate/Method-Lexical-0.11/
private methods and lexical method overrides
----
Module-Build-0.31_04
http://search.cpan.org/~ewilhelm/Module-Build-0.31_04/
Build and install Perl modules
----
Moxy-0.51
http://search.cpan.org/~tokuhirom/Moxy-0.51/
Mobile web development proxy
----
NCBIx-BigFetch-0.56
http://search.cpan.org/~rogerhall/NCBIx-BigFetch-0.56/
Robustly retrieve very large NCBI sequence result sets based on keyword searches using NCBI eUtils.
----
Nagios-Object-0.21.3
http://search.cpan.org/~duncs/Nagios-Object-0.21.3/
Creates perl objects to represent Nagios objects
----
Net-API-RPX-0.01
http://search.cpan.org/~konobi/Net-API-RPX-0.01/
Perl interface to Janrain's RPX service
----
Net-Generatus-0.20
http://search.cpan.org/~shiny/Net-Generatus-0.20/
----
Net-Twitter-2.09
http://search.cpan.org/~cthom/Net-Twitter-2.09/
Perl interface to twitter.com
----
PAR-0.987_01
http://search.cpan.org/~smueller/PAR-0.987_01/
Perl Archive Toolkit
----
PAR-Repository-Client-0.24_01
http://search.cpan.org/~smueller/PAR-Repository-Client-0.24_01/
Access PAR repositories
----
Rose-HTMLx-Form-DBIC-0.06
http://search.cpan.org/~zby/Rose-HTMLx-Form-DBIC-0.06/
Module abstract (<= 44 characters) goes here
----
Rose-HTMLx-Form-DBIC-0.07
http://search.cpan.org/~zby/Rose-HTMLx-Form-DBIC-0.07/
Module abstract (<= 44 characters) goes here
----
SVGraph-0.02
http://search.cpan.org/~comsultia/SVGraph-0.02/
Library that generates cool SVG graphs
----
Shipwright-2.1.0
http://search.cpan.org/~sunnavy/Shipwright-2.1.0/
Best Practical Builder
----
Simo-Wrapper-0.01_06
http://search.cpan.org/~kimoto/Simo-Wrapper-0.01_06/
Object wrapper to manipulate attrs and methods.
----
String-Perl-Warnings-0.04
http://search.cpan.org/~bingos/String-Perl-Warnings-0.04/
Determine if a string looks like a perl warning
----
String-RewritePrefix-0.004
http://search.cpan.org/~rjbs/String-RewritePrefix-0.004/
rewrite strings based on a set of known prefixes
----
Template-Declare-0.37
http://search.cpan.org/~jesse/Template-Declare-0.37/
Perlish declarative templates
----
Template-Plugin-XML-Feed-0.02
http://search.cpan.org/~davecross/Template-Plugin-XML-Feed-0.02/
Plugin interface to XML::Feed
----
Test-DBUnit-0.20
http://search.cpan.org/~adrianwit/Test-DBUnit-0.20/
Database testing framework.
----
Test-HTTP-Server-Simple-0.10
http://search.cpan.org/~alexmv/Test-HTTP-Server-Simple-0.10/
Test::More functions for HTTP::Server::Simple
----
Test-Weaken-2.000000
http://search.cpan.org/~jkegl/Test-Weaken-2.000000/
Test that freed references are, indeed, freed
----
WWW-Hanako-0.02
http://search.cpan.org/~hamano/WWW-Hanako-0.02/
Perl interface for Hanako(Pollen observation system at Japan)
----
WWW-MobileCarrierJP-0.27
http://search.cpan.org/~tokuhirom/WWW-MobileCarrierJP-0.27/
scrape mobile carrier information
----
WWW-Wikipedia-TemplateFiller-0.11
http://search.cpan.org/~diberri/WWW-Wikipedia-TemplateFiller-0.11/
Fill Wikipedia templates with your eyes closed
----
Web-oEmbed-0.03
http://search.cpan.org/~miyagawa/Web-oEmbed-0.03/
oEmbed consumer
----
ZConf-BGSet-0.2.0
http://search.cpan.org/~vvelox/ZConf-BGSet-0.2.0/
A perl module for background management.
----
ZConf-Mail-0.1.0
http://search.cpan.org/~vvelox/ZConf-Mail-0.1.0/
Misc mail client functions backed by ZConf.
----
ZConf-Mail-0.1.1
http://search.cpan.org/~vvelox/ZConf-Mail-0.1.1/
Misc mail client functions backed by ZConf.
----
ZConf-Runner-0.1.0
http://search.cpan.org/~vvelox/ZConf-Runner-0.1.0/
Run a file using a choosen methode, desktop entry or mimetype.
----
Zymurgy-0.01
http://search.cpan.org/~rogerhall/Zymurgy-0.01/
[One line description of module's purpose here]
----
namespace-clean-0.10
http://search.cpan.org/~flora/namespace-clean-0.10/
Keep imports and functions out of your namespace
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/>
Smalltalk/Perl/Unix consulting, Technical writing, Comedy, etc. etc.
See http://methodsandmessages.vox.com/ for Smalltalk and Seaside discussion
------------------------------
Date: Sat, 21 Feb 2009 06:16:50 -0800 (PST)
From: Jack <jack_posemsky@yahoo.com>
Subject: processing XML posts through a web server
Message-Id: <5ac02cb2-e63f-4d04-8ba4-4f4404c3ef16@i20g2000prf.googlegroups.com>
Ok call me stupid, but can anyone explain the best way to process bi
directional XML coming in via an http post, using an IIS webserver.. I
know CPAN has XML modules, etc. but how does this process work - ie a
file is posted to the webserver and saved to a directory where perl
then parses it ?? How do you use perl to post a response back through
IIS ? Basic to some but not me, any thoughts would help.
Thank you,
Jack
------------------------------
Date: Sat, 21 Feb 2009 06:05:37 GMT
From: sln@netherlands.com
Subject: Re: Sorting based on existence of keys
Message-Id: <375vp4ls8ik7ru8v5tpsmlmr9822585bp7@4ax.com>
On Fri, 20 Feb 2009 17:14:12 GMT, sln@netherlands.com wrote:
>On Fri, 20 Feb 2009 13:01:49 +0100, Rasmus Villemoes <burner+usenet@imf.au.dk> wrote:
>
>>Uri Guttman <uri@stemsystems.com> writes:
>>
>>> @sorted = map $_->[0],
>>> sort { $a->[1] <=> $b->[1] }
>>> map [ $_, exists($h{$_}) ? length $h{$_} : 9999999 ],
>>> @unsorted ;
>>
>>Let me see if I understand what's going on: The last two lines builds
>>an array of refs. Each ref is a reference to an anonymous array with
>>
>[snip]
>>Thanks to everybody for your answers. They confirm perl's slogan, and
>>it's nice to see the different approaches. For the time being I will
>>use &&-expressions and apply a decreasing function to length() so that
>>the overall comparison of existing keys ends up in ascending order. If
>>no elements are longer than 9 this actually works:
>>
>>my @ks = qw(two three one four);
>>my %h = ( one => 1,
>> three => 333 );
>>
>>for (sort { (exists $h{$b} && 10-length $h{$b}) <=>
>> (exists $h{$a} && 10-length $h{$a}) } @ks) { print "$_\n" }
>
>This is not a very clever idea.
>First, using numeric context in the hash.
>Given the first, second treating it as a string.
>Given the first and second, third is to treat it as a 10 digit string.
>
Actually, this is not why it's not clever, since you can pass length '$h{$a}' to
force string context
>Example:
>two => 2e10 in the hash
> becomes
>two => 20000000000 , length = 11
> when it hits the length() function
>
>So as a general rule, sorting by length in numeric context is not a good
>idea.
But, this is true. Too many examples to show why. Floating point, exponential,
etc. It loses it's context in what length() is for... really strings.
>
>The fourth is that its not portable.
>There is two parts to this, one is forcing non-existing elements to the
>bottom, the other to sort the existing ones and bring to the top.
>These two parts have to be kept separate for portablity.
>
> for (sort { (exists $h{$b} && $h{$b}) <=>
> (exists $h{$a} && $h{$a}) } @ks) { print "$_\n" }
The above won't work in value context, numeric by nature with <=>.
On the other hand, 'exists $h{$b}' is NOT meant to be interpreted as
numeric, but as a string, since 0 can equal 0. But '' is less than '1'
in a compare, but equal length numerically. The two don't mix.
>^^^^
>This wont work if you decide to sort by value instead of length.
>
>The most portable approach is a scheme like this:
>
$xa = exists $h{$a};
string context, returns '1' for true, '' for false
> length: !($xb & $xa) ? $xb cmp $xa : length $h{$a} <=> length $h{$b}
> !($xb & $xa) ? $xb cmp $xa : length $h{$b} <=> length $h{$a}
> value: !($xb & $xa) ? $xb cmp $xa : $h{$a} <=> $h{$b}
> !($xb & $xa) ? $xb cmp $xa : $h{$b} <=> $h{$a}
^^^^^^^^^^^^^^^
Haven't tried this one, %75 of my theory works, this is the %25 haven't tried.
My confidence is %100 the non-existent will decend to the bottom.
> or more complex: !($xb & $xa) ? $xb cmp $xa : func($h{$a},$h{$b})
>
>Any scheme will work as long as there is true separation between parts.
>
>
>-sln
Hope I cleared some stuff up. I know people will find this knowledge in the
archives someday.
-sln
------------------------------
Date: Sat, 21 Feb 2009 06:06:07 GMT
From: "Peter Wyzl" <placebo@dontbesilly.com>
Subject: Re: using WWW::Mechanize on activestate
Message-Id: <jRMnl.22418$cu.17969@news-server.bigpond.net.au>
"Larry Gates" <larry@example.invalid> wrote in message
news:7wzzzvvr59bk$.1xe1s9cowbbsn$.dlg@40tude.net...
>
> I've been trying to get scrape the web page that is given in the faqs as a
> searching resource and then automate the page. WWW::Mechanize is not one
> of the modules that activestate bundles, so I needed it off the web.
>
> I think activestate made a less-than-effective install, as when I was done
> with it, it didn't have a Mechanize.pm in it anywhere. So I download
> Mechanize.pm from cpan and put it in the WWW folder.
>
> Now my error is:
>
> C:\MinGW\source> perl goog2.pl
> Can't locate HTTP/Response/Encoding.pm in @INC (@INC contains:
> C:/Perl/site/lib
> C:/Perl/lib .) at C:/Perl/site/lib/WWW/Mechanize.pm line 109.
> BEGIN failed--compilation aborted at C:/Perl/site/lib/WWW/Mechanize.pm
> line
> 109.
Why can't you install WWW::Mechanize via ppm - I just tried it and it
installs fine.
Run ppm from the command prompt and you should fine a nice gui interface if
you have reasonably current AS Perl.
P
------------------------------
Date: Sat, 21 Feb 2009 03:45:42 -0700
From: Larry Gates <larry@example.invalid>
Subject: Re: using WWW::Mechanize on activestate
Message-Id: <1cdgtncoqiolu$.3td5tpu1bwbb$.dlg@40tude.net>
On Sat, 21 Feb 2009 06:06:07 GMT, Peter Wyzl wrote:
> "Larry Gates" <larry@example.invalid> wrote in message
> news:7wzzzvvr59bk$.1xe1s9cowbbsn$.dlg@40tude.net...
>>
>> I've been trying to get scrape the web page that is given in the faqs as a
>> searching resource and then automate the page. WWW::Mechanize is not one
>> of the modules that activestate bundles, so I needed it off the web.
>>
>> I think activestate made a less-than-effective install, as when I was done
>> with it, it didn't have a Mechanize.pm in it anywhere. So I download
>> Mechanize.pm from cpan and put it in the WWW folder.
>>
>> Now my error is:
>>
>> C:\MinGW\source> perl goog2.pl
>> Can't locate HTTP/Response/Encoding.pm in @INC (@INC contains:
>> C:/Perl/site/lib
>> C:/Perl/lib .) at C:/Perl/site/lib/WWW/Mechanize.pm line 109.
>> BEGIN failed--compilation aborted at C:/Perl/site/lib/WWW/Mechanize.pm
>> line
>> 109.
>
> Why can't you install WWW::Mechanize via ppm - I just tried it and it
> installs fine.
>
> Run ppm from the command prompt and you should fine a nice gui interface if
> you have reasonably current AS Perl.
>
> P
It installed "fine," if that can describe an install without a Mechanize.pm
in it.
http://i40.tinypic.com/692uk9.jpg
What are all these dependencies?
--
larry gates
Of course, this being Perl, we could always take both approaches. :-)
-- Larry Wall in <199709021744.KAA12428@wall.org>
------------------------------
Date: Sat, 21 Feb 2009 11:08:31 GMT
From: "Peter Wyzl" <placebo@dontbesilly.com>
Subject: Re: using WWW::Mechanize on activestate
Message-Id: <PgRnl.22485$cu.15739@news-server.bigpond.net.au>
"Larry Gates" <larry@example.invalid> wrote in message
news:1cdgtncoqiolu$.3td5tpu1bwbb$.dlg@40tude.net...
> On Sat, 21 Feb 2009 06:06:07 GMT, Peter Wyzl wrote:
>>
>> Why can't you install WWW::Mechanize via ppm - I just tried it and it
>> installs fine.
>>
>> Run ppm from the command prompt and you should fine a nice gui interface
>> if
>> you have reasonably current AS Perl.
>>
>> P
>
> It installed "fine," if that can describe an install without a
> Mechanize.pm
> in it.
>
> http://i40.tinypic.com/692uk9.jpg
>
> What are all these dependencies?
I dunno, I have Mechanize.pm in my C:\perl\Site\Lib\WWW\ directory (after a
ppm install WWW-Mechanize). I don't know what the CPAN dependencies tool
has to do with Activestate installations... I use AS tools for AS stuff and
CPAN tools for CPAN stuff - I don't known that the twain do actually meet.
As per your own image - the 60% chance of all tests passing doesn't actually
mean much.
Have you tried a ppm install of encoder?
P
------------------------------
Date: Sat, 21 Feb 2009 14:36:42 GMT
From: Peter Scott <Peter@PSDT.com>
Subject: Re: using WWW::Mechanize on activestate
Message-Id: <_jUnl.14600$Si4.9941@newsfe22.iad>
On Sat, 21 Feb 2009 03:45:42 -0700, Larry Gates wrote:
> On Sat, 21 Feb 2009 06:06:07 GMT, Peter Wyzl wrote:
>
>> "Larry Gates" <larry@example.invalid> wrote in message
>> news:7wzzzvvr59bk$.1xe1s9cowbbsn$.dlg@40tude.net...
>>>
>>> I've been trying to get scrape the web page that is given in the faqs
>>> as a searching resource and then automate the page. WWW::Mechanize is
>>> not one of the modules that activestate bundles, so I needed it off
>>> the web.
>>>
>>> I think activestate made a less-than-effective install, as when I was
>>> done with it, it didn't have a Mechanize.pm in it anywhere. So I
>>> download Mechanize.pm from cpan and put it in the WWW folder.
>>>
>>> Now my error is:
>>>
>>> C:\MinGW\source> perl goog2.pl
>>> Can't locate HTTP/Response/Encoding.pm in @INC (@INC contains:
>>> C:/Perl/site/lib
>>> C:/Perl/lib .) at C:/Perl/site/lib/WWW/Mechanize.pm line 109. BEGIN
>>> failed--compilation aborted at C:/Perl/site/lib/WWW/Mechanize.pm line
>>> 109.
>>
>> Why can't you install WWW::Mechanize via ppm - I just tried it and it
>> installs fine.
>>
>> Run ppm from the command prompt and you should fine a nice gui
>> interface if you have reasonably current AS Perl.
>>
>> P
>
> It installed "fine," if that can describe an install without a
> Mechanize.pm in it.
If I understand correctly, you ran ppm and used it to install
WWW::Mechanize, but then a program using that module couldn't find it.
Correct?
If so, the problem you need to solve is why your usage of ppm isn't
meeting your expectations. Simply copying Mechanize.pm isn't going to
solve this problem and even if it did, it would be unlikely to work for
the next module.
I've never seen ppm claim to install a module and not actually do it, so I
would first check that you are using ppm correctly. Have you used it to
successfully install another module that you knew wasn't in the AS core on
this machine before?
Do you have more than one installation of perl on this machine? Is it
possible that the ppm you ran pointed to a different one from the perl
command you ran?
I found the ppm GUI not totally intuitive to begin with (although granted
I needed the additional step of adding another respository; you don't have
to do that). I think it is quite possible that you thought you installed
a module but didn't. Repeat and reexamine every step of that process,
perhaps on a different module.
I've used ppm to install Mech on a modern Windows perl, so I know it's
doable.
--
Peter Scott
http://www.perlmedic.com/
http://www.perldebugged.com/
------------------------------
Date: Sat, 21 Feb 2009 16:54:22 +0100
From: Marc Lucksch <perl@marc-s.de>
Subject: Re: using WWW::Mechanize on activestate
Message-Id: <gnp828$erj$1@ariadne.rz.tu-clausthal.de>
Peter Scott schrieb:
> I've used ppm to install Mech on a modern Windows perl, so I know it's
> doable.
You could also try
perl -MCPAN -e install -e WWW::Mechanize
worked fine for me and didn't need to compile anything
------------------------------
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 2226
***************************************