### ImageMagick version

7 git e716f9e16e6

### Operating system

Linux

### Operating system, version and so on

Debian sid

### Description

When configuring the imagemagick source, the `--prefix` option allows for specifying a custom installation prefix. The installation of the perl module doesn't use this, though, and installs to `/usr/local` regardless.

I will submit a best-guess PR to fix this (I'm not really familiar with perl module building).

Thanks,
Corey

### Steps to Reproduce

```
./configure --with-perl --prefix=/tmp/magick
make -j16 # or whatever suits your CPU
make install 2>&1 | grep -E '^Installing /usr/local/'
```

The last command gives output:
```
Installing /usr/local/lib/x86_64-linux-gnu/perl/5.38.2/auto/Image/Magick/Magick.so
Installing /usr/local/lib/x86_64-linux-gnu/perl/5.38.2/auto/Image/Magick/Q16HDRI/Q16HDRI.so
Installing /usr/local/lib/x86_64-linux-gnu/perl/5.38.2/Image/Magick.pm
Installing /usr/local/lib/x86_64-linux-gnu/perl/5.38.2/Image/Magick/Q16HDRI.pm
Installing /usr/local/lib/x86_64-linux-gnu/perl/5.38.2/auto/Image/Magick/Q16HDRI/autosplit.ix
Installing /usr/local/man/man3/Image::Magick.3pm
Installing /usr/local/man/man3/Image::Magick::Q16HDRI.3pm
```
Note: If the files are already installed in `/usr/local`, nothing will be printed; to reproduce the message, remove those files first.

### Images

_No response_
perl module installation does not respect --prefix option
This is a GitHub Issue
repo:ImageMagick
owner:ImageMagick
Title : perl module installation does not respect --prefix option
Issue date:

--- start body ---
### ImageMagick version

7 git e716f9e16e6

### Operating system

Linux

### Operating system, version and so on

Debian sid

### Description

When configuring the imagemagick source, the `--prefix` option allows for specifying a custom installation prefix. The installation of the perl module doesn't use this, though, and installs to `/usr/local` regardless.

I will submit a best-guess PR to fix this (I'm not really familiar with perl module building).

Thanks,
Corey

### Steps to Reproduce

```
./configure --with-perl --prefix=/tmp/magick
make -j16 # or whatever suits your CPU
make install 2>&1 | grep -E '^Installing /usr/local/'
```

The last command gives output:
```
Installing /usr/local/lib/x86_64-linux-gnu/perl/5.38.2/auto/Image/Magick/Magick.so
Installing /usr/local/lib/x86_64-linux-gnu/perl/5.38.2/auto/Image/Magick/Q16HDRI/Q16HDRI.so
Installing /usr/local/lib/x86_64-linux-gnu/perl/5.38.2/Image/Magick.pm
Installing /usr/local/lib/x86_64-linux-gnu/perl/5.38.2/Image/Magick/Q16HDRI.pm
Installing /usr/local/lib/x86_64-linux-gnu/perl/5.38.2/auto/Image/Magick/Q16HDRI/autosplit.ix
Installing /usr/local/man/man3/Image::Magick.3pm
Installing /usr/local/man/man3/Image::Magick::Q16HDRI.3pm
```
Note: If the files are already installed in `/usr/local`, nothing will be printed; to reproduce the message, remove those files first.

### Images

_No response_
--- end body ---
