The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.
CONTRIBUTING 2381
Changes 011
LICENSE 11
MANIFEST 14
META.json 1123
META.yml 2425
Makefile.PL 2337
README 4448
cpanfile 042
dist.ini 41
lib/File/pushd.pm 7890
perlcritic.rc 03
t/00-compile.t 740
t/00-report-prereqs.t 29144
t/File_pushd.t 7244
t/exception.t 33
tidyall.ini 05
xt/author/00-compile.t 053
xt/author/pod-spell.t 46
xt/release/distmeta.t 32
xt/release/pod-coverage.t 93
xt/release/pod-syntax.t 32
xt/release/portability.t 03
23 files changed (This is a version diff) 406631
@@ -1,42 +1,100 @@
-README.PATCHING
+## HOW TO CONTRIBUTE
 
 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).
+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:
+Generally, **you do not need Dist::Zilla to contribute patches**.  You do need
+Dist::Zilla to create a tarball and/or install from the repository.  See below
+for guidance.
 
-  $ prove -l
-  $ prove -lv t/some_test_file.t
+### Getting dependencies
 
-For most distributions, 'prove' is entirely sufficent for you to test any
-patches you have.
+See the included `cpanfile` file for a list of dependencies.  If you have
+App::cpanminus 1.6 or later installed, you can use `cpanm` to satisfy
+dependencies like this:
 
-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.
+    $ cpanm --installdeps .
+
+Otherwise, you can install Module::CPANfile 1.0002 or later and then satisfy
+dependencies with the regular `cpan` client and `cpanfile-dump`:
+
+    $ cpan `cpanfile-dump`
+
+### Running tests
+
+You can run tests directly using the `prove` tool:
+
+    $ prove -l
+    $ prove -lv t/some_test_file.t
+
+For most of my distributions, `prove` is entirely sufficient for you to test any
+patches you have. I use `prove` for 99% of my testing during development.
+
+### Code style and tidying
+
+Please try to match any existing coding style.  If there is a `.perltidyrc`
+file, please install Perl::Tidy and use perltidy before submitting patches.
+
+If there is a `tidyall.ini` file, you can also install Code::TidyAll and run
+`tidyall` on a file or `tidyall -a` to tidy all files.
+
+### Patching documentation
+
+Much of the documentation Pod is generated at release time.  Depending on the
+distribution, some of my 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:
+### Installing from the repository
 
-  $ cpan `dzil authordeps`
-  $ dzil authordeps | cpanm
+If you want to install directly from the repository, you need to have
+Dist::Zilla installed (see below).  If this is a burden to you, I welcome
+patches against a CPAN tarball instead of the repository.
+
+### Installing and using Dist::Zilla
+
+Dist::Zilla is a very powerful authoring tool, optimized for maintaining a
+large number of distributions with a high degree of automation, but it has a
+large dependency chain, a bit of a learning curve and requires a number of
+author-specific plugins.
+
+To install it from CPAN, I recommend one of the following approaches for
+the quickest installation:
+
+    # using CPAN.pm, but bypassing non-functional pod tests
+    $ cpan TAP::Harness::Restricted
+    $ PERL_MM_USE_DEFAULT=1 HARNESS_CLASS=TAP::Harness::Restricted cpan Dist::Zilla
+
+    # using cpanm, bypassing *all* tests
+    $ cpanm -n Dist::Zilla
+
+In either case, it's probably going to take about 10 minutes.  Go for a walk,
+go get a cup of your favorite beverage, take a bathroom break, or whatever.
+When you get back, Dist::Zilla should be ready for you.
+
+Then you need to install any plugins specific to this distribution:
+
+    $ cpan `dzil authordeps`
+    $ dzil authordeps | cpanm
 
 Once installed, here are some dzil commands you might try:
 
-  $ dzil build
-  $ dzil test
-  $ dzil xtest
- 
+    $ dzil build
+    $ dzil test
+    $ dzil xtest
+
+To install from the repository, use:
+
+    $ dzil install
+
 You can learn more about Dist::Zilla at http://dzil.org/
 
@@ -1,5 +1,16 @@
 Revision history for Perl module File::pushd
 
+1.006     2014-03-27 15:29:36-04:00 America/New_York
+
+    [DOCUMENTED]
+
+    - Noted that multiple pushd objects in a lexical scope are not
+      destroyed in a predictable order
+
+    [CHANGED]
+
+    - Modernized Dist::Zilla configuration and repo support files
+
 1.005     2013-03-22 09:58:20 America/New_York
 
     [BUG FIXES]
@@ -1,4 +1,4 @@
-This software is Copyright (c) 2013 by David A Golden.
+This software is Copyright (c) 2014 by David A Golden.
 
 This is free software, licensed under:
 
@@ -1,3 +1,4 @@
+# This file was automatically generated by Dist::Zilla::Plugin::Manifest v5.014.
 CONTRIBUTING
 Changes
 LICENSE
@@ -7,14 +8,16 @@ META.yml
 Makefile.PL
 README
 Todo
+cpanfile
 dist.ini
 examples/example.pl
 lib/File/pushd.pm
 perlcritic.rc
-t/00-compile.t
 t/00-report-prereqs.t
 t/File_pushd.t
 t/exception.t
+tidyall.ini
+xt/author/00-compile.t
 xt/author/critic.t
 xt/author/pod-spell.t
 xt/release/distmeta.t
@@ -4,7 +4,7 @@
       "David Golden <dagolden@cpan.org>"
    ],
    "dynamic_config" : 0,
-   "generated_by" : "Dist::Zilla version 4.300031, CPAN::Meta::Converter version 2.120921",
+   "generated_by" : "Dist::Zilla version 5.014, CPAN::Meta::Converter version 2.140640",
    "license" : [
       "apache_2_0"
    ],
@@ -27,13 +27,20 @@
    "prereqs" : {
       "configure" : {
          "requires" : {
-            "ExtUtils::MakeMaker" : "6.30"
+            "ExtUtils::MakeMaker" : "6.17"
          }
       },
       "develop" : {
          "requires" : {
+            "Dist::Zilla" : "5.014",
+            "Dist::Zilla::PluginBundle::DAGOLDEN" : "0.060",
+            "File::Spec" : "0",
+            "File::Temp" : "0",
+            "IO::Handle" : "0",
+            "IPC::Open3" : "0",
             "Pod::Coverage::TrustPod" : "0",
             "Test::CPAN::Meta" : "0",
+            "Test::More" : "0",
             "Test::Pod" : "1.41",
             "Test::Pod::Coverage" : "1.08"
          }
@@ -47,41 +54,46 @@
             "File::Spec" : "0",
             "File::Temp" : "0",
             "overload" : "0",
-            "perl" : "5.006",
+            "perl" : "5.008",
             "strict" : "0",
             "warnings" : "0"
          }
       },
       "test" : {
+         "recommends" : {
+            "CPAN::Meta" : "0",
+            "CPAN::Meta::Requirements" : "2.120900"
+         },
          "requires" : {
             "ExtUtils::MakeMaker" : "0",
             "File::Basename" : "0",
-            "File::Find" : "0",
             "File::Spec::Functions" : "0",
             "List::Util" : "0",
-            "Test::More" : "0"
+            "Test::More" : "0",
+            "version" : "0"
          }
       }
    },
    "provides" : {
       "File::pushd" : {
          "file" : "lib/File/pushd.pm",
-         "version" : "1.005"
+         "version" : "1.006"
       }
    },
    "release_status" : "stable",
    "resources" : {
       "bugtracker" : {
-         "web" : "https://github.com/dagolden/file-pushd/issues"
+         "web" : "https://github.com/dagolden/File-pushd/issues"
       },
-      "homepage" : "https://metacpan.org/release/File-pushd",
+      "homepage" : "https://github.com/dagolden/File-pushd",
       "repository" : {
          "type" : "git",
-         "url" : "git://github.com/dagolden/file-pushd.git",
-         "web" : "https://github.com/dagolden/file-pushd"
+         "url" : "https://github.com/dagolden/File-pushd.git",
+         "web" : "https://github.com/dagolden/File-pushd"
       }
    },
