Module::CPANTS::Site::Controller::Kwalitee - Catalyst Controller


Module-CPANTS-Site documentation Contained in the Module-CPANTS-Site distribution.

Index


Code Index:

NAME

Top

Module::CPANTS::Site::Controller::Kwalitee - Catalyst Controller

SYNOPSIS

Top

See Module::CPANTS::Site

DESCRIPTION

Top

Catalyst Controller.

METHODS

Top

AUTHOR

Top

Thomas Klausner, <domm@cpan.org>

LICENSE

Top

This library is free software, you can redistribute it and/or modify it under the same terms as Perl itself.


Module-CPANTS-Site documentation Contained in the Module-CPANTS-Site distribution.

package Module::CPANTS::Site::Controller::Kwalitee;

use strict;
use warnings;

use base qw( Catalyst::Controller );

sub shortcoming : Local {
    my ( $self, $c ) = @_;
    my $metric       = $c->req->param( 'name' );
    my $kwalitee     = $c->model( 'Kwalitee' );
    
    $c->stash->{ indicator } = $kwalitee->get_indicators_hash->{ $metric };
}

sub view : Path {
    my ( $self, $c, $distname ) = @_;
    
    my $dist = $c->model( 'DBIC::Dist' )->search( { dist => $distname } );

    $c->stash->{ dist } = $dist->first;
}

'listening to: kids during judo training';

__END__