From: Steffen Mueller Date: Mon, 21 Sep 2009 14:56:04 +0000 (+0200) Subject: Remove Class::ISA use from autouse tests X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=00f261ef41d6be5447d49f9e25a6aafeb2871793;p=p5sagit%2Fp5-mst-13.2.git Remove Class::ISA use from autouse tests Instead, include an ultra-simple module for testing in t/lib. --- diff --git a/ext/autouse/t/autouse.t b/ext/autouse/t/autouse.t index 42caf17..522a025 100644 --- a/ext/autouse/t/autouse.t +++ b/ext/autouse/t/autouse.t @@ -64,6 +64,9 @@ ok( $@, qr/^\Qautoused module Env has unique import() method/ ); # Check that UNIVERSAL.pm doesn't interfere with modules that don't use # Exporter and have no import() of their own. require UNIVERSAL; -autouse->import("Class::ISA" => 'self_and_super_versions'); -my %versions = self_and_super_versions("Class::ISA"); -ok( $versions{"Class::ISA"}, $Class::ISA::VERSION ); +require File::Spec; +unshift @INC, File::Spec->catdir('t', 'lib'), 'lib'; +autouse->import("MyTestModule" => 'test_function'); +my $ret = test_function(); +ok( $ret, 'works' ); + diff --git a/ext/autouse/t/lib/MyTestModule.pm b/ext/autouse/t/lib/MyTestModule.pm new file mode 100644 index 0000000..f650a45 --- /dev/null +++ b/ext/autouse/t/lib/MyTestModule.pm @@ -0,0 +1,8 @@ +package MyTestModule; +use strict; + +sub test_function { + return 'works'; +} + +1;