| 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
| |||||||||||
| 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 | ||||||||||