[Mapserver-users] Re: mapscript/perl: Can't locate object method "new" via package "mapObj" [SOLVED]

Pedro Salazar pedro-b-salazar at ptinovacao.pt
Fri Feb 28 08:35:23 PST 2003


--=-RekHUCkWasJUV6CYUwOL
Content-Type: text/plain
Content-Transfer-Encoding: quoted-printable

Hi!

I already solved! I must use the package name:

my $map =3D new mapscript::mapObj('aveiro.map') or die('Unable to open
mapfile.');

thanks,
Pedro Salazar.

On Fri, 2003-02-28 at 16:28, Pedro Salazar wrote:
> Greetings,=20
>=20
> I'm trying to get in mapscript through perl, and I got this error:
> "
> Can't locate object method "new" via package "mapObj" (perhaps you
> forgot to load "mapObj"?) at ./script.pl line 7.
> "
>=20
> my perl script:
> "
> #!/usr/bin/perl -w
> use strict;
>=20
> use mapscript;
> #use Xbase;
>=20
> my $map =3D mapObj->new ('aveiro1.map') or die('Unable to open mapfile.')=
;
> my $img =3D $map->draw() or die('Unable to draw map');
> my $void =3D $img->saveImage('example.png', $mapscript::MS_PNG,
> $map->{transparent}, $map->{interlace}, 0);
> "
>=20
> Anyone has a clue about this? (it looks to be a simple issue)
>=20
> thanks,
> Pedro Salazar.
> --=20
> <id name=3D"pedro salazar">=20
> <email>pedro-b-salazar at ptinovacao.pt</email>
> <pgp-key-id>0E129E31D803BC61</pgp-key-id>
> </id>
--=20
<id name=3D"pedro salazar">=20
<email>pedro-b-salazar at ptinovacao.pt</email>
<pgp-key-id>0E129E31D803BC61</pgp-key-id>
</id>

--=-RekHUCkWasJUV6CYUwOL
Content-Type: application/pgp-signature; name=signature.asc
Content-Description: This is a digitally signed message part

-----BEGIN PGP SIGNATURE-----

iD8DBQA+X4/LDhKeMdgDvGERAqYtAJ9SO4tdwdUoTmBRuLDqvPeDT5fX4gCffnuJ
r+OX4fww1OLuLsbR2cMDbZo=
=U+bi
-----END PGP SIGNATURE-----

--=-RekHUCkWasJUV6CYUwOL--




More information about the MapServer-users mailing list