use Test::More tests => 2; package CGI; use subs 'bless'; package main; my $called = 0; use CGI; sub CGI::bless { $called++; CORE::bless( $_[0], $_[1] ); }; my $foo = CGI->new(); is( $called, 1, 'bless() should call overridden version' ); isa_ok( $foo, 'CGI', 'which should return something that' );