Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re: Dependency Inference

by kvale (Monsignor)
on Jul 12, 2005 at 16:09 UTC ( [id://474307]=note: print w/replies, xml ) Need Help??


in reply to Dependency Inference

What you are describing is mathematically a directed graph and can be represented in Perl as a Graph object using the module Graph. That module also has a number of methods for processing graphs. For instance, one could do a topological sort to establish the hierarchy of dependencies.
use Graph::Directed; my $g = Graph::Directed->new; # A directed graph. $g->add_edge(...); $g->add_vertex(...); $g->vertices(...) $g->edges(...) my @ts = $g->topological_sort;

For modules in particular, check out Module::Dependency for useful methods.

-Mark

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others contemplating the Monastery: (6)
As of 2024-03-29 12:42 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found