in reply to use: distinguishing compile-time vs run-time dependencies
Specifically, a compile-time dependency is a module which needs to be loaded in order for a compile-check to work. A run-time dependency is one that only required to be loaded at run time.That isn't very different than solving the halting problem, isn't it? Suppose a module "Dependency::Checker" exists, which exports a subroutine runtime_dependency that does what it says:
What will happen?package Foo; use Dependency::Checker 'runtime_dependency'; use LWP::UserAgent; sub make_agent {LWP::UserAgent->new} BEGIN { make_agent() if runtime_dependency("LWP::UserAgent"); } 1;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: use: distinguishing compile-time vs run-time dependencies
by perl5ever (Pilgrim) on Aug 08, 2011 at 16:29 UTC | |
by JavaFan (Canon) on Aug 08, 2011 at 16:44 UTC |