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:
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...#!/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;
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()
In reply to Re^3: File::System recursion
by mpeever
in thread File::System recursion
by koaps
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |