NAME

SPOPS::DBI::RandomCode - Creates a random code for the ID field

SYNOPSIS

package MySPOPS;

@MySPOPS::ISA = qw( SPOPS::DBI::RandomCode SPOPS::DBI );

DESCRIPTION

Very, very simple. We just use the generate_random_code() method in all SPOPS classes to generate an n character code. The width of the code is determined by the field {id_width} in the CONFIG of the SPOPS implementation.

BUGS

Getting a 'random' value

If you are using this under mod_perl, you might have the problem of colliding ID fields. This seems to happen because the httpd children all have the same random seed, since they are all forked off from the same parent.

The solution is to put a 'srand()' in the PerlChildInitHandler, although mod_perl versions from 1.25 on might take care of this for you.

TO DO

COPYRIGHT

Copyright (c) 2000 intes.net, inc.. All rights reserved.

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

AUTHORS

Chris Winters <chris@cwinters.com>