[Mapserver-users] Perl 5.8 and MS 3.7 (yet another time...)

Gerry Creager N5JXS gerry.creager at tamu.edu
Tue Apr 22 09:45:38 EDT 2003


I've been playing again, and gotten further in my quest than the last 
several episodes.  Specifically, I'm using RH9.0, MS 3.7's nightly build 
installed last Saturday, and Perl 5.8.  So far, any missing perl modules 
have been pretty easy to deal with.  Database is PostGres 7.3.2, 
installed with the OS via RPM.

I've got a perl script that calls mapscript.pm, with the object of the 
exercise to create a shapefile from the database.  I've ascertained that 
the db call returns a reasonable array of data, correctly populated.

The problem arises when I try to use a point function, calling 
mapscriptc::new_pointObj() to initialize the hash.  Here's what I've got 
as a code snippet:

     my $shape = mapscriptc::new_shapeObj($mapscriptc::MS_SHAPE_LINE);
     my $line = mapscriptc::new_lineObj();
     my $point = mapscriptc::new_pointObj();

     $lineNumber++;

     $point->{x} = $lon;
     $point->{y} = $lat;
     $line->add( $point );
     $shape->add( $line );
     $shapeFile->add( $shape );

I get the following error:
	Not a HASH reference at ./makeshapefile.pl line 187.

Line 187 is:
       $point->{x} = $lon;
and I'm assuming, if it got that far, that I'd see the same thing at the 
next line.

Are there any benevolent perl/mapscript guru's out there who can help?

TIA, Gerry
-- 
Gerry Creager -- gerry.creager at tamu.edu
Network Engineering -- AATLT, Texas A&M University	
Cell: 979.229.5301 Office: 979.458.4020 FAX: 979.847.8578
Page: 979.228.0173
Office: 903A Eller Bldg, TAMU, College Station, TX 77843




More information about the mapserver-users mailing list