XP is just a number | |
PerlMonks |
Re: Task scheduling using perlby radiantmatrix (Parson) |
on Aug 18, 2005 at 16:39 UTC ( [id://484867]=note: print w/replies, xml ) | Need Help?? |
Your problem is stated sort of oddly, and your test data has circular dependencies, which I decided to treat as an error. I put new test data in my __DATA__ block after verifying that circular dependencies are found correctly by this code. I also took the liberty of creating a task entry for tasks that are not in the left column, but are a dependency (e.g. Task4 and Task6 in the sample data). This is a little messy, but should illustrate the type of approach you have to use.
This results in the following output:
The levels are tracked, so you can see that the dependency tree is navigated, only executing tasks once the dependencies have run.
<-radiant.matrix->
Larry Wall is Yoda: there is no try{} (ok, except in Perl6; way to ruin a joke, Larry! ;P) The Code that can be seen is not the true Code "In any sufficiently large group of people, most are idiots" - Kaa's Law
In Section
Seekers of Perl Wisdom
|
|