diff -Nru libcwd-guard-perl-0.4/Build.PL libcwd-guard-perl-0.05/Build.PL --- libcwd-guard-perl-0.4/Build.PL 2013-06-03 02:04:07.000000000 +0000 +++ libcwd-guard-perl-0.05/Build.PL 2016-04-14 02:47:27.000000000 +0000 @@ -12,8 +12,6 @@ use Module::Build; use File::Basename; use File::Spec; -use CPAN::Meta; -use CPAN::Meta::Prereqs; my %args = ( license => 'perl', @@ -25,12 +23,16 @@ name => 'Cwd-Guard', module_name => 'Cwd::Guard', - allow_pure_perl => 0, + allow_pureperl => 0, script_files => [glob('script/*'), glob('bin/*')], + c_source => [qw()], + PL_files => {}, test_files => ((-d '.git' || $ENV{RELEASE_TESTING}) && -d 'xt') ? 't/ xt/' : 't/', recursive_test_files => 1, + + ); if (-d 'share') { $args{share_dir} = 'share'; @@ -49,20 +51,15 @@ )->new(%args); $builder->create_build_script(); -my $mbmeta = CPAN::Meta->load_file('MYMETA.json'); -my $meta = CPAN::Meta->load_file('META.json'); -my $prereqs_hash = CPAN::Meta::Prereqs->new( - $meta->prereqs -)->with_merged_prereqs( - CPAN::Meta::Prereqs->new($mbmeta->prereqs) -)->as_string_hash; -my $mymeta = CPAN::Meta->new( - { - %{$meta->as_struct}, - prereqs => $prereqs_hash - } -); -print "Merging cpanfile prereqs to MYMETA.yml\n"; -$mymeta->save('MYMETA.yml', { version => 1.4 }); -print "Merging cpanfile prereqs to MYMETA.json\n"; -$mymeta->save('MYMETA.json', { version => 2 }); +use File::Copy; + +print "cp META.json MYMETA.json\n"; +copy("META.json","MYMETA.json") or die "Copy failed(META.json): $!"; + +if (-f 'META.yml') { + print "cp META.yml MYMETA.yml\n"; + copy("META.yml","MYMETA.yml") or die "Copy failed(META.yml): $!"; +} else { + print "There is no META.yml... You may install this module from the repository...\n"; +} + diff -Nru libcwd-guard-perl-0.4/Changes libcwd-guard-perl-0.05/Changes --- libcwd-guard-perl-0.4/Changes 2013-06-03 02:04:07.000000000 +0000 +++ libcwd-guard-perl-0.05/Changes 2016-04-14 02:47:27.000000000 +0000 @@ -1,5 +1,9 @@ Revision history for Perl extension Cwd::Guard +0.05 2016-04-14T02:47:15Z + + - add a new test (Thank you eserte) + 0.04 2013-06-03T02:04:02Z - use fchdir when available (ap++) diff -Nru libcwd-guard-perl-0.4/cpanfile libcwd-guard-perl-0.05/cpanfile --- libcwd-guard-perl-0.4/cpanfile 2013-06-03 02:04:07.000000000 +0000 +++ libcwd-guard-perl-0.05/cpanfile 2016-04-14 02:47:27.000000000 +0000 @@ -4,4 +4,5 @@ requires 'Cwd'; on build => sub { requires 'Test::More'; + requires 'Test::Requires'; }; diff -Nru libcwd-guard-perl-0.4/debian/changelog libcwd-guard-perl-0.05/debian/changelog --- libcwd-guard-perl-0.4/debian/changelog 2015-06-18 14:59:13.000000000 +0000 +++ libcwd-guard-perl-0.05/debian/changelog 2021-03-21 02:08:53.000000000 +0000 @@ -1,3 +1,32 @@ +libcwd-guard-perl (0.05-1~16.04.sav0) xenial; urgency=medium + + * Backport to Xenial + + -- Rob Savoury Sat, 20 Mar 2021 19:08:53 -0700 + +libcwd-guard-perl (0.05-1) unstable; urgency=medium + + * Team upload. + + [ Salvatore Bonaccorso ] + * debian/control: Use HTTPS transport protocol for Vcs-Git URI + + [ gregor herrmann ] + * debian/copyright: change Copyright-Format 1.0 URL to HTTPS. + + [ Salvatore Bonaccorso ] + * Import upstream version 0.05 + * Bump Debhelper compat level to 9 + * Declare compliance with Debian policy 3.9.8 + * Make Build-Depends on libmodule-build-perl unversioned + * Update Build-Depends for perl. + Replace alternative Build-Depends on perl (>= 5.13.10) or + libcpan-meta-perl with only perl. + * Add Build-Depends-Indep on libtest-requires-perl + * Wrap and sort fields in debian/control file + + -- Salvatore Bonaccorso Sun, 22 May 2016 10:49:30 +0200 + libcwd-guard-perl (0.4-2) unstable; urgency=medium * Team upload. diff -Nru libcwd-guard-perl-0.4/debian/compat libcwd-guard-perl-0.05/debian/compat --- libcwd-guard-perl-0.4/debian/compat 2015-06-18 14:59:13.000000000 +0000 +++ libcwd-guard-perl-0.05/debian/compat 2016-05-22 08:49:53.000000000 +0000 @@ -1 +1 @@ -8 +9 diff -Nru libcwd-guard-perl-0.4/debian/control libcwd-guard-perl-0.05/debian/control --- libcwd-guard-perl-0.4/debian/control 2015-06-18 14:59:13.000000000 +0000 +++ libcwd-guard-perl-0.05/debian/control 2016-05-22 08:49:53.000000000 +0000 @@ -4,18 +4,16 @@ Section: perl Testsuite: autopkgtest-pkg-perl Priority: optional -Build-Depends: debhelper (>= 8), - perl (>= 5.13.10) | libcpan-meta-perl, - libmodule-build-perl (>= 0.380000) -Standards-Version: 3.9.6 +Build-Depends: debhelper (>= 9), libmodule-build-perl, perl +Build-Depends-Indep: libtest-requires-perl +Standards-Version: 3.9.8 Vcs-Browser: https://anonscm.debian.org/cgit/pkg-perl/packages/libcwd-guard-perl.git -Vcs-Git: git://anonscm.debian.org/pkg-perl/packages/libcwd-guard-perl.git +Vcs-Git: https://anonscm.debian.org/git/pkg-perl/packages/libcwd-guard-perl.git Homepage: https://metacpan.org/release/Cwd-Guard Package: libcwd-guard-perl Architecture: all -Depends: ${misc:Depends}, - ${perl:Depends} +Depends: ${misc:Depends}, ${perl:Depends} Description: module for temporarily changing working directory (chdir) Cwd::Guard provides changing the current directory (chdir) using a limited scope. Return to current working directory, if this object destroyed. If diff -Nru libcwd-guard-perl-0.4/debian/copyright libcwd-guard-perl-0.05/debian/copyright --- libcwd-guard-perl-0.4/debian/copyright 2015-06-18 14:59:13.000000000 +0000 +++ libcwd-guard-perl-0.05/debian/copyright 2016-05-22 08:49:53.000000000 +0000 @@ -1,4 +1,4 @@ -Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ +Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ Upstream-Name: Cwd-Guard Source: https://metacpan.org/release/Cwd-Guard Upstream-Contact: Masahiro Nagano diff -Nru libcwd-guard-perl-0.4/lib/Cwd/Guard.pm libcwd-guard-perl-0.05/lib/Cwd/Guard.pm --- libcwd-guard-perl-0.4/lib/Cwd/Guard.pm 2013-06-03 02:04:07.000000000 +0000 +++ libcwd-guard-perl-0.05/lib/Cwd/Guard.pm 2016-04-14 02:47:27.000000000 +0000 @@ -7,7 +7,7 @@ our @EXPORT_OK = qw/cwd_guard/; our $Error; -our $VERSION = '0.04'; +our $VERSION = '0.05'; use constant USE_FCHDIR => eval { opendir my $dh, '.'; chdir $dh; 1 }; use if !USE_FCHDIR, Cwd => qw/getcwd/; diff -Nru libcwd-guard-perl-0.4/MANIFEST libcwd-guard-perl-0.05/MANIFEST --- libcwd-guard-perl-0.4/MANIFEST 2013-06-03 02:04:07.000000000 +0000 +++ libcwd-guard-perl-0.05/MANIFEST 2016-04-14 02:47:27.000000000 +0000 @@ -7,5 +7,6 @@ lib/Cwd/Guard.pm t/00_compile.t t/01_basic.t +t/02_renamed.t META.yml MANIFEST \ No newline at end of file diff -Nru libcwd-guard-perl-0.4/META.json libcwd-guard-perl-0.05/META.json --- libcwd-guard-perl-0.4/META.json 2013-06-03 02:04:07.000000000 +0000 +++ libcwd-guard-perl-0.05/META.json 2016-04-14 02:47:27.000000000 +0000 @@ -4,8 +4,10 @@ "Masahiro Nagano " ], "dynamic_config" : 0, - "generated_by" : "Minilla/v0.4.6", - "license" : "perl_5", + "generated_by" : "Minilla/v2.4.1", + "license" : [ + "perl_5" + ], "meta-spec" : { "url" : "http://search.cpan.org/perldoc?CPAN::Meta::Spec", "version" : "2" @@ -19,26 +21,27 @@ "share", "eg", "examples", - "author" + "author", + "builder" ] }, "prereqs" : { "build" : { "requires" : { - "Test::More" : "0" + "Test::More" : "0", + "Test::Requires" : "0" } }, "configure" : { "requires" : { - "CPAN::Meta" : "0", - "CPAN::Meta::Prereqs" : "0", "Module::Build" : "0.38" } }, "develop" : { "requires" : { "Test::CPAN::Meta" : "0", - "Test::MinimumVersion" : "0.10108", + "Test::MinimumVersion::Fast" : "0.04", + "Test::PAUSE::Permissions" : "0.04", "Test::Pod" : "1.41", "Test::Spellunker" : "v0.2.7" } @@ -55,7 +58,7 @@ "provides" : { "Cwd::Guard" : { "file" : "lib/Cwd/Guard.pm", - "version" : "0.04" + "version" : "0.05" } }, "release_status" : "stable", @@ -69,9 +72,11 @@ "web" : "https://github.com/kazeburo/Cwd-Guard" } }, - "version" : "0.04", + "version" : "0.05", "x_contributors" : [ "Aristotle Pagaltzis ", + "Slaven Rezic ", "Masahiro Nagano " - ] + ], + "x_serialization_backend" : "JSON::PP version 2.27203" } diff -Nru libcwd-guard-perl-0.4/META.yml libcwd-guard-perl-0.05/META.yml --- libcwd-guard-perl-0.4/META.yml 2013-06-03 02:04:07.000000000 +0000 +++ libcwd-guard-perl-0.05/META.yml 2016-04-14 02:47:27.000000000 +0000 @@ -3,17 +3,16 @@ author: - 'Masahiro Nagano ' build_requires: - Test::More: 0 + Test::More: '0' + Test::Requires: '0' configure_requires: - CPAN::Meta: 0 - CPAN::Meta::Prereqs: 0 - Module::Build: 0.38 + Module::Build: '0.38' dynamic_config: 0 -generated_by: 'Minilla/v0.4.6, CPAN::Meta::Converter version 2.130880' +generated_by: 'Minilla/v2.4.1, CPAN::Meta::Converter version 2.150005' license: perl meta-spec: url: http://module-build.sourceforge.net/META-spec-v1.4.html - version: 1.4 + version: '1.4' name: Cwd-Guard no_index: directory: @@ -24,20 +23,23 @@ - eg - examples - author + - builder provides: Cwd::Guard: file: lib/Cwd/Guard.pm - version: 0.04 + version: '0.05' requires: - Cwd: 0 - Exporter: 0 - if: 0 - parent: 0 + Cwd: '0' + Exporter: '0' + if: '0' + parent: '0' resources: bugtracker: https://github.com/kazeburo/Cwd-Guard/issues homepage: https://github.com/kazeburo/Cwd-Guard repository: git://github.com/kazeburo/Cwd-Guard.git -version: 0.04 +version: '0.05' x_contributors: - 'Aristotle Pagaltzis ' + - 'Slaven Rezic ' - 'Masahiro Nagano ' +x_serialization_backend: 'CPAN::Meta::YAML version 0.012' diff -Nru libcwd-guard-perl-0.4/README.md libcwd-guard-perl-0.05/README.md --- libcwd-guard-perl-0.4/README.md 2013-06-03 02:04:07.000000000 +0000 +++ libcwd-guard-perl-0.05/README.md 2016-04-14 02:47:27.000000000 +0000 @@ -14,8 +14,6 @@ } # back to $dir - - # DESCRIPTION CORE::chdir Cwd:: Guard can change the current directory (chdir) using a limited scope. @@ -33,7 +31,7 @@ # SEE ALSO -[File::chdir](http://search.cpan.org/perldoc?File::chdir), [File::pushd](http://search.cpan.org/perldoc?File::pushd) +[File::chdir](https://metacpan.org/pod/File::chdir), [File::pushd](https://metacpan.org/pod/File::pushd) # LICENSE diff -Nru libcwd-guard-perl-0.4/t/02_renamed.t libcwd-guard-perl-0.05/t/02_renamed.t --- libcwd-guard-perl-0.4/t/02_renamed.t 1970-01-01 00:00:00.000000000 +0000 +++ libcwd-guard-perl-0.05/t/02_renamed.t 2016-04-14 02:47:27.000000000 +0000 @@ -0,0 +1,32 @@ +use strict; +use warnings; +use Test::More; + +use Cwd qw/getcwd/; +use Cwd::Guard qw/cwd_guard/; +use File::Temp qw/tempdir/; + +use Test::Requires qw/File::Spec::Link/; + +plan skip_all => "Safe renames only possible with fchdir" + if !Cwd::Guard::USE_FCHDIR; + +my $tempdir_path = tempdir(CLEANUP => 1); +my $tempdir = File::Spec::Link->resolve_path($tempdir_path); + +my $olddir = "$tempdir/foo"; +my $newdir = "$tempdir/bla"; +mkdir $olddir; +chdir $olddir or die $!; +{ + my $guard = cwd_guard $tempdir; + rename $olddir, $newdir or die $!; +} + +is getcwd, $newdir, 'can change back to renamed directory'; + +chdir '/'; # so tempdir can do a cleanup + +done_testing; + +__END__