package Nonce; use base 'WWW::Mechanize'; sub get_basic_credentials { my ( $self, $realm, $uri, $proxy ) = @_; my $netloc = lc $uri->host_port; local $| = 1; print "<$netloc>\n<$realm>\n"; return undef; } package main; my $M = Nonce->new(); $M->get('http://anywhere.com/mytest?rm=test', @args); # etc.