in reply to How can one determine context within FETCH?
Even if you can figure out how to get the behavior you want (which, IMHO, is counter-intuitive) using a tied interface is still going to limit you to the point where you will probably eventually turn it into an object interface anyway. That being said, it sounds like you are reinventing Path::Class, so you might want to take a look at that...
use Path::Class qw( dir file ); my $root = dir( '/' ); my $spool = $root->subdir( 'var', 'spool' ); my $line = ($spool->slurp)[0]; my @names = $spool->children;
| We're not surrounded, we're in a target-rich environment! |
|---|
|
|---|