blib/lib/Froody/Argument/Number.pm

filter: Statementstmt 100% 14 / 14 Branchbran 100% 2 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 5 / 5 Podpod 100% 2 / 2 totaltotal 100% 23 / 23 CC 2 SCAR 2.9
CC
2
Cov
100%
process
2.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.3
« blib/lib/Froody/Invoker.pm ↑ Summary blib/lib/Froody/Argument/Email.pm »
1 package Froody::Argument::Number;
2  
3 18 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 18 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
5  
6 18 ▶use base 'Froody::Argument';
Subroutine BEGIN: called CC=1 SCAR=0.0
7  
8 17 ▶sub type { 'number' }
Subroutine type: called CC=1 SCAR=0.0
Pod documented
9  
10 9 ▶sub process {
Subroutine process: called CC=2 SCAR=6.9
Pod documented
11 9 my ($class, $param, $check) = @_;
12 9 ▶ $check->( 0 , "not a number")
Branch: 1 branch
BranchTrueFalseTotal
unless $param =~ /^\d*$/ 1 8 9
13 unless $param =~ m/^\d*$/;
14 9 return $param;
15 }
16  
17 18 1;
18  
19 =head1 NAME
20  
21 Froody::Argument::Number - Froody argument type handler for numeric arguments
22  
23 =head1 AUTHORS
24  
25 Copyright Fotango 2006. All rights reserved.
26  
27 Please see the main L<Froody> documentation for details of who has worked
28 on this project.
29  
30 This module is free software; you can redistribute it and/or modify it under
31 the same terms as Perl itself.
32  
33 =cut
« blib/lib/Froody/Invoker.pm ↑ Summary blib/lib/Froody/Argument/Email.pm »