File Coverage

blib/lib/App/Math/Tutor/Role/Roman.pm
Criterion Covered Total %
statement 12 12 100.0
branch n/a
condition n/a
subroutine 4 4 100.0
pod n/a
total 16 16 100.0


line stmt bran cond sub pod time code
1             package App::Math::Tutor::Role::Roman;
2              
3 1     1   535 use warnings;
  1         1  
  1         31  
4 1     1   4 use strict;
  1         2  
  1         28  
5              
6             =head1 NAME
7              
8             App::Math::Tutor::Role::Roman - role for roman style natural numbers
9              
10             =cut
11              
12 1     1   3 use Moo::Role;
  1         2  
  1         5  
13 1     1   671 use App::Math::Tutor::Numbers;
  1         4  
  1         213  
14              
15             with "App::Math::Tutor::Role::Natural";
16              
17             our $VERSION = '0.005';
18              
19             around _guess_natural_number => sub {
20             my $next = shift;
21             my $max_val = $_[0]->format;
22             my $value = int( rand( $max_val - 1 ) ) + 1;
23             RomanNum->new( value => $value );
24             };
25              
26             =head1 LICENSE AND COPYRIGHT
27              
28             Copyright 2010-2014 Jens Rehsack.
29              
30             This program is free software; you can redistribute it and/or modify it
31             under the terms of either: the GNU General Public License as published
32             by the Free Software Foundation; or the Artistic License.
33              
34             See http://dev.perl.org/licenses/ for more information.
35              
36             =cut
37              
38             1;