Skip Menu |

This queue is for tickets about the Catalyst-View-Excel-Template-Plus CPAN distribution.

Report information
The Basics
Id: 68917
Status: resolved
Priority: 0/
Queue: Catalyst-View-Excel-Template-Plus

People
Owner: Nobody in particular
Requestors: j.g.villalonga [...] gmail.com
Cc:
AdminCc:

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



Subject: Error getting the configuration hash from Catalyst
Date: Sat, 18 Jun 2011 20:56:37 +0200
To: bug-Catalyst-View-Excel-Template-Plus [...] rt.cpan.org
From: Jorge Gonzalez <j.g.villalonga [...] gmail.com>
Hi, when creating a view with new, it gets its config in this way: my $config = $c->config->{'View::Excel::Template::Plus'}; (Catalyst/View/Excel/Template/Plus.pm, line 27) When creating a view of this class in a Catalyst app, this code works as long as you name your view exactly "View::Excel::Template::Plus" (which may or may not be what you want). My view is named just "View::Excel", and so I can'tt config the view properly following standard Catalyst procedure. This module should get the config data not from the global configuration and then the hardcoded view type (as it is now), but the runtime name of the view class, this way: my $config = { %{$class->config} }; In this way, if I decide to create a view named "MyView", which inherits from Catalyst::View::Excel::Template::Plus, the configuration will be read from $c->config->{'View::MyView'} and not from the wrong place. I have manually corrected this issue in my app and everything works as expected. Thanks for such a good module. Regards Jorge
Hi Jorge, My name's Alex and I'm taking part in the 2015 CPAN Pull Request Challenge, and Catalyst-View-Excel-Template-Plus is my randomly assigned distribution for January. I know this RT request is years old at this point but it does seem like a good change to make, so perhaps you'd still be able to help me solve it. Show quoted text
> This module should get the config data not from the global configuration and > then the hardcoded view type (as it is now), but the runtime name of the > view class, this way: > > my $config = { %{$class->config} }; > > In this way, if I decide to create a view named "MyView", which inherits > from Catalyst::View::Excel::Template::Plus, the configuration will be read > from $c->config->{'View::MyView'} and not from the wrong place.
I tried this change but the test suite doesn't seem to pass with it in place. Also the case of sub-classing/inheritance you describe seems to be tested directly in the test suite since TestApp::View::Excel inherits from Catalyst::View::Excel::Template::Plus. Show quoted text
> I have manually corrected this issue in my app and everything works as > expected.
Can you send a patch? Thanks! - Alex
Pull request applied and pushed a new version to cpan, much thanks!
On Tue Jan 13 16:01:50 2015, STEVAN wrote: Show quoted text
> Pull request applied and pushed a new version to cpan, much thanks!
Hey Stevan, Just so you know I don't think *this* ticket was solved by any of my pull requests. That said I don't disagree with your decision to close it given that it's a feature request and the original ticket creator doesn't seem to be interested any more. - Alex p.s. I'm at FOSDEM if you want to talk face to face. One more day before this CPAN PR Challenge is done and I move on to whatever module Neil gives me in February :-)
Subject: Re: [rt.cpan.org #68917] Error getting the configuration hash from Catalyst
Date: Sat, 7 Feb 2015 16:16:43 +0100
To: bug-Catalyst-View-Excel-Template-Plus [...] rt.cpan.org
From: Stevan Little <stevan.little [...] gmail.com>
Alex, Sorry, I didn't read the fine print, if the original ticket author comes back we can revisit, but for now we can leave it closed. Thanks again for the work via the CPAN PR challenge. - Stevan On Sat, Jan 31, 2015 at 10:11 AM, Alex Balhatchet via RT < bug-Catalyst-View-Excel-Template-Plus@rt.cpan.org> wrote: Show quoted text
> Queue: Catalyst-View-Excel-Template-Plus > Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=68917 > > > On Tue Jan 13 16:01:50 2015, STEVAN wrote:
> > Pull request applied and pushed a new version to cpan, much thanks!
> > Hey Stevan, > > Just so you know I don't think *this* ticket was solved by any of my pull > requests. > > That said I don't disagree with your decision to close it given that it's > a feature request and the original ticket creator doesn't seem to be > interested any more. > > - Alex > > p.s. I'm at FOSDEM if you want to talk face to face. One more day before > this CPAN PR Challenge is done and I move on to whatever module Neil gives > me in February :-) >