[30010] in Perl-Users-Digest
Perl-Users Digest, Issue: 1253 Volume: 11
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Sun Feb 3 09:09:45 2008
Date: Sun, 3 Feb 2008 06:09:05 -0800 (PST)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Perl-Users Digest Sun, 3 Feb 2008 Volume: 11 Number: 1253
Today's topics:
Re: Magic for object constructor wanted <hjp-usenet2@hjp.at>
new CPAN modules on Sun Feb 3 2008 (Randal Schwartz)
Pan in SDL_Perl, Alt. Audio Engines (Win32) <vtatila@mail.student.oulu.fi>
Re: Perl on Linux and AIX <here@my.pc>
Re: Perl on Linux and AIX <hjp-usenet2@hjp.at>
Re: post or get message posting <rm@dontspamme.net>
Re: post or get message posting <noreply@gunnar.cc>
Re: post or get message posting <rm@dontspamme.net>
submitting a form when two forms with the same name <nospam@nospam.com>
Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Sun, 3 Feb 2008 10:04:08 +0100
From: "Peter J. Holzer" <hjp-usenet2@hjp.at>
Subject: Re: Magic for object constructor wanted
Message-Id: <slrnfqb0sj.nvc.hjp-usenet2@hrunkner.hjp.at>
On 2008-02-01 10:29, Dr.Ruud <rvtol+news@isolution.nl> wrote:
> Martijn Lievaart schreef:
>> A Dude normally does not get a name once he gets friends, he has a
>> name, so the constructor should set the name.
But sometimes he gets an additional name when he gets friends ...
> Best let the constructor only construct, and make a separate initiator
> to initialize values.
... and he isn't necessarily born with a name.
hp
------------------------------
Date: Sun, 3 Feb 2008 05:42:16 GMT
From: merlyn@stonehenge.com (Randal Schwartz)
Subject: new CPAN modules on Sun Feb 3 2008
Message-Id: <JvnEIG.10nq@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.
Bundle-Theory-1.00
http://search.cpan.org/~dwheeler/Bundle-Theory-1.00/
A bundle to install all Theory's favorite modules
----
Data-Thunk-0.05
http://search.cpan.org/~nuffin/Data-Thunk-0.05/
A sneakier Scalar::Defer ;-)
----
Devel-StackTrace-1.16
http://search.cpan.org/~drolsky/Devel-StackTrace-1.16/
Stack trace and stack trace frame objects
----
Fey-Core-0.01
http://search.cpan.org/~drolsky/Fey-Core-0.01/
----
Fey-Loader-0.01
http://search.cpan.org/~drolsky/Fey-Loader-0.01/
Load your schema defintion from a DBMS
----
Geo-Coordinates-Converter-iArea-0.05
http://search.cpan.org/~tokuhirom/Geo-Coordinates-Converter-iArea-0.05/
get center point from iArea
----
Geo-Coordinates-Converter-iArea-0.06
http://search.cpan.org/~tokuhirom/Geo-Coordinates-Converter-iArea-0.06/
get center point from iArea
----
Graph-Maker
http://search.cpan.org/~batz/Graph-Maker/
Create many types of graphs
----
IO-Ppoll-0.06
http://search.cpan.org/~pevans/IO-Ppoll-0.06/
Object interface to Linux's ppoll() call
----
Net-Appliance-Session-0.21
http://search.cpan.org/~oliver/Net-Appliance-Session-0.21/
Run command-line sessions to network appliances
----
POE-Component-CPAN-SQLite-Info-0.05
http://search.cpan.org/~zoffix/POE-Component-CPAN-SQLite-Info-0.05/
non-blocking wrapper around CPAN::SQLite::Info with file fetching abilities.
----
POE-Component-CPAN-SQLite-Info-0.06
http://search.cpan.org/~zoffix/POE-Component-CPAN-SQLite-Info-0.06/
non-blocking wrapper around CPAN::SQLite::Info with file fetching abilities.
----
POE-Component-DirWatch-0.100000_03
http://search.cpan.org/~groditi/POE-Component-DirWatch-0.100000_03/
POE directory watcher
----
POE-Component-WWW-Google-PageRank-0.02
http://search.cpan.org/~zoffix/POE-Component-WWW-Google-PageRank-0.02/
A non-blocking wrapper for WWW::Google::PageRank
----
POE-Component-WWW-PAUSE-RecentUploads-0.01
http://search.cpan.org/~zoffix/POE-Component-WWW-PAUSE-RecentUploads-0.01/
a non-blocking POE wrapper around WWW::PAUSE::RecentUploads.
----
POE-Component-WWW-PAUSE-RecentUploads-0.02
http://search.cpan.org/~zoffix/POE-Component-WWW-PAUSE-RecentUploads-0.02/
a non-blocking POE wrapper around WWW::PAUSE::RecentUploads.
----
POE-Component-WWW-PAUSE-RecentUploads-Tail-0.01
http://search.cpan.org/~zoffix/POE-Component-WWW-PAUSE-RecentUploads-Tail-0.01/
tail recent uploads to PAUSE.
----
POE-Component-WWW-Search-Mininova-0.03
http://search.cpan.org/~zoffix/POE-Component-WWW-Search-Mininova-0.03/
non-blocking POE wrapper for WWW::Search::Mininova
----
POE-Component-WWW-YouTube-VideoURI-0.05
http://search.cpan.org/~zoffix/POE-Component-WWW-YouTube-VideoURI-0.05/
Non-blocking POE wrapper around WWW::YouTube::VideoURI with download abilities.
----
POE-Component-WebService-Validator-HTML-W3C-0.05
http://search.cpan.org/~zoffix/POE-Component-WebService-Validator-HTML-W3C-0.05/
a non-blocking POE wrapper around WebService::Validator::HTML::W3C
----
Parse-Stata-DtaReader-0.59
http://search.cpan.org/~reckon/Parse-Stata-DtaReader-0.59/
CPAN release history
----
Parse-Stata-DtaReader-0.591
http://search.cpan.org/~reckon/Parse-Stata-DtaReader-0.591/
CPAN release history
----
Perl6-Doc-0.34_3
http://search.cpan.org/~lichtkind/Perl6-Doc-0.34_3/
all useful Perl 6 Docs in your command line
----
Proc-Exists-0.09
http://search.cpan.org/~brianski/Proc-Exists-0.09/
quickly check for process existence
----
Slackware-Slackget-0.15_99
http://search.cpan.org/~dupuisarn/Slackware-Slackget-0.15_99/
The main slack-get 1.0 library
----
Tie-OneOff-1.02
http://search.cpan.org/~nobull/Tie-OneOff-1.02/
create tied variables without defining a separate package
----
Tie-OneOff-1.03
http://search.cpan.org/~nobull/Tie-OneOff-1.03/
create tied variables without defining a separate package
----
Variable-Magic-0.09
http://search.cpan.org/~vpit/Variable-Magic-0.09/
Associate user-defined magic to variables from Perl.
----
WordPress-XMLRPC-1.02
http://search.cpan.org/~leocharre/WordPress-XMLRPC-1.02/
----
XML-Comma-1.996
http://search.cpan.org/~brianski/XML-Comma-1.996/
A framework for structured document manipulation
----
relative-0.04
http://search.cpan.org/~saper/relative-0.04/
Load modules with relative names
If you're an author of one of these modules, please submit a detailed
announcement to comp.lang.perl.announce, and we'll pass it along.
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, 03 Feb 2008 14:05:52 +0200
From: Veli-Pekka =?iso-8859-1?Q?T=E4til=E4?= <vtatila@mail.student.oulu.fi>
Subject: Pan in SDL_Perl, Alt. Audio Engines (Win32)
Message-Id: <47A5AE20.7181E74B@mail.student.oulu.fi>
Hi,
What options do I have in Win32 if I'd like to use an audio engine that
can play multiple audio channels with volume and pan for each one? It
should also have the ability to separately load and play files and would
be cool if it could stream compressed music (ogg/mp3) from disk, too.
Pitch shifting and basic delay and filter based audio effects would be
nice extras.
SDL looks Ok to me, however, there's no pan parameter in the PPM release
() obtained via ActiveState (SDL-Perl 2.13). I read on the Web someone
faced the very same problem under Unix and patched the pan support
himself. Has that support migrated to any PPM binaries in Windows?
Here's the thread I found about it:
http://www.perlmonks.org/?node_id=598630
The lack of per channel pan seems to be a common problem in SDL, in that
the authors of the game GlTron have had to patch it in themselves, too:
http://listas.apesol.org/pipermail/sdl-libsdl.org/2001-March/015788.html
I'm also willing to try libs other than SDL and a bit of Googling
brought up Allegro and Fmod 3, URLs:
http://www.talula.demon.co.uk/allegro/
http://www.fmod.org/
It seems to me neither has XS or pure Perl bindings, based on searching
CPAN and the ActiveState reps with Perl 5.8.8. I've taken a cursory look
at the docs and it looks to me like one could write a Perl wrapper for
the audio functions in the DLLs using Win32::API. This would then be
Windows specific, though, and I'd need keyboard input, too. I reckon
mixing SDL for input and some other engine for audio is looking for
trouble in terms of timing and performance. My experience so far is that
many of the Win32::* modules don't like threading, anything using
Win32::OLE being one good example.
Umm, this is the least liked option personally but howabout native APIs
such as DirectSound? I couldn't find any Perl wrappers so far. From what
I've understood, any OLE client can basically use DirectX. In stead I
accidentally ran into a DirectSound library for the other P language
implemented via COM, however I'd like to use Perl.
If you're wondering why I'm not asking about graphics, that's because I
don't need any. I'm toying around with a prototype idea for a freebie
pure audio game for blind folks. Most devs doing these games use VB
wrappers for DirectX or C++ but as I like Perl, I'm going to try that
first. I could ask in the blind programming mailing list, but I'm one of
two Perl users out there, and the other one is doing mainly Web apps. I
asked about audio engines there before, and people recommended Fmod back
then.
--
With kind regards Veli-Pekka Tätilä (vtatila@mail.student.oulu.fi)
Accessibility, game music, synthesizers and programming:
http://www.student.oulu.fi/~vtatila
------------------------------
Date: 3 Feb 2008 10:52:11 +1300
From: Rob Simpson <here@my.pc>
Subject: Re: Perl on Linux and AIX
Message-Id: <47a4e60b$1@clear.net.nz>
On Sat, 02 Feb 2008 03:33:12 +0000, Uri Guttman propped his eyelids open
with toothpicks and wrote:
>>>>>> "MA" == Mike Andrews <mikea@mikea.ath.cx> writes:
>
> MA> It's not a _useless_ use of cat, because the shape of the line
> shows MA> the neophyte who takes over when I'm sick or get hit by a
> truck just MA> how PL is used. There's a visual difference between MA>
> PL < C_output
> MA> and
> MA> cat C_output | PL
> MA> since
> MA> cat C_output
> MA> looks more like
> MA> C | PL > foo
> MA> than does
> MA> PL < C_output
> MA> .
>
> MA> IMHO, anyway.
>
> useless use of a herd of cats award!
>
Definitely not a "herd" of cats.
There are a number names for a group of cats, but my favorite is a
"glorying" of cats.
--
/home/rob/.signature
------------------------------
Date: Sun, 3 Feb 2008 09:53:29 +0100
From: "Peter J. Holzer" <hjp-usenet2@hjp.at>
Subject: Re: Perl on Linux and AIX
Message-Id: <slrnfqb089.nvc.hjp-usenet2@hrunkner.hjp.at>
["Followup-To:" header set to comp.lang.perl.misc.]
On 2008-02-02 02:50, Robert M. Riches Jr. <spamtrap42@verizon.net> wrote:
> On 2008-02-02, dcruncher4@aim.com <dcruncher4@aim.com> wrote:
>> In article <x74pcsnrnw.fsf@mail.sysarch.com>, Uri Guttman says...
>>
>>>
>>> d> test.pl < a_file
>>> d> cat a_file | test.pl
>>>
>>>useless use of cat award.
>>
>> ha ha.
>>
>> Can't help it. This script will be called by other scripts and
>> my script has to be backward compatible with the C one.
>
> What is wrong with
>
> test.pl < a_file
>
> ???
For the user of test.pl? Nothing. That's the way they should use it if
the input is in a file.
But dcruncher4 isn't the user - he is the author. And as the author he
has to test all the ways his script will be used.
some_other_program | test.pl
is a way this script will be used someday. So he has to test whether it
works.
cat a_file | test.pl
does test that.
test.pl < a_file
doesn't (there are differences between a file and a pipe, most
importantly, a pipe isn't seekable).
hp
PS: dcruncher4's original program worked for me on linux (2.6.21).
Use of /dev/stdin is system-dependent, of course, but I see no
reason why it should work only for files, but not for pipes. Either
the system provides /dev/stdin, then it should work always, or it
doesn't, then it cannot work at all.
------------------------------
Date: Sun, 03 Feb 2008 08:19:04 GMT
From: "RocketMan" <rm@dontspamme.net>
Subject: Re: post or get message posting
Message-Id: <YNepj.1278$xE.304@trnddc01>
"Tad J McClellan" <tadmc@seesig.invalid> wrote in message
news:slrnfq6222.ci0.tadmc@tadmc30.sbcglobal.net...
> RocketMan <rm@dontspamme.net> wrote:
>
>
>> I have a form I need to post to with perl.
>
>
> perldoc -q form
>
> How do I automate an HTML form submission?
>
>
> --
> Tad McClellan
> email: perl -le "print scalar reverse qq/moc.noitatibaher\100cmdat/"
Thanks Tad, but three days later, still can't do what I need to.
I used HTML::Form->parse($response); to identify all the form pairs, but one
has no name (<NONAME>) and there are hiden ones.
I used get to grab a .crumb pair, and use Post to submit them all back to
the form 'action' url, but the form still never gets submitted on the
server.
HTTP response is 200, though.
Here is an example of the form I'm trying to submit to.
Go here, and then click "Reply".
http://messages.finance.yahoo.com/Stocks_%28A_to_Z%29/Stocks_I/threadview?m=tm&bn=9010&tid=452005&mid=452005&tof=2&frt=1
The reply form is the one that won't take a submit.
Note, my goal is not to spam.
Yahoo easily detects spam posting and immediately deletes accounts of those
who spam, and that is not the goal.
I think I exhausted all options on this.
Any clues or points someone may have woud be helpful.
Thanks!
------------------------------
Date: Sun, 03 Feb 2008 09:50:57 +0100
From: Gunnar Hjalmarsson <noreply@gunnar.cc>
Subject: Re: post or get message posting
Message-Id: <60ldk0F1rkpf2U1@mid.individual.net>
RocketMan wrote:
> Here is an example of the form I'm trying to submit to.
> Go here, and then click "Reply".
>
> http://messages.finance.yahoo.com/Stocks_%28A_to_Z%29/Stocks_I/threadview?m=tm&bn=9010&tid=452005&mid=452005&tof=2&frt=1
>
> The reply form is the one that won't take a submit.
The reply form doesn't show up unless you are signed in.
--
Gunnar Hjalmarsson
Email: http://www.gunnar.cc/cgi-bin/contact.pl
------------------------------
Date: Sun, 03 Feb 2008 09:45:54 GMT
From: "RocketMan" <rm@dontspamme.net>
Subject: Re: post or get message posting
Message-Id: <m3gpj.2242$eD3.1751@trndny05>
"Gunnar Hjalmarsson" <noreply@gunnar.cc> wrote in message
news:60ldk0F1rkpf2U1@mid.individual.net...
> RocketMan wrote:
>> Here is an example of the form I'm trying to submit to.
>> Go here, and then click "Reply".
>>
>> http://messages.finance.yahoo.com/Stocks_%28A_to_Z%29/Stocks_I/threadview?m=tm&bn=9010&tid=452005&mid=452005&tof=2&frt=1
>>
>> The reply form is the one that won't take a submit.
>
> The reply form doesn't show up unless you are signed in.
>
> --
> Gunnar Hjalmarsson
> Email: http://www.gunnar.cc/cgi-bin/contact.pl
Yes, I am aware of that.
I already deal with signing in first, and the form shows up and is correct
with a get.
Thanks!
This just the form from that page:
<form
action="http://messages.finance.yahoo.com/Stocks_%28A_to_Z%29/Stocks_I/reply?bn=9010&pid=452005&tof=2&.done=http%3A%2F%2Fmessages.finance.yahoo.com%2FStocks_%2528A_to_Z%2529%2FStocks_I%2Fthreadview%3Fm%3Dtm%26bn%3D9010%26tid%3D452005%26mid%3D452005%26tof%3D2%26frt%3D1"
method="post" id="frmPost">
<div class="blue-box" style="background-color: rgb(247, 249, 251);">
<span class="corner-top">
<span class="corner-left"></span>
</span>
<div class="margin-10">
<table width="80%">
<thead>
<tr><th colspan="2" style="text-align: left">
<h1 class="form-title">
Posting on Message Boards</h1>
</th></tr>
</thead>
<tbody>
<tr>
<td align="left" valign="top">
<p>
<div class="space-5"></div>
<h2 class="form-title">
Reply Message
</h2>
<div class="margin-10"></div>
<label accesskey="S">
<h3 class="form-title" style="display:inline;">
Subject:</h3><span id="subject-err" class="element-err-box"></span>
<div class="space-5" style="font-size:3px;height:3px"></div>
<input type="text"
value="Re: buy out" id="subject"
size="35" name="subject" class="post-input-border" tabindex="2"/>
</label>
<div class="space-5"></div>
<label accesskey=="M">
<h3 class="form-title" style="display:inline">
Type message:</h3><span id="message-err"
class="element-err-box"></span>
<div class="space-5" style="font-size:3px;height:3px"></div>
<textarea class="ygta post-input-border" rows="10" cols="60"
id="message"
name="message" tabindex="3"></textarea>
</label>
</p>
<br/>
</td>
</tr>
<tr><td><p> <label accesskey="I">
<h3 class="form-title" style="display:inline;">
Identity:</h3><span id="identity-err" class="element-err-box"></span>
<div class="space-5" style="font-size:3px;height:3px"></div>
<select class="textbox post-input-border" size="1" id="identity"
name="identity" tabindex="1">
<option value="myuserid" selected="true">myuserid</option><option
value="myuserid2">myuserid2</option>
</select>
</label></p></td></tr>
<tr>
<td width="50%">
<br>
<table width="90%" summary="Display
Sentiment Options" border="0" style="width: 55%;">
<tr>
<td colspan="3">
<b>Long-Term Sentiment Disclosure</b> - <small>sentiment
will be displayed along with your message.</small> </br>
</td>
</tr>
<tr>
<td>
<label>
<input type="radio" name="E"
value="5" > Strong Buy
</label>
</td>
<td>
<label>
<input type="radio" name="E"
value="4" > Buy
</label>
</td>
<td>
<label>
<input type="radio" name="E"
value="3" > Hold
</label>
</td>
</tr>
<tr>
<td>
<label>
<input type="radio" name="E"
value="2" > Sell
</label>
</td>
<td>
<label>
<input type="radio" name="E"
value="1" > Strong Sell
</label>
</td>
<td>
<label>
<input type="radio" name="E"
value="0" checked>
Do Not Disclose
</label>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td>
<FONT size="-2">
NOTE: Please read our <A href="http://docs.yahoo.com/info/terms/">
Terms of Service</A>. Messages that harass, abuse or threaten other members;
have obscene or otherwise objectionable content; have spam, commercial or
advertising content or links may be removed and may result in the loss of
your Yahoo! ID (including e-mail). Please do not post any private
information unless you want it to be available publicly.
</FONT>
<P>
<FONT size="-2">
Never assume that you are anonymous and cannot be identified by your posts.
</FONT>
</P>
</td>
</tr>
</table>
</div>
<div class="message-box-action">
<span style="float: right; padding-right: 10px;">
<input type="submit" class="active-button" id="SubmitPreview"
name="SubmitPreview" accesskey="R" tabindex="4" value="Preview Message"/>
<input type="submit" class="inactive-button" id="SubmitPost"
name="SubmitPost" accesskey="P" tabindex="5" value="Post Message"/>
<input type="submit" class="inactive-button" id="SubmitCancel"
name="SubmitCancel" accesskey="C" tabindex="6" value="Cancel"/>
<input type="hidden" name=".crumb" value="RcVV..HAwN/" />
<input type="hidden" id="yIdCoreIdUser" value="myuserid" />
<input type="hidden" name="action_btn" />
</span>
</div>
<span class="corner-bottom">
<span class="corner-left"></span>
</span>
</div>
<div class="space-5"></div>
<div class="space-5"></div>
<div class="heading">
<span>
<b>Original Message</b>
</span>
</div>
<div class="space-5"></div>
<div class="blue-box">
<div class="message-box-heading"
style="border-top: none; position: static; top: 0;">
<span class="corner-top"><span class="corner-left"></span></span>
<span style="float: left; padding: 5px 0px 5px 5px;">
<span class="user-data"><B>buy out</B></span>
<span class="no-wrap"><b>Rating :</b><br/><img border="0"
src="http://us.i1.yimg.com/us.yimg.com/i/us/mb/star_g16.gif" alt=""
title=""><img border="0"
src="http://us.i1.yimg.com/us.yimg.com/i/us/mb/star_g16.gif" alt=""
title=""><img border="0"
src="http://us.i1.yimg.com/us.yimg.com/i/us/mb/star_g16.gif" alt=""
title=""><img border="0"
src="http://us.i1.yimg.com/us.yimg.com/i/us/mb/star_g16.gif" alt=""
title=""><img border="0"
src="http://us.i1.yimg.com/us.yimg.com/i/us/mb/star_g16.gif" alt=""
title=""> <span class="header-link" style="color:
#8c8c8c;padding-left:0px;vertical-align:text-top;">(No
ratings)</span></span>
</span>
<span class="time no-wrap"
style="float: right; padding: 8px 10px 8px 0px;">
2-Feb-08 09:52 pm
</span>
</div>
<div>
<table>
<tr>
<td id="msgcontents" style="padding: 5px;" valign="top">
<span class="user-data">
<div id="messg-contents">
wait till big blue and emc start the bidding war emc it could nasty
</div>
</span>
</td>
<td id="authorinfo"
style="background: #f7f7f7; padding: 5px;" rowspan="3">
<div id="avatar452005" style="width:48px; height:48px;" ><img
border="0"
src="http://us.i1.yimg.com/us.yimg.com/i/us/avtr/site/default/avatar_medium.png"
alt="" title="" id=img452005></div>
<p style="margin: 0; padding: 0 0 5px 0;">
<a
href="http://messages.finance.yahoo.com/profile?bn=9010&mid=452005"
target="_new" class="syslink $cssDef">iikbcn</a></p>
<hr size="1" noshade="" align="left" style="color: rgb(217, 217,
217);"/>
<p style="margin: 0; padding: 0 0 5px 0;">
<a
href="http://messages.finance.yahoo.com/settings?users=iikbcn&.crumb=RcVV..HAwN/&SubmitAddIgnUsers=1&o=2&.done=http%3A%2F%2Fmessages.finance.yahoo.com%2FStocks_%2528A_to_Z%2529%2FStocks_I%2Freply%3Fbn%3D9010%26pid%3D452005%26tof%3D2%26.done%3Dhttp%253A%252F%252Fmessages.finance.yahoo.com%252FStocks_%252528A_to_Z%252529%252FStocks_I%252Fthreadview%253Fm%253Dtm%2526bn%253D9010%2526tid%253D452005%2526mid%253D452005%2526tof%253D2%2526frt%253D1"
class="small syslink">Ignore User</a></p>
</td>
</tr>
</table>
</div>
<span class="corner-bottom"><span class="corner-left"></span></span>
</div>
</form>
------------------------------
Date: Sun, 3 Feb 2008 03:54:50 -0000
From: "Nospam" <nospam@nospam.com>
Subject: submitting a form when two forms with the same name
Message-Id: <fo3e04$a9v$1@north.jnrs.ja.net>
Keywords: x-No-archive:yes
Trying to submit the second form, when there are two forms on the page both
called "submit" using www::Mechanize and Html::Form
the first form html is: <input type="submit" name="submit" value="Go" />
The second form's: <input type=submit name=submit value=" S E N D ">
#After filling in my login details with and getting positive checks for
username and password filled in:
#! /usr/bin/perl
use strict;
use warnings;
use WWW::Mechanize;
my $mech WWW::Mechanize->new();
$mech->get("http://localhost/login.cgi");
foreach($mech->forms()){
if (defined $_->find_input('username'))
$_->value('username',"username");
if($mech->success){print "Username filled in \n";}else{print " $! \n"}
$_->value('password',"password");
if($mech->success){print "password filled in \n";}else{print " $! \n"}
}
}
$mech->submit("submit"); #I have also tried $_->click("submit"); but all
submitted the first form and not the second
------------------------------
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 1253
***************************************