Slash Boxes
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

use Perl Log In

Log In

[ Create a new account ]

tokuhirom (7396)

  (email not shown publicly)

Journal of tokuhirom (7396)

Friday November 03, 2006
09:41 AM

Sledge::View 0.04 released

[ #31498 ]

I released Sledge::View 0.04 released.

This distribution includes the Sledge::View::CSV.

yeah, Japanese sales person often requires the CSV formatted files ;-)


package Your::Pages::Admin::Report;
use strict;
use warnings;
use base qw/Sledge::Pages::Compat/;
use Sledge::Plugin::View;
use Sledge::Plugin::Stash;
    my $self = shift;
    if ($self->r->param('output') eq 'csv') {
    else {
sub dispatch_report {
   my $self = shift;
   $self->stash->{row} = [[qw/a b/], [qw/c d/]];

and, your template is:

  [% FOR row IN rows %]
    [% FOR col IN row %]
    <td>[% col %]</td>
    [% END %]
  [% END %]

if user access to '/admin/report/report' then get the html table report, and if access to '/admin/report/report?output=csv' then get the csv report.

yes, you can easy to change the view.

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
More | Login | Reply
Loading... please wait.