Grades::Types - MooseX::Type checks for homework, classwork and exams data
use Grades; use Grades::Types qw/Beancans Card/; has 'beancanseries' => (is => 'ro', isa => Beancans, lazy_build => 1); method _build_beancanseries { my $series = $self->series; my $league = $self->league->id; +{ map { $_ => $self->inspect( "$league/$_/beancans.yaml" ) } @$series }; } method card (Num $week) { my $card = $self->data->{$week}; croak "Week $week card probably has undefined or non-numeric Merit, Absence, Tardy scores, or possibly illegal beancan." unless is_Card( $card ); return $card; }
MooseX::Types extension of Moose::Util::TypeConstraint checking of user input.
A string, where the first letter is upper case, there are some letters or spaces or hyphens, and there is an optional digit at the end to disambiguate same-named players.
An array ref of PlayerName.
A possibly undefined PlayerNames list type.
A string of digits or underscore, with possibly a letter in front.
A hashref with name and id keys.
A possibly undefined list of Member.
A number or the string 'transfer' for each playerId.
A number or the string 'transfer'.
'one', 'two' cutpoints with the numerical value
A number or undef.
'letters' and 'questions' and the number of each. But letters might be undef.
HomeworkWork of all players.
A hashref of PlayerId keys and HomeworkResult values.
A hashref of the homework grades keyed on the round (an Int.) For each round, the keys are PlayerId, and the values are scores, or Num.
A hashref of teams and their constituents, where the keys are the sessions (Str) and the keys for each session are teams, or beancans (ie Str) and the corresponding value is PlayerNames.
A hashref of classwork results for the lesson, where the keys are beancan names (Str) and for each beancan there are 'merits', 'absences', and 'tardies' keys, with Int values for each key.
A hashref of classwork results for the lesson, where the keys are beancan names (Str) and for each beancan there are 'merits', and 'absent' keys, with an Int value for the first and AbsenteeNames for the second key.
A hashref of the results for one exam, with PlayerId keys and Num values.
A hashref of weights for the components making up the grade, where the keys are 'classwork', 'homework', and 'exams', and the corresponding Num value is the weight accorded the component in the grade.
Dr Bean, <drbean, followed by the at mark (@), cpan, then a dot, and finally, org>
<drbean, followed by the at mark (@), cpan, then a dot, and finally, org>
Please report any bugs or feature requests to bug-grades at rt.cpan.org, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Grades. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.
bug-grades at rt.cpan.org
You can find documentation for this module with the perldoc command.
perldoc Grades::Types
You can also look for information at:
AnnoCPAN: Annotated CPAN documentation
http://annocpan.org/dist/Grades
CPAN Ratings
http://cpanratings.perl.org/d/Grades
RT: CPAN's request tracker
http://rt.cpan.org/NoAuth/Bugs.html?Dist=Grades
Search CPAN
http://search.cpan.org/dist/Grades
Copyright 2006 Dr Bean, all rights reserved.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
To install Grades, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Grades
CPAN shell
perl -MCPAN -e shell install Grades
For more information on module installation, please visit the detailed CPAN module installation guide.