# (test for WWW::Mechanize::Shell) { my $called; local *WWW::Mechanize::get = sub { $called++; }; ok( $shell->foo() ); is( $called, 1, '$shell->agent->get was called one time"); };