[Mapserver-users] Can't locate object method "TIEHASH"
Eric Bridger
eric at gomoos.org
Fri May 28 05:38:02 PDT 2004
On Fri, 2004-05-28 at 05:54, Agneta Schick wrote:
> Hello mapserver-users,
>
> I've searched the mail archive and found 2 messages on this topic,
> both were, however, unanswered.
>
> So I'll try again...
>
> Platform:
> MapServer 4.0.1
> solaris 9
> Perl 5.8.3
>
> I want to test an application querying shape files.
> My perl mapscript code
> ...
> $layer->queryByPoint($tmp_map,$pnt,$mapscript::MS_SINGLE,1000);
> my $res = $layer->getResult(0);
> $layer->open();
> my $shape=new mapscript::shapeObj($layer->{type});
> my $shape_index = $layer->getShape($shape,-1,$res->{shapeindex});
> my $table =
> mapscript::msDBFOpen("/space/b3sn13/webdb/htdocs/ermos/data/usgs.dbf","r+");
> ....
> is terminated with
> Can't locate object method "TIEHASH" via package "_DBFHandle".
>
> Is this a mapscript problem or is something missing in the installation?
>
> (I tried the same perl script on solaris 8, mapserver 3.6.5, perl 5.6
> and got the same error).
This sounds familiar to me but I can't remember the details.
The solution is to not use mapscript's DBF functions. I've never gotten
them to work. Use some other dbase module. I use XBase.pm
http://search.cpan.org/~janpaz/DBD-XBase-0.241/lib/XBase.pm to do all
dbf access of shapefiles.
Eric
More information about the MapServer-users
mailing list