[PATCH] Git.pm: Require File::Temp 0.14 for new()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



File::Temp->new() was introduced in File::Temp 0.14, but 5.8.0 shipped
with File::Temp 0.13, as pointed out by Tom G. Christensen. Since the
dependency is optional anyway, we can require 0.14.

Signed-off-by: Abhijit Menon-Sen <ams@xxxxxxxxxx>
---

At 2008-09-01 11:46:17 +0200, Matthieu.Moy@xxxxxxx wrote:
>
> > The problem is that Git.pm depends on the "new" method of File::Temp
> > introduced in 0.14. [...]
> 
> Isn't that fixed by c14c8ceb13b299892f286757e22e6af4f6cffab5 ?
> (Git.pm: Make File::Spec and File::Temp requirement lazy, a few
> commits before 1.6.0)

No, because _verify_require only checks that File::Temp exists, not that
File::Temp 0.14 exists. This patch fixes that.

-- ams

 perl/Git.pm |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/perl/Git.pm b/perl/Git.pm
index 102e6a4..4e901b6 100644
--- a/perl/Git.pm
+++ b/perl/Git.pm
@@ -1032,7 +1032,10 @@ sub _temp_cache {
 }
 
 sub _verify_require {
-	eval { require File::Temp; require File::Spec; };
+	eval {
+            require File::Spec;
+            require File::Temp; File::Temp->VERSION(0.14);
+        };
 	$@ and throw Error::Simple($@);
 }
 
-- 
1.6.0.49.gea35
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux