Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

Hi Monks
Simple question for you, but it's driving me crazy here.
I have to link my program to use ImageMagick and it is installed in /usr/ports/graphics/ImageMagick.
How can I use it on my program, I tried something like:

use usr::ports::graphics::ImageMagick;
and
use usr/ports/graphics/ImageMagick;

I know it's not right, but I can't think of another way.
Thanks for the help!

Replies are listed 'Best First'.
Re: External Perl Module
by chargrill (Parson) on May 19, 2006 at 21:15 UTC

    Actually, you don't have ImageMagick installed. Additionally, your hosting provider is using some BSD, I would assume FreeBSD. All that is contained in /usr/ports/graphics/ImageMagick are package description files and a Makefile. You should kindly ask your hosting company to do the following:

    cd /usr/ports/graphics/ImageMagick make sudo make install

    After that, you'll need to either install the perl ImageMagick module from cpan in your own directory, or ask your hosting provider to install it for the whole server.



    --chargrill
    $,=42;for(34,0,-3,9,-11,11,-17,7,-5){$*.=pack'c'=>$,+=$_}for(reverse s +plit//=>$* ){$%++?$ %%2?push@C,$_,$":push@c,$_,$":(push@C,$_,$")&&push@c,$"}$C[$# +C]=$/;($#C >$#c)?($ c=\@C)&&($ C=\@c):($ c=\@c)&&($C=\@C);$%=$|;for(@$c){print$_^ +$$C[$%++]}
Re: External Perl Module
by jhourcle (Prior) on May 19, 2006 at 19:10 UTC
      To expand on the above post, how did you go about installing Image::Magick? If installed properly inside that directory, you might be able to use it via:
      use lib '/usr/ports/graphics';

      ---
      It's all fine and dandy until someone has to look at the code.
        The people at the hosting company did.
Re: External Perl Module
by rhesa (Vicar) on May 19, 2006 at 20:03 UTC
    how about use Image::Magick; ?