Skip Menu |

This queue is for tickets about the MojoX-Renderer-Mason CPAN distribution.

Report information
The Basics
Id: 54324
Status: open
Priority: 0/
Queue: MojoX-Renderer-Mason

People
Owner: Nobody in particular
Requestors: v.gusakov [...] perevedem.ru
Cc:
AdminCc:

Bug Information
Severity: Critical
Broken in: 0.11
Fixed in: (no value)



Subject: template name is always undef in the build sub
template is defined incorrectly inside MojoX::Renderer::Mason->build method. at the moment it looks like this: return sub { my ($mojo, $ctx, $output) = @_; my $stash = $ctx->stash; my $template = $stash->{template}; ... template here will always be undef, because in MojoX::Renderer->render you can see the following: my $template = delete $c->stash->{template}; ... my $options = {template => $template, format => $format, handler => $handler}; ... elsif ($template || $handler) { # Render return unless $self->_render_template($c, \$output, $options); # Extends? $c->stash->{content}->{content} = b("$output") if ($c->stash->{extends} || $c->stash->{layout}) && !$partial; } ... so the code should be rewritten as follows, for example: return sub { my ($mojo, $ctx, $output, $options) = @_; my $stash = $ctx->stash; my $template = ($options and ref($options) and ref($options) eq 'HASH') ? $options->{template} : $stash->{template}; ...
Subject: Re: [rt.cpan.org #54324] template name is always undef in the build sub
Date: Thu, 4 Feb 2010 16:09:24 -0600
To: bug-MojoX-Renderer-Mason [...] rt.cpan.org
From: Graham Barr <gbarr [...] pobox.com>
This module has not been updated with recent API changes in Mojo. I am unlikely to be using this module anytime soon. There is a git repository on github at http://github.com/gbarr/MojoX-Renderer-Mason If you want to make a fork on github with fixes and upload to CPAN I will gladly give you co-maint permissions Graham.
Subject: Re: [rt.cpan.org #54324] template name is always undef in the build sub
Date: Fri, 5 Feb 2010 01:18:10 +0300
To: bug-MojoX-Renderer-Mason [...] rt.cpan.org
From: Vladimir Gusakov <v.gusakov [...] perevedem.ru>
Ok, thank you, I'll do it and will let you know. Vladimir On Fri, Feb 5, 2010 at 1:10 AM, Graham Barr via RT < bug-MojoX-Renderer-Mason@rt.cpan.org> wrote: Show quoted text
> <URL: https://rt.cpan.org/Ticket/Display.html?id=54324 > > > This module has not been updated with recent API changes in Mojo. > > I am unlikely to be using this module anytime soon. > > There is a git repository on github at > http://github.com/gbarr/MojoX-Renderer-Mason > > If you want to make a fork on github with fixes and upload to CPAN I will > gladly give you co-maint permissions > > Graham. > > >