Skip Menu |

This queue is for tickets about the Catalyst-View-TT CPAN distribution.

Report information
The Basics
Id: 124685
Status: new
Priority: 0/
Queue: Catalyst-View-TT

Owner: Nobody in particular
Requestors: rrwo [...]

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

Subject: Unable to expose methods included as part of a Moo role
Date: Mon, 5 Mar 2018 14:14:07 +0000
To: bug-Catalyst-View-TT [...]
From: Robert Rothenberg <rrwo [...]>
Download (untitled) / with headers
text/plain 702b
I have a subclass of Catalys::View::TT, and am including methods from a role using Role::Tiny::With that I want to expose to the template by adding them to the expose_methods attribute. I get an error that the methods don't exist from Catalyst::View::TT. (I've added a die unless $class->can('my_method') to verify the methods are imported, and that wasn''t triggered. I've had to use an ugly workaround: use Class::Method::Modifiers qw/ before /; use Role::Tiny::With; with 'MyRole'; before my_method => sub {}; I'm assuming it might work by rewriting the view to use Moose instead of the old-style mro modification, but was hoping to avoid not rewriting some legacy code.

This service is sponsored and maintained by Best Practical Solutions and runs on infrastructure.

Please report any issues with to