OK, I think I understand a little better what you were trying to accomplish.
This seems to correctly return all the files in the File::System in a hash of hashes:
#!/usr/bin/perl
use strict;
use Data::Dumper;
use File::Find;
use File::System;
my $root = File::System->new( "Real", root => '/etc' );
my %files = map {
my $file = $_;
my %attrs = map { $_ => $file->get_property($_); } ( $_->propertie
+s() );
$file => \%attrs;
} $root->find( sub { 1 }, () );
print Dumper \%files;
I realise that doesn't completely do what you want, but it seems to at least get the complete file tree back, without empty hashes...
To be perfectly honest, I generally use File::Find out of a sense of guilt: I really prefer the interface from File::System::Object $obj -> find()
|