Hey Dave,
- It looks like you're using an old version of WWW::Myspace. Make
sure you're current.
- Be aware that (as I hope the docs say) I may not stick with
WWW::Mechanize. In fact, I
already circumvent it in submit_form.
- If you're planning on using the module for mass messaging or
commenting, Myspace
now has measures in place that cripple accounts that mass message
or comment.
They disable your ability to message or comment. Messages will
appear in your Sent
folder but not in the receiver's inbox, although they'll be able
to see it if they're
paging through from another message.
The receiver will get a "New Comments" notification and be able to
see your comment,
but it won't appear on the profile page.
On Sep 14, 2006, at 11:06 AM, Dave Hayes via RT wrote:
Show quoted text>
> Thu Sep 14 14:06:41 2006: Request 21495 was acted upon.
> Transaction: Ticket created by dave@jetcafe.org
> Queue: WWW-Myspace
> Subject: Patch to WWW::Myspace
> Broken in: (no value)
> Severity: (no value)
> Owner: Nobody
> Requestors: dave@jetcafe.org
> Status: new
> Ticket <URL:
http://rt.cpan.org/Ticket/Display.html?id=21495 >
>
>
> Hello. :)
>
> The project I am working on is going to require really fine
> grained control of the LWP::UserAgent (among other things), so
> I took the liberty of patching your fine module to allow this.
>
> Patch is attached. Let me know if you've already addressed this or
> this breaks anything. (I'm sure it does.) Thanks.
> ------
> Dave Hayes - Consultant - Altadena CA, USA - dave@jetcafe.org
>>>> The opinions expressed above are entirely my own <<<
>
> The king arrived at the resturant where Nasrudin had been
> left in charge. The king ordered an omelette. After his
> meal, when he saw the check he raised his eyebrows. "Eggs
> must be very costly here. Are they as scarce as that?"
>
> "It is not the eggs, your majesty...it is the visits of
> kings."
>
>
> *** Myspace.pm 2006/09/14 17:32:24 1.1
> --- Myspace.pm 2006/09/14 18:00:44
> ***************
> *** 602,611 ****
>
> }
>
> sub _new_mech {
>
> # Set up our web browser (WWW::Mechanize object)
> ! $self->mech( new WWW::Mechanize( onerror => undef ) );
>
> # We need to follow redirects for POST too.
> push @{ $self->mech->requests_redirectable }, 'POST';
> --- 602,637 ----
>
> }
>
> + ## For those that want more control, we need to provide parameters
> + ## to WWW::Mechanize. This little hack allows that. Apologies if
> this
> + ## breaks your intent. Since you reset the mech object each time you
> + ## "logout" (or login), I have to do it this way...I think.
> + ## -- dave@jetcafe.org
> + ## P.S. Spiffy scares the hell out of me as does any source code
> filter
> +
> + =head2 mech_parms
> +
> + Pass this parameters you wish the WWW::Mechanize object to use,
> inside
> + a hash reference. See the docs for WWW::Mechanize for more
> + information. Novice users should leave this alone.
> +
> + =cut
> +
> + field mech_params => undef;
> +
> sub _new_mech {
>
> # Set up our web browser (WWW::Mechanize object)
> ! my $params = $self->mech_params();
> ! if (defined($params)) {
> ! if (ref($params) eq "HASH") {
> ! $self->mech( new WWW::Mechanize( %$params ) );
> ! } else {
> ! warn "Please pass mech_params() a HASH reference. Thanks!\n";
> ! }
> ! } else {
> ! $self->mech( new WWW::Mechanize( onerror => undef ) );
> ! }
>
> # We need to follow redirects for POST too.
> push @{ $self->mech->requests_redirectable }, 'POST';
--
Grant Grueninger
Commercial Systems Corporation
http://www.cscorp.com/
818-760-1649