Revision history for Catalyst-View-Component-SubInclude
+0.06
+ - Weaken $c to avoid a memory leak.
+
0.05 Tue Apr 21 19:16:00 2009
- Change attribute constraint from ClassName to Str to fix issue with
newer Catalyst versions
----\r
-abstract: 'Use subincludes in your Catalyst views'\r
-author:\r
- - 'Nilson Santos Figueiredo Junior, C<< <nilsonsfj at cpan.org> >>'\r
-distribution_type: module\r
-generated_by: 'Module::Install version 0.77'\r
-license: perl\r
-meta-spec:\r
- url: http://module-build.sourceforge.net/META-spec-v1.4.html\r
- version: 1.4\r
-name: Catalyst-View-Component-SubInclude\r
-no_index:\r
- directory:\r
- - inc\r
- - t\r
-requires:\r
- Carp: 0\r
- Catalyst::Plugin::SubRequest: 0\r
- Catalyst::Runtime: 5.70000\r
- Moose: 0\r
- Moose::Role: 0\r
- namespace::clean: 0\r
-resources:\r
- license: http://dev.perl.org/licenses/\r
-version: 0.05\r
+---
+abstract: 'Use subincludes in your Catalyst views'
+author:
+ - 'Nilson Santos Figueiredo Junior, C<< <nilsonsfj at cpan.org> >>'
+distribution_type: module
+generated_by: 'Module::Install version 0.79'
+license: perl
+meta-spec:
+ url: http://module-build.sourceforge.net/META-spec-v1.4.html
+ version: 1.4
+name: Catalyst-View-Component-SubInclude
+no_index:
+ directory:
+ - inc
+ - t
+requires:
+ Carp: 0
+ Catalyst::Plugin::SubRequest: 0
+ Catalyst::Runtime: 5.70000
+ Moose: 0
+ Moose::Role: 0
+ Task::Weaken: 0
+ namespace::clean: 0
+resources:
+ license: http://dev.perl.org/licenses/
+version: 0.06
use Carp qw/croak/;
use namespace::clean qw/croak/;
+use Scalar::Util qw/weaken/;
=head1 NAME
=cut
-our $VERSION = '0.05';
+our $VERSION = '0.06';
=head1 SYNOPSIS
around 'render' => sub {
my $next = shift;
my ($self, $c, @args) = @_;
-
+
+ weaken $c;
+
$c->stash->{subinclude} = sub { $self->_subinclude( $c, @_ ) };
$c->stash->{subinclude_using} = sub { $self->_subinclude_using( $c, @_ ) };