[mapserver-users] PERL MapScript

Kralidis,Tom [Ontario] Tom.Kralidis at ec.gc.ca
Tue May 19 19:57:42 EDT 2009


I get the same error when running mapObj->get("name").  I don't see any get() method in mapObj.  From my example, you should see a out2.xml file written to disk.

..Tom



-----Original Message-----
From: Christopher Condit [mailto:condit at sdsc.edu]
Sent: Tue 19-May-09 19:45
To: Kralidis,Tom [Ontario]; mapserver-users at lists.osgeo.org
Subject: RE: [mapserver-users] PERL MapScript
 
Hi Tom-
> What does your code look like?  The following works for me:
#!/usr/bin/perl
use mapscript;
use strict;

my $map = new mapscript::mapObj("test.map") or die "no map $!";
my $name = $map->get("name");
print $name;

> #!/usr/bin/perl
> 
> use strict;
> use warnings;
> use mapscript;
> 
> my $map = new mapscript::mapObj('test.map');
> $map->saveMapContext('out2.xml');

I also tried running your code. It doesn't generate an error but no
test.xml file is created...

Any thoughts?
Thanks,
-Chris





More information about the mapserver-users mailing list