[DAS] Bug (and fix) for Bio::Das

Lincoln Stein lstein at cshl.edu
Wed Jan 26 17:29:54 EST 2005


This is probably masking a problem that occurs somewhere else, but the 
correct workaround would be 

	my @dsn = ref $dsn && ref $dsn eq 'ARRAY' ? @$dsn : $dsn; 

Lincoln

On Tuesday 18 January 2005 11:50 pm, Vamsi Veeramachaneni wrote:
> Hi,
>
> There is a bug in Bio::Das.pm (v 1.36 2004/06/21 03:11:37 lstein)
>
> Script which shows the error:
>
> --------------------------------
> use Bio::Das;
> use strict;
>
> my $das = Bio::Das->new(-source =>
> 'http://servlet.sanger.ac.uk:8080/das/',
> 			-dsn => 'homo_sapiens_core_25_34e');
>
> my $segment = $das->segment("21");
> my @types = $segment->types;
>
> --------------------------------
>
> This dies with: "Not an ARRAY reference at Bio/Das.pm line 279"
>
> line 279 is: my @dsn = ref $dsn ? @$dsn : $dsn;
>
> At this point in the execution of my script $dsn is a Bio::Das::DSN
> object, so the ref operator returns true. But $dsn is not an array
> reference hence the error.
>
> Suggested modification (works for me):
>
> line 279 to: my @dsn = (ref($dsn) eq 'ARRAYREF') ? @$dsn : $dsn;
>
> Regards,
> Vamsi
>
> --
> Specialist - Bioinformatics
> Strand Genomics Pvt Ltd
> _______________________________________________
> DAS mailing list
> DAS at biodas.org
> http://biodas.org/mailman/listinfo/das

-- 
Lincoln D. Stein
Cold Spring Harbor Laboratory
1 Bungtown Road
Cold Spring Harbor, NY 11724

NOTE: Please copy Sandra Michelsen <michelse at cshl.edu> on
all emails regarding scheduling and other time-critical topics.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://portal.open-bio.org/pipermail/das/attachments/20050126/1197975e/attachment.bin


More information about the DAS mailing list