On 6/5/05, Ing. Branislav Gerzo wrote:
Hi all,
I noticed strange behavior with die;
Here is snippet:
use strict;
use warnings;
use WWW::Mechanize;
my $mech = WWW::Mechanize-new();
$mech-agent_alias('Windows IE 6');
$mech-get( 'http://www.zoznam.sk' );
for my $link ( $mech-links() )
Offer Kaye [OK], on Monday, June 6, 2005 at 10:31 (+0300) contributed
this to our collective wisdom:
$mech-get( 'http://www.google.com/' );
OK So the problem is:
OK 1. In some other code you didn't show
OK 2. Specific to your OS, Perl version of W::M version
OK I suspect reason 1 is the culprit
Ing. Branislav Gerzo [EMAIL PROTECTED] wrote:
you should try that with www.zoznam.sk, or some page where is
JavaScript link. On Google AFAIK is not, so I think that's
why your script is OK. Just change the page and you will see.
Doesn't that kind-of answer your question?
If you call die
Thomas Bätzler [TB], on Monday, June 6, 2005 at 11:01 (+0200 ) wrote
the following:
TB Doesn't that kind-of answer your question?
TB If you call die without an argument, it'll use the message in
TB $@ instead. That's set by the last eval() in your code. I would
TB expect that failing eval()
Ing. Branislav Gerzo [EMAIL PROTECTED] asked:
hm question is, why die; produces error, and when is no die;
in that snippet everything is OK? (I hope:)
Read my lips: die without argument list (as used in your code)
will show the error that occured during the last eval() that was
executed by
Thomas Bätzler [TB], on Monday, June 6, 2005 at 12:07 (+0200 )
contributed this to our collective wisdom:
TB What happens is that your page has javascript: links embedded.
TB URI.pm tries to load URI::javascript, but it's not there. Since
TB URI.pm considers this a non-fatal error, it does not
On 6/6/05, Thomas Bätzler wrote:
Off the top of my head I'd say that when parsing the links on
the page you requested, WWW::Mechanize creates an URI object for
each link that is found. The URI class is subclassed by the URI
request scheme (i.e. URI::http, URI::nttp, ... ) and the needed
Hi all,
I noticed strange behavior with die;
Here is snippet:
use strict;
use warnings;
use WWW::Mechanize;
my $mech = WWW::Mechanize-new();
$mech-agent_alias('Windows IE 6');
$mech-get( 'http://www.zoznam.sk' );
for my $link ( $mech-links() ) {
print $link-url_abs, \n;
}
This