- or download this
package MyMech;
use base qw(WWW::Mechanize);
...
my $self = shift or die $!;
$self->SUPER::get(@_);
}
- or download this
my $mech = MyMech->new;
$mech->get("http://google.com/");
print $mech->title."\n";
- or download this
my $mech = MyMech->new;
$mech->get("http://google.com/");
print $mech->title."\n" if $mech->success;