[Catalyst-commits] r13524 -
Catalyst-View-TT/branches/export_methods/lib/Catalyst/View
lukes at dev.catalyst.perl.org
lukes at dev.catalyst.perl.org
Wed Aug 25 08:56:13 GMT 2010
Author: lukes
Date: 2010-08-25 09:56:13 +0100 (Wed, 25 Aug 2010)
New Revision: 13524
Modified:
Catalyst-View-TT/branches/export_methods/lib/Catalyst/View/TT.pm
Log:
use accessor for expose_methods rather than access config directly
Modified: Catalyst-View-TT/branches/export_methods/lib/Catalyst/View/TT.pm
===================================================================
--- Catalyst-View-TT/branches/export_methods/lib/Catalyst/View/TT.pm 2010-08-25 07:14:27 UTC (rev 13523)
+++ Catalyst-View-TT/branches/export_methods/lib/Catalyst/View/TT.pm 2010-08-25 08:56:13 UTC (rev 13524)
@@ -13,6 +13,7 @@
our $VERSION = '0.34';
__PACKAGE__->mk_accessors('template');
+__PACKAGE__->mk_accessors('expose_methods');
__PACKAGE__->mk_accessors('include_path');
*paths = \&include_path;
@@ -128,6 +129,7 @@
# Set base include paths. Local'd in render if needed
$self->include_path($config->{INCLUDE_PATH});
+ $self->expose_methods($config->{expose_methods});
$self->config($config);
# Creation of template outside of call to new so that we can pass [ $self ]
@@ -273,9 +275,9 @@
name => $c->config->{name}
);
- if ($self->config->{expose_methods}) {
+ if ($self->expose_methods) {
my $meta = $self->meta;
- foreach my $method_name (@{$self->config->{expose_methods}}) {
+ foreach my $method_name (@{$self->expose_methods}) {
my $method = $meta->get_method( $method_name );
unless ($method) {
Catalyst::Exception->throw( "$method_name not found in TT view" );
More information about the Catalyst-commits
mailing list