[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

Re: [MacPerl] Image::Size installation?



davistv@iac.net (Troy Davis, Mann Bukvic Gatch) writes:
}Hi,
}
}I'm trying to use the Image::Size pm, but I can't figure out how to get
}around the Makefile script since it looks like it is expecting a unix
}system. Has anyone installed this module before?

You don't get around the Makefile script.  They do expect that Perl modules
will only be installed on Unix systems.

Here are some things to look for when downloading a module from CPAN.  If
there are any files ending in .xs, forget it, since you'll need a C
compiler to install it.  As far as I know, only Matthias can properly make
shared libraries.  If all there are is one or more .pm files, put them into
the appropriate place by hand.  In this case (having just downloaded
Image-Size from CPAN), there's only a Size.pm, so put that in a folder
named Image somewhere in your MacPerl search path.  (You should probably
maintain at least one folder in your MacPerl search path outside of your
MacPerl folder, so you don't need to rescue modules you've added when a new
MacPerl comes out.)  Make sure it's a Macintosh text file, and not a Unix
text file, or MacPerl will choke.

Now you try it (I'm using the all.t in the t directory) and you find that
it complains about a module that it wants to Autoload that's not being
found.  On a Unix system, during the make process the file would be
Autosplit, and each individual routine below the __END__ would go in an
:auto:Image:Size:name.al file, with name replaced by the routine name (so
you would have gifsize.al, etc.)  But often you don't need to do that.  The
first thing to try is to find the __END__ line in Size.pm and simply
comment it out.  And, behold, all but one of the tests (that for the
included ppm file) work.  Mission almost accomplished.  I'll leave it to
you to start up the debugger and figure out why the ppm isn't working if
you want, but if you don't care about ppm, you're set.

The steps again: put Size.pm in a folder named Image in your MacPerl search
path.  Change it to Mac text, and edit it to comment out the __END__. Have
fun!


}
}Thanks,
}Troy Davis
}
}________________________
}Troy Davis, Webmaster
}Mann Bukvic Gatch Partners
}205 West 4th Street  Suite 1130
}Cincinnati, Ohio  45202
}USA       513.241.4444
}http://www.slipstream.com


---
Paul J. Schinder
NASA Goddard Space Flight Center
Code 693, Greenbelt, MD 20771
schinder@pjstoaster.pg.md.us