Skip Menu |

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

Report information
The Basics
Id: 105844
Status: resolved
Priority: 0/
Queue: Catalyst-View-CSV

People
Owner: mbrown [...] fensystems.co.uk
Requestors: bitcard [...] 32ths.com
Cc:
AdminCc:

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



Subject: die if Text::CSV cannot be instantiated.
I passed an encoding => utf8 option into the config for Catalyst::View::CSV erroneously. This caused Text::CSV constructor to die, but my Catalyst app happily started until I tried to forward to the CSV view, in which case it mysteriously died when trying to access $csv in process function. $csv was undefined, since the constructor failed. Suggest: my $csv = Text::CSV->new ( $config ) or die "Cannot use CSV View: ".Text::CSV->error_diag (); $self->csv ( $csv ); in the new method. Setting auto_diag in Text::CSV at least prints something upon start, but seems like app should not start if a View failed to instantiate. Thanks, \- Mike $ perl -MCatalyst::View::CSV\ 999 Catalyst::View::CSV version 999 required--this is only version 1.5. BEGIN failed--compilation aborted.
On Mon Jul 13 15:56:58 2015, xmikew wrote: Show quoted text
> Suggest: > > my $csv = Text::CSV->new ( $config ) > or die "Cannot use CSV View: ".Text::CSV->error_diag (); > $self->csv ( $csv ); > > in the new method.
Thanks. Have applied your fix and uploaded as v1.6; should be available via CPAN shortly. Michael