Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re: Sorting by dependencies

by tobyink (Abbot)
on Apr 27, 2013 at 19:07 UTC ( #1031004=note: print w/ replies, xml ) Need Help??


in reply to Sorting by dependencies

It's not a problem that is always solvable. Consider: @jobs = qw(A B) with rules "A after B" and "B after A".

package Cow { use Moo; has name => (is => 'lazy', default => sub { 'Mooington' }) } say Cow->new->name

Replies are listed 'Best First'.
Re^2: Sorting by dependencies
by Laurent_R (Abbot) on Apr 27, 2013 at 22:19 UTC

    I think that's what Rolf was talking about when he spoke about circular dependencies.

    You need to end up with (what we called in my IT studies, my translation into English might be faulty) a cycle-less oriented graph.

      In English and graph theory, they usually say "acyclic".
      لսႽ ᥲᥒ⚪⟊Ⴙᘓᖇ Ꮅᘓᖇ⎱ Ⴙᥲ𝇋ƙᘓᖇ

        In this case, the jargon "DAG" (directed acyclic graph) would be appropriate.

        package Cow { use Moo; has name => (is => 'lazy', default => sub { 'Mooington' }) } say Cow->new->name
        Thank you for the correction.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (4)
As of 2016-06-30 22:06 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My preferred method of making French fries (chips) is in a ...











    Results (404 votes). Check out past polls.