for (keys %INC) { if (/^App\/MtAws\/(.*)\.pmc?$/) { my $module = "App::MtAws::$1"; my $got = $module->VERSION; $got = 'undef' unless defined $got; die "FATAL: wrong version of $module, expected $VERSION, found $got" unless $got eq $VERSION; } }; }