[Bioperl-guts-l] bioperl-live/Bio/Annotation SimpleValue.pm, 1.21, 1.22

Malcom Cook mcook at dev.open-bio.org
Tue Jan 30 18:01:54 EST 2007


Update of /home/repository/bioperl/bioperl-live/Bio/Annotation
In directory dev.open-bio.org:/tmp/cvs-serv3692

Modified Files:
	SimpleValue.pm 
Log Message:
provide fallback of operator overloading


Index: SimpleValue.pm
===================================================================
RCS file: /home/repository/bioperl/bioperl-live/Bio/Annotation/SimpleValue.pm,v
retrieving revision 1.21
retrieving revision 1.22
diff -C2 -d -r1.21 -r1.22
*** SimpleValue.pm	26 Sep 2006 22:03:05 -0000	1.21
--- SimpleValue.pm	30 Jan 2007 23:01:52 -0000	1.22
***************
*** 63,68 ****
  package Bio::Annotation::SimpleValue;
  use strict;
! use overload '""' => sub { $_[0]->value};
! use overload 'eq' => sub { "$_[0]" eq "$_[1]" };
  
  # Object preamble - inherits from Bio::Root::Root
--- 63,72 ----
  package Bio::Annotation::SimpleValue;
  use strict;
! 
! use overload
!   '""' => sub { $_[0]->value},
!   'eq' => sub { "$_[0]" eq "$_[1]" },
!   fallback => 1
!   ;
  
  # Object preamble - inherits from Bio::Root::Root



More information about the Bioperl-guts-l mailing list