after lots of testing i have:
next unless ($self->{db}->cols->{$_}->{'type'} eq 'DATE' );
$tmp = $self->{cgi}->{$_};
}so i have determined that i have successfully found data field with type = DATE; $tmp is the current value of the data field. i want to send $tmp to a subroutine to change the format of the string. i thought i could use:
$self->{cgi}->{$_} = my_sub($tmp);
but even if i have a useless sub like
sub my_sub {
my ($data) = $_[0];
return '01-01-2010';
}
it seems to lock up and never comes back to rest of script. must be something simple but what?
Code:
foreach ( keys %{$self->{db}->cols} ) { next unless ($self->{db}->cols->{$_}->{'type'} eq 'DATE' );
$tmp = $self->{cgi}->{$_};
}
$self->{cgi}->{$_} = my_sub($tmp);
but even if i have a useless sub like
sub my_sub {
my ($data) = $_[0];
return '01-01-2010';
}
it seems to lock up and never comes back to rest of script. must be something simple but what?