Module naming: Boolean::Verbose
am 11.03.2006 13:07:11 von ktatHi, All.
I have a module which I want to upload to CPAN.
My calliing it Boolean::Verbose, but Boolean is to be top level.
So I want to avoid this name. Do you have idea?
My second idea is Acme::True::Verbose. does this suit Acme::*?
============================================================ ===
NAME
Boolean::Verbose - return true or false with verbose message
SYNOPSIS
use Boolean::Verbose;
if(my $r = check()){
# OK, you can see why you are OK.
print $r->message;
}else{
# NG, you can see why you are NG.
print $r->message;
}
sub check{
return false('you are not 20.') unless is_age_20();
return false('you are not male') unless is_male();
return true('you are 20 and male');
}
DESCRIPTION
Boolean::Verbose returns 1 or 0 with verbose message.
EXPORT
true
true('you are right');
It returns 1, but it is object. When you use 'message' method.
You
can see 'you are right'.
false
true('you are wrong');
It returns 0, but it is object. When you use 'message' method.
You
can see 'you are wrong'.
METHOD
message
$obj->message;
You can see verbose message used as true or false argument.
============================================================ ===
--
Ktat
mailto: atusi@pure.ne.jp