Re: check if all the links on an HTML page are working (except the mailto links)

2006-07-08 Thread Gabor Szabo

On 7/6/06, Andy Lester <[EMAIL PROTECTED]> wrote:


On Jul 6, 2006, at 10:22 AM, Gabor Szabo wrote:

> Using  Test::WWW::Mechanize 1.10 I am trying to
> $w->page_links_ok();
>
> on a page that has an e-mail address in it and the test fails.
>
> How could I tell TWM not to bother with the mailto links on the page?

That's silly that it tries the mailto.  I'm fixing it right now.


thanks.
1.12 works well.

Gabor


Re: check if all the links on an HTML page are working (except the mailto links)

2006-07-06 Thread A. Pagaltzis
* A. Pagaltzis <[EMAIL PROTECTED]> [2006-07-06 18:05]:
> Err, right. I suppose that should be `m!^(s?)http(?(1)|s?):!`,

Drat, `m!^(s)?http(?(1)|s?):!` of course.

Regards,
-- 
Aristotle Pagaltzis // 


Re: check if all the links on an HTML page are working (except the mailto links)

2006-07-06 Thread Andy Lester


On Jul 6, 2006, at 11:01 AM, A. Pagaltzis wrote:


Err, right. I suppose that should be `m!^(s?)http(?(1)|s?):!`, or
else you just punt on `shttp` (does LWP handle those, anyway?).


I was going to just make it be /^https?/.  Never heard of shttp.

--
Andy Lester => [EMAIL PROTECTED] => www.petdance.com => AIM:petdance






Re: check if all the links on an HTML page are working (except the mailto links)

2006-07-06 Thread Andy Lester


On Jul 6, 2006, at 10:46 AM, A. Pagaltzis wrote:


$urls = [ grep m!^s?https?:!, @$urls ];


What's an "shttps" link?

--
Andy Lester => [EMAIL PROTECTED] => www.petdance.com => AIM:petdance






Re: check if all the links on an HTML page are working (except the mailto links)

2006-07-06 Thread A. Pagaltzis
* Andy Lester <[EMAIL PROTECTED]> [2006-07-06 17:55]:
> On Jul 6, 2006, at 10:46 AM, A. Pagaltzis wrote:
> 
> >$urls = [ grep m!^s?https?:!, @$urls ];
> 
> What's an "shttps" link?

Err, right. I suppose that should be `m!^(s?)http(?(1)|s?):!`, or
else you just punt on `shttp` (does LWP handle those, anyway?).

Regards,
-- 
Aristotle Pagaltzis // 


Re: check if all the links on an HTML page are working (except the mailto links)

2006-07-06 Thread demerphq

On 7/6/06, Andy Lester <[EMAIL PROTECTED]> wrote:


On Jul 6, 2006, at 10:46 AM, A. Pagaltzis wrote:

> $urls = [ grep m!^s?https?:!, @$urls ];

What's an "shttps" link?


That the Sean Connery version...

Yves

--
perl -Mre=debug -e "/just|another|perl|hacker/"


Re: check if all the links on an HTML page are working (except the mailto links)

2006-07-06 Thread A. Pagaltzis
* Gabor Szabo <[EMAIL PROTECTED]> [2006-07-06 17:25]:
> Using  Test::WWW::Mechanize 1.10 I am trying to
> $w->page_links_ok();
> 
> on a page that has an e-mail address in it and the test fails.
> 
> How could I tell TWM not to bother with the mailto links on the page?

There’s no official way. Until Andy fixes it somehow, you can
hack it:

package Test::WWW::Mechanize::CheckOnlyHTTPURI;

our @ISA = qw( Test::WWW::Mechanize );

sub _check_links_status {
my $self = shift;
my $urls = shift;
$urls = [ grep m!^s?https?:!, @$urls ];
return $self->SUPER::_check_links_status( $urls, @_ );
}

Regards,
-- 
Aristotle Pagaltzis // 


Re: check if all the links on an HTML page are working (except the mailto links)

2006-07-06 Thread Andy Lester


On Jul 6, 2006, at 10:22 AM, Gabor Szabo wrote:


Using  Test::WWW::Mechanize 1.10 I am trying to
$w->page_links_ok();

on a page that has an e-mail address in it and the test fails.

How could I tell TWM not to bother with the mailto links on the page?


That's silly that it tries the mailto.  I'm fixing it right now.

xoxo,
Andy

--
Andy Lester => [EMAIL PROTECTED] => www.petdance.com => AIM:petdance






check if all the links on an HTML page are working (except the mailto links)

2006-07-06 Thread Gabor Szabo

Using  Test::WWW::Mechanize 1.10 I am trying to
$w->page_links_ok();

on a page that has an e-mail address in it and the test fails.

How could I tell TWM not to bother with the mailto links on the page?

Gabor