view release on metacpan or search on metacpan
lib/Directory/Scanner.pm view on Meta::CPAN
->match(sub { $_->is_dir });
# ignore anything that is a . directory, then recurse
my $stream = Directory::Scanner->for( $dir )
->ignore(sub { $_->basename =~ /^\./ })
->recurse;
=head1 DESCRIPTION
This module provides a streaming interface for traversing directories.
Unlike most modules that provide similar capabilities, this will not
pre-fetch the list of files or directories, but instead will only focus
on one thing at a time. This is useful if you have a large directory tree
and need to do a lot of resource intensive work on each file.
=head2 Builders
This module uses the builder pattern to create the L<Directory::Scanner>
stream you need. If you look in the L<SYNOPSIS> above you can see that
the C<for> method starts the creation of a builder. All the susequent
lib/Directory/Scanner/Stream/Application.pm view on Meta::CPAN
package Directory::Scanner::Stream::Application;
# ABSTRACT: Apply function to streaming directory iterator
use strict;
use warnings;
use Carp ();
use Scalar::Util ();
our $VERSION = '0.04';
our $AUTHORITY = 'cpan:STEVAN';
lib/Directory/Scanner/Stream/Application.pm view on Meta::CPAN
}
1;
__END__
=pod
=head1 NAME
Directory::Scanner::Stream::Application - Apply function to streaming directory iterator
=head1 VERSION
version 0.04
=head1 DESCRIPTION
This is provides a stream that will apply a function to each item
using the given C<function> CODE ref.
lib/Directory/Scanner/Stream/Concat.pm view on Meta::CPAN
package Directory::Scanner::Stream::Concat;
# ABSTRACT: Connect streaming directory iterators
use strict;
use warnings;
use Carp ();
use Scalar::Util ();
our $VERSION = '0.04';
our $AUTHORITY = 'cpan:STEVAN';
lib/Directory/Scanner/Stream/Concat.pm view on Meta::CPAN
}
1;
__END__
=pod
=head1 NAME
Directory::Scanner::Stream::Concat - Connect streaming directory iterators
=head1 VERSION
version 0.04
=head1 DESCRIPTION
Given multiple streams, this will concat them together one
after another.
lib/Directory/Scanner/Stream/Ignoring.pm view on Meta::CPAN
package Directory::Scanner::Stream::Ignoring;
# ABSTRACT: Ignoring files in the streaming directory iterator
use strict;
use warnings;
use Carp ();
use Scalar::Util ();
our $VERSION = '0.04';
our $AUTHORITY = 'cpan:STEVAN';
lib/Directory/Scanner/Stream/Ignoring.pm view on Meta::CPAN
}
1;
__END__
=pod
=head1 NAME
Directory::Scanner::Stream::Ignoring - Ignoring files in the streaming directory iterator
=head1 VERSION
version 0.04
=head1 DESCRIPTION
This is provides a stream that will ignore any item for which the
given a C<filter> CODE ref returns true.
lib/Directory/Scanner/Stream/Matching.pm view on Meta::CPAN
package Directory::Scanner::Stream::Matching;
# ABSTRACT: Filtered streaming directory iterator
use strict;
use warnings;
use Carp ();
use Scalar::Util ();
our $VERSION = '0.04';
our $AUTHORITY = 'cpan:STEVAN';
lib/Directory/Scanner/Stream/Matching.pm view on Meta::CPAN
}
1;
__END__
=pod
=head1 NAME
Directory::Scanner::Stream::Matching - Filtered streaming directory iterator
=head1 VERSION
version 0.04
=head1 DESCRIPTION
This is provides a stream that will retain any item for which the
given a C<predicate> CODE ref returns true.
lib/Directory/Scanner/Stream/Recursive.pm view on Meta::CPAN
package Directory::Scanner::Stream::Recursive;
# ABSTRACT: Recrusive streaming directory iterator
use strict;
use warnings;
use Carp ();
use Scalar::Util ();
our $VERSION = '0.04';
our $AUTHORITY = 'cpan:STEVAN';
lib/Directory/Scanner/Stream/Recursive.pm view on Meta::CPAN
}
1;
__END__
=pod
=head1 NAME
Directory::Scanner::Stream::Recursive - Recrusive streaming directory iterator
=head1 VERSION
version 0.04
=head1 DESCRIPTION
This is provides a stream that will traverse all encountered
sub-directories.
lib/Directory/Scanner/Stream/Transformer.pm view on Meta::CPAN
package Directory::Scanner::Stream::Transformer;
# ABSTRACT: Fmap a streaming directory iterator
use strict;
use warnings;
use Carp ();
use Scalar::Util ();
our $VERSION = '0.04';
our $AUTHORITY = 'cpan:STEVAN';
lib/Directory/Scanner/Stream/Transformer.pm view on Meta::CPAN
}
1;
__END__
=pod
=head1 NAME
Directory::Scanner::Stream::Transformer - Fmap a streaming directory iterator
=head1 VERSION
version 0.04
=head1 DESCRIPTION
This is provides a stream that will transform each item using the
given C<transformer> CODE ref.