[Catalyst] Re: CGI::Dump()

Aristotle Pagaltzis pagaltzis at gmx.de
Sat Apr 19 04:11:00 BST 2008


Hi Ashley,

    my $t = sub { my $n = shift; @_ ? join("\n","<$n>", at _,"</$n>") : () ) }
    my $e = sub { HTML::Entities::encode($_) };
    return $t->( ul => map { $t->( li =>
        $t->( b => &$e ),
        $t->( ul => map { $t->( li => &$e ) } $c->req->param($_) ),
    ) } $c->req->param );

Untested. But it least it doesn’t look half like Java.

-- 
*AUTOLOAD=*_;sub _{s/(.*)::(.*)/print$2,(",$\/"," ")[defined wantarray]/e;$1}
&Just->another->Perl->hack;
#Aristotle Pagaltzis // <http://plasmasturm.org/>



More information about the Catalyst mailing list