From: Ansgar Burchardt <ansgar@43-1.org>
Date: Fri, 30 Apr 2010 20:31:08 +0900
Origin: vendor
Forwarded: not-needed
Subject: Remove build-dep on Dir::Self by including the relevant method.
 .
 The function __DIR__ is taken from Dir::Self 0.10 which has the following
 copyright information:
 .
  Copyright (C) 2007, 2008 by Lukas Mai
 .
  This library is free software; you can redistribute it and/or modify it under
  the same terms as Perl itself, either Perl version 5.8.8 or, at your option,
  any later version of Perl 5 you may have available.

--- a/t/bcrypt.t
+++ b/t/bcrypt.t
@@ -2,9 +2,15 @@
 use warnings;
 use Test::More;
 use utf8;
-use Dir::Self;
 use File::Spec;
 use File::Temp 'tempdir';
+
+sub __DIR__ () {
+  my $level = shift || 0;
+  my $file = (caller $level)[1];
+  File::Spec->rel2abs(join '', (File::Spec->splitpath($file))[0, 1])
+}
+
 use lib File::Spec->catdir(__DIR__, 'lib');
 
 BEGIN {
--- a/t/digest_sha.t
+++ b/t/digest_sha.t
@@ -2,9 +2,15 @@
 use warnings;
 use Test::More;
 
-use Dir::Self;
 use File::Spec;
 use File::Temp 'tempdir';
+
+sub __DIR__ () {
+  my $level = shift || 0;
+  my $file = (caller $level)[1];
+  File::Spec->rel2abs(join '', (File::Spec->splitpath($file))[0, 1])
+}
+
 use lib File::Spec->catdir(__DIR__, 'lib');
 
 use DigestTest::Schema;
--- a/t/open_pgp.t
+++ b/t/open_pgp.t
@@ -2,9 +2,15 @@
 use warnings;
 use Test::More;
 
-use Dir::Self;
 use File::Spec;
 use File::Temp 'tempdir';
+
+sub __DIR__ () {
+  my $level = shift || 0;
+  my $file = (caller $level)[1];
+  File::Spec->rel2abs(join '', (File::Spec->splitpath($file))[0, 1])
+}
+
 use lib File::Spec->catdir(__DIR__, 'lib');
 use DigestTest::Schema;
 
--- a/t/whirlpool.t
+++ b/t/whirlpool.t
@@ -2,9 +2,15 @@
 use warnings;
 use Test::More;
 
-use Dir::Self;
 use File::Spec;
 use File::Temp 'tempdir';
+
+sub __DIR__ () {
+  my $level = shift || 0;
+  my $file = (caller $level)[1];
+  File::Spec->rel2abs(join '', (File::Spec->splitpath($file))[0, 1])
+}
+
 use lib File::Spec->catdir(__DIR__, 'lib');
 use DigestTest::Schema;
 
