use File::Path;
my $libdir = 'test_trash';
+local @INC = @INC;
unshift(@INC, $libdir);
my $appclass = 'TestComponents';
}
sub make_component_file {
- my ($type, $prefix, $name) = @_;
+ my ($libdir, $appclass, $type, $prefix, $name) = @_;
my $compbase = "Catalyst::${type}";
my $fullname = "${appclass}::${prefix}::${name}";
}
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{
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(