
IO::Dir::Recursive - IO::Dir working recursive

use IO::Dir::Recursive;
my $dh = IO::Dir::Recursive->new('.');
print "$_\n" while $dh->read();
tie my %dir, 'IO::Dir::Recursive', '.';
print $dir{subdir1}->{subdir2}->{file}->slurp();

IO::Dir::Recursive gives IO::Dir the ability to work recursive.

The following constans may be imported on request.
This constant can be passed as option to tie to strip out parent directories.
This is inherited from IO::Dir. Deleting an element from the hash will delete the corresponding file or subdirectory if this constant is passed as a tie option.

IO::Dir::Recursive inherits from IO::Dir and therefor inherits all its methods with the following exceptions.
my $item = $dh->read();
Reads the next item in $dh and returns the coresponding object for the item: an IO::Dir::Recursive instance for directories, an IO::All instance for files or undef if there are no other items left.
my $next = $dh->_read();
Same as read() above, but returns a string describing the next item instead of an object. Mainly for internal use, but maybe it's useful in some other places, too.


Florian Ragwitz, <flora@cpan.org>

Copyright (C) 2005 by Florian Ragwitz
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.7 or, at your option, any later version of Perl 5 you may have available.