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

[git wiki PATCH] "Modernizing and expanding Git.pm" project

From
Jakub Narebski <jnareb@gmail.com>
Date
Mar 3, 2012, 21:14 UTC
Message-ID
<1330809281-25774-1-git-send-email-jnareb@gmail.com>
In-Reply-To
<20120302091114.GA3984@sigill.intra.peff.net>

--- I'm not sure if my Markdown is entirely correct.

 SoC-2012-Ideas.md |   41 +++++++++++++++++++++++++++++++++++++++++
 1 files changed, 41 insertions(+), 0 deletions(-)
diff --git a/SoC-2012-Ideas.md b/SoC-2012-Ideas.md
index 02a8fc7..f56b601 100644
--- a/SoC-2012-Ideas.md
+++ b/SoC-2012-Ideas.md
@@ -181,3 +181,44 @@ this project.
 
 Proposed by: Thomas Rast  
 Possible mentor(s): Thomas Rast
+
+Modernizing and expanding Git.pm
+--------------------------------
+
+Git.pm was created in 2006 to make it easy to call git commands from
+Perl scripts safely, in a portable way (including workarounds required
+for ActiveState Perl on MS Windows).  Its error handling via exceptions
+also comes from that year.
+
+Git.pm module uses Error (and Error::Simple) for its exception handling.
+Unfortunately, while it might looked like a good choice in 2006, Error
+module is deprecated:
+
+> WARNING
+> -------
+>
+> Using the "Error" module is **no longer recommended** due to the
+> black-magical nature of its syntactic sugar, which often tends to
+> break. Its maintainers have stopped actively writing code that uses
+> it, and discourage people from doing so. See the "SEE ALSO" section
+> below for better recommendations.
+
+Nowadays the recommended solution to exception handling in Perl are
+Try::Tiny (or TryCatch, but I don't think Git.pm would need this more
+heavyweight module) for capturing and handling exceptions, and
+Exception::Class (or Throwable, but that requires heavyweight Moose
+object system) for throwing OO exceptions.
+
+The major goal would be to update Git.pm to modern Perl conventions,
+amon others moving from Error / Error::Simple to Try::Tiny and
+Exception::Class, preserving backwards compatibility, but perhaps also
+adding a better interface and using it in git commands implemented in
+Perl.
+
+Other optional goals would be to extend Git.pm, for example adding
+Git::Config module which would read git configuration once like gitweb
+does, or Git::Commit module for parsing commit objects, etc.
+
+Programming language: Perl  
+Proposed by: Jakub Narębski  
+Possible mentor(s): Jakub Narębski (?)
-- 
1.7.9
Previous: Jeff KingNext: Jeff King
Message 5 of 20 in “GSoC 2012 application process”
  1. Jeff KingMar 2, 2012
  2. Nguyen Thai Ngoc DuyMar 2, 2012
  3. Junio C HamanoMar 2, 2012
  4. Jeff KingMar 3, 2012
  5. "Modernizing and expanding Git.pm" projectJakub Narebski, Mar 3, 2012
  6. Jeff KingMar 3, 2012
  7. Teaching "--3way" to "git apply"Junio C Hamano, Mar 4, 2012
  8. Jeff KingMar 5, 2012
  9. Thomas RastMar 5, 2012
  10. Jeff KingMar 5, 2012
  11. Matthieu MoyMar 5, 2012
  12. Jeff KingMar 5, 2012
  13. Matthieu MoyMar 5, 2012
  14. Jeff KingMar 5, 2012
  15. GSoC backup adminJeff King, Mar 7, 2012
  16. Shawn PearceMar 7, 2012
  17. "Use JavaScript library / framework in gitweb" projectJakub Narebski, Mar 8, 2012
  18. Jeff KingMar 9, 2012
  19. "`git instaweb --serve`" projectJakub Narebski, Mar 10, 2012
  20. "Graphical diff in git-gui" projectJakub Narebski, Mar 11, 2012

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.