1#!/usr/bin/perl -w 2 3BEGIN { 4 if( $ENV{PERL_CORE} ) { 5 chdir 't' if -d 't'; 6 chdir '../lib/parent'; 7 @INC = '..'; 8 } 9} 10 11use strict; 12use Test::More tests => 4; 13use lib 't/lib'; 14 15use_ok('parent'); 16 17my $base = './t'; 18 19# Tests that a bare (non-double-colon) class still loads 20# and does not get treated as a file: 21eval sprintf q{package Test2; require '%s/lib/Dummy2.plugin'; use parent -norequire, 'Dummy2::InlineChild' }, $base; 22is $@, '', "Loading a class from a file works"; 23isnt $INC{"$base/lib/Dummy2.plugin"}, undef, "We loaded the plugin file"; 24my $o = bless {}, 'Test2'; 25isa_ok $o, 'Dummy2::InlineChild'; 26