|Subject:||->parent should stop at root|
The following will never end: my $dir = dir(cwd); print $dir while $dir = $dir->parent; The problem is that dir("")->parent returns the root directory again. Whether or not that's technically correct, if the root really is its own parent, its not very useful and makes recursing up the call path require checking if your parent is yourself. print $dir while $dir ne $dir->parent and $dir = $dir->parent; The documentation of parent() and the example given contradict each other. The docs say "it really means we just chop off entries from the end of the directory list until we can't chop no more" but the example shows it repeating the root directory. I think parent() stopping at root has a lot more practical utility than it not. Agreed?