http://qs321.pair.com?node_id=948504


in reply to use of "use X"

I took your idea, following ikegami's advice, and wrote a test.
#!/usr/bin/perl -l use strict; use CGI; use Test::SubCalls; use Test::More tests => 2; BEGIN { my $debug = 1; if ($debug) { require warnings; import warnings; } } print "Using warnings"; sub_track( 'CGI::new' ); my $q1 = CGI->new; my $q2 = CGI->new; sub_calls( 'CGI::new', 2, "Running" ); sub_calls( 'CGI::new', 2, "Ran" ); done_testing(2);