in reply to Re^3: Tie::Filesystem - request for review
in thread Tie::Filesystem - request for review
The reason that, say, $fs{etc}->{passwd} == '/etc/passwd' currently is because the downside of this interfece is that it is difficult to get the full pathname without walking back up the tree. Having the full path name gives the programmer flexibilty and keeps the thing light.
What about this: an optional argument to the tie is a closure. This closure takes the full path to a file, and returns some arbitrary scalar - a filehandle ref, the leafname, a Tie::File array ref, whatever. How's that sound?
Light a man a fire, he's warm for a day. Catch a man on fire, and he's warm for the rest of his life. - Terry Pratchet
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^5: Tie::Filesystem - request for review
by jepri (Parson) on Jun 24, 2004 at 00:56 UTC |