r41078 - in /branches/upstream/libfile-next-perl/current: Changes MANIFEST META.yml Makefile.PL Next.pm t/dot.t t/everything.t t/methods.t
ansgar-guest at users.alioth.debian.org
ansgar-guest at users.alioth.debian.org
Sat Aug 1 12:27:36 UTC 2009
Author: ansgar-guest
Date: Sat Aug 1 12:27:29 2009
New Revision: 41078
URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=41078
Log:
[svn-upgrade] Integrating new upstream version, libfile-next-perl (1.04)
Added:
branches/upstream/libfile-next-perl/current/t/methods.t
Modified:
branches/upstream/libfile-next-perl/current/Changes
branches/upstream/libfile-next-perl/current/MANIFEST
branches/upstream/libfile-next-perl/current/META.yml
branches/upstream/libfile-next-perl/current/Makefile.PL
branches/upstream/libfile-next-perl/current/Next.pm
branches/upstream/libfile-next-perl/current/t/dot.t
branches/upstream/libfile-next-perl/current/t/everything.t
Modified: branches/upstream/libfile-next-perl/current/Changes
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libfile-next-perl/current/Changes?rev=41078&op=diff
==============================================================================
--- branches/upstream/libfile-next-perl/current/Changes (original)
+++ branches/upstream/libfile-next-perl/current/Changes Sat Aug 1 12:27:29 2009
@@ -1,8 +1,23 @@
Revision history for File-Next
-Please note that as of version 1.02, File::Next no longer uses
-rt.cpan.org for bug tracking. Please report problems at
-http://code.google.com/p/file-next/.
+File::Next does NOT use rt.cpan.org for bug tracking. Please report
+problems at http://github.com/petdance/file-next/issues.
+
+1.04 Fri Jul 31 16:24:36 CDT 2009
+ [ENHANCEMENTS]
+ It's never been correct to call File::Next::files() as a method,
+ as File::Next->files(). Now, if you do, files() will die with
+ an error. This is also the case with dirs() and everything().
+ Thanks to Eric Lyons for reporting.
+
+ Tiny directory reading speedups.
+
+ [DOCUMENTATION]
+ Updated URLs for support sites.
+
+ Added a little note about the follow_symlinks=>0 being a speed
+ hit.
+
1.02 Mon Jan 14 14:01:40 CST 2008
[SPEED ENHANCEMENTS]
Modified: branches/upstream/libfile-next-perl/current/MANIFEST
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libfile-next-perl/current/MANIFEST?rev=41078&op=diff
==============================================================================
--- branches/upstream/libfile-next-perl/current/MANIFEST (original)
+++ branches/upstream/libfile-next-perl/current/MANIFEST Sat Aug 1 12:27:29 2009
@@ -12,6 +12,7 @@
t/dot.t
t/everything.t
t/follow.t
+t/methods.t
t/parms.t
t/pod-coverage.t
t/pod.t
Modified: branches/upstream/libfile-next-perl/current/META.yml
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libfile-next-perl/current/META.yml?rev=41078&op=diff
==============================================================================
--- branches/upstream/libfile-next-perl/current/META.yml (original)
+++ branches/upstream/libfile-next-perl/current/META.yml Sat Aug 1 12:27:29 2009
@@ -1,19 +1,27 @@
--- #YAML:1.0
-name: File-Next
-version: 1.02
-abstract: File-finding iterator
-license: ~
-author:
+name: File-Next
+version: 1.04
+abstract: File-finding iterator
+author:
- Andy Lester <andy at petdance.com>
-generated_by: ExtUtils::MakeMaker version 6.42
-distribution_type: module
-requires:
- File::Spec: 0
- Test::More: 0
+license: perl
+distribution_type: module
+configure_requires:
+ ExtUtils::MakeMaker: 0
+build_requires:
+ ExtUtils::MakeMaker: 0
+requires:
+ File::Spec: 0
+ Test::More: 0
+resources:
+ bugtracker: http://github.com/petdance/file-next/issues
+ license: http://dev.perl.org/licenses/
+ repository: http://github.com/petdance/file-next/tree/master
+no_index:
+ directory:
+ - t
+ - inc
+generated_by: ExtUtils::MakeMaker version 6.50
meta-spec:
- url: http://module-build.sourceforge.net/META-spec-v1.3.html
- version: 1.3
-resources:
- bugtracker: http://code.google.com/p/file-next/issues/list
- license: http://dev.perl.org/licenses/
- Repository: http://code.google.com/p/file-next/source
+ url: http://module-build.sourceforge.net/META-spec-v1.4.html
+ version: 1.4
Modified: branches/upstream/libfile-next-perl/current/Makefile.PL
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libfile-next-perl/current/Makefile.PL?rev=41078&op=diff
==============================================================================
--- branches/upstream/libfile-next-perl/current/Makefile.PL (original)
+++ branches/upstream/libfile-next-perl/current/Makefile.PL Sat Aug 1 12:27:29 2009
@@ -1,4 +1,7 @@
package main;
+
+use 5.006001;
+
use strict;
use warnings;
use ExtUtils::MakeMaker;
@@ -17,14 +20,19 @@
clean => { FILES => 'File-Next-*' },
);
-if ( $ExtUtils::MakeMaker::VERSION ge '6.36' ) {
- $parms{EXTRA_META} = <<EOF;
-resources:
- bugtracker: http://code.google.com/p/file-next/issues/list
- license: http://dev.perl.org/licenses/
- Repository: http://code.google.com/p/file-next/source
-EOF
- }
+if ( $ExtUtils::MakeMaker::VERSION =~ /^\d\.\d\d$/ and $ExtUtils::MakeMaker::VERSION > 6.30 ) {
+ $parms{LICENSE} = 'perl';
+}
+
+if ( $ExtUtils::MakeMaker::VERSION ge '6.46' ) {
+ $parms{META_MERGE} = {
+ resources => {
+ bugtracker => 'http://github.com/petdance/file-next/issues',
+ repository => 'http://github.com/petdance/file-next/tree/master',
+ license => 'http://dev.perl.org/licenses/',
+ }
+ };
+}
WriteMakefile( %parms );
@@ -32,16 +40,26 @@
return <<'MAKE_FRAG';
.PHONY: tags critic
+tags:
+ ctags -f tags --recurse --totals \
+ --exclude=blib \
+ --exclude=.git \
+ --exclude=.svn \
+ --exclude='*~' \
+ --languages=Perl --langmap=Perl:+.t \
+
critic:
perlcritic -profile perlcriticrc -1 -quiet *.pm t/*.t
+TARGET_DIRS=~/parrot /usr/local/minicpan ~/bin
+
prof: all
- perl -d:DProf -Mblib ./stress ~/parrot ~/bw/trunk ~/p101 ~/bin /Developer > /dev/null
+ perl -d:DProf -Mblib ./stress $(TARGET_DIRS)
dprofpp -R
-smallprof: all
- perl -d:SmallProf -Mblib ./stress ~/parrot ~/bw/trunk ~/p101 ~/bin /Developer > /dev/null
- sort -k 2nr,2 smallprof.out | less
+nytprof: all
+ perl -d:NYTProf -Mblib ./stress $(TARGET_DIRS)
+ nytprofhtml
MAKE_FRAG
}
Modified: branches/upstream/libfile-next-perl/current/Next.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libfile-next-perl/current/Next.pm?rev=41078&op=diff
==============================================================================
--- branches/upstream/libfile-next-perl/current/Next.pm (original)
+++ branches/upstream/libfile-next-perl/current/Next.pm Sat Aug 1 12:27:29 2009
@@ -9,11 +9,11 @@
=head1 VERSION
-Version 1.02
+Version 1.04
=cut
-our $VERSION = '1.02';
+our $VERSION = '1.04';
=head1 SYNOPSIS
@@ -193,6 +193,11 @@
Note that this filter does not apply to any of the I<@starting_points>
passed in to the constructor.
+
+You should not set C<< follow_symlinks => 0 >> unless you specifically
+need that behavior. Setting C<< follow_symlinks => 0 >> can be a
+speed hit, because File::Next must check to see if the file or
+directory you're about to follow is actually a symlink.
=cut
@@ -218,6 +223,8 @@
sub files {
+ ($_[0] eq __PACKAGE__) && die 'File::Next::files must not be invoked as File::Next->files';
+
my ($parms, at queue) = _setup( \%files_defaults, @_ );
my $filter = $parms->{file_filter};
@@ -244,6 +251,8 @@
sub dirs {
+ ($_[0] eq __PACKAGE__) && die 'File::Next::dirs must not be invoked as File::Next->dirs';
+
my ($parms, at queue) = _setup( \%files_defaults, @_ );
return sub {
@@ -261,6 +270,8 @@
sub everything {
+ ($_[0] eq __PACKAGE__) && die 'File::Next::everything must not be invoked as File::Next->everything';
+
my ($parms, at queue) = _setup( \%files_defaults, @_ );
my $filter = $parms->{file_filter};
@@ -379,8 +390,7 @@
my $follow_symlinks = $parms->{follow_symlinks};
my $sort_sub = $parms->{sort_files};
- while ( defined ( my $file = readdir $dh ) ) {
- next if $skip_dirs{$file};
+ for my $file ( grep { !exists $skip_dirs{$_} } readdir $dh ) {
my $has_stat;
# Only do directory checking if we have a descend_filter
@@ -413,6 +423,14 @@
return @newfiles;
}
+=head1 SPEED TWEAKS
+
+=over 4
+
+=item * Don't set C<< follow_symlinks => 0 >> unless you need it.
+
+=back
+
=head1 AUTHOR
Andy Lester, C<< <andy at petdance.com> >>
@@ -420,8 +438,9 @@
=head1 BUGS
Please report any bugs or feature requests to
-L<http://rt.cpan.org/NoAuth/Bugs.html?Dist=File-Next>. Note that
-File::Next does NOT use L<rt.cpan.org> for bug tracking.
+L<http://github.com/petdance/file-next/issues>.
+
+Note that File::Next does NOT use L<http://rt.cpan.org> for bug tracking.
=head1 SUPPORT
@@ -435,7 +454,7 @@
=item * File::Next's bug queue
-L<http://code.google.com/p/file-next/issues/list>
+L<http://github.com/petdance/file-next/issues>
=item * AnnoCPAN: Annotated CPAN documentation
@@ -449,9 +468,9 @@
L<http://search.cpan.org/dist/File-Next>
-=item * Subversion repository
-
-L<https://file-next.googlecode.com/svn/trunk>
+=item * Source code repository
+
+L<http://github.com/petdance/file-next/tree/master>
=back
@@ -462,11 +481,20 @@
=head1 COPYRIGHT & LICENSE
-Copyright 2006-2008 Andy Lester, all rights reserved.
-
-This program is free software; you can redistribute it and/or modify it
-under the same terms as Perl itself.
-
-=cut
+Copyright 2005-2009 Andy Lester.
+
+This program is free software; you can redistribute it and/or modify
+it under the terms of either:
+
+=over 4
+
+=item * the GNU General Public License as published by the Free
+Software Foundation; either version 1, or (at your option) any later
+version, or
+
+=item * the Artistic License version 2.0.
+
+=back
+
1; # End of File::Next
Modified: branches/upstream/libfile-next-perl/current/t/dot.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libfile-next-perl/current/t/dot.t?rev=41078&op=diff
==============================================================================
--- branches/upstream/libfile-next-perl/current/t/dot.t (original)
+++ branches/upstream/libfile-next-perl/current/t/dot.t Sat Aug 1 12:27:29 2009
@@ -26,6 +26,7 @@
dot.t
everything.t
follow.t
+ methods.t
parms.t
pod-coverage.t
pod.t
Modified: branches/upstream/libfile-next-perl/current/t/everything.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libfile-next-perl/current/t/everything.t?rev=41078&op=diff
==============================================================================
--- branches/upstream/libfile-next-perl/current/t/everything.t (original)
+++ branches/upstream/libfile-next-perl/current/t/everything.t Sat Aug 1 12:27:29 2009
@@ -26,6 +26,7 @@
t/dot.t
t/everything.t
t/follow.t
+ t/methods.t
t/parms.t
t/pod-coverage.t
t/pod.t
Added: branches/upstream/libfile-next-perl/current/t/methods.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libfile-next-perl/current/t/methods.t?rev=41078&op=file
==============================================================================
--- branches/upstream/libfile-next-perl/current/t/methods.t (added)
+++ branches/upstream/libfile-next-perl/current/t/methods.t Sat Aug 1 12:27:29 2009
@@ -1,0 +1,53 @@
+#!perl -T
+
+use strict;
+use warnings;
+use Test::More tests => 7;
+
+use lib 't';
+use Util;
+
+BEGIN {
+ use_ok( 'File::Next' );
+}
+
+EVERYTHING: {
+ my $iter;
+ my $rc = eval {
+ $iter = File::Next->everything( 't/' );
+ };
+ ok( !defined($rc), 'Calling everything as method should fail' );
+
+ $rc = eval {
+ $iter = File::Next::everything( 't/' );
+ };
+ ok( defined($rc), 'Calling everything as function should pass' );
+}
+
+
+FILES: {
+ my $iter;
+ my $rc = eval {
+ $iter = File::Next->files( 't/' );
+ };
+ ok( !defined($rc), 'Calling files as method should fail' );
+
+ $rc = eval {
+ $iter = File::Next::files( 't/' );
+ };
+ ok( defined($rc), 'Calling files as function should pass' );
+}
+
+DIRS: {
+ my $iter;
+ my $rc = eval {
+ $iter = File::Next->dirs( 't/' );
+ };
+ ok( !defined($rc), 'Calling dirs as method should fail' );
+
+ $rc = eval {
+ $iter = File::Next::dirs( 't/' );
+ };
+ ok( defined($rc), 'Calling dirs as function should pass' );
+}
+
More information about the Pkg-perl-cvs-commits
mailing list