r12912 - in /branches/upstream/libfile-next-perl/current: Changes META.yml Makefile.PL Next.pm
dmn at users.alioth.debian.org
dmn at users.alioth.debian.org
Fri Jan 18 07:57:44 UTC 2008
Author: dmn
Date: Fri Jan 18 07:57:37 2008
New Revision: 12912
URL: http://svn.debian.org/wsvn/?sc=1&rev=12912
Log:
[svn-upgrade] Integrating new upstream version, libfile-next-perl (1.02)
Modified:
branches/upstream/libfile-next-perl/current/Changes
branches/upstream/libfile-next-perl/current/META.yml
branches/upstream/libfile-next-perl/current/Makefile.PL
branches/upstream/libfile-next-perl/current/Next.pm
Modified: branches/upstream/libfile-next-perl/current/Changes
URL: http://svn.debian.org/wsvn/branches/upstream/libfile-next-perl/current/Changes?rev=12912&op=diff
==============================================================================
--- branches/upstream/libfile-next-perl/current/Changes (original)
+++ branches/upstream/libfile-next-perl/current/Changes Fri Jan 18 07:57:37 2008
@@ -1,4 +1,17 @@
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/.
+
+1.02 Mon Jan 14 14:01:40 CST 2008
+ [SPEED ENHANCEMENTS]
+ Don't do a directory stat call if we've already done one to
+ check for a symlink.
+
+ Be smarter about building a list of candidate files that we're
+ going to have to sort anyway.
+
1.00 Mon Jun 18 10:06:14 CDT 2007
Modified: branches/upstream/libfile-next-perl/current/META.yml
URL: http://svn.debian.org/wsvn/branches/upstream/libfile-next-perl/current/META.yml?rev=12912&op=diff
==============================================================================
--- branches/upstream/libfile-next-perl/current/META.yml (original)
+++ branches/upstream/libfile-next-perl/current/META.yml Fri Jan 18 07:57:37 2008
@@ -1,15 +1,19 @@
--- #YAML:1.0
name: File-Next
-version: 1.00
+version: 1.02
abstract: File-finding iterator
license: ~
-generated_by: ExtUtils::MakeMaker version 6.32
+author:
+ - Andy Lester <andy at petdance.com>
+generated_by: ExtUtils::MakeMaker version 6.42
distribution_type: module
requires:
File::Spec: 0
Test::More: 0
meta-spec:
- url: http://module-build.sourceforge.net/META-spec-v1.2.html
- version: 1.2
-author:
- - Andy Lester <andy at petdance.com>
+ 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
Modified: branches/upstream/libfile-next-perl/current/Makefile.PL
URL: http://svn.debian.org/wsvn/branches/upstream/libfile-next-perl/current/Makefile.PL?rev=12912&op=diff
==============================================================================
--- branches/upstream/libfile-next-perl/current/Makefile.PL (original)
+++ branches/upstream/libfile-next-perl/current/Makefile.PL Fri Jan 18 07:57:37 2008
@@ -3,7 +3,7 @@
use warnings;
use ExtUtils::MakeMaker;
-WriteMakefile(
+my %parms = (
NAME => 'File::Next',
AUTHOR => 'Andy Lester <andy at petdance.com>', ## no critic (RequireInterpolationOfMetachars)
VERSION_FROM => 'Next.pm',
@@ -17,6 +17,17 @@
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
+ }
+
+WriteMakefile( %parms );
+
sub MY::postamble {
return <<'MAKE_FRAG';
.PHONY: tags critic
@@ -25,8 +36,12 @@
perlcritic -profile perlcriticrc -1 -quiet *.pm t/*.t
prof: all
- perl -d:DProf -Mblib ./stress ~/parrot ~/bw/trunk > /dev/null
- dprofpp
+ perl -d:DProf -Mblib ./stress ~/parrot ~/bw/trunk ~/p101 ~/bin /Developer > /dev/null
+ dprofpp -R
+
+smallprof: all
+ perl -d:SmallProf -Mblib ./stress ~/parrot ~/bw/trunk ~/p101 ~/bin /Developer > /dev/null
+ sort -k 2nr,2 smallprof.out | less
MAKE_FRAG
}
Modified: branches/upstream/libfile-next-perl/current/Next.pm
URL: http://svn.debian.org/wsvn/branches/upstream/libfile-next-perl/current/Next.pm?rev=12912&op=diff
==============================================================================
--- branches/upstream/libfile-next-perl/current/Next.pm (original)
+++ branches/upstream/libfile-next-perl/current/Next.pm Fri Jan 18 07:57:37 2008
@@ -9,11 +9,11 @@
=head1 VERSION
-Version 1.00
-
-=cut
-
-our $VERSION = '1.00';
+Version 1.02
+
+=cut
+
+our $VERSION = '1.02';
=head1 SYNOPSIS
@@ -224,7 +224,7 @@
return sub {
while (@queue) {
my ($dir,$file,$fullpath) = splice( @queue, 0, 3 );
- if (-f $fullpath) {
+ if ( -f $fullpath ) {
if ( $filter ) {
local $_ = $file;
local $File::Next::dir = $dir;
@@ -233,7 +233,7 @@
}
return wantarray ? ($dir,$file,$fullpath) : $fullpath;
}
- elsif (-d _) {
+ elsif ( -d _ ) {
unshift( @queue, _candidate_files( $parms, $fullpath ) );
}
} # while
@@ -249,7 +249,7 @@
return sub {
while (@queue) {
my (undef,undef,$fullpath) = splice( @queue, 0, 3 );
- if (-d $fullpath) {
+ if ( -d $fullpath ) {
unshift( @queue, _candidate_files( $parms, $fullpath ) );
return $fullpath;
}
@@ -267,7 +267,7 @@
return sub {
while (@queue) {
my ($dir,$file,$fullpath) = splice( @queue, 0, 3 );
- if (-d $fullpath) {
+ if ( -d $fullpath ) {
unshift( @queue, _candidate_files( $parms, $fullpath ) );
}
if ( $filter ) {
@@ -375,30 +375,39 @@
}
my @newfiles;
+ my $descend_filter = $parms->{descend_filter};
+ my $follow_symlinks = $parms->{follow_symlinks};
+ my $sort_sub = $parms->{sort_files};
+
while ( defined ( my $file = readdir $dh ) ) {
next if $skip_dirs{$file};
+ my $has_stat;
# Only do directory checking if we have a descend_filter
my $fullpath = File::Spec->catdir( $dir, $file );
- if ( !$parms->{follow_symlinks} ) {
+ if ( !$follow_symlinks ) {
next if -l $fullpath;
- }
-
- if ( $parms->{descend_filter} && -d $fullpath ) {
- local $File::Next::dir = $fullpath;
- local $_ = $file;
- next if not $parms->{descend_filter}->();
- }
- push( @newfiles, $dir, $file, $fullpath );
+ $has_stat = 1;
+ }
+
+ if ( $descend_filter ) {
+ if ( $has_stat ? (-d _) : (-d $fullpath) ) {
+ local $File::Next::dir = $fullpath;
+ local $_ = $file;
+ next if not $descend_filter->();
+ }
+ }
+ if ( $sort_sub ) {
+ push( @newfiles, [ $dir, $file, $fullpath ] );
+ }
+ else {
+ push( @newfiles, $dir, $file, $fullpath );
+ }
}
closedir $dh;
- if ( my $sub = $parms->{sort_files} ) {
- my @triplets;
- while ( @newfiles ) {
- push @triplets, [splice( @newfiles, 0, 3 )];
- }
- @newfiles = map { @{$_} } sort $sub @triplets;
+ if ( $sort_sub ) {
+ return map { @{$_} } sort $sort_sub @newfiles;
}
return @newfiles;
@@ -411,10 +420,8 @@
=head1 BUGS
Please report any bugs or feature requests to
-C<bug-file-next at rt.cpan.org>, or through the web interface at
-L<http://rt.cpan.org/NoAuth/ReportBug.html?Queue=File-Next>.
-I will be notified, and then you'll automatically be notified of
-progress on your bug as I make changes.
+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.
=head1 SUPPORT
@@ -426,6 +433,10 @@
=over 4
+=item * File::Next's bug queue
+
+L<http://code.google.com/p/file-next/issues/list>
+
=item * AnnoCPAN: Annotated CPAN documentation
L<http://annocpan.org/dist/File-Next>
@@ -433,10 +444,6 @@
=item * CPAN Ratings
L<http://cpanratings.perl.org/d/File-Next>
-
-=item * RT: CPAN's request tracker
-
-L<http://rt.cpan.org/NoAuth/Bugs.html?Dist=File-Next>
=item * Search CPAN
@@ -455,7 +462,7 @@
=head1 COPYRIGHT & LICENSE
-Copyright 2006-2007 Andy Lester, all rights reserved.
+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.
More information about the Pkg-perl-cvs-commits
mailing list