The prototypes on all of your subroutines conflict with the code in the subroutines. For example: sub new ($){ says that new takes a single argument, but then two arguments are shifted from @_:
It is fortunate in this case that current versions of Perl ignore prototypes on method calls. :)my $self = shift; $self = bless {}; $self{'index_path'} = shift;
Your hardcoded LOCK constants are not platform compatible:
The constants from Fcntl should be used instead.$LOCK_SH = '1'; $LOCK_EX = '2'; $LOCK_NB = '3'; $LOCK_UN = '4';
Globs, which are entries in the symbol table, do not include lexical variables, which are held outside the symbol table. In this code:
the glob that is returned does not include the lexical hash that was just made. You probably want to return the hash itself, or a reference to it.my %deleted_pair = (); $deleted_pair{$key} = $TABLE{$key}; delete ($TABLE{$key}); $self->update_index_table(\%TABLE); return (*deleted_pair)
These are a few of the more egregious issues with the current state of your module. I hope you will continue making improvements.
In reply to Re: Lady_TM
by chipmunk
in thread Lady_TM
by Steeeeeve
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |