maint: remove no longer used test data files.
[bioperl-live.git] / lib / Bio / Phenotype / OMIM / OMIMentry.pm
blobc297c363c3abf1f786d47ad8a99c0608a54d1817
2 # BioPerl module for Bio::Phenotype::OMIM::OMIMentry
4 # Please direct questions and support issues to <bioperl-l@bioperl.org>
6 # Cared for by Christian M. Zmasek <czmasek-at-burnham.org> or <cmzmasek@yahoo.com>
8 # (c) Christian M. Zmasek, czmasek-at-burnham.org, 2002.
9 # (c) GNF, Genomics Institute of the Novartis Research Foundation, 2002.
11 # You may distribute this module under the same terms as perl itself.
12 # Refer to the Perl Artistic License (see the license accompanying this
13 # software package, or see http://www.perl.com/language/misc/Artistic.html)
14 # for the terms under which you may use, modify, and redistribute this module.
16 # THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED
17 # WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
18 # MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
20 # You may distribute this module under the same terms as perl itself
22 # POD documentation - main docs before the code
24 =head1 NAME
26 Bio::Phenotype::OMIM::OMIMentry - represents OMIM (Online Mendelian
27 Inheritance in Man) database entries
29 =head1 SYNOPSIS
31 $obj = Bio::Phenotype::OMIM::OMIMentry->new( -mim_number => 200000,
32 -description => "This is ...",
33 -more_than_two_genes => 1 );
35 =head1 DESCRIPTION
37 Inherits from Bio::Phenotype::PhenotypeI.
38 Bio::Phenotype::OMIM::OMIMparser parses the flat file representation
39 of OMIM (i.e. files "omim.txt" and "genemap") returning OMIMentry objects.
41 =head1 FEEDBACK
43 =head2 Mailing Lists
45 User feedback is an integral part of the evolution of this and other
46 Bioperl modules. Send your comments and suggestions preferably to the
47 Bioperl mailing lists Your participation is much appreciated.
49 bioperl-l@bioperl.org - General discussion
50 http://bioperl.org/wiki/Mailing_lists - About the mailing lists
52 =head2 Support
54 Please direct usage questions or support issues to the mailing list:
56 I<bioperl-l@bioperl.org>
58 rather than to the module maintainer directly. Many experienced and
59 reponsive experts will be able look at the problem and quickly
60 address it. Please include a thorough description of the problem
61 with code and data examples if at all possible.
63 =head2 Reporting Bugs
65 report bugs to the Bioperl bug tracking system to help us keep track
66 the bugs and their resolution. Bug reports can be submitted via the
67 web:
69 https://github.com/bioperl/bioperl-live/issues
71 =head1 AUTHOR
73 Christian M. Zmasek
75 Email: czmasek-at-burnham.org or cmzmasek@yahoo.com
77 WWW: http://monochrome-effect.net/
79 Address:
81 Genomics Institute of the Novartis Research Foundation
82 10675 John Jay Hopkins Drive
83 San Diego, CA 92121
85 =head1 APPENDIX
87 The rest of the documentation details each of the object
88 methods. Internal methods are usually preceded with a _
90 =cut
93 # Let the code begin...
96 package Bio::Phenotype::OMIM::OMIMentry;
97 use strict;
99 use Bio::Phenotype::OMIM::MiniMIMentry;
100 use Bio::Phenotype::OMIM::OMIMentryAllelicVariant;
102 use constant TRUE => 1;
103 use constant FALSE => 0;
104 use constant DEFAULT_MIM_NUMER => 0;
106 use base qw(Bio::Phenotype::Phenotype);
111 =head2 new
113 Title : new
114 Usage : $obj = Bio::Phenotype::OMIM::OMIMentry->new( -mim_number => 200000,
115 -description => "This is ...",
116 -more_than_two_genes => 1 );
117 Function: Creates a new OMIMentry object.
118 Returns : A new OMIMentry object.
119 Args : -mim_number => the MIM number
120 -title => the title or name
121 -alternative_titles_and_symbols => the "alternative titles and symbols"
122 -more_than_two_genes => can phenotype can be caused by mutation in any of two or more genes?
123 -is_separate => is this phenotype separate from those represented by other entries
124 -description => the description of this phenotype
125 -mapping_method => the mapping method
126 -gene_status => the gene status of this
127 -comment => a comment
128 -species => ref to the the species (human)
129 -created => created by whom/when
130 -edited => edited by whom/when
131 -contributors => contributed by whom/when
132 -additional_references => "see also"
133 -clinical_symptoms => the clinical symptoms
134 -minimim => the Mini MIM associated with this OMIM antry
136 =cut
138 sub new {
140 my( $class,@args ) = @_;
142 my $self = $class->SUPER::new( @args );
144 my ( $mim_number,
145 $title,
146 $alternative_titles_and_symbols,
147 $more_than_two_genes,
148 $is_separate,
149 $description,
150 $mapping_method,
151 $gene_status,
152 $comment,
153 $species,
154 $created,
155 $edited,
156 $contributors,
157 $additional_references,
158 $clinical_symptoms,
159 $miniMIM )
160 = $self->_rearrange( [ qw( MIM_NUMBER
161 TITLE
162 ALTERNATIVE_TITLES_AND_SYMBOLS
163 MORE_THAN_TWO_GENES
164 IS_SEPARATE
165 DESCRIPTION
166 MAPPING_METHOD
167 GENE_STATUS
168 COMMENT
169 SPECIES
170 CREATED
171 EDITED
172 CONTRIBUTORS
173 ADDITIONAL_REFERENCES
174 CLINICAL_SYMPTOMS
175 MINIMIM ) ], @args );
177 $self->init();
179 $mim_number && $self->MIM_number( $mim_number );
180 $title && $self->title( $title );
181 $alternative_titles_and_symbols && $self->alternative_titles_and_symbols( $alternative_titles_and_symbols );
182 $more_than_two_genes && $self->more_than_two_genes( $more_than_two_genes );
183 $is_separate && $self->is_separate( $is_separate );
184 $description && $self->description( $description );
185 $mapping_method && $self->mapping_method( $mapping_method );
186 $gene_status && $self->gene_status( $gene_status );
187 $comment && $self->comment( $comment );
188 $species && $self->species( $species );
189 $created && $self->created( $created );
190 $edited && $self->edited( $edited );
191 $contributors && $self->contributors( $contributors );
192 $additional_references && $self->additional_references( $additional_references );
193 $clinical_symptoms && $self->clinical_symptoms_raw( $clinical_symptoms );
194 $miniMIM && $self->miniMIM( $miniMIM );
196 return $self;
198 } # new
202 =head2 init
204 Title : init()
205 Usage : $obj->init();
206 Function: Initializes this OMIMentry to all "" and empty lists.
207 Returns :
208 Args :
210 =cut
212 sub init {
214 my( $self ) = @_;
216 $self->MIM_number( DEFAULT_MIM_NUMER );
217 $self->title( "" );
218 $self->alternative_titles_and_symbols( "" );
219 $self->more_than_two_genes( FALSE );
220 $self->is_separate( FALSE );
221 $self->description( "" );
222 $self->mapping_method( "" );
223 $self->gene_status( "" );
224 $self->comment( "" );
225 my $species = Bio::Species->new();
226 $species->classification( qw( sapiens Homo ) );
227 $self->species( $species );
228 $self->created( "" );
229 $self->edited( "" );
230 $self->contributors( "" );
231 $self->additional_references( "" );
232 $self->clinical_symptoms( {} );
233 $self->remove_Correlates();
234 $self->remove_References();
235 $self->remove_AllelicVariants();
236 $self->remove_CytoPositions();
237 $self->remove_gene_symbols();
238 $self->remove_Genotypes();
239 $self->remove_DBLinks();
240 $self->remove_keywords();
241 $self->remove_Variants();
242 $self->remove_Measures();
243 $self->miniMIM( Bio::Phenotype::OMIM::MiniMIMentry->new() );
245 } # init
249 sub to_string {
251 my( $self ) = @_;
253 my $s = "";
255 $s .= "-- MIM number:\n";
256 $s .= $self->MIM_number()."\n\n";
257 $s .= "-- Title:\n";
258 $s .= $self->title()."\n\n";
259 $s .= "-- Alternative Titles and Symbols:\n";
260 $s .= $self->alternative_titles_and_symbols()."\n\n";
261 $s .= "-- Can be caused by Mutation in any of two or more Genes:\n";
262 $s .= $self->more_than_two_genes()."\n\n";
263 $s .= "-- Phenotype is separate:\n";
264 $s .= $self->is_separate()."\n\n";
265 $s .= "-- Description:\n";
266 $s .= $self->description()."\n\n";
267 $s .= "-- Species:\n";
268 $s .= $self->species()->binomial()."\n\n";
269 $s .= "-- Clinical Symptoms:\n";
270 $s .= $self->clinical_symptoms()."\n\n";
271 $s .= "-- Allelic Variants:\n";
272 $s .= $self->_array_to_string( $self->each_AllelicVariant() )."\n";
273 $s .= "-- Cyto Positions:\n";
274 $s .= $self->_array_to_string( $self->each_CytoPosition() )."\n";
275 $s .= "-- Gene Symbols:\n";
276 $s .= $self->_array_to_string( $self->each_gene_symbol() )."\n";
277 $s .= "-- Correlates:\n";
278 $s .= $self->_array_to_string( $self->each_Correlate() )."\n";
279 $s .= "-- References:\n";
280 $s .= $self->_array_to_string( $self->each_Reference() )."\n";
281 $s .= "-- Additional References:\n";
282 $s .= $self->additional_references()."\n\n";
283 $s .= "-- Mapping Method:\n";
284 $s .= $self->mapping_method()."\n\n";
285 $s .= "-- Gene status:\n";
286 $s .= $self->gene_status()."\n\n";
287 $s .= "-- Created:\n";
288 $s .= $self->created()."\n\n";
289 $s .= "-- Contributors:\n";
290 $s .= $self->contributors()."\n\n";
291 $s .= "-- Edited:\n";
292 $s .= $self->edited()."\n\n";
293 $s .= "-- Comment:\n";
294 $s .= $self->comment()."\n\n";
295 $s .= "-- MiniMIM:\n";
296 $s .= $self->miniMIM()->to_string()."\n\n";
297 return $s;
300 } # to_string
304 =head2 MIM_number
306 Title : MIM_number
307 Usage : $omim->MIM_number( "100050" );
309 print $omim->MIM_number();
310 Function: Set/get for the MIM number of this OMIM entry.
311 Returns : The MIM number [an integer larger than 100000].
312 Args : The MIM number [an integer larger than 100000] (optional).
314 =cut
316 sub MIM_number {
317 my ( $self, $value ) = @_;
319 if ( defined $value ) {
320 if ( $value =~ /\D/
321 || ( $value < 100000 && $value != DEFAULT_MIM_NUMER ) ) {
322 $self->throw( "Found [$value]"
323 . " where [integer larger than 100000] expected" );
325 $self->{ "_MIM_number" } = $value;
328 return $self->{ "_MIM_number" };
330 } # MIM_number
335 =head2 title
337 Title : title
338 Usage : $omim->title( "AARSKOG SYNDROME" );
340 print $omim->title();
341 Function: Set/get for the title or name of this OMIM entry.
342 This method is an alias to the method "name" of
343 Bio::Phenotype::PhenotypeI.
344 Returns : The title [scalar].
345 Args : The title [scalar] (optional).
347 =cut
349 sub title {
350 my $self = shift;
352 $self->name(@_);
354 } # title
359 =head2 alternative_titles_and_symbols
361 Title : alternative_titles_and_symbols
362 Usage : $omim->alternative_titles_and_symbols( "AORTIC ANEURYSM, ABDOMINAL" );
364 print $omim->alternative_titles_and_symbols();
365 Function: Set/get for the "alternative titles and symbols" of this OMIM entry.
366 Currently, everything after the first line of title (TI) field is
367 considered "alternative titles and symbols".
368 Returns : "alternative titles and symbols" [scalar].
369 Args : "alternative titles and symbols" [scalar] (optional).
371 =cut
373 sub alternative_titles_and_symbols {
374 my ( $self, $value ) = @_;
376 if ( defined $value ) {
377 $self->{ "_alternative_titles_and_symbols" } = $value;
380 return $self->{ "_alternative_titles_and_symbols" };
382 } # alternative_titles_and_symbols
387 =head2 more_than_two_genes
389 Title : more_than_two_genes
390 Usage : $omim->more_than_two_genes( 1 );
392 print $omim->more_than_two_genes();
393 Function: This is true if this phenotype can be caused
394 by mutation in any of two or more genes.
395 In OMIM, this is indicated by a number symbol (#)
396 before an entry number (e.g. #114480 -- BREAST CANCER).
397 Returns : [1 or 0].
398 Args : [1 or 0] (optional).
400 =cut
402 sub more_than_two_genes {
403 my ( $self, $value ) = @_;
405 if ( defined $value ) {
406 $self->_is_true_or_false( $value );
407 $self->{ "_more_than_two_genes" } = $value;
410 return $self->{ "_more_than_two_genes" };
412 } # more_than_two_genes
417 =head2 is_separate
419 Title : is_separate
420 Usage : $omim->is_separate( 1 );
422 print $omim->is_separate();
423 Function: This is true if the phenotype determined by the gene at
424 the given locus is separate from those represented by
425 other entries where "is_separate" is true and if the mode
426 of inheritance of the phenotype has been proved
427 (in the judgment of the authors and editors).
428 In OMIM, this is indicated by a asterisk (*)
429 before an entry number (e.g. *113705 BREAST CANCER,
430 TYPE 1; BRCA1).
431 Returns : [1 or 0].
432 Args : [1 or 0] (optional).
434 =cut
436 sub is_separate {
437 my ( $self, $value ) = @_;
439 if ( defined $value ) {
440 $self->_is_true_or_false( $value );
441 $self->{ "_is_separate" } = $value;
444 return $self->{ "_is_separate" };
446 } # is_separate
451 =head2 mapping_method
453 Title : mapping_method
454 Usage : $omim->mapping_method( "PCR of somatic cell hybrid DNA" );
456 print $omim->mapping_method();
457 Function: Set/get for the mapping method of this OMIM entry.
458 Returns : The mapping method [scalar].
459 Args : The mapping method [scalar] (optional).
461 =cut
463 sub mapping_method {
464 my $self = shift;
465 return $self->{ "_mapping_method" } = shift if(@_);
466 return $self->{ "_mapping_method" };
467 } # mapping_method
469 =head2 gene_status
471 Title : gene_status
472 Usage : $omim->gene_status( "C" );
474 print $omim->gene_status();
475 Function: Set/get for the gene status of this OMIM entry.
476 The certainty with which assignment of loci to chromosomes or the linkage
477 between two loci has been established has been graded into the following
478 classes:
479 <L>C = confirmed - observed in at least two laboratories or in several families.
480 <L>P = provisional - based on evidence from one laboratory or one family.
481 <L>I = inconsistent - results of different laboratories disagree.
482 <L>L = limbo - evidence not as strong as that provisional, but included for
483 heuristic reasons. (Same as `tentative'.)
485 Returns : [C, P, I, or L].
486 Args : [C, P, I, or L] (optional).
488 =cut
490 sub gene_status {
491 my ( $self, $value ) = @_;
493 if ( defined $value ) {
494 #unless ( $value eq "C"
495 # || $value eq "P"
496 # || $value eq "I"
497 # || $value eq "L"
498 # || $value eq "A" # !?
499 # || $value eq "H" # !?
500 # || $value eq "U" # !?
501 # || $value eq "" ) {
502 # $self->throw( "Found [$value]"
503 # . " where [C, P, I, or L] expected" );
505 unless ( $value eq "C"
506 || $value eq "P"
507 || $value eq "I"
508 || $value eq "L"
509 || $value eq "" ) {
510 $value = "";
513 $self->{ "_gene_status" } = $value;
516 return $self->{ "_gene_status" };
518 } # gene_status
521 =head2 clinical_symptoms
523 Title : clinical_symptoms
524 Usage : $omim->clinical_symptoms({});
525 Function: Set/get for the clinical symptoms of this OMIM entry.
526 Returns : [hash reference].
527 Args : [hash reference]. Suggested not to assign alone. Parser will do.
529 =cut
531 sub clinical_symptoms {
532 my ( $self, $value ) = @_;
534 if ( defined $value ) {
535 unless(ref($value) eq 'HASH'){
536 $self->throw('a hash referenced needed');
538 $self->{ "_clinical_symptoms" } = $value;
541 return $self->{ "_clinical_symptoms" };
543 } # clinical_symptoms
545 =head2 clinical_symptoms_raw
547 Title : clinical_symptoms_raw
548 Usage : $omim->clinical_symptoms( "Patients with ..." );
549 print $omim->clinical_symptoms();
550 Functions : Get/set for text information of clinical symptoms
551 Returns : The clinical symptoms [scalar].
552 Args : The clinical symptoms [scalar] (optional).
554 =cut
556 sub clinical_symptoms_raw {
557 my $self = shift;
558 return $self->{_clinical_symptoms_raw} = shift if @_;
559 return $self->{_clinical_symptoms_raw};
562 =head2 add_clinical_symptoms
564 Title : add_clinical_symptoms
565 Usage : $entry->add_clinical_symptoms('Ears', 'Floppy ears', 'Lop-ears');
566 Function : add one or more symptoms on one part of body.
567 Returns : [none]
568 Args : ($part, @symptoms)
569 $part, the text name of part/organism of human
570 @symptoms, an array of text description
572 =cut
574 sub add_clinical_symptoms {
575 my ($self, $part, @symptoms) = @_;
576 unless(defined $part){
577 $self->throw('a part/organism must be assigned');
579 $self->{_clinical_symptoms} = {} unless $self->{_clinical_symptoms};
580 $self->{_clinical_symptoms}->{$part} = []
581 unless $self->{_clinical_symptoms}->{$part};
582 push @{$self->{_clinical_symptoms}->{$part}}, @symptoms;
585 =head2 query_clinical_symptoms
587 Title : get_clinical_symptoms
588 Usage : @symptoms = $self->query_clinical_symptoms('Ears');
589 Function : get all symptoms specific to one part/organism.
590 Returns : an array of text
591 Args : $organ
593 =cut
595 sub query_clinical_symptoms {
596 my ($self, $organ)=@_;
597 my $symptoms=$self->{_clinical_symptoms}->{$organ};
598 @$symptoms;
601 sub get_clinical_symptom_organs {
602 my ($self)=@_;
603 keys %{$self->{_clinical_symptoms}};
606 =head2 created
608 Title : created
609 Usage : $omim->created( "Victor A. McKusick: 6/4/1986" );
611 print $omim->created();
612 Function: Set/get for the created field of the OMIM database.
613 Returns : Name(s) and date(s) [scalar - free form].
614 Args : Name(s) and date(s) [scalar - free form] (optional).
616 =cut
618 sub created {
619 my $self = shift;
620 return $self->{ "_created" } = shift if(@_);
621 return $self->{ "_created" };
623 } # created
628 =head2 contributors
630 Title : contributors
631 Usage : $omim->contributors( "Kelly A. Przylepa - revised: 03/18/2002" );
633 print $omim->contributors();
634 Function: Set/get for the contributors field of the OMIM database.
635 Returns : Name(s) and date(s) [scalar - free form].
636 Args : Name(s) and date(s) [scalar - free form] (optional).
638 =cut
640 sub contributors {
641 my $self = shift;
642 $self->{ "_contributors" } = shift if(@_);
643 return $self->{ "_contributors" };
645 } # contributors
650 =head2 edited
652 Title : edited
653 Usage : $omim->edited( "alopez: 06/03/1997" );
655 print $omim->edited();
656 Function: Set/get for the edited field of the OMIM database.
657 Returns : Name(s) and date(s) [scalar - free form].
658 Args : Name(s) and date(s) [scalar - free form] (optional).
660 =cut
662 sub edited {
663 my $self = shift;
664 return $self->{ "_edited" } = shift if(@_);
665 return $self->{ "_edited" };
667 } # edited
672 =head2 additional_references
674 Title : additional_references
675 Usage : $omim->additional_references( "Miller er al." );
677 print $omim->additional_references();
678 Function: Set/get for the additional references of this OMIM antry
679 (see also).
680 Returns : additional reference [scalar].
681 Args : additional reference [scalar] (optional).
683 =cut
685 sub additional_references {
686 my $self = shift;
687 return $self->{ "_additional_references" } = shift if(@_);
688 return $self->{ "_additional_references" };
690 } # additional_references
692 =head2 miniMIM
694 Title : miniMIM
695 Usage : $omim->miniMIM( $MM );
697 $MM = $omim->miniMIM();
698 Function: Set/get for the Mini MIM associated with this OMIM antry
699 (see also).
700 Returns : [Bio::Phenotype::OMIM::MiniMIMentry].
701 Args : [Bio::Phenotype::OMIM::MiniMIMentry] (optional).
703 =cut
705 sub miniMIM {
707 my ( $self, $value ) = @_;
709 if ( defined $value ) {
710 $self->_check_ref_type( $value, "Bio::Phenotype::OMIM::MiniMIMentry" );
711 $self->{ "_mini_mim" } = $value;
714 return $self->{ "_mini_mim" };
717 =head2 each_AllelicVariant
719 Title : each_AllelicVariant()
720 Usage : @avs = $obj->each_AllelicVariant();
721 Function: Returns a list of Bio::Phenotype::OMIM::OMIMentryAllelicVariant objects
722 associated with this OMIM entry.
723 Returns : A list of Bio::Phenotype::OMIM::OMIMentryAllelicVariant objects.
724 Args :
726 =cut
728 sub each_AllelicVariant {
729 my ( $self ) = @_;
731 return @{$self->{"_allelic_variants"}} if exists($self->{"_allelic_variants"});
732 return ();
733 } # each_AllelicVariant
736 =head2 add_AllelicVariants
738 Title : add_AllelicVariants
739 Usage : $obj->add_AllelicVariants( @avs );
741 $obj->add_AllelicVariants( $av );
742 Function: Pushes one or more OMIMentryAllelicVariant
743 into the list of OMIMentryAllelicVariants.
744 Returns :
745 Args : Bio::Phenotype::OMIM::OMIMentryAllelicVariant object(s).
747 =cut
749 sub add_AllelicVariants {
750 my ( $self, @values ) = @_;
752 return unless( @values );
754 foreach my $value ( @values ) {
755 $self->_check_ref_type( $value, "Bio::Phenotype::OMIM::OMIMentryAllelicVariant" );
758 push( @{ $self->{ "_allelic_variants" } }, @values );
760 } # add_AllelicVariants
763 =head2 remove_AllelicVariants
765 Title : remove_AllelicVariants
766 Usage : $obj->remove_AllelicVariants();
767 Function: Deletes (and returns) the list of OMIMentryAllelicVariant objects
768 associated with this OMIM entry.
769 Returns : A list of OMIMentryAllelicVariant objects.
770 Args :
772 =cut
774 sub remove_AllelicVariants {
775 my ( $self ) = @_;
777 my @a = $self->each_AllelicVariant();
778 $self->{ "_allelic_variants" } = [];
779 return @a;
781 } # remove_AllelicVariants
784 # Title : _array_to_string
785 # Function:
786 # Returns :
787 # Args :
788 sub _array_to_string {
789 my( $self, @value ) = @_;
791 my $s = "";
793 for ( my $i = 0; $i < scalar( @value ); ++$i ) {
794 if ( ! ref( $value[ $i ] ) ) {
795 $s .= "#" . $i . "\n-- Value:\n" . $value[ $i ] . "\n";
797 elsif ( $value[ $i ]->isa( "Bio::Phenotype::OMIM::OMIMentryAllelicVariant" )
798 || $value[ $i ]->isa( "Bio::Phenotype::Correlate" ) ) {
799 $s .= "#" . $i . "\n" . ( $value[ $i ] )->to_string() . "\n";
801 elsif ( $value[ $i ]->isa( "Bio::Annotation::Reference" ) ) {
802 $s .= "#".$i."\n-- Authors:\n".( $value[ $i ] )->authors()."\n";
803 $s .= "-- Title:\n".( $value[ $i ] )->title()."\n";
804 $s .= "-- Location:\n".( $value[ $i ] )->location()."\n";
806 elsif ( $value[ $i ]->isa( "Bio::Map::CytoPosition" ) ) {
807 $s .= "#" . $i . "\n-- Value:\n" . ( $value[ $i ] )->value() . "\n";
811 return $s;
813 } # _array_to_string
816 # Title :_is_true_or_false
817 # Function: Checks whether the argument is 1 or 0.
818 # Returns :
819 # Args : The value to be checked.
820 sub _is_true_or_false {
821 my ( $self, $value ) = @_;
822 unless ( $value !~ /\D/ && ( $value == TRUE || $value == FALSE ) ) {
823 $self->throw( "Found [" . $value
824 . "] where " . TRUE . " or " . FALSE . " expected" );
826 } # _is_true_or_false