-   "version" : "1.005",
+   "version" : "1.006",
+   "x_authority" : "cpan:DAGOLDEN",
    "x_contributors" : [
       "Diab Jerius <djerius@cfa.harvard.edu>"
    ]
@@ -3,20 +3,20 @@ abstract: 'change directory temporarily for a limited scope'
 author:
   - 'David Golden <dagolden@cpan.org>'
 build_requires:
-  ExtUtils::MakeMaker: 0
-  File::Basename: 0
-  File::Find: 0
-  File::Spec::Functions: 0
-  List::Util: 0
-  Test::More: 0
+  ExtUtils::MakeMaker: '0'
+  File::Basename: '0'
+  File::Spec::Functions: '0'
+  List::Util: '0'
+  Test::More: '0'
+  version: '0'
 configure_requires:
-  ExtUtils::MakeMaker: 6.30
+  ExtUtils::MakeMaker: '6.17'
 dynamic_config: 0
-generated_by: 'Dist::Zilla version 4.300031, CPAN::Meta::Converter version 2.120921'
+generated_by: 'Dist::Zilla version 5.014, CPAN::Meta::Converter version 2.140640'
 license: apache
 meta-spec:
   url: http://module-build.sourceforge.net/META-spec-v1.4.html
-  version: 1.4
+  version: '1.4'
 name: File-pushd
 no_index:
   directory:
@@ -29,22 +29,23 @@ no_index:
 provides:
   File::pushd:
     file: lib/File/pushd.pm
-    version: 1.005
+    version: '1.006'
 requires:
-  Carp: 0
-  Cwd: 0
-  Exporter: 0
-  File::Path: 0
-  File::Spec: 0
-  File::Temp: 0
-  overload: 0
-  perl: 5.006
-  strict: 0
-  warnings: 0
+  Carp: '0'
+  Cwd: '0'
+  Exporter: '0'
+  File::Path: '0'
+  File::Spec: '0'
+  File::Temp: '0'
+  overload: '0'
+  perl: '5.008'
+  strict: '0'
+  warnings: '0'
 resources:
-  bugtracker: https://github.com/dagolden/file-pushd/issues
-  homepage: https://metacpan.org/release/File-pushd
-  repository: git://github.com/dagolden/file-pushd.git
-version: 1.005
+  bugtracker: https://github.com/dagolden/File-pushd/issues
+  homepage: https://github.com/dagolden/File-pushd
+  repository: https://github.com/dagolden/File-pushd.git
+version: '1.006'
+x_authority: cpan:DAGOLDEN
 x_contributors:
   - 'Diab Jerius <djerius@cfa.harvard.edu>'
@@ -1,26 +1,20 @@
 
+# This file was automatically generated by Dist::Zilla::Plugin::MakeMaker v5.014.
 use strict;
 use warnings;
 
-use 5.006;
+use 5.008;
 
-use ExtUtils::MakeMaker 6.30;
+use ExtUtils::MakeMaker 6.17;
 
 
 
 my %WriteMakefileArgs = (
   "ABSTRACT" => "change directory temporarily for a limited scope",
   "AUTHOR" => "David Golden <dagolden\@cpan.org>",
-  "BUILD_REQUIRES" => {
-    "ExtUtils::MakeMaker" => 0,
-    "File::Basename" => 0,
-    "File::Find" => 0,
-    "File::Spec::Functions" => 0,
-    "List::Util" => 0,
-    "Test::More" => 0
-  },
+  "BUILD_REQUIRES" => {},
   "CONFIGURE_REQUIRES" => {
-    "ExtUtils::MakeMaker" => "6.30"
+    "ExtUtils::MakeMaker" => "6.17"
   },
   "DISTNAME" => "File-pushd",
   "EXE_FILES" => [],
@@ -37,24 +31,44 @@ my %WriteMakefileArgs = (
     "strict" => 0,
     "warnings" => 0
   },
-  "VERSION" => "1.005",
+  "TEST_REQUIRES" => {
+    "ExtUtils::MakeMaker" => 0,
+    "File::Basename" => 0,
+    "File::Spec::Functions" => 0,
+    "List::Util" => 0,
+    "Test::More" => 0,
+    "version" => 0
+  },
+  "VERSION" => "1.006",
   "test" => {
     "TESTS" => "t/*.t"
   }
 );
 
 
