[Mapserver-users] Can't locate 'new' method of mapObj

Steve Lime steve.lime at dnr.state.mn.us
Mon Feb 17 16:18:29 PST 2003


Starting with 3.6.4 we starting using new versions of SWIG. As a result
any creation of objects must be prefaced with the module name. This
brings perl in line with all other languages.

So, $map = new mapObj(...);
becomes $map = new mapscript::mapObj(...);

Steve

>>> "krung" <krung at cad.go.th> 02/17/03 12:43 PM >>>
Hi all,

I compiled perl mapscript (mapserver 3.6.4) on RH7.2. When I ran a
simple script, it showed the error message below:

Can't locate object method 'new' via package 'mapObj' (Perhaps you
forgot to load 'mapObj'?) at ./testgis.pl line 4

# code
use mapscript;

$ENV{MS_ERRORFILE}="mapserver.log";
my $map = new mapObj("test.map")or die 'Couldn't open map file";
$img = $map->draw();
$img = saveImage("test.png",$mapscript::MS_PNG,1,1,1);
$img->free();
undef $map;

No error file created. What I did wrong? Any special to compile
mapserver-3.6.4 than mapserver-3.6.3.

Thank you in advance,

Krung.

_______________________________________________
Mapserver-users mailing list
Mapserver-users at lists.gis.umn.edu
http://lists.gis.umn.edu/mailman/listinfo/mapserver-users




More information about the MapServer-users mailing list