[Catalyst] RFC: Catalyst::View::Excel::Template
Kevin Old
kevinold at gmail.com
Sat Oct 1 06:40:16 CEST 2005
Juan,
On 9/30/05, Juan Camacho <jc5826 at gmail.com> wrote:
> I think you should put it up. I certainly would find it useful.
Thanks. I plan on getting it uploaded this weekend.
> 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?
>
I like the suggestions you've made and will likely incorporate them
into the module before it's released (giving you credit of course).
It's late here and I've had a rough week so I'm having a little
trouble getting everything connected in the module with your changes.
I'll have a chance to look at it tomorrow. If you've made these
modules to your working copy and want to send me a diff file, that
would be great!
Otherwise, I'll try to get it working tomorrow.
Thanks,
--
Kevin Old
kevinold at gmail.com
More information about the Catalyst
mailing list