-unless ( eval { ExtUtils::MakeMaker->VERSION(6.56) } ) {
-  my $br = delete $WriteMakefileArgs{BUILD_REQUIRES};
-  my $pp = $WriteMakefileArgs{PREREQ_PM};
-  for my $mod ( keys %$br ) {
-    if ( exists $pp->{$mod} ) {
-      $pp->{$mod} = $br->{$mod} if $br->{$mod} > $pp->{$mod};
-    }
-    else {
-      $pp->{$mod} = $br->{$mod};
-    }
-  }
+my %FallbackPrereqs = (
+  "Carp" => 0,
+  "Cwd" => 0,
+  "Exporter" => 0,
+  "ExtUtils::MakeMaker" => 0,
+  "File::Basename" => 0,
+  "File::Path" => 0,
+  "File::Spec" => 0,
+  "File::Spec::Functions" => 0,
+  "File::Temp" => 0,
+  "List::Util" => 0,
+  "Test::More" => 0,
+  "overload" => 0,
+  "strict" => 0,
+  "version" => 0,
+  "warnings" => 0
+);
+
+
+unless ( eval { ExtUtils::MakeMaker->VERSION(6.63_03) } ) {
+  delete $WriteMakefileArgs{TEST_REQUIRES};
+  delete $WriteMakefileArgs{BUILD_REQUIRES};
+  $WriteMakefileArgs{PREREQ_PM} = \%FallbackPrereqs;
 }
 
 delete $WriteMakefileArgs{CONFIGURE_REQUIRES}
@@ -2,31 +2,31 @@ NAME
     File::pushd - change directory temporarily for a limited scope
 
 VERSION
-    version 1.005
+    version 1.006
 
 SYNOPSIS
-      use File::pushd;
- 
-      chdir $ENV{HOME};
- 
-      # change directory again for a limited scope
-      {
-          my $dir = pushd( '/tmp' );
-          # working directory changed to /tmp
-      }
-      # working directory has reverted to $ENV{HOME}
- 
-      # tempd() is equivalent to pushd( File::Temp::tempdir )
-      {
-          my $dir = tempd();
-      }
- 
-      # object stringifies naturally as an absolute path
-      {
+     use File::pushd;
+
+     chdir $ENV{HOME};
+
+     # change directory again for a limited scope
+     {
          my $dir = pushd( '/tmp' );
-         my $filename = File::Spec->catfile( $dir, "somefile.txt" );
-         # gives /tmp/somefile.txt
-      }
+         # working directory changed to /tmp
+     }
+     # working directory has reverted to $ENV{HOME}
+
+     # tempd() is equivalent to pushd( File::Temp::tempdir )
+     {
+         my $dir = tempd();
+     }
+
+     # object stringifies naturally as an absolute path
+     {
+        my $dir = pushd( '/tmp' );
+        my $filename = File::Spec->catfile( $dir, "somefile.txt" );
+        # gives /tmp/somefile.txt
+     }
 
 DESCRIPTION
     File::pushd does a temporary "chdir" that is easily and automatically
@@ -44,16 +44,20 @@ DESCRIPTION
     For convenience, the object stringifies as the canonical form of the
     absolute pathname of the directory entered.
 
+    Warning: if you create multiple "pushd" objects in the same lexical
+    scope, their destruction order is not guaranteed and you might not wind
+    up in the directory you expect.
+
 USAGE
-      use File::pushd;
+     use File::pushd;
 
     Using File::pushd automatically imports the "pushd" and "tempd"
     functions.
 
   pushd
-      {
-          my $dir = pushd( $target_directory );
-      }
+     {
+         my $dir = pushd( $target_directory );
+     }
 
     Caches the current working directory, calls "chdir" to change to the
     target directory, and returns a File::pushd object. When the object is
@@ -68,16 +72,16 @@ USAGE
 
     Can be given a hashref as an optional second argument. The only
     supported option is "untaint_pattern", which is used to untaint file
-    paths involved. It defaults to "qr{^([-+@\w./]+)$}", which is reasonably
-    restrictive (e.g. it does not even allow spaces in the path). Change
-    this to suit your circumstances and security needs if running under
-    taint mode. Note: you must include the parentheses in the pattern to
-    capture the untainted portion of the path.
+    paths involved. It defaults to {qr{^("" in -+@\w.+)$}}, which is
+    reasonably restrictive (e.g. it does not even allow spaces in the path).
+    Change this to suit your circumstances and security needs if running
+    under taint mode. *Note*: you must include the parentheses in the
+    pattern to capture the untainted portion of the path.
 
   tempd
-      {
-          my $dir = tempd();
-      }
+     {
+         my $dir = tempd();
+     }
 
     This function is like "pushd" but automatically creates and calls
     "chdir" to a temporary directory created by File::Temp. Unlike normal
@@ -89,14 +93,14 @@ USAGE
     As with "pushd", "tempd" will die if "chdir" fails.
 
     It may be given a single options hash that will be passed internally to
-    C<pushd>.
+    "pushd".
 
   preserve
-      {
-          my $dir = tempd();
-          $dir->preserve;      # mark to preserve at end of scope
-          $dir->preserve(0);   # mark to delete at end of scope
-      }
+     {
+         my $dir = tempd();
+         $dir->preserve;      # mark to preserve at end of scope
+         $dir->preserve(0);   # mark to delete at end of scope
+     }
 
     Controls whether a temporary directory will be cleaned up when the
     object is destroyed. With no arguments, "preserve" sets the directory to
@@ -112,16 +116,16 @@ SEE ALSO
 SUPPORT
   Bugs / Feature Requests
     Please report any bugs or feature requests through the issue tracker at
-    <https://github.com/dagolden/file-pushd/issues>. You will be notified
+    <https://github.com/dagolden/File-pushd/issues>. You will be notified
     automatically of any progress on your issue.
 
   Source Code
     This is open source software. The code repository is available for
     public review and contribution under the terms of the license.
 
-    <https://github.com/dagolden/file-pushd>
+    <https://github.com/dagolden/File-pushd>
 
-      git clone git://github.com/dagolden/file-pushd.git
+      git clone https://github.com/dagolden/File-pushd.git
 
 AUTHOR
     David Golden <dagolden@cpan.org>
@@ -130,7 +134,7 @@ CONTRIBUTOR
     Diab Jerius <djerius@cfa.harvard.edu>
 
 COPYRIGHT AND LICENSE
-    This software is Copyright (c) 2013 by David A Golden.
+    This software is Copyright (c) 2014 by David A Golden.
 
     This is free software, licensed under:
 
@@ -0,0 +1,42 @@
+requires "Carp" => "0";
+requires "Cwd" => "0";
+requires "Exporter" => "0";
+requires "File::Path" => "0";
+requires "File::Spec" => "0";
+requires "File::Temp" => "0";
+requires "overload" => "0";
+requires "perl" => "5.008";
+requires "strict" => "0";
+requires "warnings" => "0";
+
+on 'test' => sub {
+  requires "ExtUtils::MakeMaker" => "0";
+  requires "File::Basename" => "0";
+  requires "File::Spec::Functions" => "0";
+  requires "List::Util" => "0";
+  requires "Test::More" => "0";
+  requires "version" => "0";
+};
+
+on 'test' => sub {
+  recommends "CPAN::Meta" => "0";
+  recommends "CPAN::Meta::Requirements" => "2.120900";
+};
+
+on 'configure' => sub {
+  requires "ExtUtils::MakeMaker" => "6.17";
+};
+
+on 'develop' => sub {
+  requires "Dist::Zilla" => "5.014";
+  requires "Dist::Zilla::PluginBundle::DAGOLDEN" => "0.060";
+  requires "File::Spec" => "0";
+  requires "File::Temp" => "0";
+  requires "IO::Handle" => "0";
+  requires "IPC::Open3" => "0";
+  requires "Pod::Coverage::TrustPod" => "0";
+  requires "Test::CPAN::Meta" => "0";
+  requires "Test::More" => "0";
+  requires "Test::Pod" => "1.41";
+  requires "Test::Pod::Coverage" => "1.08";
+};
@@ -4,10 +4,7 @@ license = Apache_2_0
 copyright_holder = David A Golden
 
 [@DAGOLDEN]
-AutoMetaResources.bugtracker.rt = 0
-AutoMetaResources.bugtracker.github = user:dagolden
-stopwords = Diab
-stopwords = Jerius
+:version = 0.060
 stopwords = destructor
 stopwords = pathname
 stopwords = tempd
@@ -1,29 +1,30 @@
 use strict;
 use warnings;
+
 package File::pushd;
 # ABSTRACT: change directory temporarily for a limited scope
-our $VERSION = '1.005'; # VERSION
+our $VERSION = '1.006'; # VERSION
 
-our @EXPORT  = qw( pushd tempd );
-our @ISA     = qw( Exporter );
+our @EXPORT = qw( pushd tempd );
+our @ISA    = qw( Exporter );
 
 use Exporter;
 use Carp;
-use Cwd         qw( getcwd abs_path );
-use File::Path  qw( rmtree );
-use File::Temp  qw();
+use Cwd qw( getcwd abs_path );
+use File::Path qw( rmtree );
+use File::Temp qw();
 use File::Spec;
 
 use overload
-    q{""} => sub { File::Spec->canonpath( $_[0]->{_pushd} ) },
-    fallback => 1;
+  q{""}    => sub { File::Spec->canonpath( $_[0]->{_pushd} ) },
+  fallback => 1;
 
 #--------------------------------------------------------------------------#
 # pushd()
 #--------------------------------------------------------------------------#
 
 sub pushd {
-    my ($target_dir, $options) = @_;
+    my ( $target_dir, $options ) = @_;
     $options->{untaint_pattern} ||= qr{^([-+@\w./]+)$};
 
     $target_dir = "." unless defined $target_dir;
@@ -32,32 +33,33 @@ sub pushd {
     my $tainted_orig = getcwd;
     my $orig;
     if ( $tainted_orig =~ $options->{untaint_pattern} ) {
-      $orig = $1;
+        $orig = $1;
     }
     else {
-      $orig = $tainted_orig;
+        $orig = $tainted_orig;
     }
 
     my $tainted_dest;
-    eval { $tainted_dest   = $target_dir ? abs_path( $target_dir ) : $orig };
+    eval { $tainted_dest = $target_dir ? abs_path($target_dir) : $orig };
     croak "Can't locate absolute path for $target_dir: $@" if $@;
 
     my $dest;
     if ( $tainted_dest =~ $options->{untaint_pattern} ) {
-      $dest = $1;
+        $dest = $1;
     }
     else {
-      $dest = $tainted_dest;
+        $dest = $tainted_dest;
     }
 
-    if ($dest ne $orig) {
+    if ( $dest ne $orig ) {
         chdir $dest or croak "Can't chdir to $dest\: $!";
     }
 
     my $self = bless {
-        _pushd => $dest,
+        _pushd    => $dest,
         _original => $orig
-    }, __PACKAGE__;
+      },
+      __PACKAGE__;
 
     return $self;
 }
@@ -81,7 +83,7 @@ sub tempd {
 
 sub preserve {
     my $self = shift;
-    return 1 if ! $self->{"_tempd"};
+    return 1 if !$self->{"_tempd"};
     if ( @_ == 0 ) {
         return $self->{_preserve} = 1;
     }
@@ -100,8 +102,9 @@ sub DESTROY {
     my ($self) = @_;
     my $orig = $self->{_original};
     chdir $orig if $orig; # should always be so, but just in case...
-    if ( $self->{_tempd} &&
-        !$self->{_preserve} ) {
+    if ( $self->{_tempd}
+        && !$self->{_preserve} )
+    {
         # don't destroy existing $@ if there is no error.
         my $err = do {
             local $@;
@@ -114,49 +117,49 @@ sub DESTROY {
 
 1;
 
-__END__
-
 =pod
 
+=encoding UTF-8
+
 =head1 NAME
 
 File::pushd - change directory temporarily for a limited scope
 
 =head1 VERSION
 
-version 1.005
+version 1.006
 
 =head1 SYNOPSIS
 
-  use File::pushd;
- 
-  chdir $ENV{HOME};
- 
-  # change directory again for a limited scope
-  {
-      my $dir = pushd( '/tmp' );
-      # working directory changed to /tmp
-  }
-  # working directory has reverted to $ENV{HOME}
- 
-  # tempd() is equivalent to pushd( File::Temp::tempdir )
-  {
-      my $dir = tempd();
-  }
- 
-  # object stringifies naturally as an absolute path
-  {
+ use File::pushd;
+
+ chdir $ENV{HOME};
+
+ # change directory again for a limited scope
+ {
      my $dir = pushd( '/tmp' );
-     my $filename = File::Spec->catfile( $dir, "somefile.txt" );
-     # gives /tmp/somefile.txt
-  }
+     # working directory changed to /tmp
+ }
+ # working directory has reverted to $ENV{HOME}
+
+ # tempd() is equivalent to pushd( File::Temp::tempdir )
+ {
+     my $dir = tempd();
+ }
+
+ # object stringifies naturally as an absolute path
+ {
+    my $dir = pushd( '/tmp' );
+    my $filename = File::Spec->catfile( $dir, "somefile.txt" );
+    # gives /tmp/somefile.txt
+ }
 
 =head1 DESCRIPTION
 
-File::pushd does a temporary C<<< chdir >>> that is easily and automatically
-reverted, similar to C<<< pushd >>> in some Unix command shells.  It works by
+File::pushd does a temporary C<chdir> that is easily and automatically
+reverted, similar to C<pushd> in some Unix command shells.  It works by
 creating an object that caches the original working directory.  When the object
-is destroyed, the destructor calls C<<< chdir >>> to revert to the original working
+is destroyed, the destructor calls C<chdir> to revert to the original working
 directory.  By storing the object in a lexical variable with a limited scope,
 this happens automatically at the end of the scope.
 
@@ -167,19 +170,23 @@ directory from L<File::Temp>.
 For convenience, the object stringifies as the canonical form of the absolute
 pathname of the directory entered.
 
+B<Warning>: if you create multiple C<pushd> objects in the same lexical scope,
+their destruction order is not guaranteed and you might not wind up in the
+directory you expect.
+
 =head1 USAGE
 
-  use File::pushd;
+ use File::pushd;
 
-Using File::pushd automatically imports the C<<< pushd >>> and C<<< tempd >>> functions.
+Using File::pushd automatically imports the C<pushd> and C<tempd> functions.
 
 =head2 pushd
 
-  {
-      my $dir = pushd( $target_directory );
-  }
+ {
+     my $dir = pushd( $target_directory );
+ }
 
-Caches the current working directory, calls C<<< chdir >>> to change to the target
+Caches the current working directory, calls C<chdir> to change to the target
 directory, and returns a File::pushd object.  When the object is
 destroyed, the working directory reverts to the original directory.
 
@@ -188,52 +195,52 @@ called with no arguments, it uses the current directory as its target and
 returns to the current directory when the object is destroyed.
 
 If the target directory does not exist or if the directory change fails
-for some reason, C<<< pushd >>> will die with an error message.
+for some reason, C<pushd> will die with an error message.
 
 Can be given a hashref as an optional second argument.  The only supported
-option is C<<< untaint_pattern >>>, which is used to untaint file paths involved.
-It defaults to C<<< qr{^([-+@\w./]+)$} >>>, which is reasonably restrictive (e.g.
+option is C<untaint_pattern>, which is used to untaint file paths involved.
+It defaults to {qr{^(L<-+@\w./>+)$}}, which is reasonably restrictive (e.g.
 it does not even allow spaces in the path).  Change this to suit your
-circumstances and security needs if running under taint mode. B<Note>: you
+circumstances and security needs if running under taint mode. *Note*: you
 must include the parentheses in the pattern to capture the untainted
 portion of the path.
 
 =head2 tempd
 
-  {
-      my $dir = tempd();
-  }
+ {
+     my $dir = tempd();
+ }
 
-This function is like C<<< pushd >>> but automatically creates and calls C<<< chdir >>> to
+This function is like C<pushd> but automatically creates and calls C<chdir> to
 a temporary directory created by L<File::Temp>. Unlike normal L<File::Temp>
 cleanup which happens at the end of the program, this temporary directory is
-removed when the object is destroyed. (But also see C<<< preserve >>>.)  A warning
+removed when the object is destroyed. (But also see C<preserve>.)  A warning
 will be issued if the directory cannot be removed.
 
-As with C<<< pushd >>>, C<<< tempd >>> will die if C<<< chdir >>> fails.
+As with C<pushd>, C<tempd> will die if C<chdir> fails.
 
 It may be given a single options hash that will be passed internally
-to CE<lt>pushdE<gt>.
+to C<pushd>.
 
 =head2 preserve
 
-  {
-      my $dir = tempd();
-      $dir->preserve;      # mark to preserve at end of scope
-      $dir->preserve(0);   # mark to delete at end of scope
-  }
+ {
+     my $dir = tempd();
+     $dir->preserve;      # mark to preserve at end of scope
+     $dir->preserve(0);   # mark to delete at end of scope
+ }
 
 Controls whether a temporary directory will be cleaned up when the object is
-destroyed.  With no arguments, C<<< preserve >>> sets the directory to be preserved.
+destroyed.  With no arguments, C<preserve> sets the directory to be preserved.
 With an argument, the directory will be preserved if the argument is true, or
-marked for cleanup if the argument is false.  Only C<<< tempd >>> objects may be
-marked for cleanup.  (Target directories to C<<< pushd >>> are always preserved.)
-C<<< preserve >>> returns true if the directory will be preserved, and false
+marked for cleanup if the argument is false.  Only C<tempd> objects may be
+marked for cleanup.  (Target directories to C<pushd> are always preserved.)
+C<preserve> returns true if the directory will be preserved, and false
 otherwise.
 
 =head1 SEE ALSO
 
-=over
+=over 4
 
 =item *
 
@@ -248,7 +255,7 @@ L<File::chdir>
 =head2 Bugs / Feature Requests
 
 Please report any bugs or feature requests through the issue tracker
-at L<https://github.com/dagolden/file-pushd/issues>.
+at L<https://github.com/dagolden/File-pushd/issues>.
 You will be notified automatically of any progress on your issue.
 
 =head2 Source Code
@@ -256,9 +263,9 @@ You will be notified automatically of any progress on your issue.
 This is open source software.  The code repository is available for
 public review and contribution under the terms of the license.
 
-L<https://github.com/dagolden/file-pushd>
+L<https://github.com/dagolden/File-pushd>
 
-  git clone git://github.com/dagolden/file-pushd.git
+  git clone https://github.com/dagolden/File-pushd.git
 
 =head1 AUTHOR
 
@@ -270,10 +277,15 @@ Diab Jerius <djerius@cfa.harvard.edu>
 
 =head1 COPYRIGHT AND LICENSE
 
-This software is Copyright (c) 2013 by David A Golden.
+This software is Copyright (c) 2014 by David A Golden.
 
 This is free software, licensed under:
 
   The Apache License, Version 2.0, January 2004
 
 =cut
+
+__END__
+
+
+# vim: ts=4 sts=4 sw=4 et:
@@ -7,6 +7,9 @@ allow = $@ $!
 [TestingAndDebugging::ProhibitNoStrict]
 allow = refs
 
+[Variables::ProhibitEvilVariables]
+variables = $DB::single
+
 # Turn these off
 [-BuiltinFunctions::ProhibitStringyEval]
 [-ControlStructures::ProhibitPostfixControls]
@@ -1,74 +0,0 @@
-#!perl
-
-use strict;
-use warnings;
-
-use Test::More;
-
-
-
-use File::Find;
-use File::Temp qw{ tempdir };
-
-my @modules;
-find(
-  sub {
-    return if $File::Find::name !~ /\.pm\z/;
-    my $found = $File::Find::name;
-    $found =~ s{^lib/}{};
-    $found =~ s{[/\\]}{::}g;
-    $found =~ s/\.pm$//;
-    # nothing to skip
-    push @modules, $found;
-  },
-  'lib',
-);
-
-sub _find_scripts {
-    my $dir = shift @_;
-
-    my @found_scripts = ();
-    find(
-      sub {
-        return unless -f;
-        my $found = $File::Find::name;
-        # nothing to skip
-        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;
-      },
-      $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");
-
-{
-    # fake home for cpan-testers
-     local $ENV{HOME} = tempdir( CLEANUP => 1 );
-
-    like( qx{ $^X -Ilib -e "require $_; print '$_ ok'" }, qr/^\s*$_ ok/s, "$_ loaded ok" )
-        for sort @modules;
-
-    SKIP: {
-        eval "use Test::Script 1.05; 1;";
-        skip "Test::Script needed to test script compilation", scalar(@scripts) if $@;
-        foreach my $file ( @scripts ) {
-            my $script = $file;
-            $script =~ s!.*/!!;
-            script_compiles( $file, "$script script compiles" );
-        }
-    }
-
-}
@@ -3,45 +3,130 @@
 use strict;
 use warnings;
 
+# This test was generated by Dist::Zilla::Plugin::Test::ReportPrereqs 0.013
+
 use Test::More tests => 1;
 
 use ExtUtils::MakeMaker;
 use File::Spec::Functions;
 use List::Util qw/max/;
+use version;
+
+# hide optional CPAN::Meta modules from prereq scanner
+# and check if they are available
+my $cpan_meta = "CPAN::Meta";
+my $cpan_meta_req = "CPAN::Meta::Requirements";
+my $HAS_CPAN_META = eval "require $cpan_meta"; ## no critic
+my $HAS_CPAN_META_REQ = eval "require $cpan_meta_req; $cpan_meta_req->VERSION('2.120900')";
+
+# Verify requirements?
+my $DO_VERIFY_PREREQS = 1;
+
+sub _merge_requires {
+    my ($collector, $prereqs) = @_;
+    for my $phase ( qw/configure build test runtime develop/ ) {
+        next unless exists $prereqs->{$phase};
+        if ( my $req = $prereqs->{$phase}{'requires'} ) {
+            my $cmr = CPAN::Meta::Requirements->from_string_hash( $req );
+            $collector->add_requirements( $cmr );
+        }
+    }
+}
+
+my %include = map {; $_ => 1 } qw(
 
-my @modules = qw(
-  Carp
-  Cwd
-  Exporter
-  ExtUtils::MakeMaker
-  File::Basename
-  File::Find
-  File::Path
-  File::Spec
-  File::Spec::Functions
-  File::Temp
-  List::Util
-  Test::More
-  overload
-  perl
-  strict
-  warnings
 );
 
-# replace modules with dynamic results from MYMETA.json if we can
-# (hide CPAN::Meta from prereq scanner)
-my $cpan_meta = "CPAN::Meta";
-if ( -f "MYMETA.json" && eval "require $cpan_meta" ) { ## no critic
-  if ( my $meta = eval { CPAN::Meta->load_file("MYMETA.json") } ) {
-    my $prereqs = $meta->prereqs;
-    delete $prereqs->{develop};
-    my %uniq = map {$_ => 1} map { keys %$_ } map { values %$_ } values %$prereqs;
-    $uniq{$_} = 1 for @modules; # don't lose any static ones
-    @modules = sort keys %uniq;
+my %exclude = map {; $_ => 1 } qw(
+
+);
+
+# Add static prereqs to the included modules list
+my $static_prereqs = do { my $x = {
+       'configure' => {
+                        'requires' => {
+                                        'ExtUtils::MakeMaker' => '6.17'
+                                      }
+                      },
+       'develop' => {
+                      'requires' => {
+                                      'Dist::Zilla' => '5.014',
+                                      'Dist::Zilla::PluginBundle::DAGOLDEN' => '0.060',
+                                      'File::Spec' => '0',
+                                      'File::Temp' => '0',
+                                      'IO::Handle' => '0',
+                                      'IPC::Open3' => '0',
+                                      'Pod::Coverage::TrustPod' => '0',
+                                      'Test::CPAN::Meta' => '0',
+                                      'Test::More' => '0',
+                                      'Test::Pod' => '1.41',
+                                      'Test::Pod::Coverage' => '1.08'
+                                    }
+                    },
+       'runtime' => {
+                      'requires' => {
+                                      'Carp' => '0',
+                                      'Cwd' => '0',
+                                      'Exporter' => '0',
+                                      'File::Path' => '0',
+                                      'File::Spec' => '0',
+                                      'File::Temp' => '0',
+                                      'overload' => '0',
+                                      'perl' => '5.008',
+                                      'strict' => '0',
+                                      'warnings' => '0'
+                                    }
+                    },
+       'test' => {
+                   'recommends' => {
+                                     'CPAN::Meta' => '0',
+                                     'CPAN::Meta::Requirements' => '2.120900'
+                                   },
+                   'requires' => {
+                                   'ExtUtils::MakeMaker' => '0',
+                                   'File::Basename' => '0',
+                                   'File::Spec::Functions' => '0',
+                                   'List::Util' => '0',
+                                   'Test::More' => '0',
+                                   'version' => '0'
+                                 }
+                 }
+     };
+  $x;
+ };
+
+delete $static_prereqs->{develop} if not $ENV{AUTHOR_TESTING};
+$include{$_} = 1 for map { keys %$_ } map { values %$_ } values %$static_prereqs;
+
+# Merge requirements for major phases (if we can)
+my $all_requires;
+if ( $DO_VERIFY_PREREQS && $HAS_CPAN_META_REQ ) {
+    $all_requires = $cpan_meta_req->new;
+    _merge_requires($all_requires, $static_prereqs);
+}
+
+
+# Add dynamic prereqs to the included modules list (if we can)
+my ($source) = grep { -f } 'MYMETA.json', 'MYMETA.yml';
+if ( $source && $HAS_CPAN_META ) {
+  if ( my $meta = eval { CPAN::Meta->load_file($source) } ) {
+    my $dynamic_prereqs = $meta->prereqs;
+    delete $dynamic_prereqs->{develop} if not $ENV{AUTHOR_TESTING};
+    $include{$_} = 1 for map { keys %$_ } map { values %$_ } values %$dynamic_prereqs;
+
+    if ( $DO_VERIFY_PREREQS && $HAS_CPAN_META_REQ ) {
+        _merge_requires($all_requires, $dynamic_prereqs);
+    }
   }
 }
+else {
+  $source = 'static metadata';
+}
 
+my @modules = sort grep { ! $exclude{$_} } keys %include;
 my @reports = [qw/Version Module/];
+my @dep_errors;
+my $req_hash = defined($all_requires) ? $all_requires->as_string_hash : {};
 
 for my $mod ( @modules ) {
   next if $mod eq 'perl';
@@ -53,9 +138,29 @@ for my $mod ( @modules ) {
     my $ver = MM->parse_version( catfile($prefix, $file) );
     $ver = "undef" unless defined $ver; # Newer MM should do this anyway
     push @reports, [$ver, $mod];
+
+    if ( $DO_VERIFY_PREREQS && $all_requires ) {
+      my $req = $req_hash->{$mod};
+      if ( defined $req && length $req ) {
+        if ( ! defined eval { version->parse($ver) } ) {
+          push @dep_errors, "$mod version '$ver' cannot be parsed (version '$req' required)";
+        }
+        elsif ( ! $all_requires->accepts_module( $mod => $ver ) ) {
+          push @dep_errors, "$mod version '$ver' is not in required range '$req'";
+        }
+      }
+    }
+
   }
   else {
     push @reports, ["missing", $mod];
+
+    if ( $DO_VERIFY_PREREQS && $all_requires ) {
+      my $req = $req_hash->{$mod};
+      if ( defined $req && length $req ) {
+        push @dep_errors, "$mod is not installed (version '$req' required)";
+      }
+    }
   }
 }
 
@@ -63,9 +168,19 @@ if ( @reports ) {
   my $vl = max map { length $_->[0] } @reports;
   my $ml = max map { length $_->[1] } @reports;
   splice @reports, 1, 0, ["-" x $vl, "-" x $ml];
-  diag "Prerequisite Report:\n", map {sprintf("  %*s %*s\n",$vl,$_->[0],-$ml,$_->[1])} @reports;
+  diag "\nVersions for all modules listed in $source (including optional ones):\n",
+    map {sprintf("  %*s %*s\n",$vl,$_->[0],-$ml,$_->[1])} @reports;
+}
+
+if ( @dep_errors ) {
+  diag join("\n",
+    "\n*** WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING ***\n",
+    "The following REQUIRED prerequisites were not satisfied:\n",
+    @dep_errors,
+    "\n"
+  );
 }
 
 pass;
 
-# vim: ts=2 sts=2 sw=2 et:
+# vim: ts=4 sts=4 sw=4 et:
@@ -2,7 +2,7 @@
 use strict;
 #use warnings;
 
-use Test::More tests =>  39 ;
+use Test::More tests => 39;
 use File::Path 'rmtree';
 use File::Basename 'dirname';
 use Cwd 'abs_path';
@@ -16,19 +16,18 @@ sub absdir { canonpath( abs_path( shift || curdir() ) ); }
 # Test import
 #--------------------------------------------------------------------------#
 
-BEGIN { use_ok( 'File::pushd' ); }
+BEGIN { use_ok('File::pushd'); }
 can_ok( 'main', 'pushd', 'tempd' );
 
 #--------------------------------------------------------------------------#
 # Setup
 #--------------------------------------------------------------------------#
 
-
 my ( $new_dir, $temp_dir, $err );
 my $original_dir = absdir();
-my $target_dir = 't';
-my $expected_dir = absdir( catdir($original_dir,$target_dir) );
-my $nonexistant = 'DFASDFASDFASDFAS';
+my $target_dir   = 't';
+my $expected_dir = absdir( catdir( $original_dir, $target_dir ) );
+my $nonexistant  = 'DFASDFASDFASDFAS';
 
 #--------------------------------------------------------------------------#
 # Test error handling on bad target
@@ -36,8 +35,7 @@ my $nonexistant = 'DFASDFASDFASDFAS';
 
 eval { $new_dir = pushd($nonexistant) };
 $err = $@;
-like( $@, '/\\ACan\'t/',
-    "pushd to nonexistant directory croaks" );
+like( $@, '/\\ACan\'t/', "pushd to nonexistant directory croaks" );
 
 #--------------------------------------------------------------------------#
 # Test changing to relative path directory
@@ -61,14 +59,10 @@ is( "$new_dir", $expected_dir, "object stringifies" );
 
 undef $new_dir;
 
-is( absdir(), $original_dir,
-    "revert directory when variable goes out of scope"
-);
+is( absdir(), $original_dir, "revert directory when variable goes out of scope" );
 
 #--------------------------------------------------------------------------#
 
-
-
 # Test changing to absolute path directory and reverting
 #--------------------------------------------------------------------------#
 
@@ -76,111 +70,92 @@ $new_dir = pushd($expected_dir);
 is( absdir(), $expected_dir, "change directory on pushd (absolute path)" );
 
 undef $new_dir;
-is( absdir(), $original_dir,
-    "revert directory when variable goes out of scope"
-);
+is( absdir(), $original_dir, "revert directory when variable goes out of scope" );
 
 #--------------------------------------------------------------------------#
 # Test changing upwards
 #--------------------------------------------------------------------------#
 
-$expected_dir = absdir(updir());
-$new_dir = pushd(updir());
+$expected_dir = absdir( updir() );
+$new_dir      = pushd( updir() );
 
 is( absdir(), $expected_dir, "change directory on pushd (upwards)" );
 undef $new_dir;
-is( absdir(), $original_dir,
-    "revert directory when variable goes out of scope"
-);
+is( absdir(), $original_dir, "revert directory when variable goes out of scope" );
 
 #--------------------------------------------------------------------------#
 # Test changing to root
 #--------------------------------------------------------------------------#
 
-
 $new_dir = pushd( rootdir() );
 
-is( absdir(), absdir( rootdir() ),
-    "change directory on pushd (rootdir)" );
+is( absdir(), absdir( rootdir() ), "change directory on pushd (rootdir)" );
 undef $new_dir;
-is( absdir(), $original_dir,
-    "revert directory when variable goes out of scope"
-);
+is( absdir(), $original_dir, "revert directory when variable goes out of scope" );
 
 #--------------------------------------------------------------------------#
 # Test with options
 #--------------------------------------------------------------------------#
 
-$new_dir = pushd($expected_dir , { untaint_pattern => qr{^([-\w./]+)$} } );
+$new_dir = pushd( $expected_dir, { untaint_pattern => qr{^([-\w./]+)$} } );
 is( absdir(), $expected_dir, "change directory on pushd (custom untaint)" );
 undef $new_dir;
-is( absdir(), $original_dir,
-    "revert directory when variable goes out of scope"
-);
-
+is( absdir(), $original_dir, "revert directory when variable goes out of scope" );
 
 #--------------------------------------------------------------------------#
 # Test changing in place
 #--------------------------------------------------------------------------#
 
-$new_dir = pushd( );
+$new_dir = pushd();
 
-is( absdir(), $original_dir,
-    "pushd with no argument doesn't change directory"
-);
+is( absdir(), $original_dir, "pushd with no argument doesn't change directory" );
 chdir "t";
-is( absdir(), absdir( catdir( $original_dir, "t" ) ) ,
+is(
+    absdir(),
+    absdir( catdir( $original_dir, "t" ) ),
     "changing manually to another directory"
 );
 undef $new_dir;
-is( absdir(), $original_dir,
-    "revert directory when variable goes out of scope"
-);
+is( absdir(), $original_dir, "revert directory when variable goes out of scope" );
 
 #--------------------------------------------------------------------------#
 # Test changing to temporary dir
 #--------------------------------------------------------------------------#
 
-$new_dir = tempd();
+$new_dir  = tempd();
 $temp_dir = "$new_dir";
 
-ok( absdir() ne $original_dir,
-    "tempd changes to new temporary directory" );
+ok( absdir() ne $original_dir, "tempd changes to new temporary directory" );
 
 undef $new_dir;
-is( absdir(), $original_dir,
-    "revert directory when variable goes out of scope"
-);
+is( absdir(), $original_dir, "revert directory when variable goes out of scope" );
 
-ok( ! -e $temp_dir, "temporary directory removed" );
+ok( !-e $temp_dir, "temporary directory removed" );
 
 #--------------------------------------------------------------------------#
 # Test changing to temporary dir but preserving it
 #--------------------------------------------------------------------------#
 
-$new_dir = tempd();
+$new_dir  = tempd();
 $temp_dir = "$new_dir";
 
-ok( absdir() ne $original_dir,
-    "tempd changes to new temporary directory" );
+ok( absdir() ne $original_dir, "tempd changes to new temporary directory" );
 
 ok( $new_dir->preserve(1), "mark temporary directory for preservation" );
 
 undef $new_dir;
-is( absdir(), $original_dir,
-    "revert directory when variable goes out of scope"
-);
+is( absdir(), $original_dir, "revert directory when variable goes out of scope" );
 
 ok( -e $temp_dir, "temporary directory preserved" );
 
-ok( rmtree( $temp_dir ), "temporary directory manually cleaned up" );
+ok( rmtree($temp_dir), "temporary directory manually cleaned up" );
 
 #--------------------------------------------------------------------------#
 # Test changing to temporary dir but preserving it *outside the process*
 #--------------------------------------------------------------------------#
 
 my $program_file = File::Temp->new();
-my $lib = absdir("lib");
+my $lib          = absdir("lib");
 
 print {$program_file} <<"END_PROGRAM";
 use lib "$lib";
@@ -210,45 +185,42 @@ ok( length $clean_tmp, "got a temp directory name from subproces" );
 
 ok( -e $clean_tmp, "temporary directory preserved outside subprocess" );
 
-ok( rmtree( $clean_tmp ), "temporary directory manually cleaned up" );
+ok( rmtree($clean_tmp), "temporary directory manually cleaned up" );
 
 #--------------------------------------------------------------------------#
 # Test changing to temporary dir, preserve it, then revert
 #--------------------------------------------------------------------------#
 
-$new_dir = tempd();
+$new_dir  = tempd();
 $temp_dir = "$new_dir";
 
-ok( absdir() ne $original_dir,
-    "tempd changes to new temporary directory" );
+ok( absdir() ne $original_dir, "tempd changes to new temporary directory" );
 
-ok( $new_dir->preserve, "mark temporary directory for preservation" );
-ok( ! $new_dir->preserve(0), "mark temporary directory for removal" );
+ok( $new_dir->preserve,     "mark temporary directory for preservation" );
+ok( !$new_dir->preserve(0), "mark temporary directory for removal" );
 
 undef $new_dir;
-is( absdir(), $original_dir,
-    "revert directory when variable goes out of scope"
-);
+is( absdir(), $original_dir, "revert directory when variable goes out of scope" );
 
-ok( ! -e $temp_dir, "temporary directory removed" );
+ok( !-e $temp_dir, "temporary directory removed" );
 #--------------------------------------------------------------------------#
 # Test preserve failing on non temp directory
 #--------------------------------------------------------------------------#
 
 $new_dir = pushd( catdir( $original_dir, $target_dir ) );
 
-is( absdir(), absdir( catdir( $original_dir, $target_dir ) ),
-    "change directory on pushd" );
+is(
+    absdir(),
+    absdir( catdir( $original_dir, $target_dir ) ),
+    "change directory on pushd"
+);
 $temp_dir = "$new_dir";
 
-ok( $new_dir->preserve, "regular pushd is automatically preserved" );
+ok( $new_dir->preserve,    "regular pushd is automatically preserved" );
 ok( $new_dir->preserve(0), "can't mark regular pushd for deletion" );
 
 undef $new_dir;
-is( absdir(), $original_dir,
-    "revert directory when variable goes out of scope"
-);
+is( absdir(), $original_dir, "revert directory when variable goes out of scope" );
 
 ok( -e $expected_dir, "original directory not removed" );
 
-
@@ -4,8 +4,8 @@ use Test::More;
 use File::pushd;
 
 eval {
-     my $dir = tempd;
-     die( "error\n" );
+    my $dir = tempd;
+    die("error\n");
 };
 
 my $err = $@;
@@ -15,7 +15,7 @@ done_testing;
 #
 # This file is part of File-pushd
 #
-# This software is Copyright (c) 2013 by David A Golden.
+# This software is Copyright (c) 2014 by David A Golden.
 #
 # This is free software, licensed under:
 #
@@ -0,0 +1,5 @@
+; Install Code::TidyAll
+; run "tidyall -a" to tidy all files
+; run "tidyall -g" to tidy only files modified from git
+[PerlTidy]
+select = {lib,t}/**/*.{pl,pm,t}
@@ -0,0 +1,53 @@
+use 5.006;
+use strict;
+use warnings;
+
+# this test was generated with Dist::Zilla::Plugin::Test::Compile 2.039
+
+use Test::More  tests => 1 + ($ENV{AUTHOR_TESTING} ? 1 : 0);
+
+
+
+my @module_files = (
+    'File/pushd.pm'
+);
+
+
+
+# fake home for cpan-testers
+use File::Temp;
+local $ENV{HOME} = File::Temp::tempdir( CLEANUP => 1 );
+
+
+my $inc_switch = -d 'blib' ? '-Mblib' : '-Ilib';
+
+use File::Spec;
+use IPC::Open3;
+use IO::Handle;
+
+open my $stdin, '<', File::Spec->devnull or die "can't open devnull: $!";
+
+my @warnings;
+for my $lib (@module_files)
+{
+    # see L<perlfaq8/How can I capture STDERR from an external command?>
+    my $stderr = IO::Handle->new;
+
+    my $pid = open3($stdin, '>&STDERR', $stderr, $^X, $inc_switch, '-e', "require q[$lib]");
+    binmode $stderr, ':crlf' if $^O eq 'MSWin32';
+    my @_warnings = <$stderr>;
+    waitpid($pid, 0);
+    is($?, 0, "$lib loaded ok");
+
+    if (@_warnings)
+    {
+        warn @_warnings;
+        push @warnings, @_warnings;
+    }
+}
+
+
+
+is(scalar(@warnings), 0, 'no warnings found') if $ENV{AUTHOR_TESTING};
+
+
@@ -2,21 +2,23 @@ use strict;
 use warnings;
 use Test::More;
 
-# generated by Dist::Zilla::Plugin::Test::PodSpelling 2.004003
-eval "use Test::Spelling 0.12; use Pod::Wordlist::hanekomu; 1" or die $@;
+# generated by Dist::Zilla::Plugin::Test::PodSpelling 2.006007
+use Test::Spelling 0.12;
+use Pod::Wordlist;
 
 
 add_stopwords(<DATA>);
 all_pod_files_spelling_ok( qw( bin lib  ) );
 __DATA__
-Diab
-Jerius
 destructor
 pathname
 tempd
 David
 Golden
 dagolden
+Diab
+Jerius
+djerius
 lib
 File
 pushd
@@ -1,7 +1,6 @@
 #!perl
+# This file was automatically generated by Dist::Zilla::Plugin::MetaTests.
 
-use Test::More;
+use Test::CPAN::Meta;
 
-eval "use Test::CPAN::Meta";
-plan skip_all => "Test::CPAN::Meta required for testing META.yml" if $@;
 meta_yaml_ok();
@@ -1,13 +1,7 @@
 #!perl
+# This file was automatically generated by Dist::Zilla::Plugin::PodCoverageTests.
 
-use Test::More;
-
-eval "use Test::Pod::Coverage 1.08";
-plan skip_all => "Test::Pod::Coverage 1.08 required for testing POD coverage"
-  if $@;
-
-eval "use Pod::Coverage::TrustPod";
-plan skip_all => "Pod::Coverage::TrustPod required for testing POD coverage"
-  if $@;
+use Test::Pod::Coverage 1.08;
+use Pod::Coverage::TrustPod;
 
 all_pod_coverage_ok({ coverage_class => 'Pod::Coverage::TrustPod' });
@@ -1,7 +1,6 @@
 #!perl
+# This file was automatically generated by Dist::Zilla::Plugin::PodSyntaxTests.
 use Test::More;
-
-eval "use Test::Pod 1.41";
-plan skip_all => "Test::Pod 1.41 required for testing POD" if $@;
+use Test::Pod 1.41;
 
 all_pod_files_ok();
@@ -1,5 +1,8 @@
 #!perl
 
+use strict;
+use warnings;
+
 use Test::More;
 
 eval 'use Test::Portability::Files';