| jagerman | Zaba: If you're doing any array manipulation other than appending to the array, you'll need to switch to a C-style for loop |
| Juerd | Zaba: Will the array eventually be empty? |
| f00li5h | Zaba: iterate over a list of moudules to unload, you say |
| Zaba | Juerd, probably, if none of the modules will fail to unload |
| Juerd | Zaba: So not definitely always empty? |
| f00li5h | Zaba: now about having the module names as the argument list to a sub then you can unload each argument without changing the list |
| integral | P5NCI considered harmful, my gcc just needed >1200MB of VM |
| Zaba | hm.. |
| Juerd | Zaba: my @success; my @fail; while (@modules) { my $module = shift @modules; if (unload $module) { push @success, $module } else { push @fail, $module } } Gives you free counters and diagnostics too. |
| Monie | eval: my @success; my @fail; while (@modules) { my $module = shift @modules; if (unload $module) { push @success, $module } else { push @fail, $module } } |
| buubot | Monie: 0 |
| Juerd | Monie: @modules is initially empty in this example :) |
| Monie | ok. |
| jagerman | Are these Perl modules you're attempting to unload? |
| Juerd | Zaba: And if you need @modules to be @fail afterwards, @modules = @fail; is a great way to clearly document this. jagerman: Let's hope not :) |
| Zaba | hm Juerd, it dies at failture, so |
| f00li5h | push unload $module ? @success : @fail , $module ; |
| Juerd | Zaba: Then you can jush while over the loop, and not push things :) |
| f00li5h | deparse: sub unload; push unload $module ? @success : @fail , $module ; |
| Zaba | Juerd, though i still need to track loaded modules and hm |
| buubot | Killing 1357 due to run time |
| f00li5h | buubot: meow? |
| buubot | meow is the sound cats make |
| Juerd | f00li5h: Style depends on audience. |
| f00li5h | Juerd: and if you're evil or not >;) |
| rindolf | Hi octagon |
| Juerd | Zaba: If you unload all, and failure will lead to death, then the array will always be empty at the end if it ever reaches that, right? f00li5h: That too depends on audience. |
| f00li5h | anyway, no, i'm evil either way |
| Juerd | f00li5h: Even to your mom? |
| f00li5h | not really |
| rindolf | octagon: I went to the all-night caf yesterday's night. But they didn't have food - only drinks. octagon: so I went back home, ate some pasta and went to sleep. octagon: maybe today, I'll hit it earlier. |
| f00li5h | perhaps i can write some kind of apache handler to populate my templates |