Hello community, here is the log from the commit of package perl-File-chdir for openSUSE:Factory checked in at 2013-06-06 15:05:44 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/perl-File-chdir (Old) and /work/SRC/openSUSE:Factory/.perl-File-chdir.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "perl-File-chdir" Changes: -------- --- /work/SRC/openSUSE:Factory/perl-File-chdir/perl-File-chdir.changes 2011-11-16 17:21:25.000000000 +0100 +++ /work/SRC/openSUSE:Factory/.perl-File-chdir.new/perl-File-chdir.changes 2013-06-06 15:05:46.000000000 +0200 @@ -1,0 +2,7 @@ +Tue Jun 4 08:58:14 UTC 2013 - [email protected] + +- updated to 0.1008 + - Fixed broken use of abs_path on Cygwin [Joel Berger] + - Fixed broken Pod link; reordered CAVEATS section + +------------------------------------------------------------------- Old: ---- File-chdir-0.1006.tar.gz New: ---- File-chdir-0.1008.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ perl-File-chdir.spec ++++++ --- /var/tmp/diff_new_pack.OoHKQr/_old 2013-06-06 15:05:46.000000000 +0200 +++ /var/tmp/diff_new_pack.OoHKQr/_new 2013-06-06 15:05:46.000000000 +0200 @@ -1,7 +1,7 @@ # # spec file for package perl-File-chdir # -# Copyright (c) 2011 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -16,25 +16,24 @@ # - Name: perl-File-chdir -Version: 0.1006 -Release: 1 -License: GPL-1.0+ or Artistic-1.0 +Version: 0.1008 +Release: 0 %define cpan_name File-chdir Summary: A more sensible way to change directories -Url: http://search.cpan.org/dist/File-chdir/ +License: Artistic-1.0 or GPL-1.0+ Group: Development/Libraries/Perl -Source: http://www.cpan.org/authors/id/D/DA/DAGOLDEN/File-chdir-%{version}.tar.gz -BuildRequires: perl(Cwd) >= 3.16 -BuildRequires: perl(File::Spec) >= 3.27 +Url: http://search.cpan.org/dist/File-chdir/ +Source: http://www.cpan.org/authors/id/D/DA/DAGOLDEN/%{cpan_name}-%{version}.tar.gz +BuildArch: noarch +BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRequires: perl BuildRequires: perl-macros -BuildRequires: perl(Module::Build) +BuildRequires: perl(Cwd) >= 3.16 +BuildRequires: perl(File::Spec::Functions) >= 3.27 +#BuildRequires: perl(File::chdir) Requires: perl(Cwd) >= 3.16 -Requires: perl(File::Spec) >= 3.27 -BuildRoot: %{_tmppath}/%{name}-%{version}-build -BuildArch: noarch +Requires: perl(File::Spec::Functions) >= 3.27 %{perl_requires} %description @@ -51,25 +50,21 @@ %prep %setup -q -n %{cpan_name}-%{version} -%__sed -i '/^auto_install/d' Makefile.PL %build -%__perl Makefile.PL PREFIX="%{_prefix}" -%__make %{?_smp_flags} +%{__perl} Makefile.PL INSTALLDIRS=vendor +%{__make} %{?_smp_mflags} %check -%__make test +%{__make} test %install %perl_make_install %perl_process_packlist %perl_gen_filelist -%clean -%{__rm} -rf %{buildroot} - %files -f %{name}.files -%defattr(644,root,root,755) -%doc Changes examples LICENSE README xt +%defattr(-,root,root,755) +%doc Changes CONTRIBUTING examples LICENSE perlcritic.rc README %changelog ++++++ File-chdir-0.1006.tar.gz -> File-chdir-0.1008.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/File-chdir-0.1006/CONTRIBUTING new/File-chdir-0.1008/CONTRIBUTING --- old/File-chdir-0.1006/CONTRIBUTING 1970-01-01 01:00:00.000000000 +0100 +++ new/File-chdir-0.1008/CONTRIBUTING 2012-12-03 04:32:41.000000000 +0100 @@ -0,0 +1,50 @@ +README.PATCHING + +Thank you for considering contributing to this distribution. This file +contains instructions that will help you work with the source code. + +The distribution is managed with Dist::Zilla. This means than many of the +usual files you might expect are not in the repository, but are generated +at release time (e.g. Makefile.PL). + +However, you can run tests directly using the 'prove' tool: + + $ prove -l + $ prove -lv t/some_test_file.t + +For most distributions, 'prove' is entirely sufficent for you to test any +patches you have. + +You may need to satisfy some dependencies. See the included META.json +file for a list. If you install App::mymeta_requires from CPAN, it's easy +to satisfy any that you are missing by piping the output to your favorite +CPAN client: + + $ mymeta-requires | cpanm + $ cpan `mymeta-requires` + +Likewise, much of the documentation Pod is generated at release time. +Depending on the distribution, some documentation may be written in a Pod +dialect called WikiDoc. (See Pod::WikiDoc on CPAN.) If you would like to +submit a documentation edit, please limit yourself to the documentation you +see. + +If you see typos or documentation issues in the generated docs, please +email or open a bug ticket instead of patching. + +Dist::Zilla is a very powerful authoring tool, but requires a number of +author-specific plugins. If you would like to use it for contributing, +install it from CPAN, then run one of the following commands, depending on +your CPAN client: + + $ cpan `dzil authordeps` + $ dzil authordeps | cpanm + +Once installed, here are some dzil commands you might try: + + $ dzil build + $ dzil test + $ dzil xtest + +You can learn more about Dist::Zilla at http://dzil.org/ + diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/File-chdir-0.1006/Changes new/File-chdir-0.1008/Changes --- old/File-chdir-0.1006/Changes 2011-11-02 23:11:17.000000000 +0100 +++ new/File-chdir-0.1008/Changes 2012-12-03 04:32:41.000000000 +0100 @@ -1,5 +1,13 @@ Changes for File-chdir +0.1008 2012-12-02 22:32:37 America/New_York + + - Fixed broken use of abs_path on Cygwin [Joel Berger] + +0.1007 2012-09-17 20:29:43 America/New_York + + - Fixed broken Pod link; reordered CAVEATS section + 0.1006 2011-11-02 18:11:13 America/New_York - Handle directories with newlines [rt.cpan.org #72114] diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/File-chdir-0.1006/LICENSE new/File-chdir-0.1008/LICENSE --- old/File-chdir-0.1006/LICENSE 2011-11-02 23:11:17.000000000 +0100 +++ new/File-chdir-0.1008/LICENSE 2012-12-03 04:32:41.000000000 +0100 @@ -1,4 +1,4 @@ -This software is copyright (c) 2011 by Michael G Schwern and David A Golden. +This software is copyright (c) 2012 by Michael G Schwern and David A Golden. This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. @@ -12,7 +12,7 @@ --- The GNU General Public License, Version 1, February 1989 --- -This software is Copyright (c) 2011 by Michael G Schwern and David A Golden. +This software is Copyright (c) 2012 by Michael G Schwern and David A Golden. This is free software, licensed under: @@ -22,7 +22,7 @@ Version 1, February 1989 Copyright (C) 1989 Free Software Foundation, Inc. - 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + 51 Franklin St, Suite 500, Boston, MA 02110-1335 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. @@ -272,7 +272,7 @@ --- The Artistic License 1.0 --- -This software is Copyright (c) 2011 by Michael G Schwern and David A Golden. +This software is Copyright (c) 2012 by Michael G Schwern and David A Golden. This is free software, licensed under: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/File-chdir-0.1006/MANIFEST new/File-chdir-0.1008/MANIFEST --- old/File-chdir-0.1006/MANIFEST 2011-11-02 23:11:17.000000000 +0100 +++ new/File-chdir-0.1008/MANIFEST 2012-12-03 04:32:41.000000000 +0100 @@ -1,3 +1,4 @@ +CONTRIBUTING Changes LICENSE MANIFEST @@ -5,7 +6,6 @@ META.yml Makefile.PL README -README.PATCHING dist.ini examples/chdir-example.pl lib/File/chdir.pm @@ -19,6 +19,7 @@ t/newline.t t/var.t xt/author/critic.t +xt/author/pod-spell.t xt/release/distmeta.t xt/release/pod-coverage.t xt/release/pod-syntax.t diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/File-chdir-0.1006/META.json new/File-chdir-0.1008/META.json --- old/File-chdir-0.1006/META.json 2011-11-02 23:11:17.000000000 +0100 +++ new/File-chdir-0.1008/META.json 2012-12-03 04:32:41.000000000 +0100 @@ -5,7 +5,7 @@ "Michael G Schwern <[email protected]> (original author)" ], "dynamic_config" : 0, - "generated_by" : "Dist::Zilla version 4.300002, CPAN::Meta::Converter version 2.112580", + "generated_by" : "Dist::Zilla version 4.300025, CPAN::Meta::Converter version 2.120921", "license" : [ "perl_5" ], @@ -33,51 +33,51 @@ }, "runtime" : { "requires" : { - "Carp" : 0, + "Carp" : "0", "Cwd" : "3.16", - "Exporter" : 0, + "Exporter" : "0", "File::Spec::Functions" : "3.27", "perl" : "5.006", - "strict" : 0, - "vars" : 0 + "strict" : "0", + "vars" : "0" } }, "test" : { "requires" : { - "File::Find" : 0, - "File::Temp" : 0, - "Test::More" : 0, - "warnings" : 0 + "File::Find" : "0", + "File::Temp" : "0", + "Test::More" : "0", + "warnings" : "0" } } }, "provides" : { "File::chdir" : { "file" : "lib/File/chdir.pm", - "version" : "0.1006" + "version" : "0.1008" }, "File::chdir::ARRAY" : { "file" : "lib/File/chdir.pm", - "version" : "0.1006" + "version" : "0.1008" }, "File::chdir::SCALAR" : { "file" : "lib/File/chdir.pm", - "version" : "0.1006" + "version" : "0.1008" } }, "release_status" : "stable", "resources" : { "bugtracker" : { - "mailto" : "bug-file-chdir at rt.cpan.org", - "web" : "http://rt.cpan.org/Public/Dist/Display.html?Name=File-chdir" + "mailto" : "[email protected]", + "web" : "https://rt.cpan.org/Public/Dist/Display.html?Name=File-chdir" }, - "homepage" : "https://github.com/dagolden/file-chdir", + "homepage" : "https://metacpan.org/release/File-chdir", "repository" : { "type" : "git", - "url" : "https://github.com/dagolden/file-chdir.git", + "url" : "git://github.com/dagolden/file-chdir.git", "web" : "https://github.com/dagolden/file-chdir" } }, - "version" : "0.1006" + "version" : "0.1008" } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/File-chdir-0.1006/META.yml new/File-chdir-0.1008/META.yml --- old/File-chdir-0.1006/META.yml 2011-11-02 23:11:17.000000000 +0100 +++ new/File-chdir-0.1008/META.yml 2012-12-03 04:32:41.000000000 +0100 @@ -11,7 +11,7 @@ configure_requires: ExtUtils::MakeMaker: 6.30 dynamic_config: 0 -generated_by: 'Dist::Zilla version 4.300002, CPAN::Meta::Converter version 2.112580' +generated_by: 'Dist::Zilla version 4.300025, CPAN::Meta::Converter version 2.120921' license: perl meta-spec: url: http://module-build.sourceforge.net/META-spec-v1.4.html @@ -28,13 +28,13 @@ provides: File::chdir: file: lib/File/chdir.pm - version: 0.1006 + version: 0.1008 File::chdir::ARRAY: file: lib/File/chdir.pm - version: 0.1006 + version: 0.1008 File::chdir::SCALAR: file: lib/File/chdir.pm - version: 0.1006 + version: 0.1008 requires: Carp: 0 Cwd: 3.16 @@ -44,7 +44,7 @@ strict: 0 vars: 0 resources: - bugtracker: http://rt.cpan.org/Public/Dist/Display.html?Name=File-chdir - homepage: https://github.com/dagolden/file-chdir - repository: https://github.com/dagolden/file-chdir.git -version: 0.1006 + bugtracker: https://rt.cpan.org/Public/Dist/Display.html?Name=File-chdir + homepage: https://metacpan.org/release/File-chdir + repository: git://github.com/dagolden/file-chdir.git +version: 0.1008 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/File-chdir-0.1006/Makefile.PL new/File-chdir-0.1008/Makefile.PL --- old/File-chdir-0.1006/Makefile.PL 2011-11-02 23:11:17.000000000 +0100 +++ new/File-chdir-0.1008/Makefile.PL 2012-12-03 04:32:41.000000000 +0100 @@ -32,7 +32,7 @@ "strict" => 0, "vars" => 0 }, - "VERSION" => "0.1006", + "VERSION" => "0.1008", "test" => { "TESTS" => "t/*.t" } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/File-chdir-0.1006/README new/File-chdir-0.1008/README --- old/File-chdir-0.1006/README 2011-11-02 23:11:17.000000000 +0100 +++ new/File-chdir-0.1008/README 2012-12-03 04:32:41.000000000 +0100 @@ -2,7 +2,7 @@ File::chdir - a more sensible way to change directories VERSION - version 0.1006 + version 0.1008 SYNOPSIS use File::chdir; @@ -63,8 +63,8 @@ @CWD and $CWD both work fine together. - NOTE Due to a perl bug you can't localize @CWD. See "BUGS and" for a - work around. + NOTE Due to a perl bug you can't localize @CWD. See "CAVEATS" for a work + around. EXAMPLES (We omit the "use File::chdir" from these examples for terseness) @@ -101,7 +101,7 @@ sub foo { use Cwd; - my $orig_dir = Cwd::abs_path; + my $orig_dir = Cwd::getcwd; chdir('some/other/dir'); ...do your work... @@ -122,6 +122,17 @@ $CWD[-2] = 'foo'; CAVEATS + "local @CWD" does not work. + "local @CWD" will not localize @CWD. This is a bug in Perl, you can't + localize tied arrays. As a work around localizing $CWD will effectively + localize @CWD. + + { + local $CWD; + pop @CWD; + ... + } + Assigning to @CWD calls "chdir()" for each element @CWD = qw/a b c d/; @@ -135,17 +146,6 @@ Generally, avoid assigning to @CWD and just use push and pop instead. - "local @CWD" does not work. - "local @CWD>" will not localize @CWD. This is a bug in Perl, you can't - localize tied arrays. As a work around localizing $CWD will effectively - localize @CWD. - - { - local $CWD; - pop @CWD; - ... - } - Volumes not handled There is currently no way to change the current volume via File::chdir. @@ -199,10 +199,9 @@ SUPPORT Bugs / Feature Requests - Please report any bugs or feature requests by email to "bug-file-chdir - at rt.cpan.org", or through the web interface at - <http://rt.cpan.org/Public/Dist/Display.html?Name=File-chdir>. You will - be automatically notified of any progress on the request by the system. + Please report any bugs or feature requests through the issue tracker at + <https://rt.cpan.org/Public/Dist/Display.html?Name=File-chdir>. You will + be notified automatically of any progress on your issue. Source Code This is open source software. The code repository is available for @@ -210,7 +209,7 @@ <https://github.com/dagolden/file-chdir> - git clone https://github.com/dagolden/file-chdir.git + git clone git://github.com/dagolden/file-chdir.git AUTHORS * David A Golden <[email protected]> @@ -218,7 +217,7 @@ * Michael G Schwern <[email protected]> (original author) COPYRIGHT AND LICENSE - This software is copyright (c) 2011 by Michael G Schwern and David A + This software is copyright (c) 2012 by Michael G Schwern and David A Golden. This is free software; you can redistribute it and/or modify it under diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/File-chdir-0.1006/README.PATCHING new/File-chdir-0.1008/README.PATCHING --- old/File-chdir-0.1006/README.PATCHING 2011-11-02 23:11:17.000000000 +0100 +++ new/File-chdir-0.1008/README.PATCHING 1970-01-01 01:00:00.000000000 +0100 @@ -1,50 +0,0 @@ -README.PATCHING - -Thank you for considering contributing to this distribution. This file -contains instructions that will help you work with the source code. - -The distribution is managed with Dist::Zilla. This means than many of the -usual files you might expect are not in the repository, but are generated -at release time (e.g. Makefile.PL). - -However, you can run tests directly using the 'prove' tool: - - $ prove -l - $ prove -lv t/some_test_file.t - -For most distributions, 'prove' is entirely sufficent for you to test any -patches you have. - -You may need to satisfy some dependencies. See the included META.json -file for a list. If you install App::mymeta_requires from CPAN, it's easy -to satisfy any that you are missing by piping the output to your favorite -CPAN client: - - $ mymeta-requires | cpanm - $ cpan `mymeta-requires` - -Likewise, much of the documentation Pod is generated at release time. -Depending on the distribution, some documentation may be written in a Pod -dialect called WikiDoc. (See Pod::WikiDoc on CPAN.) If you would like to -submit a documentation edit, please limit yourself to the documentation you -see. - -If you see typos or documentation issues in the generated docs, please -email or open a bug ticket instead of patching. - -Dist::Zilla is a very powerful authoring tool, but requires a number of -author-specific plugins. If you would like to use it for contributing, -install it from CPAN, then run one of the following commands, depending on -your CPAN client: - - $ cpan `dzil authordeps` - $ dzil authordeps | cpanm - -Once installed, here are some dzil commands you might try: - - $ dzil build - $ dzil test - $ dzil xtest - -You can learn more about Dist::Zilla at http://dzil.org/ - diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/File-chdir-0.1006/dist.ini new/File-chdir-0.1008/dist.ini --- old/File-chdir-0.1006/dist.ini 2011-11-02 23:11:17.000000000 +0100 +++ new/File-chdir-0.1008/dist.ini 2012-12-03 04:32:41.000000000 +0100 @@ -6,5 +6,4 @@ [@DAGOLDEN] :version = 0.018 - -[Test::Perl::Critic] +stopwords = Warnock diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/File-chdir-0.1006/lib/File/chdir.pm new/File-chdir-0.1008/lib/File/chdir.pm --- old/File-chdir-0.1006/lib/File/chdir.pm 2011-11-02 23:11:17.000000000 +0100 +++ new/File-chdir-0.1008/lib/File/chdir.pm 2012-12-03 04:32:41.000000000 +0100 @@ -3,7 +3,7 @@ use strict; use vars qw($VERSION @ISA @EXPORT $CWD @CWD); # ABSTRACT: a more sensible way to change directories -our $VERSION = '0.1006'; # VERSION +our $VERSION = '0.1008'; # VERSION require Exporter; @ISA = qw(Exporter); @@ -16,10 +16,10 @@ tie $CWD, 'File::chdir::SCALAR' or die "Can't tie \$CWD"; tie @CWD, 'File::chdir::ARRAY' or die "Can't tie \@CWD"; -sub _abs_path { +sub _abs_path { # Otherwise we'll never work under taint mode. - my($cwd) = Cwd::abs_path =~ /(.*)/s; - # Run through File::Spec, since everything else uses it + my($cwd) = Cwd::getcwd =~ /(.*)/s; + # Run through File::Spec, since everything else uses it return canonpath($cwd); } @@ -38,8 +38,9 @@ return catpath($vol, catdir(q{}, @dirs), q{}); } -sub _chdir { - my($new_dir) = @_; +sub _chdir { + # Untaint target directory + my ($new_dir) = $_[0] =~ /(.*)/s; local $Carp::CarpLevel = $Carp::CarpLevel + 1; if ( ! CORE::chdir($new_dir) ) { @@ -52,14 +53,14 @@ package File::chdir::SCALAR; use Carp; - BEGIN { + BEGIN { *_abs_path = \&File::chdir::_abs_path; *_chdir = \&File::chdir::_chdir; *_split_cwd = \&File::chdir::_split_cwd; *_catpath = \&File::chdir::_catpath; } - sub TIESCALAR { + sub TIESCALAR { bless [], $_[0]; } @@ -80,8 +81,8 @@ package File::chdir::ARRAY; use Carp; - BEGIN { - *_abs_path = \&File::chdir::_abs_path; + BEGIN { + *_abs_path = \&File::chdir::_abs_path; *_chdir = \&File::chdir::_chdir; *_split_cwd = \&File::chdir::_split_cwd; *_catpath = \&File::chdir::_catpath; @@ -91,7 +92,7 @@ bless {}, $_[0]; } - sub FETCH { + sub FETCH { my($self, $idx) = @_; my ($vol, @cwd) = _split_cwd; return $cwd[$idx]; @@ -113,9 +114,9 @@ return $cwd[$idx]; } - sub FETCHSIZE { + sub FETCHSIZE { my ($vol, @cwd) = _split_cwd; - return scalar @cwd; + return scalar @cwd; } sub STORESIZE {} @@ -166,7 +167,7 @@ my $offset = shift || 0; my $len = shift || $self->FETCHSIZE - $offset; my @new_dirs = @_; - + my ($vol, @cwd) = _split_cwd; my @orig_dirs = splice @cwd, $offset, $len, @new_dirs; my $dir = _catpath($vol, @cwd); @@ -175,7 +176,7 @@ } sub EXTEND { } - sub EXISTS { + sub EXISTS { my($self, $idx) = @_; return $self->FETCHSIZE >= $idx ? 1 : 0; } @@ -191,6 +192,7 @@ 1; +__END__ =pod @@ -200,7 +202,7 @@ =head1 VERSION -version 0.1006 +version 0.1008 =head1 SYNOPSIS @@ -242,7 +244,7 @@ } # still /foo out here! -C<<< $CWD >>> always returns the absolute path in the native form for the +C<<< $CWD >>> always returns the absolute path in the native form for the operating system. C<<< $CWD >>> and normal C<<< chdir() >>> work together just fine. @@ -265,7 +267,7 @@ C<<< @CWD >>> and C<<< $CWD >>> both work fine together. -B<NOTE> Due to a perl bug you can't localize C<<< @CWD >>>. See L</BUGS and> for a work around. +B<NOTE> Due to a perl bug you can't localize C<<< @CWD >>>. See L</CAVEATS> for a work around. =head1 EXAMPLES @@ -303,7 +305,7 @@ sub foo { use Cwd; - my $orig_dir = Cwd::abs_path; + my $orig_dir = Cwd::getcwd; chdir('some/other/dir'); ...do your work... @@ -325,6 +327,18 @@ =head1 CAVEATS +=head3 C<<< local @CWD >>> does not work. + +C<<< local @CWD >>> will not localize C<<< @CWD >>>. This is a bug in Perl, you +can't localize tied arrays. As a work around localizing $CWD will +effectively localize @CWD. + + { + local $CWD; + pop @CWD; + ... + } + =head3 Assigning to C<<< @CWD >>> calls C<<< chdir() >>> for each element @CWD = qw/a b c d/; @@ -339,25 +353,13 @@ Generally, avoid assigning to C<<< @CWD >>> and just use push and pop instead. -=head3 C<<< local @CWD >>> does not work. - -C<<< local @CWD> >>> will not localize C<<< @CWD >>>. This is a bug in Perl, you -can't localize tied arrays. As a work around localizing $CWD will -effectively localize @CWD. - - { - local $CWD; - pop @CWD; - ... - } - =head3 Volumes not handled There is currently no way to change the current volume via File::chdir. =head1 NOTES -C<<< $CWD >>> returns the current directory using native path separators, i.e. \ +C<<< $CWD >>> returns the current directory using native path separators, i.e. \ on Win32. This ensures that C<<< $CWD >>> will compare correctly with directories created using File::Spec. For example: @@ -412,18 +414,18 @@ =head1 SEE ALSO -L<File::pushd>, L<File::Spec>, L<Cwd>, L<perlfunc/chdir>, +L<File::pushd>, L<File::Spec>, L<Cwd>, L<perlfunc/chdir>, "Animal House" L<http://www.imdb.com/title/tt0077975/quotes> -=for :stopwords cpan testmatrix url annocpan anno bugtracker rt cpants kwalitee diff irc mailto metadata placeholders +=for :stopwords cpan testmatrix url annocpan anno bugtracker rt cpants kwalitee diff irc mailto metadata placeholders metacpan =head1 SUPPORT =head2 Bugs / Feature Requests -Please report any bugs or feature requests by email to C<bug-file-chdir at rt.cpan.org>, or through -the web interface at L<http://rt.cpan.org/Public/Dist/Display.html?Name=File-chdir>. You will be automatically notified of any -progress on the request by the system. +Please report any bugs or feature requests through the issue tracker +at L<https://rt.cpan.org/Public/Dist/Display.html?Name=File-chdir>. +You will be notified automatically of any progress on your issue. =head2 Source Code @@ -432,7 +434,7 @@ L<https://github.com/dagolden/file-chdir> - git clone https://github.com/dagolden/file-chdir.git + git clone git://github.com/dagolden/file-chdir.git =head1 AUTHORS @@ -450,14 +452,9 @@ =head1 COPYRIGHT AND LICENSE -This software is copyright (c) 2011 by Michael G Schwern and David A Golden. +This software is copyright (c) 2012 by Michael G Schwern and David A Golden. This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. =cut - - -__END__ - - diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/File-chdir-0.1006/perlcritic.rc new/File-chdir-0.1008/perlcritic.rc --- old/File-chdir-0.1006/perlcritic.rc 2011-11-02 23:11:17.000000000 +0100 +++ new/File-chdir-0.1008/perlcritic.rc 2012-12-03 04:32:41.000000000 +0100 @@ -10,7 +10,6 @@ [-ControlStructures::ProhibitUnlessBlocks] [-Documentation::RequirePodSections] [-InputOutput::ProhibitInteractiveTest] -[-Miscellanea::RequireRcsKeywords] [-References::ProhibitDoubleSigils] [-RegularExpressions::RequireExtendedFormatting] [-InputOutput::ProhibitTwoArgOpen] diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/File-chdir-0.1006/t/00-compile.t new/File-chdir-0.1008/t/00-compile.t --- old/File-chdir-0.1006/t/00-compile.t 2011-11-02 23:11:17.000000000 +0100 +++ new/File-chdir-0.1008/t/00-compile.t 2012-12-03 04:32:41.000000000 +0100 @@ -24,19 +24,33 @@ 'lib', ); -my @scripts; -if ( -d 'bin' ) { +sub _find_scripts { + my $dir = shift @_; + + my @found_scripts = (); find( sub { return unless -f; my $found = $File::Find::name; # nothing to skip - push @scripts, $found; + open my $FH, '<', $_ or do { + note( "Unable to open $found in ( $! ), skipping" ); + return; + }; + my $shebang = <$FH>; + return unless $shebang =~ /^#!.*?\bperl\b\s*$/; + push @found_scripts, $found; }, - 'bin', + $dir, ); + + return @found_scripts; } +my @scripts; +do { push @scripts, _find_scripts($_) if -d $_ } + for qw{ bin script scripts }; + my $plan = scalar(@modules) + scalar(@scripts); $plan ? (plan tests => $plan) : (plan skip_all => "no tests to run"); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/File-chdir-0.1006/t/array.t new/File-chdir-0.1008/t/array.t --- old/File-chdir-0.1006/t/array.t 2011-11-02 23:11:17.000000000 +0100 +++ new/File-chdir-0.1008/t/array.t 2012-12-03 04:32:41.000000000 +0100 @@ -3,7 +3,7 @@ use strict; use Test::More tests => 55; use File::Spec::Functions qw/canonpath splitdir catdir splitpath catpath/; -use Cwd qw/getcwd abs_path/; +use Cwd qw/getcwd/; BEGIN { use_ok('File::chdir') } @@ -12,7 +12,7 @@ #--------------------------------------------------------------------------#- # _catdir has OS-specific path separators so do the same for getcwd -sub _getcwd { canonpath( abs_path ) } +sub _getcwd { canonpath( getcwd ) } # reassemble sub _catpath { @@ -21,7 +21,7 @@ } # get $vol here and use it later -my ($vol,$cwd) = splitpath(canonpath(abs_path),1); +my ($vol,$cwd) = splitpath(canonpath(getcwd),1); # get directory list the way a user would use it -- without empty leading dir # as returned by splitdir; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/File-chdir-0.1006/t/chdir.t new/File-chdir-0.1008/t/chdir.t --- old/File-chdir-0.1006/t/chdir.t 2011-11-02 23:11:17.000000000 +0100 +++ new/File-chdir-0.1008/t/chdir.t 2012-12-03 04:32:41.000000000 +0100 @@ -3,12 +3,12 @@ use strict; use Test::More tests => 6; use File::Spec::Functions qw/canonpath catdir/; -use Cwd qw/getcwd abs_path/; +use Cwd qw/getcwd/; BEGIN { use_ok('File::chdir') } # _catdir has OS-specific path separators so do the same for getcwd -sub _getcwd { canonpath( abs_path ) } +sub _getcwd { canonpath( getcwd ) } my($cwd) = _getcwd =~ /(.*)/; # detaint otherwise nothing's gonna work diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/File-chdir-0.1006/t/delete-array.t new/File-chdir-0.1008/t/delete-array.t --- old/File-chdir-0.1006/t/delete-array.t 2011-11-02 23:11:17.000000000 +0100 +++ new/File-chdir-0.1008/t/delete-array.t 2012-12-03 04:32:41.000000000 +0100 @@ -14,7 +14,7 @@ } use File::Spec::Functions qw/canonpath splitdir catdir splitpath catpath/; -use Cwd qw/getcwd abs_path/; +use Cwd qw/getcwd/; BEGIN { use_ok('File::chdir') } @@ -23,7 +23,7 @@ #--------------------------------------------------------------------------#- # _catdir has OS-specific path separators so do the same for getcwd -sub _getcwd { canonpath( abs_path ) } +sub _getcwd { canonpath( getcwd ) } # reassemble sub _catpath { @@ -32,7 +32,7 @@ } # get $vol here and use it later -my ($vol,$cwd) = splitpath(canonpath(abs_path),1); +my ($vol,$cwd) = splitpath(canonpath(getcwd),1); # get directory list the way a user would use it -- without empty leading dir # as returned by splitdir; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/File-chdir-0.1006/t/newline.t new/File-chdir-0.1008/t/newline.t --- old/File-chdir-0.1006/t/newline.t 2011-11-02 23:11:17.000000000 +0100 +++ new/File-chdir-0.1008/t/newline.t 2012-12-03 04:32:41.000000000 +0100 @@ -6,7 +6,7 @@ use Test::More; use File::chdir; -use Cwd qw(abs_path); +use Cwd qw(getcwd); my $Orig_Cwd = $CWD; @@ -17,11 +17,11 @@ { local $CWD = $Test_Dir; - is $CWD, abs_path; + is $CWD, getcwd; } is $CWD, $Orig_Cwd; -is abs_path, $Orig_Cwd; +is getcwd, $Orig_Cwd; END { chdir $Orig_Cwd; # just in case diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/File-chdir-0.1006/t/var.t new/File-chdir-0.1008/t/var.t --- old/File-chdir-0.1006/t/var.t 2011-11-02 23:11:17.000000000 +0100 +++ new/File-chdir-0.1008/t/var.t 2012-12-03 04:32:41.000000000 +0100 @@ -3,12 +3,12 @@ use strict; use Test::More tests => 13; use File::Spec::Functions qw/canonpath catdir/; -use Cwd qw/getcwd abs_path/; +use Cwd qw/getcwd/; BEGIN { use_ok('File::chdir') } # _catdir has OS-specific path separators so do the same for getcwd -sub _getcwd { canonpath( abs_path ) } +sub _getcwd { canonpath( getcwd ) } my $cwd = _getcwd; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/File-chdir-0.1006/xt/author/pod-spell.t new/File-chdir-0.1008/xt/author/pod-spell.t --- old/File-chdir-0.1006/xt/author/pod-spell.t 1970-01-01 01:00:00.000000000 +0100 +++ new/File-chdir-0.1008/xt/author/pod-spell.t 2012-12-03 04:32:41.000000000 +0100 @@ -0,0 +1,22 @@ +use strict; +use warnings; +use Test::More; + +# generated by Dist::Zilla::Plugin::Test::PodSpelling 2.002005 +eval "use Test::Spelling 0.12; use Pod::Wordlist::hanekomu; 1" or die $@; + + +add_stopwords(<DATA>); +all_pod_files_spelling_ok('bin', 'lib'); +__DATA__ +Warnock +David +Golden +Michael +Schwern +original +author +and +lib +File +chdir diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/File-chdir-0.1006/xt/release/portability.t new/File-chdir-0.1008/xt/release/portability.t --- old/File-chdir-0.1006/xt/release/portability.t 2011-11-02 23:11:17.000000000 +0100 +++ new/File-chdir-0.1008/xt/release/portability.t 2012-12-03 04:32:41.000000000 +0100 @@ -2,7 +2,7 @@ use Test::More; -eval "use Test::Portability::Files"; -plan skip_all => "Test::Portability::Files required for testing portability" - if $@; +eval 'use Test::Portability::Files'; +plan skip_all => 'Test::Portability::Files required for testing portability' + if $@; run_tests(); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/File-chdir-0.1006/xt/release/test-version.t new/File-chdir-0.1008/xt/release/test-version.t --- old/File-chdir-0.1006/xt/release/test-version.t 2011-11-02 23:11:17.000000000 +0100 +++ new/File-chdir-0.1008/xt/release/test-version.t 2012-12-03 04:32:41.000000000 +0100 @@ -1,12 +1,22 @@ -#!/usr/bin/perl -use 5.006; use strict; use warnings; use Test::More; -eval "use Test::Version 0.04"; -plan skip_all => "Test::Version 0.04 required for testing versions" - if $@; +# generated by Dist::Zilla::Plugin::Test::Version 0.002004 +BEGIN { eval "use Test::Version; 1;" or die $@; } -version_all_ok(); +my @imports = ( 'version_all_ok' ); + +my $params = { + is_strict => 0, + has_version => 1, +}; + +push @imports, $params + if version->parse( $Test::Version::VERSION ) >= version->parse('1.002'); + + +Test::Version->import(@imports); + +version_all_ok; done_testing; -- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
