As I read the POD loop_safe detects and neutralizes them, but does it silently. That's a shame when detection is what you want.
There's probably some relatively easy way to do this with %seen context but it's not entirely obvious and it's hard enough that Claude's first cut at it (which used private _seen) was completely wrong and would obviously fire on DAG, and it then suggested stat every ancestor to detect back edges, ug.
GNU find prints warning but it doesn't identify the actual guilty backlink and it wasn't obvious to me how to identify it reliably from the warning it gives.
So right now I have my own Tarjan's strongly connected components implementation to find the actual guilty links, which seems like massive overkill given that many of the various find type thingies are doing something very close to what I want already anyway.
As I read the POD loop_safe detects and neutralizes them, but does it silently. That's a shame when detection is what you want.
There's probably some relatively easy way to do this with %seen context but it's not entirely obvious and it's hard enough that Claude's first cut at it (which used private _seen) was completely wrong and would obviously fire on DAG, and it then suggested stat every ancestor to detect back edges, ug.
GNU find prints warning but it doesn't identify the actual guilty backlink and it wasn't obvious to me how to identify it reliably from the warning it gives.
So right now I have my own Tarjan's strongly connected components implementation to find the actual guilty links, which seems like massive overkill given that many of the various find type thingies are doing something very close to what I want already anyway.