[Catalyst] RFC: Catalyst::View::Excel::Template
    Juan Camacho 
    jc5826 at gmail.com
       
    Fri Sep 30 23:59:40 CEST 2005
    
    
  
On 9/13/05, Kevin Old <kevinold at gmail.com> wrote:
> I'd be interested to here what others think so that I might clean it
> up a little before uploading it to CPAN.  Please go easy as this is my
> first module for CPAN.
I think you should put it up.  I certainly would find it useful.
Here are some very small points:
I'm not sure if this is such a good idea when assigning the template name.
  my $filename = $c->stash->{template} || $c->req->match;
Just bail out if the template is not defined, or at least do something
like this instead:
   my $template_name = $c->stash->{template} ||
File::Basename::basename($c->req->match);
# maybe $c->req->path is more reliable
Also, how about adding an alternative way to define the file attachment name?
  my $filename = $c->stash->{xls_filename} ;
  ($filename ||= $template_name) =~ s/\.xml$/.xls/;
Is 'application/vnd.ms-excel' a better content type?
    
    
More information about the Catalyst
mailing list