libwww-perl / WWW-Mechanize

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

WM: uri() dies if no request has been performed #210

Closed spazm closed 6 years ago

spazm commented 7 years ago

michael....@gmail.com reported on Mar 25, 2012

    use 5.014;
    use WWW::Mechanize;

    my $mech = WWW::Mechanize;
    say $mech->uri();

gives:

    Can't call method "request" on an undefined value at /opt/perl-5.14/lib/site_perl/5.14.2/WWW/Mechanize.pm

uri() should probably just return null if no request has been performed, like other methods (such as content()).

WWW::Mechanize version 1.72.

 – Michael

Details

Imported from Google Code issue 233 via archive

zackse commented 7 years ago

This is a dupe of #60 and was fixed in 8c04c9a35e60c7cdda4283ecfc5c9a820d79b5f6.

oalders commented 6 years ago

Thanks @zackse!