X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FCatalyst-View-Component-SubInclude.git;a=blobdiff_plain;f=lib%2FCatalyst%2FView%2FComponent%2FSubInclude.pm;h=dd0caeaeb23e7be5663a08c1f49a780f21d0c1b1;hp=ba2c397da3e38b2e4b2afb9f4a05ba4a02be5812;hb=f97c716560e114d118695339a200fe5a7e09e9e5;hpb=d547aa9523060fbe40d76cfd935e19c296def29e diff --git a/lib/Catalyst/View/Component/SubInclude.pm b/lib/Catalyst/View/Component/SubInclude.pm index ba2c397..dd0caea 100644 --- a/lib/Catalyst/View/Component/SubInclude.pm +++ b/lib/Catalyst/View/Component/SubInclude.pm @@ -2,6 +2,7 @@ package Catalyst::View::Component::SubInclude; use Moose::Role; use Carp qw/croak/; +use Catalyst::Utils (); use namespace::clean -except => 'meta'; with 'Catalyst::Component::ContextClosure'; @@ -143,7 +144,8 @@ sub _subinclude { sub _subinclude_using { my ($self, $c, $plugin, @args) = @_; $plugin = $self->_subinclude_plugin_class_name($plugin); - $plugin->generate_subinclude( $c, @args ); + my $plugin_config = Catalyst::Utils::merge_hashes($self->config->{subinclude}->{ALL}||{}, $self->config->{subinclude}->{$plugin}||{}); + $plugin->new($plugin_config)->generate_subinclude( $c, @args ); } sub _subinclude_plugin_class_name {