My favorites | Sign in
Project Home Wiki Issues Source
READ-ONLY: This project has been archived. For more information see this post.
Search
for
BoilerPlateCode1  
Boilerplate code 1
Updated Nov 18, 2010 by dan...@drjays.com

Boilerplate Code 1

It's not uncommon to see a sight such as this in a majority of our database interacting subroutines:

      return $self->_error('_enum failed') unless
 	my $Estatus = $self->_enum('corr','status');

      return $self->_error('_enum failed') unless
 	my $Etype = $self->_enum('corr','type');

      return $self->_error('_enum failed') unless
 	my $Eaction = $self->_enum('corr','action');

      return $self->_error("type not found: $params{type}") unless $Etype->{$params{type}};

      $fields{type_id} = ['d',$Etype->{$params{type}}];

      ... database code ...

Powered by Google Project Hosting