in reply to CPAN Trojan Horses
The easy way to do optional dependencies is along these lines:
use constant HAS_LWP => eval "require LWP::UserAgent"; ...; update_cache() if HAS_LWP; my $data = read_cache();
In terms of META.yml/META.json, there is a facility to indicate optional dependencies, though I don't see it used very often.
|
|---|