Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re: Best practice for a module which can use one of multiple image modules

by Your Mother (Bishop)
on Aug 17, 2019 at 12:44 UTC ( #11104618=note: print w/replies, xml ) Need Help??


in reply to Best practice for a module which can use one of multiple image modules

Along with what jcb suggested depending on what you're actually doing; a combination of Image::EXIF and PDL might cover what you want.

On the actual question. I think the best practice for this kind of situation is to create a set of platform targeted binaries or build packages which is really a lot of work and not Perly. If the code is targeted at developers, an interactive installation is fair where the user chooses the backend—defaults need to be there for automated testing—or to install dependencies.

I would say the average Perl installation does not have Image::Magick or GD::Image. Both are non-core and both can be a pain to build. If you have enough fall backs like Imager or the combination suggested above or some minimal pure Perl stuff you can package with your code then Corion’s suggestion starts to look quite sensible.

It all sounds like a lot of work for the problem though. I would gravitate towards the minimum pure Perl with dependencies included in the distribution if portability is the real concern.

  • Comment on Re: Best practice for a module which can use one of multiple image modules

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://11104618]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others surveying the Monastery: (4)
As of 2019-11-13 22:35 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Strict and warnings: which comes first?



    Results (74 votes). Check out past polls.

    Notices?