[Bioperl-l] Can't call method "seek" without a package or object reference

Hilmar Lapp hilmarl@yahoo.com
Tue, 27 Feb 2001 12:00:48 -0800


So, perl gurus out there, what is wrong with this code?

In my perldoc seek is a 'normal' function that doesn't need a
package specified. Is this different in 5.004, or on Macs? Does
seek() in general work on Macs?

	Hilmar

-------- Original Message --------
Subject: [Bioperl-guts-l] Notification: incoming/907
Date: Mon, 26 Feb 2001 19:14:07 -0500
From: bioperl-bugs@bioperl.org
To: bioperl-guts-l@bioperl.org

JitterBug notification

new message incoming/907

Message summary for PR#907
	From: Todd Richmond <todd@andrew2.stanford.edu>
	Subject: Re: [Bioperl-guts-l] Notification: incoming/897
	Date: Mon, 26 Feb 2001 16:14:08 -0800
	0 replies 	0 followups

====> ORIGINAL MESSAGE FOLLOWS <====

>From todd@andrew2.stanford.edu Mon Feb 26 19:14:06 2001
Received: from smtp.Stanford.EDU (smtp.Stanford.EDU
[171.64.14.23])
	by pw600a.bioperl.org (8.11.2/8.11.2) with ESMTP id f1R0E5R25086
	for <bioperl-bugs@bioperl.org>; Mon, 26 Feb 2001 19:14:06 -0500
Received: from [171.66.248.142] (cellwall.Stanford.EDU
[171.66.248.142])
	by smtp.Stanford.EDU (8.11.1/8.11.1) with ESMTP id f1R0E8f21840
	for <bioperl-bugs@bioperl.org>; Mon, 26 Feb 2001 16:14:08 -0800
(PST)
User-Agent: Microsoft-Entourage/9.0.2509
Date: Mon, 26 Feb 2001 16:14:08 -0800
Subject: Re: [Bioperl-guts-l] Notification: incoming/897
From: Todd Richmond <todd@andrew2.stanford.edu>
To: <bioperl-bugs@bioperl.org>
Message-ID: <B6C03150.4699%todd@andrew2.stanford.edu>
In-Reply-To: <200102261930.f1QJUMR00546@pw600a.bioperl.org>
Mime-version: 1.0
Content-type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-MIME-Autoconverted: from quoted-printable to 8bit by
pw600a.bioperl.org id f1R0E5R25086

On 2/26/01 11:30 AM, "bioperl-bugs@bioperl.org"
<bioperl-bugs@bioperl.org>
wrote:
> hilmar changed notes
> 
> Message summary for PR#897
> Notes: This is due to IO::File not working. Fixed. Waiting for Todd to
> approve.
> 
> Test output:
> 
> 1..19
> ok 1
> # Can't call method "seek" on unblessed reference.
> File 'Cellwall:Applications (Mac OS 9):MacPerl
> Y:site_perl:Bio:Seq:LargePrimarySeq.pm'; Line 195
> 
> 
> Traces back to tempfile creation?
> 

This is still not working. While the temp directory and the temp
file are
being created, nothing is being added to the file.

in this method:

sub add_sequence_as_string{
   my ($self,$str) = @_;
   my $len = $self->length + CORE::length($str);
   my $fh = $self->_fh();
   ref($fh) eq 'GLOB' ? seek($fh,0,2) : $fh->seek(0,2);
   $self->_print($str);
   $self->length($len);
}

ref($fh) is a GLOB, but the seek on the filehandle fails:

# Can't call method "seek" without a package or object reference.
File 'Cellwall:Applications (Mac OS 9):MacPerl
Y:site_perl:Bio:Seq:LargePrimarySeq.pm'; Line 200



-- 
Dr Todd Richmond                 http://cellwall.stanford.edu/todd
Carnegie Institution             email: todd@andrew2.stanford.edu
Department of Plant Biology      fax: 1-650-325-6857
260 Panama Street                phone: 1-650-325-1521 x431
Stanford, CA 94305


_______________________________________________
Bioperl-guts-l mailing list
Bioperl-guts-l@bioperl.org
http://bioperl.org/mailman/listinfo/bioperl-guts-l