git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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

From
AMAbhijit Menon-Sen <ams@toroid.org>
Date
Sep 1, 2008, 10:04 UTC
Message-ID
<20080901100435.GC6555@toroid.org>
In-Reply-To
<vpqvdxggpw6.fsf@bauges.imag.fr>

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@toroid.org>
---
At 2008-09-01 11:46:17 +0200, Matthieu.Moy@imag.fr wrote:
Show 7 quoted lines
>
> > 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
Previous: Matthieu MoyNext: Tom G. Christensen
Message 3 of 23 in “Git 1.6.0.1 breaks git-svn with perl 5.8.0”
  1. Tom G. ChristensenSep 1, 2008
  2. Matthieu MoySep 1, 2008
  3. Git.pm: Require File::Temp 0.14 for new()Abhijit Menon-Sen, Sep 1, 2008
  4. Tom G. ChristensenSep 1, 2008
  5. Git.pm: Use File::Temp->tempfile instead of ->newAbhijit Menon-Sen, Sep 1, 2008
  6. Tom G. ChristensenSep 1, 2008
  7. Junio C HamanoSep 7, 2008
  8. Abhijit Menon-SenSep 7, 2008
  9. Marcus GriepSep 7, 2008
  10. Abhijit Menon-SenSep 8, 2008
  11. Git.pm: Use File::Temp->tempfile instead of ->newMarcus Griep, Sep 8, 2008
  12. Git.pm: Use File::Temp->tempfile instead of ->newMarcus Griep, Sep 8, 2008
  13. Eric WongSep 9, 2008
  14. Junio C HamanoSep 10, 2008
  15. Eric WongSep 10, 2008
  16. Abhijit Menon-SenSep 9, 2008
  17. Marcus GriepSep 9, 2008
  18. Tom G. ChristensenSep 9, 2008
  19. Marcus GriepSep 9, 2008
  20. Tom G. ChristensenSep 10, 2008
  21. git-svn: Fixes my() parameter list syntax error in pre-5.8 PerlMarcus Griep, Sep 10, 2008
  22. Marcus GriepSep 10, 2008
  23. Tom G. ChristensenSep 1, 2008

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.