Commit de9cde21 authored by Nigel Kukard's avatar Nigel Kukard

Syntax cleanup

parent 94e61747
......@@ -131,13 +131,14 @@ sub isNumber
{
my ($var,$options) = @_;
$options = 0 if (!defined($options));
# Make sure we're not a ref
if (!isVariable($var)) {
return;
}
$options = 0 if (!defined($options));
# Strip leading 0's
if ($var =~ s/^(-?)0*([0-9]+)$/$1$2/) {
my $val = int($var);
......@@ -174,6 +175,7 @@ sub isHash
{
my $var = shift;
# A hash cannot be undef?
if (!defined($var)) {
return;
......@@ -218,13 +220,14 @@ sub isDomain
{
my ($var,$options) = @_;
$options = 0 if (!defined($options));
# Make sure we're not a ref
if (!isVariable($var)) {
return;
}
$options = 0 if (!defined($options));
# Lowercase it
$var = lc($var);
# Now check
......@@ -249,13 +252,14 @@ sub isUsername
{
my ($var,$options) = @_;
$options = 0 if (!defined($options));
# Make sure we're not a ref
if (!isVariable($var)) {
return;
}
$options = 0 if (!defined($options));
# Lowercase it
$var = lc($var);
......@@ -290,13 +294,15 @@ sub isDatabaseName
{
my ($var,$options) = @_;
$options = 0 if (!defined($options));
# Make sure we're not a ref
if (!isVariable($var)) {
return;
}
$options = 0 if (!defined($options));
# Lowercase it
$var = lc($var);
# Now check
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment