X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FCatalyst-Runtime.git;a=blobdiff_plain;f=t%2Faggregate%2Funit_core_component_loading.t;h=2c53144f94dbf44d2a2a7440fbfa8c44689bc943;hp=2586f2d0d2f3c21f9f34fd2a4bee5f5c02679889;hb=7064f69b1dfb59d1f3bad647b2097d0320acce8a;hpb=5d50f369bffa3625ca983b72fc8bc013c8a1e802 diff --git a/t/aggregate/unit_core_component_loading.t b/t/aggregate/unit_core_component_loading.t index 2586f2d..2c53144 100644 --- a/t/aggregate/unit_core_component_loading.t +++ b/t/aggregate/unit_core_component_loading.t @@ -11,6 +11,7 @@ use File::Spec; use File::Path; my $libdir = 'test_trash'; +local @INC = @INC; unshift(@INC, $libdir); my $appclass = 'TestComponents'; @@ -54,7 +55,7 @@ sub write_component_file { } sub make_component_file { - my ($type, $prefix, $name) = @_; + my ($libdir, $appclass, $type, $prefix, $name) = @_; my $compbase = "Catalyst::${type}"; my $fullname = "${appclass}::${prefix}::${name}"; @@ -78,9 +79,13 @@ EOF } foreach my $component (@components) { - make_component_file($component->{type}, - $component->{prefix}, - $component->{name}); + make_component_file( + $libdir, + $appclass, + $component->{type}, + $component->{prefix}, + $component->{name}, + ); } my $shut_up_deprecated_warnings = q{ @@ -138,9 +143,13 @@ $appclass = 'ExtraOptions'; push @components, { type => 'View', prefix => 'Extra', name => 'Foo' }; foreach my $component (@components) { - make_component_file($component->{type}, - $component->{prefix}, - $component->{name}); + make_component_file( + $libdir, + $appclass, + $component->{type}, + $component->{prefix}, + $component->{name}, + ); } eval qq(