[Catalyst] Form handling, urls and web design

Brandon Black blblack at gmail.com
Tue Jan 24 00:06:04 CET 2006


On 1/23/06, Yuval Kogman <nothingmuch at woobling.org> wrote:
> On Mon, Jan 23, 2006 at 16:26:25 -0600, Brandon Black wrote:
>
> > sub view : Local {
> >    my ($self, $c) = @_;
> >
> >    my $username = $c->req->args->[0];
> >
> >    $c->res->redirect('list') if !$username;
> >
> >    ......
> > }
>
>         sub view : Local {
>                 my ( $self, $c, $user ) = @_;
>
>                 $c->res->redirect('list') unless $username;
>         }
>
> ?
>

I never knew about that shortcut, nice :)

-- Brandon



More information about the Catalyst mailing list