#!perl use strict; use warnings; use Test::More qw( no_plan ); my $obj = GlobTest->new(); isa_ok( $obj, 'GlobTest' ); for my $method ( 0..9 ) { can_ok( $obj, $method ); } package GlobTest; BEGIN{ for my $method ( 0..9 ) { no strict 'refs'; *$method = sub { return $_ }; } } sub new { bless {}, shift }