adding "has_field"
authormiker <miker@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Wed, 21 Dec 2005 15:29:00 +0000 (15:29 +0000)
committermiker <miker@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Wed, 21 Dec 2005 15:29:00 +0000 (15:29 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@2501 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/src/perlmods/OpenILS/Utils/Fieldmapper.pm

index 7591ff2..6875751 100644 (file)
@@ -348,6 +348,13 @@ sub real_fields {
        return @f;
 }
 
+sub has_field {
+       my $self = shift;
+       my $field = shift;
+       return 1 if grep { $_ eq $field } keys %{$$fieldmap{$class_name}{fields}};
+       return 0;
+}
+
 sub properties {
        my $self = shift;
        my $class_name = $self->class_name;