libwww-perl / WWW-Mechanize

Handy web browsing in a Perl object
https://metacpan.org/pod/WWW::Mechanize
Other
68 stars 53 forks source link

get - Method hard-checks the reference #183

Open spazm opened 7 years ago

spazm commented 7 years ago

PatrickS...@gmail.com reported on Nov 19, 2010

Why aren't you just using isa?

like that: 

$uri = $uri->url if $uri->isa('WWW::Mechanize::Link');

Then someone could extend the WWW::Mechanize::Link - class and do some nasty stuff with it

(I did, and it worked fine for me)

What version of the product are you using? On what operating system?
1.56, but looked at 1.66 and is the same line 
on Linux (but that isn't relevant, is it?)

Additional information:

I've attached a possible solution and an example (the example is very dumb)

Greets Patrick Seebauer

Details

Imported from Google Code issue 187 via archive

Comments

petda...@gmail.com commented on Apr 24, 2011 :

(No comment was entered for this change.)