[InterMine Dev] Item.pm Update Suggestion

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

[InterMine Dev] Item.pm Update Suggestion

Vallejos, Andrew

I just found a “bug” in Item.pm.  Setting a value to ‘0’ caused the as_xml subroutine to die at line 461.  I made the following change and my script ran to completion.  I have not fully tested the below fix, but it seems reasonable to me.  

 

Line #461

Original:

die unless $val;  #causes script to die if $val == 0

 

Update

die unless defined $val; #causes script to die if $val == undef

 

-Andrew

 

======================

Andrew Vallejos

Web Developer II

Biotechnology and Bioengineering Center

Medical College of Wisconsin

414-955-4104

[hidden email]

 


_______________________________________________
dev mailing list
[hidden email]
http://mail.intermine.org/cgi-bin/mailman/listinfo/dev
Reply | Threaded
Open this post in threaded view
|

Re: [InterMine Dev] Item.pm Update Suggestion

Richard Smith
Hi Andrew,
Thanks!  I've checked in the fix to be included in the next release.

Richard.



Vallejos, Andrew wrote:

> I just found a "bug" in Item.pm.  Setting a value to '0' caused the
> as_xml subroutine to die at line 461.  I made the following change and
> my script ran to completion.  I have not fully tested the below fix, but
> it seems reasonable to me.  
>
>  
>
> Line #461
>
> Original:
>
> die unless $val;  #causes script to die if $val == 0
>
>  
>
> Update
>
> die unless defined $val; #causes script to die if $val == undef
>
>  
>
> -Andrew
>
>  
>
> ======================
>
> Andrew Vallejos
>
> Web Developer II
>
> Biotechnology and Bioengineering Center
>
> Medical College of Wisconsin
>
> 414-955-4104
>
> [hidden email]
>
>  
>
>
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> dev mailing list
> [hidden email]
> http://mail.intermine.org/cgi-bin/mailman/listinfo/dev


_______________________________________________
dev mailing list
[hidden email]
http://mail.intermine.org/cgi-bin/mailman/listinfo/dev